Redesign of prototype generation, part 1: varinfo and uvname.
Use a growable, per-chunk variable stack. Collect varinfo/uvname for prototype at the end.
This commit is contained in:
@@ -256,11 +256,9 @@ static void gc_traverse_proto(global_State *g, GCproto *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. */
|
||||
if (proto_uvname(pt, i))
|
||||
gc_mark_str(gco2str(proto_uvname(pt, i)));
|
||||
gc_mark_str(gco2str(proto_uvname(pt, i)));
|
||||
for (i = 0; i < (ptrdiff_t)pt->sizevarinfo; i++) /* Mark names of locals. */
|
||||
if (gcref(proto_varinfo(pt)[i].name))
|
||||
gc_mark_str(gco2str(gcref(proto_varinfo(pt)[i].name)));
|
||||
gc_mark_str(gco2str(gcref(proto_varinfo(pt)[i].name)));
|
||||
}
|
||||
|
||||
/* Traverse the frame structure of a stack. */
|
||||
|
||||
Reference in New Issue
Block a user