Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix a .DEFINITE code-gen bug.
Should not blindly re-use registers that may belong to locals.
  • Loading branch information
jnthn committed Jul 11, 2014
1 parent e83c5a3 commit e0cbe53
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/vm/moar/Perl6/Ops.nqp
Expand Up @@ -180,11 +180,13 @@ $ops.add_hll_op('perl6', 'p6definite', -> $qastcomp, $op {
push_ilist(@ops, $value_res);
nqp::push(@ops, MAST::Op.new( :op('decont'), $value_res.result_reg, $value_res.result_reg ));
my $tmp_reg := $*REGALLOC.fresh_i();
my $res_reg := $*REGALLOC.fresh_o();
nqp::push(@ops, MAST::Op.new( :op('isconcrete'), $tmp_reg, $value_res.result_reg ));
nqp::push(@ops, MAST::ExtOp.new( :op('p6bool'), :cu($*MAST_COMPUNIT),
$value_res.result_reg, $tmp_reg ));
$res_reg, $tmp_reg ));
$*REGALLOC.release_register($value_res.result_reg, $MVM_reg_obj);
$*REGALLOC.release_register($tmp_reg, $MVM_reg_int64);
MAST::InstructionList.new(@ops, $value_res.result_reg, $MVM_reg_obj)
MAST::InstructionList.new(@ops, $res_reg, $MVM_reg_obj)
});
$ops.add_hll_moarop_mapping('perl6', 'p6capturelex', 'p6capturelex');
$ops.add_hll_op('perl6', 'p6bindassert', -> $qastcomp, $op {
Expand Down

0 comments on commit e0cbe53

Please sign in to comment.