diff options
-rw-r--r-- | src/lj_trace.c | 10 |
1 files changed, 5 insertions, 5 deletions
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) | |||
187 | if (op == BC_JMP) | 187 | if (op == BC_JMP) |
188 | return; /* No need to unpatch branches in parent traces (yet). */ | 188 | return; /* No need to unpatch branches in parent traces (yet). */ |
189 | switch (bc_op(*pc)) { | 189 | switch (bc_op(*pc)) { |
190 | case BC_JFORI: | 190 | case BC_JFORL: |
191 | lua_assert(op == BC_FORL); | 191 | lua_assert(traceref(J, bc_d(*pc)) == T); |
192 | setbc_op(pc, BC_FORI); | ||
193 | pc += bc_j(*pc); | ||
194 | lua_assert(bc_op(*pc) == BC_JFORL && traceref(J, bc_d(*pc)) == T); | ||
195 | *pc = T->startins; | 192 | *pc = T->startins; |
193 | pc += bc_j(T->startins); | ||
194 | lua_assert(bc_op(*pc) == BC_JFORI); | ||
195 | setbc_op(pc, BC_FORI); | ||
196 | break; | 196 | break; |
197 | case BC_JLOOP: | 197 | case BC_JLOOP: |
198 | lua_assert(op == BC_LOOP || bc_isret(op)); | 198 | lua_assert(op == BC_LOOP || bc_isret(op)); |