diff options
author | Mike Pall <mike> | 2009-12-30 02:37:57 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2009-12-30 02:37:57 +0100 |
commit | 9de0f53a8db3a4d3fa1951ff08aaab392dc7a584 (patch) | |
tree | ce510093fe7d09073c90afbf18f8d5e3577c3cf3 /src/lj_dispatch.c | |
parent | 52eb88773e88464cb5cc69b485d742468f66f2a2 (diff) | |
download | luajit-9de0f53a8db3a4d3fa1951ff08aaab392dc7a584.tar.gz luajit-9de0f53a8db3a4d3fa1951ff08aaab392dc7a584.tar.bz2 luajit-9de0f53a8db3a4d3fa1951ff08aaab392dc7a584.zip |
Implement yield from C hooks.
Get number of multiple results from C frame.
Add lj_cont_hook: restores multres and dispatch to static ins.
Can use fastcall for lj_dispatch_ins() now.
Diffstat (limited to 'src/lj_dispatch.c')
-rw-r--r-- | src/lj_dispatch.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lj_dispatch.c b/src/lj_dispatch.c index 3ce09371..2ffe363c 100644 --- a/src/lj_dispatch.c +++ b/src/lj_dispatch.c | |||
@@ -258,15 +258,16 @@ static BCReg cur_topslot(GCproto *pt, const BCIns *pc, uint32_t nres) | |||
258 | } | 258 | } |
259 | 259 | ||
260 | /* Instruction dispatch callback for instr/line hooks or when recording. */ | 260 | /* Instruction dispatch callback for instr/line hooks or when recording. */ |
261 | void lj_dispatch_ins(lua_State *L, const BCIns *pc, uint32_t nres) | 261 | void LJ_FASTCALL lj_dispatch_ins(lua_State *L, const BCIns *pc) |
262 | { | 262 | { |
263 | GCfunc *fn = curr_func(L); | 263 | GCfunc *fn = curr_func(L); |
264 | GCproto *pt = funcproto(fn); | 264 | GCproto *pt = funcproto(fn); |
265 | BCReg slots = cur_topslot(pt, pc, nres); | ||
266 | global_State *g = G(L); | ||
267 | void *cf = cframe_raw(L->cframe); | 265 | void *cf = cframe_raw(L->cframe); |
268 | const BCIns *oldpc = cframe_pc(cf); | 266 | const BCIns *oldpc = cframe_pc(cf); |
267 | global_State *g = G(L); | ||
268 | BCReg slots; | ||
269 | setcframe_pc(cf, pc); | 269 | setcframe_pc(cf, pc); |
270 | slots = cur_topslot(pt, pc, cframe_multres(cf)); | ||
270 | L->top = L->base + slots; /* Fix top. */ | 271 | L->top = L->base + slots; /* Fix top. */ |
271 | #if LJ_HASJIT | 272 | #if LJ_HASJIT |
272 | { | 273 | { |