Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use decont_* ops to do unboxing.
  • Loading branch information
jnthn committed Feb 28, 2015
1 parent ba2beff commit 631219a
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion src/vm/jvm/Perl6/Ops.nqp
Expand Up @@ -254,4 +254,24 @@ $ops.add_hll_box('perl6', $RT_STR, -> $qastcomp {
'p6box_s', $TYPE_SMO, $TYPE_STR, $TYPE_TC ));
$il
});
#$ops.force_return_boxing_for_hll('perl6');
QAST::OperationsJAST.add_hll_unbox('perl6', $RT_INT, -> $qastcomp {
my $il := JAST::InstructionList.new();
$il.append($ALOAD_1);
$il.append(JAST::Instruction.new( :op('invokestatic'), $TYPE_OPS,
'decont_i', 'Long', $TYPE_SMO, $TYPE_TC ));
$il
});
QAST::OperationsJAST.add_hll_unbox('perl6', $RT_NUM, -> $qastcomp {
my $il := JAST::InstructionList.new();
$il.append($ALOAD_1);
$il.append(JAST::Instruction.new( :op('invokestatic'), $TYPE_OPS,
'decont_n', 'Double', $TYPE_SMO, $TYPE_TC ));
$il
});
QAST::OperationsJAST.add_hll_unbox('perl6', $RT_STR, -> $qastcomp {
my $il := JAST::InstructionList.new();
$il.append($ALOAD_1);
$il.append(JAST::Instruction.new( :op('invokestatic'), $TYPE_OPS,
'decont_s', $TYPE_STR, $TYPE_SMO, $TYPE_TC ));
$il
});

0 comments on commit 631219a

Please sign in to comment.