MCPcopy Create free account
hub / github.com/F-Stack/f-stack / luaC_barrier_

Function luaC_barrier_

freebsd/contrib/openzfs/module/lua/lgc.c:134–145  ·  view source on GitHub ↗

** barrier that moves collector forward, that is, mark the white object ** being pointed by a black object. */

Source from the content-addressed store, hash-verified

132** being pointed by a black object.
133*/
134void luaC_barrier_ (lua_State *L, GCObject *o, GCObject *v) {
135 global_State *g = G(L);
136 lua_assert(isblack(o) && iswhite(v) && !isdead(g, v) && !isdead(g, o));
137 lua_assert(g->gcstate != GCSpause);
138 lua_assert(gch(o)->tt != LUA_TTABLE);
139 if (keepinvariantout(g)) /* must keep invariant? */
140 reallymarkobject(g, v); /* restore invariant */
141 else { /* sweep phase */
142 lua_assert(issweepphase(g));
143 makewhite(g, o); /* mark main obj. as white to avoid other barriers */
144 }
145}
146
147
148/*

Callers

nothing calls this directly

Calls 1

reallymarkobjectFunction · 0.70

Tested by

no test coverage detected