MCPcopy Create free account
hub / github.com/defold/defold / luaC_barrierf

Function luaC_barrierf

engine/lua/src/lua/lgc.c:662–672  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

660
661
662void luaC_barrierf (lua_State *L, GCObject *o, GCObject *v) {
663 global_State *g = G(L);
664 lua_assert(isblack(o) && iswhite(v) && !isdead(g, v) && !isdead(g, o));
665 lua_assert(g->gcstate != GCSfinalize && g->gcstate != GCSpause);
666 lua_assert(ttype(&o->gch) != LUA_TTABLE);
667 /* must keep invariant? */
668 if (g->gcstate == GCSpropagate)
669 reallymarkobject(g, v); /* restore invariant */
670 else /* don't mind */
671 makewhite(g, o); /* mark as white just to avoid other barriers */
672}
673
674
675void luaC_barrierback (lua_State *L, Table *t) {

Callers

nothing calls this directly

Calls 2

reallymarkobjectFunction · 0.85
GFunction · 0.50

Tested by

no test coverage detected