diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lj_gc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lj_gc.c b/src/lj_gc.c index e76175fc..75871a2d 100644 --- a/src/lj_gc.c +++ b/src/lj_gc.c | |||
| @@ -230,6 +230,7 @@ static void gc_marktrace(global_State *g, TraceNo traceno) | |||
| 230 | static void gc_traverse_trace(global_State *g, GCtrace *T) | 230 | static void gc_traverse_trace(global_State *g, GCtrace *T) |
| 231 | { | 231 | { |
| 232 | IRRef ref; | 232 | IRRef ref; |
| 233 | if (T->traceno == 0) return; | ||
| 233 | for (ref = T->nk; ref < REF_TRUE; ref++) { | 234 | for (ref = T->nk; ref < REF_TRUE; ref++) { |
| 234 | IRIns *ir = &T->ir[ref]; | 235 | IRIns *ir = &T->ir[ref]; |
| 235 | if (ir->o == IR_KGC) | 236 | if (ir->o == IR_KGC) |
| @@ -242,8 +243,7 @@ static void gc_traverse_trace(global_State *g, GCtrace *T) | |||
| 242 | } | 243 | } |
| 243 | 244 | ||
| 244 | /* The current trace is a GC root while not anchored in the prototype (yet). */ | 245 | /* The current trace is a GC root while not anchored in the prototype (yet). */ |
| 245 | #define gc_traverse_curtrace(g) \ | 246 | #define gc_traverse_curtrace(g) gc_traverse_trace(g, &G2J(g)->cur) |
| 246 | { if (G2J(g)->cur.traceno != 0) gc_traverse_trace(g, &G2J(g)->cur); } | ||
| 247 | #else | 247 | #else |
| 248 | #define gc_traverse_curtrace(g) UNUSED(g) | 248 | #define gc_traverse_curtrace(g) UNUSED(g) |
| 249 | #endif | 249 | #endif |
