diff options
author | Mike Pall <mike> | 2013-08-28 13:06:19 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2013-08-30 23:38:17 +0200 |
commit | 517500ba48a290699d5a2ec7465bf76a5109c49f (patch) | |
tree | b780b0919bd2b79db462d0f392158d4b1ee6339c /src/lj_gc.c | |
parent | 5120240b77e4544b9b7405b4849a6cc63cdbbe1e (diff) | |
download | luajit-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_gc.c')
-rw-r--r-- | src/lj_gc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lj_gc.c b/src/lj_gc.c index 8dbf2090..bc10822f 100644 --- a/src/lj_gc.c +++ b/src/lj_gc.c | |||
@@ -696,7 +696,7 @@ void LJ_FASTCALL lj_gc_step_fixtop(lua_State *L) | |||
696 | /* Perform multiple GC steps. Called from JIT-compiled code. */ | 696 | /* Perform multiple GC steps. Called from JIT-compiled code. */ |
697 | int LJ_FASTCALL lj_gc_step_jit(global_State *g, MSize steps) | 697 | int LJ_FASTCALL lj_gc_step_jit(global_State *g, MSize steps) |
698 | { | 698 | { |
699 | lua_State *L = gco2th(gcref(g->jit_L)); | 699 | lua_State *L = gco2th(gcref(g->cur_L)); |
700 | L->base = tvref(G(L)->jit_base); | 700 | L->base = tvref(G(L)->jit_base); |
701 | L->top = curr_topL(L); | 701 | L->top = curr_topL(L); |
702 | while (steps-- > 0 && lj_gc_step(L) == 0) | 702 | while (steps-- > 0 && lj_gc_step(L) == 0) |