Commit Graph
1 Commits
Author SHA1 Message Date
Chris Tate 64bcb304e2 Monomorphize evolved-any array methods on the value's handle element under --dynamic
- An evolving-any array (const fns = []; fns.push(() => 1)) lowers array<jsval> at its any[] declaration, but tsc's evolving-array analysis answers the pushed element type at later method calls, so the lowering handed monomorphized helpers a jsval-element receiver under a typed signature — the SC9001 validator ICE.
- lowerArrayMethodCall now adopts the receiver VALUE's element type when it is a jsval-element array, riding the explicit-any[] handle-element lowering; HOF callback lead params bind the handles via jsvalParamOverrides whatever the evolved contextual type spelled.
- Derived bindings keep the handle-element array instead of the evolved spelling: locals adopt the initializer's type in lowerVarDecl, and file-scope globals register the handle-element array for aliases and receiver-type-preserving chains (filter/slice/splice/concat) rooted at a registered one.
- concat over a handle-element receiver decides spread-vs-element by the argument VALUE's array-ness, exactly JS's IsArray, instead of the evolved checker spelling.
- Corpus fixtures 2510-2513 pin map, filter/forEach/some/every/findIndex, mixed push sites, and the slice/concat and function-scope derived shapes, byte-identical vs Node under --dynamic on both backends.
2026-07-23 17:01:32 -05:00