mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-04-20 05:53:26 +00:00
Invalidate SCEV entry when it is out of scope.
This commit is contained in:
parent
b94fbfbee9
commit
7c964b7ffa
@ -976,6 +976,8 @@ void lj_record_ret(jit_State *J, BCReg rbase, ptrdiff_t gotresults)
|
|||||||
emitir(IRTG(IR_RETF, IRT_PGC), trpt, trpc);
|
emitir(IRTG(IR_RETF, IRT_PGC), trpt, trpc);
|
||||||
J->retdepth++;
|
J->retdepth++;
|
||||||
J->needsnap = 1;
|
J->needsnap = 1;
|
||||||
|
/* scev entry is invalid after returning to lower frame. */
|
||||||
|
J->scev.idx = REF_NIL;
|
||||||
lj_assertJ(J->baseslot == 1+LJ_FR2, "bad baseslot for return");
|
lj_assertJ(J->baseslot == 1+LJ_FR2, "bad baseslot for return");
|
||||||
/* Shift result slots up and clear the slots of the new frame below. */
|
/* Shift result slots up and clear the slots of the new frame below. */
|
||||||
memmove(J->base + cbase, J->base-1-LJ_FR2, sizeof(TRef)*nresults);
|
memmove(J->base + cbase, J->base-1-LJ_FR2, sizeof(TRef)*nresults);
|
||||||
|
Loading…
Reference in New Issue
Block a user