MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / luaC_linkupval

Function luaC_linkupval

other_src/lua/src/lgc.cpp:696–711  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

694
695
696void luaC_linkupval (lua_State *L, UpVal *uv) {
697 global_State *g = G(L);
698 GCObject *o = obj2gco(uv);
699 o->gch.next = g->rootgc; /* link upvalue into `rootgc' list */
700 g->rootgc = o;
701 if (isgray(o)) {
702 if (g->gcstate == GCSpropagate) {
703 gray2black(o); /* closed upvalues need barrier */
704 luaC_barrier(L, uv, uv->v);
705 }
706 else { /* sweep phase: sweep it (turning it into white) */
707 makewhite(g, o);
708 lua_assert(g->gcstate != GCSfinalize && g->gcstate != GCSpause);
709 }
710 }
711}
712

Callers 1

luaF_closeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected