Parents: #465, #498 Depends on: #744 Related: #739, #740, #741, #742, #743, #746
Problem
#744 permits exact value and receiver-preserving calls rooted in invocation context or strictly earlier formals, but construction through a proven earlier constructor still rejects the enclosing plain function. The VM already owns canonical [[Construct]], callee/argument order, new.target, Proxy construct traps, base initialization, explicit object-return override, abrupt completion, activation nesting, and GC roots through new_call.
Scope
- Admit non-spread
newexpressions when the constructor and every argument recursively satisfy the parameter-safe grammar. - Preserve constructor evaluation before left-to-right arguments, one
[[Construct]], exactnew.target, Proxy construct behavior, base initialization, primitive-vs-object return rules, non-constructable errors, provided-value bypass, recursion/reentrancy, moving GC, and OOM propagation. - Permit nested safe construction and composition through existing value/property/call nodes while retaining immutable metadata, debugger/step/watchdog accounting, shared-chunk no-GIL execution, and exact activation restoration.
Spread construction, optional/private/super construction, direct eval/import, writes/assignment/update/delete, unresolved outer/body bindings, suspension, literal allocation, nested-pattern expressions, and rest mixtures remain barriers. Derived and field-initializing constructor callees retain their independent plain_policy_class_constructor_semantics barrier tracked in #746; this issue does not route them through the tree walker.
No-workaround rules
- No eager construction, cached instance, duplicated constructor/getter/argument effect, skipped constructability check, substituted
new.target, source rewriting, permissivenewarm, tree-walker callback (including for #746 constructor shapes), hidden native tier, or benchmark-only path. - No stacks, queues, jobs, Promise, microtask, Worker lifecycle, or Map/Set iterator changes.
Acceptance
- Exhaustive admission tests accept only recursively safe non-spread construction and reject spread/private/super/outer/unsafe-argument forms.
- Forced tree-walker and required bytecode agree on value and named/computed bytecode-eligible constructors, callee-before-arguments order, Proxy construct,
new.target, base initialization, object return override, non-constructable/throwing constructors, provided bypass, methods/arrows, and recursion/reentrancy. - Moving-GC, allocation-failure restoration, shared no-GIL, and TSan witnesses preserve one-shot effects and activation state.
- Full units, focused compiler/frontend/VM, threadfuzz, and exact nonzero relevant Test262 accounting pass with zero regressions.
- A conventional commit lands directly on main and cross-links #465, #498, #744, #743, #742, #739, #740, #741, and #746.
Landed
feat(compiler): lower parameter construction defaults (#745)