diff options
Diffstat (limited to '')
| -rw-r--r-- | ltests.c | 13 |
1 files changed, 3 insertions, 10 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ltests.c,v 2.85 2009/12/17 16:20:01 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 2.86 2009/12/22 15:32:50 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 | */ |
| @@ -190,7 +190,7 @@ static void printobj (global_State *g, GCObject *o) { | |||
| 190 | GCObject *p; | 190 | GCObject *p; |
| 191 | for (p = g->rootgc; p != o && p != NULL; p = gch(p)->next) i++; | 191 | for (p = g->rootgc; p != o && p != NULL; p = gch(p)->next) i++; |
| 192 | if (p == NULL) i = -1; | 192 | if (p == NULL) i = -1; |
| 193 | printf("%d:%s(%p)-%c(%02X)", i, luaT_typenames[gch(o)->tt], (void *)o, | 193 | printf("%d:%s(%p)-%c(%02X)", i, typename(gch(o)->tt), (void *)o, |
| 194 | isdead(g,o)?'d':isblack(o)?'b':iswhite(o)?'w':'g', gch(o)->marked); | 194 | isdead(g,o)?'d':isblack(o)?'b':iswhite(o)?'w':'g', gch(o)->marked); |
| 195 | } | 195 | } |
| 196 | 196 | ||
| @@ -329,10 +329,7 @@ static void checkstack (global_State *g, lua_State *L1) { | |||
| 329 | 329 | ||
| 330 | static void checkobject (global_State *g, GCObject *o) { | 330 | static void checkobject (global_State *g, GCObject *o) { |
| 331 | if (isdead(g, o)) | 331 | if (isdead(g, o)) |
| 332 | /* lua_assert(issweep(g));*/ | 332 | lua_assert(issweep(g)); |
| 333 | { if (!issweep(g)) | ||
| 334 | printf(">>> %d %s %02x\n", g->gcstate, luaT_typenames[gch(o)->tt], gch(o)->marked); | ||
| 335 | } | ||
| 336 | else { | 333 | else { |
| 337 | if (g->gcstate == GCSfinalize) | 334 | if (g->gcstate == GCSfinalize) |
| 338 | lua_assert(iswhite(o)); | 335 | lua_assert(iswhite(o)); |
| @@ -1141,10 +1138,6 @@ static int runC (lua_State *L, lua_State *L1, const char *pc) { | |||
| 1141 | else if EQ("type") { | 1138 | else if EQ("type") { |
| 1142 | lua_pushstring(L1, luaL_typename(L1, getnum)); | 1139 | lua_pushstring(L1, luaL_typename(L1, getnum)); |
| 1143 | } | 1140 | } |
| 1144 | /* else if EQ("getn") { | ||
| 1145 | int i = getindex; | ||
| 1146 | lua_pushinteger(L1, lua_objlen(L1, i)); | ||
| 1147 | } */ | ||
| 1148 | else if EQ("append") { | 1141 | else if EQ("append") { |
| 1149 | int t = getindex; | 1142 | int t = getindex; |
| 1150 | int i = lua_rawlen(L1, t); | 1143 | int i = lua_rawlen(L1, t); |
