goto out;
} else if (J->state != LJ_TRACE_IDLE &&
!(g->hookmask & (HOOK_GC|HOOK_VMEVENT))) {
+#ifdef LUA_USE_ASSERT
+ ptrdiff_t delta = L->top - L->base;
+#endif
/* Record the FUNC* bytecodes, too. */
lj_trace_ins(J, pc-1); /* The interpreter bytecode PC is offset by 1. */
+ lua_assert(L->top - L->base == delta);
}
#endif
if ((g->hookmask & LUA_MASKCALL)) {
if (tvisnumber(L->top-1))
e = (TraceError)numberVint(L->top-1);
if (e == LJ_TRERR_MCODELM) {
+ L->top--; /* Remove error object */
J->state = LJ_TRACE_ASM;
return 1; /* Retry ASM with new MCode area. */
}