Skip to content

Commit ee56eb3

Browse files
authored
Merge pull request #455 from jstuder-gh/chain_rm_decont
Rakudo Issue 1886: Remove erroneous decont op in chain compilation
2 parents cf3cfb9 + c9fa821 commit ee56eb3

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/vm/moar/QAST/QASTOperationsMAST.nqp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ my $chain_gen := sub ($qastcomp, $op) {
639639

640640
# Check if callee sub in name, if not first child is callee, not arg
641641
my $arg_idx;
642-
my &get_arg_idx := -> $cq { nqp::if( $cq.name, 0, 1 ) };
642+
my &get_arg_idx := -> $cq { $cq.name ?? 0 !! 1 };
643643

644644
while nqp::istype($cqast, QAST::Op)
645645
&& ($cqast.op eq 'chain' || $cqast.op eq 'chainstatic') {
@@ -651,7 +651,6 @@ my $chain_gen := sub ($qastcomp, $op) {
651651
my @ops;
652652
my $regalloc := $*REGALLOC;
653653
my $res_reg := $regalloc.fresh_register($MVM_reg_obj);
654-
my $decont_reg := $regalloc.fresh_register($MVM_reg_obj);
655654
my $endlabel := MAST::Label.new();
656655

657656
$cqast := nqp::pop(@clist);
@@ -682,10 +681,8 @@ my $chain_gen := sub ($qastcomp, $op) {
682681
:result($res_reg),
683682
$acomp.result_reg, $bcomp.result_reg
684683
));
685-
push_op(@ops, 'decont', $decont_reg, $callee.result_reg);
686684

687685
$regalloc.release_register($callee.result_reg, $MVM_reg_obj);
688-
$regalloc.release_register($decont_reg, $MVM_reg_obj);
689686
$regalloc.release_register($acomp.result_reg, $MVM_reg_obj);
690687

691688
if @clist {

0 commit comments

Comments
 (0)