summaryrefslogtreecommitdiff
path: root/lgc.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-05-08 14:34:23 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-05-08 14:34:23 -0300
commit01f1ac36b13f4fb23527785add70afe64f275944 (patch)
tree7baf8b33faacb220683f416528e3fcc0cd033735 /lgc.c
parenta4d06736d4a66e1653599fad3df39099bf5b1276 (diff)
downloadlua-01f1ac36b13f4fb23527785add70afe64f275944.tar.gz
lua-01f1ac36b13f4fb23527785add70afe64f275944.tar.bz2
lua-01f1ac36b13f4fb23527785add70afe64f275944.zip
`global' tables (registry, etc.) stored in proper place, not in the stack
Diffstat (limited to 'lgc.c')
-rw-r--r--lgc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lgc.c b/lgc.c
index cdfd6496..3ca610e6 100644
--- a/lgc.c
+++ b/lgc.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lgc.c,v 1.134 2002/04/05 18:54:31 roberto Exp roberto $ 2** $Id: lgc.c,v 1.135 2002/04/23 15:04:39 roberto Exp roberto $
3** Garbage Collector 3** Garbage Collector
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -100,7 +100,6 @@ static void marktable (GCState *st, Table *h) {
100 if (!ismarked(h)) { 100 if (!ismarked(h)) {
101 h->mark = st->tmark; /* chain it for later traversal */ 101 h->mark = st->tmark; /* chain it for later traversal */
102 st->tmark = h; 102 st->tmark = h;
103 marktable(st, h->metatable);
104 } 103 }
105} 104}
106 105
@@ -153,6 +152,9 @@ static void markstacks (GCState *st) {
153 luaE_closethread(st->L, L1->previous); /* collect it */ 152 luaE_closethread(st->L, L1->previous); /* collect it */
154 continue; 153 continue;
155 } 154 }
155 markobject(st, defaultmeta(L1));
156 markobject(st, gt(L1));
157 markobject(st, registry(L1));
156 for (o=L1->stack; o<L1->top; o++) 158 for (o=L1->stack; o<L1->top; o++)
157 markobject(st, o); 159 markobject(st, o);
158 lim = o; 160 lim = o;