Files
scriptc/packages
Chris Tate c7c21fe4a5 Convert cyclic dyn values to recursive shapes
Checking or converting a dyn value whose objects or arrays refer back to
each other against a recursive interface (`raw.next = raw; raw as Node`)
recursed without end and overflowed the stack. Matchers and builders of
record and array types that reach themselves now track the dyn values
they visit:

- a matcher answers true for a (value, type) pair it is already checking
  further up the stack, so the outer check decides;
- a builder records the record or array it allocated for a dyn value
  before converting its members, and a later visit of the same value in
  the conversion answers it, so `n.next === n` holds after the cast and a
  value reached twice converts once.

Only values with more than one reference are tracked, since a value
reached twice has at least two; the reference a member read holds is not
counted. Capsules materialized during a conversion keep their first view,
so a nested visit cannot refresh a view an outer visit is reading, and
getters and proxy traps that a member read calls run outside the visit. The
cycle analysis treats record shapes that reach themselves and are targets
of a dynCheck as mutable, so the cyclic records a conversion builds are
collected.
2026-10-16 00:52:19 -05:00
..
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 21:48:48 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 21:48:48 -05:00
2026-10-15 19:13:52 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00