Parents: #465, #493, #496
Related: #615, #616, #618
Problem
classDeferredBodiesCaptureFrame walks every deferred class member body once for every frame binding in the current and enclosing plain-function scopes. A function with many locals plus a large method/field/static-block surface therefore multiplies frame-binding count by deferred-class AST size during bytecode admission, even when the class references only globals.
The fallback is semantically necessary today: eval_class may capture Environment-backed bindings but cannot recover an arbitrary VM frame slot. The classifier must remain conservative and exact; broad class rejection is not an optimization.
Scope
- Freeze production parse + plain-function admission/compile rows at 1K/2K/4K frame widths with method/field/static-block and early/late/global-only controls.
- Collect frame-slot names across the exact
FnScope ancestry once, excluding bindings already backed by Environment Records.
- Traverse deferred class bodies once against exact frame-name membership while leaving eager superclass and computed-key evaluation unchanged.
- Preserve conservative shadowing, TDZ policy, class template/chunk structure, unsupported-reason identity, and allocation accounting.
- Keep the zero/one-frame-name common path allocation-free.
No-workaround rules
- No class syntax refusal, heuristic cutoff, skipped deferred member kind, eager-key conflation, tree-walker fallback presented as optimization, source rewriting, or process-global cache.
- A new class member/AST node kind must not silently create a frame-capture false negative.
Acceptance
Parents: #465, #493, #496
Related: #615, #616, #618
Problem
classDeferredBodiesCaptureFramewalks every deferred class member body once for every frame binding in the current and enclosing plain-function scopes. A function with many locals plus a large method/field/static-block surface therefore multiplies frame-binding count by deferred-class AST size during bytecode admission, even when the class references only globals.The fallback is semantically necessary today:
eval_classmay capture Environment-backed bindings but cannot recover an arbitrary VM frame slot. The classifier must remain conservative and exact; broad class rejection is not an optimization.Scope
FnScopeancestry once, excluding bindings already backed by Environment Records.No-workaround rules
Acceptance