On Mon Mar 2 19:28:30 2026 +0000, Jacek Caban wrote:
I do not see how that explains things. Let’s modify the example so that A becomes A1 -> A2 -> ... -> A1000 -> J1 -> J2 -> ... -> J1000 -> B, and only A1 has an external reference. Only CC knows the relationship between A1 and A1000, so only it knows about those references. According to your description, only GC knows the relationship between J1 and J1000. That means that “A reaches B via J” is not something either of them can determine on its own. Oh I see the confusion. No, the GC supplies the CC with edge info so the CC knows as well, it just doesn't supply it with a real "refcount" per object (since it doesn't have one anyway). That is, all edges from the GC (all JS objects) are known to the CC, and all JS objects are treated as if they had an extra external ref to themselves (so that the CC cannot clean them up). Does that clear things up?
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/10045#note_130999