Skip to content

Commit cb1ed30

Browse files
committed
Emit osrpoint OSR hint ops in loop bodies.
1 parent 816447f commit cb1ed30

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/vm/moar/QAST/QASTOperationsMAST.nqp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,6 +1042,7 @@ for ('', 'repeat_') -> $repness {
10421042
# Emit the loop body; stash the result.
10431043
my $body := $qastcomp.coerce(@comp_ops[1], $res_kind);
10441044
nqp::push(@loop_il, $redo_lbl);
1045+
push_op(@loop_il, 'osrpoint');
10451046
push_ilist(@loop_il, $body);
10461047

10471048
# If there's a third child, evaluate it as part of the
@@ -1169,6 +1170,7 @@ QAST::MASTOperations.add_core_op('for', -> $qastcomp, $op {
11691170
$arity := $arity - 1;
11701171
}
11711172
nqp::push($val_il, $lbl_redo);
1173+
push_op($val_il, 'osrpoint');
11721174
$val_il := MAST::InstructionList.new($val_il, MAST::VOID, $MVM_reg_void);
11731175

11741176
# Now do block invocation.

0 commit comments

Comments
 (0)