Files
scriptc/packages/compiler
Malte UblandClaude Opus 5.5 37ea2c9ce7 Keep arrays stored through a typed global view native
A fresh array literal written to a checked-dynamic slot is built as a
dynamic array. On a member of a typed view of the global object
(`(globalThis as typeof globalThis & { cache?: number[] }).cache ??= []`)
the program reads it back through that declaration, and each typed read
extracted a new native copy. `cache().push(x)` was lost, and two reads
were never the same array. Node keeps one array.

When the literal is the right side of a write (`=`, `??=`, `||=`) to a
member of the global object, and the member is declared as a native
array, build the native array and store it boxed. Every typed read then
extracts that same array, and untyped reads see it through its live
capsule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 21:31:28 -07:00
..
2026-10-22 18:44:10 -05:00
2026-10-22 17:17:27 -05:00
…