mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
Always merge snapshots without instructions inbetween.
Thanks to Vyacheslav Egorov.
This commit is contained in:
parent
04d2806823
commit
39eddd3b96
@ -145,8 +145,8 @@ void lj_snap_add(jit_State *J)
|
|||||||
MSize nsnap = J->cur.nsnap;
|
MSize nsnap = J->cur.nsnap;
|
||||||
MSize nsnapmap = J->cur.nsnapmap;
|
MSize nsnapmap = J->cur.nsnapmap;
|
||||||
/* Merge if no ins. inbetween or if requested and no guard inbetween. */
|
/* Merge if no ins. inbetween or if requested and no guard inbetween. */
|
||||||
if (J->mergesnap ? !irt_isguard(J->guardemit) :
|
if ((nsnap > 0 && J->cur.snap[nsnap-1].ref == J->cur.nins) ||
|
||||||
(nsnap > 0 && J->cur.snap[nsnap-1].ref == J->cur.nins)) {
|
(J->mergesnap && !irt_isguard(J->guardemit))) {
|
||||||
if (nsnap == 1) { /* But preserve snap #0 PC. */
|
if (nsnap == 1) { /* But preserve snap #0 PC. */
|
||||||
emitir_raw(IRT(IR_NOP, IRT_NIL), 0, 0);
|
emitir_raw(IRT(IR_NOP, IRT_NIL), 0, 0);
|
||||||
goto nomerge;
|
goto nomerge;
|
||||||
|
Loading…
Reference in New Issue
Block a user