From 2898e2fd12db741c58813671e56e628039d9bdc7 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Sat, 19 Jul 2014 11:44:19 -0300 Subject: [PATCH] removed useless assertion (gcstate != GCSpause already implied by other assertions) and wrong assertion (setmetatable uses this barrier for tables too) --- lgc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lgc.c b/lgc.c index 574a66cc..958322a0 100644 --- 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 */