Redesign of prototype generation, part 4: late creation of prototype.

This commit is contained in:
Mike Pall
2010-02-08 05:29:47 +01:00
parent 4424027844
commit f275a9d7ef
2 changed files with 20 additions and 20 deletions

View File

@@ -251,8 +251,7 @@ static void gc_traverse_proto(global_State *g, GCproto *pt)
}
#endif
/* GC during prototype creation could cause NULL fields. */
if (gcref(pt->chunkname))
gc_mark_str(proto_chunkname(pt));
gc_mark_str(proto_chunkname(pt));
for (i = -(ptrdiff_t)pt->sizekgc; i < 0; i++) /* Mark collectable consts. */
gc_markobj(g, proto_kgc(pt, i));
for (i = 0; i < (ptrdiff_t)pt->sizeuvname; i++) /* Mark upvalue names. */