Parents: #465, #498 Depends on: #741 Related: #739, #740
Problem
#739 recursively lowers primitive-only default expressions, while #740/#741 add exact invocation-context and earlier-formal leaves only as complete expressions. Composing those proven leaves through the same unary, binary, logical, conditional, and sequence nodes still falls back even though the VM already owns canonical runtime evaluation, coercion, short-circuiting, abrupt completion, and GC roots for every operation.
Scope
- Admit recursively parameter-safe expression trees whose leaves are primitive literals, exact
this/new.target/own-arguments, or bindings established by strictly earlier formals. - Retain the existing explicit unary, binary, logical, conditional, and sequence node grammar; every child must recursively satisfy the same rule.
- Evaluate normally on every raw-undefined call with exact coercion effects, short-circuiting, BigInt behavior, exception ordering, provided-value bypass, reentrancy, moving GC, and OOM propagation.
- Preserve self/later/outer TDZ and environment boundaries, derived/field constructor policy, immutable metadata, debugger/step accounting, shared-chunk no-GIL execution, and native activation guards.
Member/call/new expressions, functions/classes, object/array/regex/template literals, assignment/update/delete, direct eval, imports, yield/await, nested pattern expressions, and rest mixtures remain barriers even when a subexpression appears unreachable.
No-workaround rules
- No constant folding, host evaluation, source rewriting, cached result, skipped coercion, effect replay, permissive default switch arm, guessed identifier resolution, tree-walker callback, or alternate metadata path.
- No stacks, queues, jobs, Promise, microtask, Worker lifecycle, or Map/Set iterator changes.
Acceptance
- Exhaustive compiler tests prove every recursive node/leaf family and reject every excluded or unsafe composition.
- Forced tree-walker and required bytecode agree on primitive/object coercion, short-circuiting, throws, signed zero/NaN/infinity, BigInt, values, bypass, recursion/reentrancy, methods/arrows/base constructors, and moving GC.
- Shared no-GIL/TSan and allocation-failure restoration remain exact without effect replay.
- Full units, focused compiler/frontend/VM, threadfuzz, and exact nonzero Test262 accounting pass with zero regressions.
- A conventional commit lands directly on main and cross-links #465, #498, #741, #739, and #740.
Landed
54c54afe — feat(compiler): compose parameter defaults (#742)