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

Function luaC_checkupvalcolor

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

** check color (and invariants) for an upvalue that was closed, ** i.e., moved into the 'allgc' list */

Source from the content-addressed store, hash-verified

187** i.e., moved into the 'allgc' list
188*/
189void luaC_checkupvalcolor (global_State *g, UpVal *uv) {
190 GCObject *o = obj2gco(uv);
191 lua_assert(!isblack(o)); /* open upvalues are never black */
192 if (isgray(o)) {
193 if (keepinvariant(g)) {
194 resetoldbit(o); /* see MOVE OLD rule */
195 gray2black(o); /* it is being visited now */
196 markvalue(g, uv->v);
197 }
198 else {
199 lua_assert(issweepphase(g));
200 makewhite(g, o);
201 }
202 }
203}
204
205
206/*

Callers 1

luaF_closeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected