Files
scriptc/packages
Chris Tate 317162af78 Count repeated calls through constructors, apply and per-value callbacks
The constant-graph pass treats a function whose call edges all run once
at initialization as init-only. Some calls recorded no edge or a
once-only one:

- `new F()` of an ES5 constructor and `f.apply(thisArg, args)` bound the
  arguments without a call edge, so a function also called directly once
  was init-only even when a loop constructed or applied it.
- Callbacks of Array.from, toSorted, replace and replaceAll run once per
  element, comparison or match, but those methods were missing from the
  repeating callback set.
- JSON.parse revivers, JSON.stringify replacers and toJSON methods run
  once per value; their edges at the JSON call site now count as
  repeated, including toJSON calls resolved after the call's handling.

Objects these functions write or allocate were reported as constant, and
their reads as foldable. constant-graphs.test.ts covers each case.
2026-10-24 16:13:05 -05:00
..
2026-10-23 20:51:00 -05:00
2026-10-23 20:51:00 -05:00
2026-10-23 20:51:00 -05:00
2026-10-23 20:51:00 -05:00
2026-10-23 20:51:00 -05:00
2026-10-23 20:51:00 -05:00
2026-10-23 20:51:00 -05:00
2026-10-23 20:51:00 -05:00
2026-10-23 20:51:00 -05:00
2026-10-23 20:51:00 -05:00
2026-10-23 20:51:00 -05:00
2026-10-23 20:51:00 -05:00
2026-10-23 20:51:00 -05:00
2026-10-23 20:51:00 -05:00