Skip to content

Commit

Permalink
Editorial: fix note about var decls in eval in parameter initializers (
Browse files Browse the repository at this point in the history
  • Loading branch information
bakkot authored and ljharb committed Jun 9, 2021
1 parent 3d8c15c commit 28fb25e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -11587,9 +11587,6 @@ <h1>FunctionDeclarationInstantiation ( _func_, _argumentsList_ )</h1>
<emu-note>
<p><emu-xref href="#sec-block-level-function-declarations-web-legacy-compatibility-semantics"></emu-xref> provides an extension to the above algorithm that is necessary for backwards compatibility with web browser implementations of ECMAScript that predate ECMAScript 2015.</p>
</emu-note>
<emu-note>
<p>Parameter |Initializer|s may contain direct eval expressions. Any top level declarations of such evals are only visible to the eval code (<emu-xref href="#sec-types-of-source-code"></emu-xref>). The creation of the environment for such declarations is described in <emu-xref href="#sec-runtime-semantics-iteratorbindinginitialization"></emu-xref>.</p>
</emu-note>
</emu-clause>
</emu-clause>

Expand Down Expand Up @@ -24619,7 +24616,7 @@ <h1>PerformEval ( _x_, _callerRealm_, _strictCaller_, _direct_ )</h1>
1. Return Completion(_result_).
</emu-alg>
<emu-note>
<p>The eval code cannot instantiate variable or function bindings in the variable environment of the calling context that invoked the eval if the calling context is evaluating formal parameter initializers or if either the code of the calling context or the eval code is strict mode code. Instead such bindings are instantiated in a new VariableEnvironment that is only accessible to the eval code. Bindings introduced by `let`, `const`, or `class` declarations are always instantiated in a new LexicalEnvironment.</p>
<p>The eval code cannot instantiate variable or function bindings in the variable environment of the calling context that invoked the eval if either the code of the calling context or the eval code is strict mode code. Instead such bindings are instantiated in a new VariableEnvironment that is only accessible to the eval code. Bindings introduced by `let`, `const`, or `class` declarations are always instantiated in a new LexicalEnvironment.</p>
</emu-note>
</emu-clause>

Expand Down

0 comments on commit 28fb25e

Please sign in to comment.