lua

A copy of the Lua development repository
Log | Files | Refs | README

commit 2898e2fd12db741c58813671e56e628039d9bdc7
parent 8704fca0c9f7a0c1c916d13ea03f6253daa6b13a
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Sat, 19 Jul 2014 11:43:54 -0300

removed useless assertion (gcstate != GCSpause already implied by
other assertions) and wrong assertion (setmetatable uses this barrier
for tables too)

Diffstat:
Mlgc.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lgc.c b/lgc.c @@ -1,5 +1,5 @@ /* -** $Id: lgc.c,v 2.187 2014/07/18 13:36:14 roberto Exp roberto $ +** $Id: lgc.c,v 2.188 2014/07/18 14:46:47 roberto Exp roberto $ ** Garbage Collector ** See Copyright Notice in lua.h */ @@ -135,13 +135,13 @@ static int iscleared (global_State *g, const TValue *o) { /* ** barrier that moves collector forward, that is, mark the white object -** being pointed by a black object. +** being pointed by a black object. (If in sweep phase, clear the black +** object to white [sweep it] to avoid other barrier calls for this +** same object.) */ void luaC_barrier_ (lua_State *L, GCObject *o, GCObject *v) { global_State *g = G(L); lua_assert(isblack(o) && iswhite(v) && !isdead(g, v) && !isdead(g, o)); - lua_assert(g->gcstate != GCSpause); - lua_assert(o->tt != LUA_TTABLE); /* tables use a back barrier */ if (keepinvariant(g)) /* must keep invariant? */ reallymarkobject(g, v); /* restore invariant */ else { /* sweep phase */