diff options
Diffstat (limited to 'ltests.c')
-rw-r--r-- | ltests.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltests.c,v 2.75 2009/10/05 16:44:33 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 2.76 2009/10/11 20:02:19 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 | */ |
@@ -305,7 +305,6 @@ static void checkstack (global_State *g, lua_State *L1) { | |||
305 | lua_assert(uv->v != &uv->u.value); /* must be open */ | 305 | lua_assert(uv->v != &uv->u.value); /* must be open */ |
306 | lua_assert(!isblack(uvo)); /* open upvalues cannot be black */ | 306 | lua_assert(!isblack(uvo)); /* open upvalues cannot be black */ |
307 | } | 307 | } |
308 | checkliveness(g, gt(L1)); | ||
309 | for (ci = L1->ci; ci != NULL; ci = ci->previous) { | 308 | for (ci = L1->ci; ci != NULL; ci = ci->previous) { |
310 | lua_assert(ci->top <= L1->stack_last); | 309 | lua_assert(ci->top <= L1->stack_last); |
311 | lua_assert(lua_checkpc(ci)); | 310 | lua_assert(lua_checkpc(ci)); |
@@ -366,6 +365,8 @@ int lua_checkmemory (lua_State *L) { | |||
366 | global_State *g = G(L); | 365 | global_State *g = G(L); |
367 | GCObject *o; | 366 | GCObject *o; |
368 | UpVal *uv; | 367 | UpVal *uv; |
368 | checkliveness(g, &g->l_registry); | ||
369 | checkliveness(g, &g->l_gt); | ||
369 | checkstack(g, g->mainthread); | 370 | checkstack(g, g->mainthread); |
370 | for (o = g->rootgc; o != obj2gco(g->mainthread); o = gch(o)->next) { | 371 | for (o = g->rootgc; o != obj2gco(g->mainthread); o = gch(o)->next) { |
371 | lua_assert(!testbits(o->gch.marked, bit2mask(SEPARATED, SFIXEDBIT))); | 372 | lua_assert(!testbits(o->gch.marked, bit2mask(SEPARATED, SFIXEDBIT))); |