aboutsummaryrefslogtreecommitdiff
path: root/ltests.c
diff options
context:
space:
mode:
Diffstat (limited to 'ltests.c')
-rw-r--r--ltests.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ltests.c b/ltests.c
index d302b97b..5764a7fa 100644
--- a/ltests.c
+++ b/ltests.c
@@ -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
382static void markgrays (global_State *g) { 382static 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));