diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-03-27 17:08:02 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-03-27 17:08:02 -0300 |
commit | 102a1be6159b34190813bfd7a7ed6c04633c6200 (patch) | |
tree | b03054b4832fefea3c9f114d3b367f2fa0dbac88 /lgc.c | |
parent | 4c031966976a0ae5d24b709fe94e90dc3fbac9ef (diff) | |
download | lua-102a1be6159b34190813bfd7a7ed6c04633c6200.tar.gz lua-102a1be6159b34190813bfd7a7ed6c04633c6200.tar.bz2 lua-102a1be6159b34190813bfd7a7ed6c04633c6200.zip |
no more support for gc TM for tables
Diffstat (limited to 'lgc.c')
-rw-r--r-- | lgc.c | 21 |
1 files changed, 1 insertions, 20 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lgc.c,v 1.41 2000/01/28 16:53:00 roberto Exp roberto $ | 2 | ** $Id: lgc.c,v 1.42 2000/03/10 18:37:44 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 | */ |
@@ -216,24 +216,6 @@ static void collectstring (lua_State *L, int limit) { | |||
216 | } | 216 | } |
217 | 217 | ||
218 | 218 | ||
219 | #ifdef LUA_COMPAT_GC | ||
220 | static void tableTM (lua_State *L) { | ||
221 | Hash *p; | ||
222 | TObject o; | ||
223 | ttype(&o) = TAG_ARRAY; | ||
224 | for (p = L->roottable; p; p = p->next) { | ||
225 | if (!p->marked) { | ||
226 | avalue(&o) = p; | ||
227 | luaD_gcIM(L, &o); | ||
228 | } | ||
229 | } | ||
230 | } | ||
231 | #else | ||
232 | #define tableTM(L) /* do nothing */ | ||
233 | #endif | ||
234 | |||
235 | |||
236 | |||
237 | static void markall (lua_State *L) { | 219 | static void markall (lua_State *L) { |
238 | travstack(L); /* mark stack objects */ | 220 | travstack(L); /* mark stack objects */ |
239 | travglobal(L); /* mark global variable values and names */ | 221 | travglobal(L); /* mark global variable values and names */ |
@@ -246,7 +228,6 @@ void luaC_collect (lua_State *L, int all) { | |||
246 | int oldah = L->allowhooks; | 228 | int oldah = L->allowhooks; |
247 | L->allowhooks = 0; /* stop debug hooks during GC */ | 229 | L->allowhooks = 0; /* stop debug hooks during GC */ |
248 | L->GCthreshold *= 4; /* to avoid GC during GC */ | 230 | L->GCthreshold *= 4; /* to avoid GC during GC */ |
249 | tableTM(L); /* call TM for tables (if LUA_COMPAT_GC) */ | ||
250 | collecttable(L); | 231 | collecttable(L); |
251 | collectstring(L, all?MAX_INT:1); | 232 | collectstring(L, all?MAX_INT:1); |
252 | collectproto(L); | 233 | collectproto(L); |