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

Function genlink

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

** Check whether object 'o' should be kept in the 'grayagain' list for ** post-processing by 'correctgraylist'. (It could put all old objects ** in the list and leave all the work to 'correctgraylist', but it is ** more efficient to avoid adding elements that will be removed.) Only ** TOUCHED1 objects need to be in the list. TOUCHED2 doesn't need to go ** back to a gray list, but then it must beco

Source from the content-addressed store, hash-verified

468** marked as touched in that mode.
469*/
470static void genlink (global_State *g, GCObject *o) {
471 lua_assert(isblack(o));
472 if (getage(o) == G_TOUCHED1) { /* touched in this cycle? */
473 linkobjgclist(o, g->grayagain); /* link it back in 'grayagain' */
474 } /* everything else do not need to be linked back */
475 else if (getage(o) == G_TOUCHED2)
476 setage(o, G_OLD); /* advance age */
477}
478
479
480/*

Callers 4

traverseweakvalueFunction · 0.70
traverseephemeronFunction · 0.70
traversestrongtableFunction · 0.70
traverseudataFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected