MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / propagatemark

Function propagatemark

third-party/lua-5.5.0/src/lgc.c:727–740  ·  view source on GitHub ↗

** traverse one gray object, turning it to black. Return an estimate ** of the number of slots traversed. */

Source from the content-addressed store, hash-verified

725** of the number of slots traversed.
726*/
727static l_mem propagatemark (global_State *g) {
728 GCObject *o = g->gray;
729 nw2black(o);
730 g->gray = *getgclist(o); /* remove from 'gray' list */
731 switch (o->tt) {
732 case LUA_VTABLE: return traversetable(g, gco2t(o));
733 case LUA_VUSERDATA: return traverseudata(g, gco2u(o));
734 case LUA_VLCL: return traverseLclosure(g, gco2lcl(o));
735 case LUA_VCCL: return traverseCclosure(g, gco2ccl(o));
736 case LUA_VPROTO: return traverseproto(g, gco2p(o));
737 case LUA_VTHREAD: return traversethread(g, gco2th(o));
738 default: lua_assert(0); return 0;
739 }
740}
741
742
743static void propagateall (global_State *g) {

Callers 2

propagateallFunction · 0.70
singlestepFunction · 0.70

Calls 7

getgclistFunction · 0.70
traversetableFunction · 0.70
traverseudataFunction · 0.70
traverseLclosureFunction · 0.70
traverseCclosureFunction · 0.70
traverseprotoFunction · 0.70
traversethreadFunction · 0.70

Tested by

no test coverage detected