MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / propagatemark

Function propagatemark

extlibs/lua/src/lgc.c:596–614  ·  view source on GitHub ↗

** traverse one gray object, turning it to black (except for threads, ** which are always gray). */

Source from the content-addressed store, hash-verified

594** which are always gray).
595*/
596static lu_mem propagatemark (global_State *g) {
597 GCObject *o = g->gray;
598 gray2black(o);
599 g->gray = *getgclist(o); /* remove from 'gray' list */
600 switch (o->tt) {
601 case LUA_VTABLE: return traversetable(g, gco2t(o));
602 case LUA_VUSERDATA: return traverseudata(g, gco2u(o));
603 case LUA_VLCL: return traverseLclosure(g, gco2lcl(o));
604 case LUA_VCCL: return traverseCclosure(g, gco2ccl(o));
605 case LUA_VPROTO: return traverseproto(g, gco2p(o));
606 case LUA_VTHREAD: {
607 lua_State *th = gco2th(o);
608 linkgclist(th, g->grayagain); /* insert into 'grayagain' list */
609 black2gray(o);
610 return traversethread(g, th);
611 }
612 default: lua_assert(0); return 0;
613 }
614}
615
616
617static 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