mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
Fill gaps in frames (caused by metamethod calls) with nil.
Simplifies storing snapshots to stack.
This commit is contained in:
parent
47f1bc80d8
commit
34d84f8836
@ -3045,8 +3045,8 @@ static void asm_tail_sync(ASMState *as)
|
|||||||
}
|
}
|
||||||
emit_movmroi(as, RID_BASE, ofs+4, irt_toitype(ir->t));
|
emit_movmroi(as, RID_BASE, ofs+4, irt_toitype(ir->t));
|
||||||
}
|
}
|
||||||
} else if (s > secondbase) {
|
} else {
|
||||||
emit_movmroi(as, RID_BASE, ofs+4, LJ_TNIL);
|
lua_assert(!(s > secondbase));
|
||||||
}
|
}
|
||||||
checkmclim(as);
|
checkmclim(as);
|
||||||
}
|
}
|
||||||
|
@ -426,7 +426,7 @@ static BCReg rec_mm_prep(jit_State *J, ASMFunction cont)
|
|||||||
#endif
|
#endif
|
||||||
J->base[top] = emitir(IRTG(IR_FRAME, IRT_PTR), trcont, trcont);
|
J->base[top] = emitir(IRTG(IR_FRAME, IRT_PTR), trcont, trcont);
|
||||||
for (s = J->maxslot; s < top; s++)
|
for (s = J->maxslot; s < top; s++)
|
||||||
J->base[s] = 0;
|
J->base[s] = TREF_NIL;
|
||||||
return top+1;
|
return top+1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -259,8 +259,8 @@ void lj_snap_restore(jit_State *J, void *exptr)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (newbase) {
|
} else {
|
||||||
setnilV(o); /* Clear unreferenced slots of newly added frames. */
|
lua_assert(!newbase);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (newbase) L->base = newbase;
|
if (newbase) L->base = newbase;
|
||||||
|
Loading…
Reference in New Issue
Block a user