summaryrefslogtreecommitdiff
path: root/src/lj_dispatch.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_dispatch.c')
-rw-r--r--src/lj_dispatch.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lj_dispatch.c b/src/lj_dispatch.c
index 0b14e21c..42027e7d 100644
--- a/src/lj_dispatch.c
+++ b/src/lj_dispatch.c
@@ -348,6 +348,7 @@ static BCReg cur_topslot(GCproto *pt, const BCIns *pc, uint32_t nres)
348/* Instruction dispatch. Used by instr/line/return hooks or when recording. */ 348/* Instruction dispatch. Used by instr/line/return hooks or when recording. */
349void LJ_FASTCALL lj_dispatch_ins(lua_State *L, const BCIns *pc) 349void LJ_FASTCALL lj_dispatch_ins(lua_State *L, const BCIns *pc)
350{ 350{
351 ERRNO_SAVE
351 GCfunc *fn = curr_func(L); 352 GCfunc *fn = curr_func(L);
352 GCproto *pt = funcproto(fn); 353 GCproto *pt = funcproto(fn);
353 void *cf = cframe_raw(L->cframe); 354 void *cf = cframe_raw(L->cframe);
@@ -382,6 +383,7 @@ void LJ_FASTCALL lj_dispatch_ins(lua_State *L, const BCIns *pc)
382 } 383 }
383 if ((g->hookmask & LUA_MASKRET) && bc_isret(bc_op(pc[-1]))) 384 if ((g->hookmask & LUA_MASKRET) && bc_isret(bc_op(pc[-1])))
384 callhook(L, LUA_HOOKRET, -1); 385 callhook(L, LUA_HOOKRET, -1);
386 ERRNO_RESTORE
385} 387}
386 388
387/* Initialize call. Ensure stack space and return # of missing parameters. */ 389/* Initialize call. Ensure stack space and return # of missing parameters. */
@@ -405,6 +407,7 @@ static int call_init(lua_State *L, GCfunc *fn)
405/* Call dispatch. Used by call hooks, hot calls or when recording. */ 407/* Call dispatch. Used by call hooks, hot calls or when recording. */
406ASMFunction LJ_FASTCALL lj_dispatch_call(lua_State *L, const BCIns *pc) 408ASMFunction LJ_FASTCALL lj_dispatch_call(lua_State *L, const BCIns *pc)
407{ 409{
410 ERRNO_SAVE
408 GCfunc *fn = curr_func(L); 411 GCfunc *fn = curr_func(L);
409 BCOp op; 412 BCOp op;
410 global_State *g = G(L); 413 global_State *g = G(L);
@@ -443,6 +446,7 @@ out:
443 (op == BC_FUNCF || op == BC_FUNCV)) 446 (op == BC_FUNCF || op == BC_FUNCV))
444 op = (BCOp)((int)op+(int)BC_IFUNCF-(int)BC_FUNCF); 447 op = (BCOp)((int)op+(int)BC_IFUNCF-(int)BC_FUNCF);
445#endif 448#endif
449 ERRNO_RESTORE
446 return makeasmfunc(lj_bc_ofs[op]); /* Return static dispatch target. */ 450 return makeasmfunc(lj_bc_ofs[op]); /* Return static dispatch target. */
447} 451}
448 452