Parents: #465, #493 Related: #726, #730
Problem
Frame-mode bytecode statically selects local/upvalue/global stores, while a with Object Environment Record can redirect an identifier through observable @@unscopables and HasProperty. Destructuring assignment must evaluate each target Reference before IteratorStep/GetV, and destructuring var BindingInitialization resolves each binding at its own spec point. Deferring name resolution until PutValue or forcing a frame slot changes order and destination, so #726 and #730 correctly keep these functions on the tree walker.
The same boundary must be audited for simple var x = value inside with; a static frame store may bypass the object Environment.
Scope
- Represent one resolved identifier Reference in activation-owned storage without borrowing a recyclable Environment or object pointer unsafely.
- Resolve dynamic bindings at the exact assignment/declaration evaluation point, including
Symbol.unscopables, Proxy traps, getters, abrupt completion, and strict/sloppy PutValue behavior. - Reuse the Reference for the final write without repeating
HasBindingor observable lookup. - Lower array/object destructuring assignment and
vardeclaration targets insidewith, including defaults, computed keys, rest, iterator close, recursion, suspension-capable env-mode paths where applicable, and nestedwithrecords. - Audit and correct simple
varinitializer behavior through the same primitive. - Preserve lexical declaration binding to its declarative scope, ordinary static frame/upvalue fast paths, moving/concurrent GC, activation reuse, and exact interpreter fallback until the complete path is admitted.
No-workaround rules
- No delayed re-resolution, duplicated Proxy/
@@unscopablesobservation, source rewriting, synthesized global names, raw Environment pointers without lifetime ownership, heuristic syntax refusal, or tree-walker fallback presented as implementation. - No stacks, queues, jobs, Promise, microtask, Worker lifecycle, or Map/Set iterator changes.
Acceptance
- Forced tree-walker and required bytecode agree on exact Reference-creation/iterator/property/write order and destinations across nested
with, Proxy,@@unscopables, defaults, rest, abrupt close, recursion, and GC. - Simple and destructuring
varinitialization plus destructuring assignment use the activation-owned Reference and no longer hitunsupported_lowering. - Static bindings retain their current direct bytecodes and native-tier eligibility.
- Focused compiler/frontend/VM, full units, applicable TSan/no-GIL, and nonzero relevant Test262 subtrees pass with exact accounting.
- Landing commit cross-links #465, #493, #726, and #730.