mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-05 08:13:06 +08:00
Two cases where a per-site clone lost writes, so later reads of the written objects folded to their initial literals: - A function walked in an enclosing clone's or receiver's context is no longer cloned per site. The clone was its own context root, so the variables it captures resolved to the default context's bindings, and its writes through them reached no object. - A clone's receiver now receives what the function's own receiver does, such as the object `bind` supplies, and an arrow's clone keeps the arrow's lexical `this`. Before, a bound function called at module initialization wrote through a fresh, empty receiver. The static-tables case writes at initialization through a helper's captured binding and through a bound function. It prints Node's `1,1` (it printed `0,0`), and the count of constant reads stays at 8. zod3's report keeps its 180 constant objects and 360 foldable reads.