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:
@@ -536,7 +536,7 @@ typedef struct global_State {
|
||||
lua_CFunction panic; /* Called as a last resort for errors. */
|
||||
BCIns bc_cfunc_int; /* Bytecode for internal C function calls. */
|
||||
BCIns bc_cfunc_ext; /* Bytecode for external C function calls. */
|
||||
GCRef jit_L; /* Current JIT code lua_State. */
|
||||
GCRef cur_L; /* Currently executing lua_State. */
|
||||
MRef jit_base; /* Current JIT code L->base or NULL. */
|
||||
MRef ctype_state; /* Pointer to C type state. */
|
||||
GCRef gcroot[GCROOT_MAX]; /* GC roots. */
|
||||
|
||||
Reference in New Issue
Block a user