MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / luaC_barrierf

Function luaC_barrierf

deps/lua/src/lgc.c:661–671  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

reallymarkobjectFunction · 0.85

Tested by

no test coverage detected