From 8f6b80aa1da8b07b944738ece7eb1348b360df49 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 20 Aug 2013 14:46:34 -0300 Subject: GC bits SEPARATED and FINALIZEDBIT mixed in FINALIZEDBIT (with simpler control) --- ltests.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ltests.c') diff --git a/ltests.c b/ltests.c index 10b5ec02..36e7be3f 100644 --- a/ltests.c +++ b/ltests.c @@ -1,5 +1,5 @@ /* -** $Id: ltests.c,v 2.144 2013/08/18 16:12:18 roberto Exp roberto $ +** $Id: ltests.c,v 2.145 2013/08/19 14:16:33 roberto Exp roberto $ ** Internal Module for Debugging of the Lua Implementation ** See Copyright Notice in lua.h */ @@ -466,12 +466,12 @@ int lua_checkmemory (lua_State *L) { if (gch(o)->tt == LUA_TTHREAD) isthread = 1; /* now travesing threads... */ else lua_assert(!isthread); /* ... and only threads */ checkobject(g, o, maybedead); - lua_assert(!testbit(o->gch.marked, SEPARATED)); + lua_assert(!tofinalize(o)); } /* check 'finobj' list */ checkgray(g, g->finobj); for (o = g->finobj; o != NULL; o = gch(o)->next) { - lua_assert(testbit(o->gch.marked, SEPARATED)); + lua_assert(tofinalize(o)); lua_assert(gch(o)->tt == LUA_TUSERDATA || gch(o)->tt == LUA_TTABLE); checkobject(g, o, 0); @@ -480,7 +480,7 @@ int lua_checkmemory (lua_State *L) { checkgray(g, g->tobefnz); for (o = g->tobefnz; o != NULL; o = gch(o)->next) { lua_assert(!iswhite(o) || g->gcstate == GCSpause); - lua_assert(!isdead(g, o) && testbit(o->gch.marked, SEPARATED)); + lua_assert(!isdead(g, o) && tofinalize(o)); lua_assert(gch(o)->tt == LUA_TUSERDATA || gch(o)->tt == LUA_TTABLE); } -- cgit v1.2.3-55-g6feb