`global' tables (registry, etc.) stored in proper place, not in the stack

This commit is contained in:
Roberto Ierusalimschy
2002-05-08 14:34:23 -03:00
parent a4d06736d4
commit 01f1ac36b1
3 changed files with 16 additions and 13 deletions

6
lgc.c
View File

@@ -1,5 +1,5 @@
/*
** $Id: lgc.c,v 1.134 2002/04/05 18:54:31 roberto Exp roberto $
** $Id: lgc.c,v 1.135 2002/04/23 15:04:39 roberto Exp roberto $
** Garbage Collector
** See Copyright Notice in lua.h
*/
@@ -100,7 +100,6 @@ static void marktable (GCState *st, Table *h) {
if (!ismarked(h)) {
h->mark = st->tmark; /* chain it for later traversal */
st->tmark = h;
marktable(st, h->metatable);
}
}
@@ -153,6 +152,9 @@ static void markstacks (GCState *st) {
luaE_closethread(st->L, L1->previous); /* collect it */
continue;
}
markobject(st, defaultmeta(L1));
markobject(st, gt(L1));
markobject(st, registry(L1));
for (o=L1->stack; o<L1->top; o++)
markobject(st, o);
lim = o;