Skip to content

Commit

Permalink
Merge pull request #96 from vext01/while-loops
Browse files Browse the repository at this point in the history
Ensure backwards jumps get a yk_location.
  • Loading branch information
ltratt authored Nov 19, 2024
2 parents 3bad330 + eb13d42 commit 7696f18
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lvm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1222,8 +1222,11 @@ void luaV_execute (lua_State *L, CallInfo *ci) {
vmfetch();
#ifdef USE_YK
YkLocation *ykloc = NULL;
if (GET_OPCODE(i) == OP_FORLOOP || GET_OPCODE(i) == OP_TFORLOOP)
if ((GET_OPCODE(i) == OP_FORLOOP) ||
(GET_OPCODE(i) == OP_TFORLOOP) ||
((GET_OPCODE(i) == OP_JMP) && (GETARG_sJ(i) < 0))) {
ykloc = &cl->p->yklocs[pcRel(pc, cl->p)];
}
yk_mt_control_point(G(L)->yk_mt, ykloc);
#endif
#if 0
Expand Down

0 comments on commit 7696f18

Please sign in to comment.