Skip to content

Commit

Permalink
Switch NQP away from using lexotic handlers.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Jun 2, 2016
1 parent 3ab1e48 commit e0aae8a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/NQP/Actions.nqp
Expand Up @@ -1140,8 +1140,8 @@ class NQP::Actions is HLL::Actions {

sub wrap_return_handler($ast) {
QAST::Op.new(
:op<lexotic>, :name<RETURN>,
$ast
:op<handlepayload>, $ast,
'RETURN', QAST::Op.new( :op<lastexpayload> )
)
}

Expand Down Expand Up @@ -1659,8 +1659,11 @@ class NQP::Actions is HLL::Actions {
method postfix:sym<.>($/) { make $<dotty>.ast; }

method term:sym<return>($/) {
make QAST::Op.new( :op('call'), :name('RETURN'),
$<EXPR> ?? $<EXPR>.ast !! QAST::WVal.new( :value($*W.find_sym(['NQPMu'])) ));
make QAST::Op.new(
:op('throwpayloadlex'),
QAST::IVal.new( :value(32) ), # s/nqp::const::CONTROL_RETURN/32/ after bootstrap
$<EXPR> ?? $<EXPR>.ast !! QAST::WVal.new( :value($*W.find_sym(['NQPMu'])))
);
}

method prefix:sym<make>($/) {
Expand Down

0 comments on commit e0aae8a

Please sign in to comment.