Skip to content

Commit

Permalink
Micro-opt exit_handler
Browse files Browse the repository at this point in the history
Since many things can go wrong very quickly here, we tread with baby steps.
  • Loading branch information
lizmat committed Jan 12, 2018
1 parent 79600d6 commit 0415bb5
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/Perl6/Metamodel/BOOTSTRAP.nqp
Expand Up @@ -3245,10 +3245,10 @@ nqp::sethllconfig('perl6', nqp::hash(
my @exceptions;
unless nqp::isnull(@leaves) {
my int $n := nqp::elems(@leaves);
my int $i := 0;
my int $i := -1;
my int $run;
my $phaser;
while $i < $n {
while ++$i < $n {
$phaser := nqp::decont(nqp::atpos(@leaves, $i));
$run := 1;
unless nqp::isnull(@keeps) {
Expand Down Expand Up @@ -3280,15 +3280,14 @@ nqp::sethllconfig('perl6', nqp::hash(
#?endif
CATCH { nqp::push(@exceptions, $_) }
}
++$i;
}
}

my @posts := nqp::atkey(%phasers, 'POST');
unless nqp::isnull(@posts) {
my int $n := nqp::elems(@posts);
my int $i := 0;
while $i < $n {
my int $i := -1;
while ++$i < $n {
#?if jvm
nqp::atpos(@posts, $i)(nqp::ifnull($resultish, Mu));
#?endif
Expand All @@ -3297,7 +3296,6 @@ nqp::sethllconfig('perl6', nqp::hash(
nqp::ifnull($resultish, Mu));
#?endif
CATCH { nqp::push(@exceptions, $_); last; }
++$i;
}
}

Expand Down

0 comments on commit 0415bb5

Please sign in to comment.