MCPcopy Create free account
hub / github.com/DFHack/dfhack / convergeephemerons

Function convergeephemerons

depends/lua/src/lgc.c:608–623  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

606
607
608static void convergeephemerons (global_State *g) {
609 int changed;
610 do {
611 GCObject *w;
612 GCObject *next = g->ephemeron; /* get ephemeron list */
613 g->ephemeron = NULL; /* tables may return to this list when traversed */
614 changed = 0;
615 while ((w = next) != NULL) {
616 next = gco2t(w)->gclist;
617 if (traverseephemeron(g, gco2t(w))) { /* traverse marked some value? */
618 propagateall(g); /* propagate changes */
619 changed = 1; /* will have to revisit all ephemeron tables */
620 }
621 }
622 } while (changed);
623}
624
625/* }====================================================== */
626

Callers 1

atomicFunction · 0.85

Calls 2

traverseephemeronFunction · 0.85
propagateallFunction · 0.85

Tested by

no test coverage detected