Parents: #465, #498 Related: #710, #491
Problem
The VM already has call_spread, call_eval_spread, call_with_this_spread, and new_spread, and the compiler already builds argument arrays with exact iterator expansion. Admission nevertheless rejects every spread call/constructor outside generators, and rejects computed-member spread even inside generators. This keeps ordinary plain, async, and program code on the tree-walker despite an existing runtime contract.
Scope
- Lower non-tail spread calls and constructors in program, plain-function, generator, and async bytecode through the existing variadic operations.
- Preserve callee/reference resolution before argument-list evaluation, including named/computed member receivers and
superhome-object/current-thissemantics. - Preserve left-to-right argument evaluation, iterator protocol and abrupt propagation (including the required absence of IteratorClose for spread expansion), abrupt completion, constructor
new.target, proxy/accessor behavior, and suspension in generator/async computed keys and spread operands. - Keep slot-based direct
eval(...spread)behind its existing dynamic-environment barrier; env-mode direct eval retainscall_eval_spread. - Keep proper-tail-call spread causally unsupported until receiver-aware and receiver-less tail-spread operations exist.
No-workaround rules
- No AST rewriting, repeated callee/key/getter evaluation, receiver-less method calls, array-only spread shortcut, source-shape exception, tree-walker callback, disabled proper tail calls, new global/shared scratch, or new runtime primitive.
- No stacks/queues/jobs-runtime, Promise/microtask, Worker, or Map/Set iterator changes.
Acceptance
- Plain/program/async direct, named/computed member,
super, and constructor spread compile through the exact existing opcode family; generator coverage remains exact. - Witnesses cover receiver/new-target identity, callee/key/getter/argument ordering, mixed spread/non-spread lists, iterators and abrupt closing, proxies, recursion, and suspension.
- Forced tree-walker and required/compiled bytecode agree; direct-eval and tail-spread barriers stay causal and audited.
- Focused compiler/frontend, full units, applicable TSan, and exact relevant Test262 before → after accounting pass with zero regressions.
- Parent/related issues and landing commit are cross-linked with quantified evidence.