Files
scriptc/packages
Chris Tate 6c3affab90 Read array-like elements for join, flat and flatMap in specification order
join checked each index with HasProperty before reading it, so a proxy's
has trap ran, and could hide a value or throw. flat converted its depth
only after it had read every index, and flatMap ran every callback before
it flattened any result, so a later read or callback could change an
array that should already have been copied.

- join reads every index with Get alone; a missing index joins as the
  empty string.
- flat converts its depth after the length and before the first index,
  and flatMap checks its callback there.
- Each present value, mapped first for flatMap, is flattened into the
  result before the next index is read, through the array dispatch's
  flat over `[value]`.

scr_dyn.h declares scr_dyn_array_like_call and scr_dyn_builtin_prototype,
the entry points of the two gated units, so every scr_* name the backend
can emit has a prototype in scr_runtime.h. The array-like corpus program's
logging proxy answers its has trap with `in` instead of Reflect.has, which
has no static lowering, so the program stays fully static.
2026-10-29 18:32:55 -05:00
..
2026-10-27 23:02:33 -05:00
2026-10-26 13:25:42 -05:00