diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-08-20 14:46:34 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-08-20 14:46:34 -0300 |
commit | 8f6b80aa1da8b07b944738ece7eb1348b360df49 (patch) | |
tree | a3ceb752923fcc1dd2b2fdf3911a84cd232496a6 /ltests.c | |
parent | 9eff921f8fe689794308cdb3fa7bb214604f75d3 (diff) | |
download | lua-8f6b80aa1da8b07b944738ece7eb1348b360df49.tar.gz lua-8f6b80aa1da8b07b944738ece7eb1348b360df49.tar.bz2 lua-8f6b80aa1da8b07b944738ece7eb1348b360df49.zip |
GC bits SEPARATED and FINALIZEDBIT mixed in FINALIZEDBIT (with simpler
control)
Diffstat (limited to 'ltests.c')
-rw-r--r-- | ltests.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltests.c,v 2.144 2013/08/18 16:12:18 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 2.145 2013/08/19 14:16: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 | */ |
@@ -466,12 +466,12 @@ int lua_checkmemory (lua_State *L) { | |||
466 | if (gch(o)->tt == LUA_TTHREAD) isthread = 1; /* now travesing threads... */ | 466 | if (gch(o)->tt == LUA_TTHREAD) isthread = 1; /* now travesing threads... */ |
467 | else lua_assert(!isthread); /* ... and only threads */ | 467 | else lua_assert(!isthread); /* ... and only threads */ |
468 | checkobject(g, o, maybedead); | 468 | checkobject(g, o, maybedead); |
469 | lua_assert(!testbit(o->gch.marked, SEPARATED)); | 469 | lua_assert(!tofinalize(o)); |
470 | } | 470 | } |
471 | /* check 'finobj' list */ | 471 | /* check 'finobj' list */ |
472 | checkgray(g, g->finobj); | 472 | checkgray(g, g->finobj); |
473 | for (o = g->finobj; o != NULL; o = gch(o)->next) { | 473 | for (o = g->finobj; o != NULL; o = gch(o)->next) { |
474 | lua_assert(testbit(o->gch.marked, SEPARATED)); | 474 | lua_assert(tofinalize(o)); |
475 | lua_assert(gch(o)->tt == LUA_TUSERDATA || | 475 | lua_assert(gch(o)->tt == LUA_TUSERDATA || |
476 | gch(o)->tt == LUA_TTABLE); | 476 | gch(o)->tt == LUA_TTABLE); |
477 | checkobject(g, o, 0); | 477 | checkobject(g, o, 0); |
@@ -480,7 +480,7 @@ int lua_checkmemory (lua_State *L) { | |||
480 | checkgray(g, g->tobefnz); | 480 | checkgray(g, g->tobefnz); |
481 | for (o = g->tobefnz; o != NULL; o = gch(o)->next) { | 481 | for (o = g->tobefnz; o != NULL; o = gch(o)->next) { |
482 | lua_assert(!iswhite(o) || g->gcstate == GCSpause); | 482 | lua_assert(!iswhite(o) || g->gcstate == GCSpause); |
483 | lua_assert(!isdead(g, o) && testbit(o->gch.marked, SEPARATED)); | 483 | lua_assert(!isdead(g, o) && tofinalize(o)); |
484 | lua_assert(gch(o)->tt == LUA_TUSERDATA || | 484 | lua_assert(gch(o)->tt == LUA_TUSERDATA || |
485 | gch(o)->tt == LUA_TTABLE); | 485 | gch(o)->tt == LUA_TTABLE); |
486 | } | 486 | } |