Parents: #465, #713 Related: #716, #491
Problem
#713 lowered property/value deletion and #716 lowered SuperReference deletion, but delete identifier remains the final DeleteExpression admission barrier. Generator, async, and async-generator bodies cannot fall back after suspension, while plain functions currently reject even statically non-deletable frame locals.
Identifier deletion resolves an Environment Record reference rather than an object expression. Exact behavior distinguishes frame/upvalue bindings, declarative and deletable eval bindings, global object bindings, unresolvable references, and active with object environments including Symbol.unscopables and proxy traps.
Scope
- Add an owned name-deletion bytecode operation for program and function chunks.
- Fold statically resolved frame/upvalue deletion to
falsewhen no activation-local environment can shadow it. - When block/catch/with environments are active, search exactly the compiler-recorded activation environment depth before falling back to a non-deletable frame/upvalue binding; never consult an outer captured
withpast that boundary. - Fully resolve name-backed generator/async/global bindings, deletable eval bindings, global own properties, and unresolvable references.
- Preserve proxy/
Symbol.unscopablesordering, configurable attributes, abrupt traps, suspension, moving GC, and cached native-tier rejection. - Share one exact runtime name-deletion helper with the tree-walker rather than duplicating environment semantics.
No-workaround rules
- No source rewriting, eval callback, tree-walker dispatch disguised as bytecode, guessed scope cutoff, global-only special case, swallowed proxy trap, or broad function fallback.
- No activation scratch, stacks, queues, jobs, Promise/microtask, Worker lifecycle, or Map/Set iterator implementation changes.
Acceptance
- Program, plain, generator, async, and async-generator admission/runtime coverage spans local/upvalue, declarative, deletable eval, global, unresolvable, and nested
withreferences. - Ordering witnesses cover proxy
has/delete traps,Symbol.unscopables, abrupt completion, configurable attributes, suspension, and moving GC. - Focused compiler/VM/frontend, full units, exact relevant Test262, and applicable TSan gates pass with exact accounting.
- Landing commit and parent issues are cross-linked with quantified evidence.