aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lgc.c8
1 files 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 @@
1/* 1/*
2** $Id: lgc.c,v 2.187 2014/07/18 13:36:14 roberto Exp roberto $ 2** $Id: lgc.c,v 2.188 2014/07/18 14:46:47 roberto Exp roberto $
3** Garbage Collector 3** Garbage Collector
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -135,13 +135,13 @@ static int iscleared (global_State *g, const TValue *o) {
135 135
136/* 136/*
137** barrier that moves collector forward, that is, mark the white object 137** barrier that moves collector forward, that is, mark the white object
138** being pointed by a black object. 138** being pointed by a black object. (If in sweep phase, clear the black
139** object to white [sweep it] to avoid other barrier calls for this
140** same object.)
139*/ 141*/
140void luaC_barrier_ (lua_State *L, GCObject *o, GCObject *v) { 142void luaC_barrier_ (lua_State *L, GCObject *o, GCObject *v) {
141 global_State *g = G(L); 143 global_State *g = G(L);
142 lua_assert(isblack(o) && iswhite(v) && !isdead(g, v) && !isdead(g, o)); 144 lua_assert(isblack(o) && iswhite(v) && !isdead(g, v) && !isdead(g, o));
143 lua_assert(g->gcstate != GCSpause);
144 lua_assert(o->tt != LUA_TTABLE); /* tables use a back barrier */
145 if (keepinvariant(g)) /* must keep invariant? */ 145 if (keepinvariant(g)) /* must keep invariant? */
146 reallymarkobject(g, v); /* restore invariant */ 146 reallymarkobject(g, v); /* restore invariant */
147 else { /* sweep phase */ 147 else { /* sweep phase */