summaryrefslogtreecommitdiff
path: root/ltests.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-05-03 08:55:40 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-05-03 08:55:40 -0300
commitd25f7f9d78961543cbbcc0f793e37631030d003c (patch)
tree8cfe603c0b22e051a8b1dc7f30d6a1431896e3e0 /ltests.c
parent85555646e3e8e1db4f50772ff8ef5c55908cc165 (diff)
downloadlua-d25f7f9d78961543cbbcc0f793e37631030d003c.tar.gz
lua-d25f7f9d78961543cbbcc0f793e37631030d003c.tar.bz2
lua-d25f7f9d78961543cbbcc0f793e37631030d003c.zip
items in 'tobefnz' are kept black (as before recent change) and changed
to white only when needed (being moved to 'allgc' when not keeping invariant).
Diffstat (limited to 'ltests.c')
-rw-r--r--ltests.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ltests.c b/ltests.c
index 5764a7fa..9917d47e 100644
--- a/ltests.c
+++ b/ltests.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltests.c,v 2.98 2010/04/29 21:42:33 roberto Exp roberto $ 2** $Id: ltests.c,v 2.99 2010/04/30 18:37:14 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*/
@@ -412,6 +412,9 @@ int lua_checkmemory (lua_State *L) {
412 testbit(o->gch.marked, SEPARATED)); 412 testbit(o->gch.marked, SEPARATED));
413 checkobject(g, o); 413 checkobject(g, o);
414 } 414 }
415 for (o = g->tobefnz; o != NULL; o = gch(o)->next) {
416 lua_assert(gch(o)->tt == LUA_TUSERDATA && isblack(o));
417 }
415 for (uv = g->uvhead.u.l.next; uv != &g->uvhead; uv = uv->u.l.next) { 418 for (uv = g->uvhead.u.l.next; uv != &g->uvhead; uv = uv->u.l.next) {
416 lua_assert(uv->u.l.next->u.l.prev == uv && uv->u.l.prev->u.l.next == uv); 419 lua_assert(uv->u.l.next->u.l.prev == uv && uv->u.l.prev->u.l.next == uv);
417 lua_assert(uv->v != &uv->u.value); /* must be open */ 420 lua_assert(uv->v != &uv->u.value); /* must be open */