mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
Another loop formation test must check for return to lower frame.
This commit is contained in:
parent
61c5a60dc3
commit
305ecbbb84
@ -401,7 +401,7 @@ static void rec_loop_jit(jit_State *J, TraceNo lnk, LoopEvent ev)
|
|||||||
lj_trace_err(J, LJ_TRERR_LINNER);
|
lj_trace_err(J, LJ_TRERR_LINNER);
|
||||||
} else if (ev != LOOPEV_LEAVE) { /* Side trace enters a compiled loop. */
|
} else if (ev != LOOPEV_LEAVE) { /* Side trace enters a compiled loop. */
|
||||||
J->instunroll = 0; /* Cannot continue across a compiled loop op. */
|
J->instunroll = 0; /* Cannot continue across a compiled loop op. */
|
||||||
if (J->pc == J->startpc && J->framedepth == 0)
|
if (J->pc == J->startpc && J->framedepth == 0 && !J->chain[IR_RETF])
|
||||||
lnk = J->curtrace; /* Can form an extra loop. */
|
lnk = J->curtrace; /* Can form an extra loop. */
|
||||||
rec_stop(J, lnk); /* Link to the loop. */
|
rec_stop(J, lnk); /* Link to the loop. */
|
||||||
} /* Side trace continues across a loop that's left or not entered. */
|
} /* Side trace continues across a loop that's left or not entered. */
|
||||||
|
Loading…
Reference in New Issue
Block a user