aboutsummaryrefslogtreecommitdiff
path: root/src/lj_dispatch.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_dispatch.c')
-rw-r--r--src/lj_dispatch.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/lj_dispatch.c b/src/lj_dispatch.c
index 1e55c48a..636fb033 100644
--- a/src/lj_dispatch.c
+++ b/src/lj_dispatch.c
@@ -523,16 +523,18 @@ out:
523/* Stitch a new trace. */ 523/* Stitch a new trace. */
524void LJ_FASTCALL lj_dispatch_stitch(jit_State *J, const BCIns *pc) 524void LJ_FASTCALL lj_dispatch_stitch(jit_State *J, const BCIns *pc)
525{ 525{
526 ERRNO_SAVE 526 if (!(J2G(J)->hookmask & HOOK_VMEVENT)) {
527 lua_State *L = J->L; 527 ERRNO_SAVE
528 void *cf = cframe_raw(L->cframe); 528 lua_State *L = J->L;
529 const BCIns *oldpc = cframe_pc(cf); 529 void *cf = cframe_raw(L->cframe);
530 setcframe_pc(cf, pc); 530 const BCIns *oldpc = cframe_pc(cf);
531 /* Before dispatch, have to bias PC by 1. */ 531 setcframe_pc(cf, pc);
532 L->top = L->base + cur_topslot(curr_proto(L), pc+1, cframe_multres_n(cf)); 532 /* Before dispatch, have to bias PC by 1. */
533 lj_trace_stitch(J, pc-1); /* Point to the CALL instruction. */ 533 L->top = L->base + cur_topslot(curr_proto(L), pc+1, cframe_multres_n(cf));
534 setcframe_pc(cf, oldpc); 534 lj_trace_stitch(J, pc-1); /* Point to the CALL instruction. */
535 ERRNO_RESTORE 535 setcframe_pc(cf, oldpc);
536 ERRNO_RESTORE
537 }
536} 538}
537#endif 539#endif
538 540