diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lj_trace.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/lj_trace.c b/src/lj_trace.c index c6e87bb5..612a41bc 100644 --- a/src/lj_trace.c +++ b/src/lj_trace.c | |||
| @@ -194,8 +194,9 @@ static void trace_unpatch(jit_State *J, GCtrace *T) | |||
| 194 | lua_assert(bc_op(*pc) == BC_JFORI); | 194 | lua_assert(bc_op(*pc) == BC_JFORI); |
| 195 | setbc_op(pc, BC_FORI); | 195 | setbc_op(pc, BC_FORI); |
| 196 | break; | 196 | break; |
| 197 | case BC_JITERL: | ||
| 197 | case BC_JLOOP: | 198 | case BC_JLOOP: |
| 198 | lua_assert(op == BC_LOOP || bc_isret(op)); | 199 | lua_assert(op == BC_ITERL || op == BC_LOOP || bc_isret(op)); |
| 199 | *pc = T->startins; | 200 | *pc = T->startins; |
| 200 | break; | 201 | break; |
| 201 | case BC_JMP: | 202 | case BC_JMP: |
| @@ -227,11 +228,13 @@ static void trace_flushroot(jit_State *J, GCtrace *T) | |||
| 227 | pt->trace = T->nextroot; | 228 | pt->trace = T->nextroot; |
| 228 | } else { /* Otherwise search in chain of root traces. */ | 229 | } else { /* Otherwise search in chain of root traces. */ |
| 229 | GCtrace *T2 = traceref(J, pt->trace); | 230 | GCtrace *T2 = traceref(J, pt->trace); |
| 230 | for (; T2->nextroot; T2 = traceref(J, T2->nextroot)) | 231 | if (T2) { |
| 231 | if (T2->nextroot == T->traceno) { | 232 | for (; T2->nextroot; T2 = traceref(J, T2->nextroot)) |
| 232 | T2->nextroot = T->nextroot; /* Unlink from chain. */ | 233 | if (T2->nextroot == T->traceno) { |
| 233 | break; | 234 | T2->nextroot = T->nextroot; /* Unlink from chain. */ |
| 234 | } | 235 | break; |
| 236 | } | ||
| 237 | } | ||
| 235 | } | 238 | } |
| 236 | } | 239 | } |
| 237 | 240 | ||
