From: Mike Pall Date: Tue, 18 Jan 2011 21:17:27 +0000 (+0100) Subject: Fix for the fix for the trace flush logic. X-Git-Tag: v2.0.0-beta6~62 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=685dfc317270642fbf2a686799ca2b31ea42e0de;p=thirdparty%2FLuaJIT.git Fix for the fix for the trace flush logic. --- diff --git a/src/lj_trace.c b/src/lj_trace.c index 5ab6c852..c6e87bb5 100644 --- a/src/lj_trace.c +++ b/src/lj_trace.c @@ -187,12 +187,12 @@ static void trace_unpatch(jit_State *J, GCtrace *T) if (op == BC_JMP) return; /* No need to unpatch branches in parent traces (yet). */ switch (bc_op(*pc)) { - case BC_JFORI: - lua_assert(op == BC_FORL); - setbc_op(pc, BC_FORI); - pc += bc_j(*pc); - lua_assert(bc_op(*pc) == BC_JFORL && traceref(J, bc_d(*pc)) == T); + case BC_JFORL: + lua_assert(traceref(J, bc_d(*pc)) == T); *pc = T->startins; + pc += bc_j(T->startins); + lua_assert(bc_op(*pc) == BC_JFORI); + setbc_op(pc, BC_FORI); break; case BC_JLOOP: lua_assert(op == BC_LOOP || bc_isret(op));