Parents: #465, #790. Observed while validating #794; independent of its capture change.
Implemented by e0ed6eb1. Local verification and pushed CI are complete.
At main 8d772d1, all five pinned Test262 generator/async-generator eval-var-scope-syntax-err.js variants fail identically before and after the nested-capture change. They expect SyntaxError from parameter initialization, but receive ReferenceError:
function* f(a = eval("var a = 42")) {}
assert.throws(SyntaxError, function () { f(); });Affected paths:
test/language/statements/generators/eval-var-scope-syntax-err.jstest/language/expressions/generators/eval-var-scope-syntax-err.jstest/language/statements/async-generator/eval-var-scope-syntax-err.jstest/language/expressions/async-generator/eval-var-scope-syntax-err.jstest/language/expressions/async-generator/named-eval-var-scope-syntax-err.jstest/language/expressions/object/method-definition/gen-meth-eval-var-scope-syntax-err.jstest/language/expressions/object/method-definition/async-gen-meth-eval-var-scope-syntax-err.js
The existing Interpreter.checkEvalLexicalConflicts uses cur_func_params during a parameter default to reject colliding eval var declarations. Ordinary calls install the callee's parameter metadata, but vm.makeGenerator and makeAsyncGenerator bind parameters without installing that metadata. This makes the conflict check depend on the caller's parameters and lets execution reach the parameter TDZ instead of rejecting the eval declaration.
Acceptance:
- Install and restore exact callee parameter metadata for suspendable parameter initialization, including abrupt exits and nested calls.
- All seven existing failures flip, with paired forced-tree-walker/required-bytecode evidence and unchanged adjacent parameter/eval cases.
- Cover caller/callee name collisions, destructuring/defaults, and restoration after an exception.
- Audit the other parameter-initialization context fields without changing native job/queue/lifecycle mechanisms or masking errors.
- Focused safety and full integration checks pass.
- Pushed CI passes before closing.
No implementation is included in the #794 capture change. The pinned corpus revision is 4249661.
The current audit also found pre-existing private-name and field-initializer context defects, tracked separately with exact before/after probes in #797. The #795 fix does not claim those behaviors are corrected.
Completed integration
CI run 33113309062 completed successfully on main commit 8a1398ffc04e9e30987f968693667c7271ca3ce1, which contains this fix. All 53 executed jobs succeeded, including all four unit and TSan-unit shards, Linux no-GIL TSan, functional/no-GIL corpus gates, fuzz profiles, ABI, Wasm, Test262 parallel, and docs. The scheduled-only nightly job was skipped, not counted as a pass. The local evidence above plus this descendant integration run completes this issue's acceptance.