diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-01-14 12:19:42 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-01-14 12:19:42 -0200 |
| commit | 5be517602e5334573297fe8d421a92eb0184ce86 (patch) | |
| tree | a3253a42f85b2aff30ed46e840e8e547f6746a94 /ltests.c | |
| parent | d2bda8046c1061c353f9e787e987772b9f96099b (diff) | |
| download | lua-5be517602e5334573297fe8d421a92eb0184ce86.tar.gz lua-5be517602e5334573297fe8d421a92eb0184ce86.tar.bz2 lua-5be517602e5334573297fe8d421a92eb0184ce86.zip | |
no more generational collector (and no more `noinc' mode)
Diffstat (limited to 'ltests.c')
| -rw-r--r-- | ltests.c | 11 |
1 files changed, 5 insertions, 6 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ltests.c,v 2.15 2004/11/01 15:06:50 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 2.16 2005/01/05 18:20:51 roberto Exp roberto $ |
| 3 | ** Internal Module for Debugging of the Lua Implementation | 3 | ** Internal Module for Debugging of the Lua Implementation |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -153,9 +153,9 @@ void *debug_realloc (void *ud, void *block, size_t oldsize, size_t size) { | |||
| 153 | 153 | ||
| 154 | static int testobjref1 (global_State *g, GCObject *f, GCObject *t) { | 154 | static int testobjref1 (global_State *g, GCObject *f, GCObject *t) { |
| 155 | if (isdead(g,t)) return 0; | 155 | if (isdead(g,t)) return 0; |
| 156 | if (g->gcstate == GCSpropagate || g->gcgenerational) | 156 | if (g->gcstate == GCSpropagate) |
| 157 | return !isblack(f) || !iswhite(t); | 157 | return !isblack(f) || !iswhite(t); |
| 158 | else if (g->gcstate == GCSfinalize && !g->gcgenerational) | 158 | else if (g->gcstate == GCSfinalize) |
| 159 | return iswhite(f); | 159 | return iswhite(f); |
| 160 | else | 160 | else |
| 161 | return 1; | 161 | return 1; |
| @@ -175,8 +175,7 @@ static void printobj (global_State *g, GCObject *o) { | |||
| 175 | static int testobjref (global_State *g, GCObject *f, GCObject *t) { | 175 | static int testobjref (global_State *g, GCObject *f, GCObject *t) { |
| 176 | int r = testobjref1(g,f,t); | 176 | int r = testobjref1(g,f,t); |
| 177 | if (!r) { | 177 | if (!r) { |
| 178 | printf("%d(%02X) %c - ", g->gcstate, g->currentwhite, | 178 | printf("%d(%02X) - ", g->gcstate, g->currentwhite); |
| 179 | g->gcgenerational ? 'G' : ' '); | ||
| 180 | printobj(g, f); | 179 | printobj(g, f); |
| 181 | printf("\t-> "); | 180 | printf("\t-> "); |
| 182 | printobj(g, t); | 181 | printobj(g, t); |
| @@ -295,7 +294,7 @@ static void checkobject (global_State *g, GCObject *o) { | |||
| 295 | printf(">>> %d %s %02x\n", g->gcstate, luaT_typenames[o->gch.tt], o->gch.marked); | 294 | printf(">>> %d %s %02x\n", g->gcstate, luaT_typenames[o->gch.tt], o->gch.marked); |
| 296 | } | 295 | } |
| 297 | else { | 296 | else { |
| 298 | if (g->gcstate == GCSfinalize && !g->gcgenerational) | 297 | if (g->gcstate == GCSfinalize) |
| 299 | lua_assert(iswhite(o)); | 298 | lua_assert(iswhite(o)); |
| 300 | switch (o->gch.tt) { | 299 | switch (o->gch.tt) { |
| 301 | case LUA_TUPVAL: { | 300 | case LUA_TUPVAL: { |
