Skip to content

Commit

Permalink
[js] Fix nqp::p6capturelex when used with nqp::handle.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmurias committed Jan 19, 2017
1 parent 2da32b6 commit c90ad2a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/vm/js/Perl6/Ops.nqp
Expand Up @@ -97,7 +97,10 @@ $ops.add_simple_op('p6decontrv', $ops.OBJ, [$ops.OBJ, $ops.OBJ]);
$ops.add_simple_op('p6definite', $ops.OBJ, [$ops.OBJ], :decont(0));

$ops.add_simple_op('p6captureouters2', $ops.OBJ, [$ops.OBJ, $ops.OBJ], :ctx);
$ops.add_simple_op('p6capturelex', $ops.OBJ, [$ops.OBJ], :ctx);
$ops.add_simple_op('p6capturelex', $ops.OBJ, [$ops.OBJ], :side_effects, sub ($codeObj) {
# Use $*BLOCK.ctx instead of $*CTX so it doesn't get overwriten by exception handling
"nqp.op.p6capturelex({$*BLOCK.ctx}, $codeObj)"
});

$ops.add_simple_op('p6bindassert', $ops.OBJ, [$ops.OBJ, $ops.OBJ], :ctx);
$ops.add_simple_op('p6store', $ops.OBJ, [$ops.OBJ, $ops.OBJ], :ctx, :side_effects);
Expand Down

0 comments on commit c90ad2a

Please sign in to comment.