Parents: #465, #498 Discovered by: #745 Related: #743, #744 Children: #747 (base, complete), #748 (derived, complete)
Resolution
Required bytecode now owns complete base and derived class-constructor activations. Base instance elements execute before parameter initialization; derived activations start with an unbound this cell, bind exactly once through super(), then install brands and run instance elements. Complete shapes no longer carry plain_policy_class_constructor_semantics; incomplete nested lowering remains causal and fail-closed.
Progress
- #747: base constructor instance-element prefix, private brands, computed names, field lexical context, moving-GC/OOM/no-GIL evidence —
d9d480d0 - #748: derived
super()activation, post-super elements, lexical arrows, native-tier completion, and exact return rules —afb9ce2c
Implemented scope
- Explicit uninitialized derived
this, exactsuper()initialization, repeated/missing-super errors, alternate object returns, and constructor completion in VM activations. - Public/private fields, auto-accessors, private method/accessor brands, computed names, and instance initializer order exactly once for base and derived constructors.
- Exact
new.target, live constructor prototype lookup, superclass capture before argument effects, default direct forwarding, abrupt completion/finally, recursion/reentry, moving GC, OOM restoration, and shared no-GIL execution. - Derived completion at bytecode, baseline-native, optimizer-entry, and OSR exits without disabling native eligibility.
- Causal direct-eval rejection in automatic mode and a hard required-mode failure with no interpreter fallback.
Acceptance
- Forced tree-walker and required bytecode agree on base/derived constructors,
super()errors, alternate object returns,new.target, public/private fields, brands, computed names, and initializer order. - Exceptions/finally, recursion/reentry, moving GC, OOM restoration, debugger/termination accounting, shared no-GIL, and TSan preserve exact activation state.
- Admission inventory removes the constructor-policy barrier only for fully covered shapes and keeps unsupported class forms causal and fail-closed.
- Full units, class/private-field Test262, threadfuzz, ABI/docs gates, and exact nonzero before -> after accounting pass with zero regressions.
- Conventional commits landed directly on
mainand cross-link #465, #498, and #745.
Evidence
- Test262 class statements: 4,367 -> 4,367 pass; class expressions: 4,059 -> 4,059 pass; 0 failures and 0 flips.
- Full units: 1,895 pass, 1 skip, 0 fail/leak.
- Threadfuzz: 400 normal + 400 TSan, 0 failures; derived and shared no-GIL TSan witnesses pass.
- Home public ABI 50/50, Home private 447/447, Bun private 437/437; C API fixtures pass.
- Docs link audit: 277 files; manifest-checked docs build: 50 pages.