Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Move THE_END to Rakudo::Internals
  • Loading branch information
lizmat committed Oct 6, 2015
1 parent 68f233a commit c981530
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/core/Exception.pm
Expand Up @@ -272,7 +272,7 @@ do {
nqp::printfh($err, $e.Str);
nqp::printfh($err, "\n");
}
THE_END();
Rakudo::Internals::THE_END();
CONTROL { when CX::Warn { .resume } }
}
if $! {
Expand Down
6 changes: 6 additions & 0 deletions src/core/Rakudo/Internals.pm
Expand Up @@ -81,6 +81,12 @@ my module Rakudo::Internals {
}
0;
}

our sub THE_END {
my @END := nqp::p6bindattrinvres(nqp::create(List), List, '$!reified',
nqp::getcurhllsym("@END_PHASERS"));
for @END -> $end { $end() };
}
}

# vim: ft=perl6 expandtab sw=4
8 changes: 1 addition & 7 deletions src/core/control.pm
Expand Up @@ -241,18 +241,12 @@ sub exit($status = 0) {
$exit = $status;

once {
THE_END();
Rakudo::Internals::THE_END();
nqp::exit(nqp::unbox_i($exit.Int));
}
$exit;
}

sub THE_END {
my @END := nqp::p6bindattrinvres(nqp::create(List), List, '$!reified',
nqp::getcurhllsym("@END_PHASERS"));
for @END -> $end { $end() };
}

constant Inf = nqp::p6box_n(nqp::inf());
constant NaN = nqp::p6box_n(nqp::nan());

Expand Down

0 comments on commit c981530

Please sign in to comment.