summaryrefslogtreecommitdiff
path: root/src/lj_asm.c
diff options
context:
space:
mode:
authorMike Pall <mike>2013-08-28 13:06:19 +0200
committerMike Pall <mike>2013-08-30 23:38:17 +0200
commit517500ba48a290699d5a2ec7465bf76a5109c49f (patch)
treeb780b0919bd2b79db462d0f392158d4b1ee6339c /src/lj_asm.c
parent5120240b77e4544b9b7405b4849a6cc63cdbbe1e (diff)
downloadluajit-517500ba48a290699d5a2ec7465bf76a5109c49f.tar.gz
luajit-517500ba48a290699d5a2ec7465bf76a5109c49f.tar.bz2
luajit-517500ba48a290699d5a2ec7465bf76a5109c49f.zip
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.
Diffstat (limited to 'src/lj_asm.c')
-rw-r--r--src/lj_asm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lj_asm.c b/src/lj_asm.c
index a80d6adf..ee1cc5b5 100644
--- a/src/lj_asm.c
+++ b/src/lj_asm.c
@@ -342,7 +342,7 @@ static Reg ra_rematk(ASMState *as, IRRef ref)
342 emit_getgl(as, r, jit_base); 342 emit_getgl(as, r, jit_base);
343 } else if (emit_canremat(ASMREF_L) && ir->o == IR_KPRI) { 343 } else if (emit_canremat(ASMREF_L) && ir->o == IR_KPRI) {
344 lua_assert(irt_isnil(ir->t)); /* REF_NIL stores ASMREF_L register. */ 344 lua_assert(irt_isnil(ir->t)); /* REF_NIL stores ASMREF_L register. */
345 emit_getgl(as, r, jit_L); 345 emit_getgl(as, r, cur_L);
346#if LJ_64 346#if LJ_64
347 } else if (ir->o == IR_KINT64) { 347 } else if (ir->o == IR_KINT64) {
348 emit_loadu64(as, r, ir_kint64(ir)->u64); 348 emit_loadu64(as, r, ir_kint64(ir)->u64);