-
-
Save timo/3dc2ff93c49e0fd241ae to your computer and use it in GitHub Desktop.
unapplied diff i had lying around
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/vm/moar/HLL/Backend.nqp b/src/vm/moar/HLL/Backend.nqp | |
index cbdf7b4..dd0331b 100644 | |
--- a/src/vm/moar/HLL/Backend.nqp | |
+++ b/src/vm/moar/HLL/Backend.nqp | |
@@ -40,9 +40,27 @@ class HLL::Backend::MoarVM { | |
method run_profiled($what) { | |
self.ensure_prof_routines(); | |
$prof_start_sub(nqp::hash()); | |
- my $res := $what(); | |
+ my $an_exception; | |
+ my $res; | |
+ | |
+ nqp::gethllsym('perl6', '@END_PHASERS').unshift({ | |
+ my $data := $prof_end_sub(); | |
+ self.dump_profile_data($data); | |
+ }); | |
+ | |
+ try { | |
+ $res := $what(); | |
+ CATCH { | |
+ $an_exception := $_ | |
+ } | |
+ } | |
+ | |
my $data := $prof_end_sub(); | |
self.dump_profile_data($data); | |
+ | |
+ if $an_exception { | |
+ nqp::die($an_exception); | |
+ } | |
$res; | |
} | |
method dump_profile_data($data) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment