mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-29 07:04:09 +08:00
A class carries the collector header when any class in its hierarchy can be on a cycle, so instances of classes whose own fields hold nothing cycle-capable were buffered as candidates and walked by every level. Such an object has no traced children and is never on a cycle. Their descriptors now name scr_cyc_no_children, and they are allocated with buf set to SCR_CYC_ACYCLIC. That value has the buffered bit set, so a release that leaves the object alive makes no call; scr_cyc_is_buffered is false for it, and an emitted death or publication mark takes the object out of a candidate buffer only when buf is below -1. A pass that walks such an object as a child restores the value when it survives.