** 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
| 468 | ** marked as touched in that mode. |
| 469 | */ |
| 470 | static 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 | /* |
no outgoing calls
no test coverage detected