Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Some CATCH/CONTROL JVM fixes, after $_ changes.
  • Loading branch information
jnthn committed Jun 30, 2013
1 parent e7ad774 commit 5b5225b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Perl6/Actions.nqp
Expand Up @@ -5563,8 +5563,10 @@ class Perl6::Actions is HLL::Actions does STDActions {

# unshift handler preamble: create exception object and store it into $_
my $exceptionreg := $handler.unique('exception_');
my $handler_preamble := QAST::Stmts.new(
QAST::Var.new( :scope('local'), :name($exceptionreg), :decl('param') ),
$handler<past_block>[0].unshift(QAST::Var.new(
:scope('local'), :name($exceptionreg), :decl('param')
));
$handler<past_block>[0].push(QAST::Stmts.new(
QAST::Op.new(
:op('bind'),
QAST::Var.new( :scope('lexical'), :name('$_') ),
Expand All @@ -5577,8 +5579,7 @@ class Perl6::Actions is HLL::Actions does STDActions {
QAST::Op.new( :op('getlexouter'), QAST::SVal.new( :value('$!') ) ),
QAST::Var.new( :scope('lexical'), :name('$_') ),
)
);
$handler<past_block>.unshift($handler_preamble);
));

# If the handler has a succeed handler, then make sure we sink
# the exception it will produce.
Expand Down

0 comments on commit 5b5225b

Please sign in to comment.