MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / propagatemark

Function propagatemark

3rd/lua-5.4.3/src/lgc.c:652–665  ·  view source on GitHub ↗

** traverse one gray object, turning it to black. */

Source from the content-addressed store, hash-verified

650** traverse one gray object, turning it to black.
651*/
652static lu_mem propagatemark (global_State *g) {
653 GCObject *o = g->gray;
654 nw2black(o);
655 g->gray = *getgclist(o); /* remove from 'gray' list */
656 switch (o->tt) {
657 case LUA_VTABLE: return traversetable(g, gco2t(o));
658 case LUA_VUSERDATA: return traverseudata(g, gco2u(o));
659 case LUA_VLCL: return traverseLclosure(g, gco2lcl(o));
660 case LUA_VCCL: return traverseCclosure(g, gco2ccl(o));
661 case LUA_VPROTO: return traverseproto(g, gco2p(o));
662 case LUA_VTHREAD: return traversethread(g, gco2th(o));
663 default: lua_assert(0); return 0;
664 }
665}
666
667
668static lu_mem propagateall (global_State *g) {

Callers 2

propagateallFunction · 0.85
singlestepFunction · 0.85

Calls 7

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

Tested by

no test coverage detected