mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-12 02:13:04 +08:00
Helpers declared above the consts they read force those consts into TDZ boxes with a checked read per access. When every environment created before the initializing assignment is the direct value of an unshared local whose reads all follow that assignment (and so do the binding's own reads), no code can observe the empty box: the binding splits at its initialization and closures copy its value once, including numeric constants. Calls in the initializer, escapes before it and helpers reached through other captured helpers keep their checks.