mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
Don't traverse inactive GCtrace objects.
This commit is contained in:
parent
77267bc538
commit
44702720c5
@ -230,6 +230,7 @@ static void gc_marktrace(global_State *g, TraceNo traceno)
|
|||||||
static void gc_traverse_trace(global_State *g, GCtrace *T)
|
static void gc_traverse_trace(global_State *g, GCtrace *T)
|
||||||
{
|
{
|
||||||
IRRef ref;
|
IRRef ref;
|
||||||
|
if (T->traceno == 0) return;
|
||||||
for (ref = T->nk; ref < REF_TRUE; ref++) {
|
for (ref = T->nk; ref < REF_TRUE; ref++) {
|
||||||
IRIns *ir = &T->ir[ref];
|
IRIns *ir = &T->ir[ref];
|
||||||
if (ir->o == IR_KGC)
|
if (ir->o == IR_KGC)
|
||||||
@ -242,8 +243,7 @@ static void gc_traverse_trace(global_State *g, GCtrace *T)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* The current trace is a GC root while not anchored in the prototype (yet). */
|
/* The current trace is a GC root while not anchored in the prototype (yet). */
|
||||||
#define gc_traverse_curtrace(g) \
|
#define gc_traverse_curtrace(g) gc_traverse_trace(g, &G2J(g)->cur)
|
||||||
{ if (G2J(g)->cur.traceno != 0) gc_traverse_trace(g, &G2J(g)->cur); }
|
|
||||||
#else
|
#else
|
||||||
#define gc_traverse_curtrace(g) UNUSED(g)
|
#define gc_traverse_curtrace(g) UNUSED(g)
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user