From d25f7f9d78961543cbbcc0f793e37631030d003c Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 3 May 2010 08:55:40 -0300 Subject: 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). --- ltests.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ltests.c') diff --git a/ltests.c b/ltests.c index 5764a7fa..9917d47e 100644 --- a/ltests.c +++ b/ltests.c @@ -1,5 +1,5 @@ /* -** $Id: ltests.c,v 2.98 2010/04/29 21:42:33 roberto Exp roberto $ +** $Id: ltests.c,v 2.99 2010/04/30 18:37:14 roberto Exp roberto $ ** Internal Module for Debugging of the Lua Implementation ** See Copyright Notice in lua.h */ @@ -412,6 +412,9 @@ int lua_checkmemory (lua_State *L) { testbit(o->gch.marked, SEPARATED)); checkobject(g, o); } + for (o = g->tobefnz; o != NULL; o = gch(o)->next) { + lua_assert(gch(o)->tt == LUA_TUSERDATA && isblack(o)); + } for (uv = g->uvhead.u.l.next; uv != &g->uvhead; uv = uv->u.l.next) { lua_assert(uv->u.l.next->u.l.prev == uv && uv->u.l.prev->u.l.next == uv); lua_assert(uv->v != &uv->u.value); /* must be open */ -- cgit v1.2.3-55-g6feb