Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Unboxers should decont.
  • Loading branch information
jnthn committed Nov 23, 2013
1 parent d41d199 commit 2339be2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/vm/moar/QAST/QASTOperationsMAST.nqp
Expand Up @@ -1466,6 +1466,7 @@ QAST::MASTOperations.add_hll_unbox('', $MVM_reg_int64, -> $qastcomp, $reg {
my $il := nqp::list();
my $a := $*REGALLOC.fresh_register($MVM_reg_num64);
my $b := $*REGALLOC.fresh_register($MVM_reg_int64);
push_op($il, 'decont', $reg, $reg);
push_op($il, 'smrt_numify', $a, $reg);
push_op($il, 'coerce_ni', $b, $a);
$*REGALLOC.release_register($a, $MVM_reg_num64);
Expand All @@ -1475,13 +1476,15 @@ QAST::MASTOperations.add_hll_unbox('', $MVM_reg_int64, -> $qastcomp, $reg {
QAST::MASTOperations.add_hll_unbox('', $MVM_reg_num64, -> $qastcomp, $reg {
my $il := nqp::list();
my $res_reg := $*REGALLOC.fresh_register($MVM_reg_num64);
push_op($il, 'decont', $reg, $reg);
push_op($il, 'smrt_numify', $res_reg, $reg);
$*REGALLOC.release_register($reg, $MVM_reg_obj);
MAST::InstructionList.new($il, $res_reg, $MVM_reg_num64)
});
QAST::MASTOperations.add_hll_unbox('', $MVM_reg_str, -> $qastcomp, $reg {
my $il := nqp::list();
my $res_reg := $*REGALLOC.fresh_register($MVM_reg_str);
push_op($il, 'decont', $reg, $reg);
push_op($il, 'smrt_strify', $res_reg, $reg);
$*REGALLOC.release_register($reg, $MVM_reg_obj);
MAST::InstructionList.new($il, $res_reg, $MVM_reg_str)
Expand Down

0 comments on commit 2339be2

Please sign in to comment.