-
-
Save FROGGS/98e1a97434c3753dc081 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/home/froggs/dev/nqp/install/bin/moar --libpath=gen/moar/stage1 gen/moar/stage1/nqp.moarvm --bootstrap --module-path=gen/moar/stage2 --setting=NULL --no-regex-lib --target=mbc \ | |
--output=gen/moar/stage2/NQPCORE.setting.moarvm gen/moar/stage2/NQPCORE.setting | |
This representation (MVMCode) does not support positional access | |
at gen/moar/stage2/nqpmo.nqp:1276 (gen/moar/stage2/nqpmo.moarvm:find_method:101) | |
from gen/moar/stage2/nqpmo.nqp:1086 (gen/moar/stage2/nqpmo.moarvm:publish_boolification_spec:13) | |
from gen/moar/stage2/nqpmo.nqp:850 (gen/moar/stage2/nqpmo.moarvm:compose:159) | |
from gen/moar/stage1/NQP.nqp:563 (gen/moar/stage1/nqp.moarvm:pkg_compose:12) | |
from gen/moar/stage1/NQP.nqp:2811 (gen/moar/stage1/nqp.moarvm:package_def:860) | |
from gen/moar/stage1/QRegex.nqp:1241 (gen/moar/stage1/QRegex.moarvm:!reduce:27) | |
from gen/moar/stage1/QRegex.nqp:1195 (gen/moar/stage1/QRegex.moarvm:!cursor_pass:0) | |
from gen/moar/stage1/NQP.nqp:1209 (gen/moar/stage1/nqp.moarvm:package_def:2480) | |
from <unknown>:1 (gen/moar/stage1/nqp.moarvm:package_declarator:sym<class>:137) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/vm/moar/QAST/QASTOperationsMAST.nqp b/src/vm/moar/QAST/QASTOperationsMAST.nqp | |
index 59dc1bf..f1f6606 100644 | |
--- a/src/vm/moar/QAST/QASTOperationsMAST.nqp | |
+++ b/src/vm/moar/QAST/QASTOperationsMAST.nqp | |
@@ -1092,11 +1092,26 @@ for ('', 'repeat_') -> $repness { | |
$*IMM_ARG($res_reg); | |
} | |
+ my $arr := $qastcomp.as_mast(QAST::Op.new( | |
+ :op('create'), | |
+ QAST::Op.new( :op('hlllist') ) | |
+ )); | |
+ my $arr_reg := $arr.result_reg; | |
+ push_ilist(@loop_il, $arr); | |
+ my $item := $qastcomp.as_mast(QAST::IVal.new( :value(42)), :want($MVM_reg_obj)); | |
+ my $mark := $item.result_reg; | |
+ if $res_kind == $MVM_reg_obj { | |
+ #~ push_op(@loop_il, 'push_o', $arr_reg, $body.result_reg); | |
+ push_ilist(@loop_il, $item); | |
+ push_op(@loop_il, 'push_o', $arr_reg, $mark); | |
+ } | |
+ | |
# Emit the loop body; stash the result. | |
my $body := $qastcomp.coerce(@comp_ops[1], $res_kind); | |
nqp::push(@loop_il, $redo_lbl); | |
push_op(@loop_il, 'osrpoint'); | |
push_ilist(@loop_il, $body); | |
+ push_op(@loop_il, 'push_o', $arr_reg, $mark) if $res_kind == $MVM_reg_obj; | |
# If there's a third child, evaluate it as part of the | |
# "next". | |
@@ -1152,11 +1167,13 @@ for ('', 'repeat_') -> $repness { | |
:label($lablocal) | |
)); | |
nqp::push($il, $done_lbl); | |
- MAST::InstructionList.new($il, $res_reg, $res_kind) | |
+ MAST::InstructionList.new($il, $arr.result_reg, $arr.result_kind) | |
+ #~ MAST::InstructionList.new($il, $res_reg, $res_kind) | |
} | |
else { | |
nqp::push(@loop_il, $done_lbl); | |
- MAST::InstructionList.new(@loop_il, $res_reg, $res_kind) | |
+ MAST::InstructionList.new(@loop_il, $arr.result_reg, $arr.result_kind) | |
+ #~ MAST::InstructionList.new(@loop_il, $res_reg, $res_kind) | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment