Files
scriptc/tests
Chris Tate da616a27cd Install the global lookup for function-local snapshots, and release navigator values read alone
A computed read through a snapshot of the global object taken in a
function (`const g = globalThis; return g[name];`) threw SC2020 for
builtin globals: the scan that decides whether a module installs the
builtin-global lookup runs before function bodies are lowered, when the
snapshot's alias is not registered yet. The scan now also recognizes a
variable whose only declaration initializes it with the global object.

navigator.language and navigator.languages cache their answers, but
only taking the navigator object registered their release at exit, so a
program that read just those members left them live and a sanitized
build exited with status 99. The first cached value now registers the
release.

Corpus 8161 reads through a function-local snapshot, and 8168 reads
navigator.language, navigator.languages and navigator.platform without
the navigator object.
2026-10-25 14:57:45 -05:00
..
…