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.97 2010/04/29 17:33:51 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 2.98 2010/04/29 21:42:33 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 | */ |
@@ -380,6 +380,7 @@ static void checkgraylist (GCObject *l) { | |||
380 | 380 | ||
381 | 381 | ||
382 | static void markgrays (global_State *g) { | 382 | static void markgrays (global_State *g) { |
383 | if (!keepinvariant(g)) return; | ||
383 | checkgraylist(g->gray); | 384 | checkgraylist(g->gray); |
384 | checkgraylist(g->grayagain); | 385 | checkgraylist(g->grayagain); |
385 | checkgraylist(g->weak); | 386 | checkgraylist(g->weak); |
@@ -399,7 +400,7 @@ int lua_checkmemory (lua_State *L) { | |||
399 | for (o = g->allgc; o != NULL; o = gch(o)->next) { | 400 | for (o = g->allgc; o != NULL; o = gch(o)->next) { |
400 | checkobject(g, o); | 401 | checkobject(g, o); |
401 | if (isgray(o)) { | 402 | if (isgray(o)) { |
402 | lua_assert(issweepphase(g) || testbit(o->gch.marked, GRAYBIT)); | 403 | lua_assert(!keepinvariant(g) || testbit(o->gch.marked, GRAYBIT)); |
403 | o->gch.marked = resetbit(o->gch.marked, GRAYBIT); | 404 | o->gch.marked = resetbit(o->gch.marked, GRAYBIT); |
404 | } | 405 | } |
405 | lua_assert(!testbit(o->gch.marked, SEPARATED)); | 406 | lua_assert(!testbit(o->gch.marked, SEPARATED)); |