** 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
| 422 | ** 'correctgraylist' does when it finds a TOUCHED2 object.) |
| 423 | */ |
| 424 | static void genlink (global_State *g, GCObject *o) { |
| 425 | lua_assert(isblack(o)); |
| 426 | if (getage(o) == G_TOUCHED1) { /* touched in this cycle? */ |
| 427 | linkobjgclist(o, g->grayagain); /* link it back in 'grayagain' */ |
| 428 | } /* everything else do not need to be linked back */ |
| 429 | else if (getage(o) == G_TOUCHED2) |
| 430 | changeage(o, G_TOUCHED2, G_OLD); /* advance age */ |
| 431 | } |
| 432 | |
| 433 | |
| 434 | /* |
no outgoing calls
no test coverage detected