aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lj_dispatch.c4
-rw-r--r--src/lj_trace.c1
2 files changed, 5 insertions, 0 deletions
diff --git a/src/lj_dispatch.c b/src/lj_dispatch.c
index b1d17add..38fd1709 100644
--- a/src/lj_dispatch.c
+++ b/src/lj_dispatch.c
@@ -431,8 +431,12 @@ ASMFunction LJ_FASTCALL lj_dispatch_call(lua_State *L, const BCIns *pc)
431 goto out; 431 goto out;
432 } else if (J->state != LJ_TRACE_IDLE && 432 } else if (J->state != LJ_TRACE_IDLE &&
433 !(g->hookmask & (HOOK_GC|HOOK_VMEVENT))) { 433 !(g->hookmask & (HOOK_GC|HOOK_VMEVENT))) {
434#ifdef LUA_USE_ASSERT
435 ptrdiff_t delta = L->top - L->base;
436#endif
434 /* Record the FUNC* bytecodes, too. */ 437 /* Record the FUNC* bytecodes, too. */
435 lj_trace_ins(J, pc-1); /* The interpreter bytecode PC is offset by 1. */ 438 lj_trace_ins(J, pc-1); /* The interpreter bytecode PC is offset by 1. */
439 lua_assert(L->top - L->base == delta);
436 } 440 }
437#endif 441#endif
438 if ((g->hookmask & LUA_MASKCALL)) { 442 if ((g->hookmask & LUA_MASKCALL)) {
diff --git a/src/lj_trace.c b/src/lj_trace.c
index 33cc98f7..afaeb300 100644
--- a/src/lj_trace.c
+++ b/src/lj_trace.c
@@ -497,6 +497,7 @@ static int trace_abort(jit_State *J)
497 if (tvisnumber(L->top-1)) 497 if (tvisnumber(L->top-1))
498 e = (TraceError)numberVint(L->top-1); 498 e = (TraceError)numberVint(L->top-1);
499 if (e == LJ_TRERR_MCODELM) { 499 if (e == LJ_TRERR_MCODELM) {
500 L->top--; /* Remove error object */
500 J->state = LJ_TRACE_ASM; 501 J->state = LJ_TRACE_ASM;
501 return 1; /* Retry ASM with new MCode area. */ 502 return 1; /* Retry ASM with new MCode area. */
502 } 503 }