MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / genlink

Function genlink

lib/lua/src/lgc.c:430–437  ·  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

428** 'correctgraylist' does when it finds a TOUCHED2 object.)
429*/
430static void genlink (global_State *g, GCObject *o) {
431 lua_assert(isblack(o));
432 if (getage(o) == G_TOUCHED1) { /* touched in this cycle? */
433 linkobjgclist(o, g->grayagain); /* link it back in 'grayagain' */
434 } /* everything else do not need to be linked back */
435 else if (getage(o) == G_TOUCHED2)
436 changeage(o, G_TOUCHED2, G_OLD); /* advance age */
437}
438
439
440/*

Callers 3

traverseephemeronFunction · 0.85
traversestrongtableFunction · 0.85
traverseudataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected