mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-09 11:44:31 +08:00
freezableTypes seeded its worklist with `stack.push(...live)`, one entry per untyped conversion in the program. A spread argument list is capped by the engine's argument limit, so a large program threw `RangeError: Maximum call stack size exceeded` while lowering, which crashed the pi coverage build. Seed the worklist with a loop push instead. The same spread sat on other program-sized accumulators: the diagnostics and runtime-fence ledgers (one entry per deferred statement), the lowered function list, the static program roots, module units and early bindings, and the dropped-package scan results. Those push with loops too. Spreads over a fixed list or over one node's own children stay as they are. The co-located test seeds a 200k-entry live list, which the spread throws on, and pins that a live record type still marks its shape freezable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>