Save currently executing lua_State in g->cur_L.
This is only a good approximation due to deficiencies in the design of the Lua/C API. It indicates _some_ valid state that is/was executing. Also reorder L->cframe stores to achieve a synchronously consistent state.
This commit is contained in:
@@ -1759,7 +1759,7 @@ static void asm_stack_check(ASMState *as, BCReg topslot,
|
||||
emit_tai(as, PPCI_LWZ, tmp, tmp, offsetof(lua_State, maxstack));
|
||||
if (pbase == RID_TMP)
|
||||
emit_getgl(as, RID_TMP, jit_base);
|
||||
emit_getgl(as, tmp, jit_L);
|
||||
emit_getgl(as, tmp, cur_L);
|
||||
if (allow == RSET_EMPTY) /* Spill temp. register. */
|
||||
emit_tai(as, PPCI_STW, tmp, RID_SP, SPOFS_TMPW);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user