Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editorial: Fix 2 old bugs re Block-Level Function Declarations #2951

Merged
merged 1 commit into from
Jun 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -28856,7 +28856,6 @@ <h1>
1. If _fnDefinable_ is *false*, throw a *TypeError* exception.
1. Append _fn_ to _declaredFunctionNames_.
1. Insert _d_ as the first element of _functionsToInitialize_.
1. [id="step-evaldeclarationinstantiation-web-compat-insertion-point"] NOTE: Annex <emu-xref href="#sec-web-compat-evaldeclarationinstantiation"></emu-xref> adds additional steps at this point.
1. Let _declaredVarNames_ be a new empty List.
1. For each element _d_ of _varDeclarations_, do
1. If _d_ is either a |VariableDeclaration|, a |ForBinding|, or a |BindingIdentifier|, then
Expand All @@ -28867,6 +28866,7 @@ <h1>
1. If _vnDefinable_ is *false*, throw a *TypeError* exception.
1. If _declaredVarNames_ does not contain _vn_, then
1. Append _vn_ to _declaredVarNames_.
1. [id="step-evaldeclarationinstantiation-web-compat-insertion-point"] NOTE: Annex <emu-xref href="#sec-web-compat-evaldeclarationinstantiation"></emu-xref> adds additional steps at this point.
1. [id="step-evaldeclarationinstantiation-post-validation"] NOTE: No abnormal terminations occur after this algorithm step unless _varEnv_ is a Global Environment Record and the global object is a Proxy exotic object.
1. Let _lexDeclarations_ be the LexicallyScopedDeclarations of _body_.
1. For each element _d_ of _lexDeclarations_, do
Expand Down Expand Up @@ -49444,7 +49444,7 @@ <h1>Changes to FunctionDeclarationInstantiation</h1>
1. Let _F_ be StringValue of the |BindingIdentifier| of _f_.
1. If replacing the |FunctionDeclaration| _f_ with a |VariableStatement| that has _F_ as a |BindingIdentifier| would not produce any Early Errors for _func_ and _parameterNames_ does not contain _F_, then
1. NOTE: A var binding for _F_ is only instantiated here if it is neither a VarDeclaredName, the name of a formal parameter, or another |FunctionDeclaration|.
1. If _initializedBindings_ does not contain _F_ and _F_ is not *"arguments"*, then
1. If _instantiatedVarNames_ does not contain _F_ and _F_ is not *"arguments"*, then
1. Perform ! _varEnv_.CreateMutableBinding(_F_, *false*).
1. Perform ! _varEnv_.InitializeBinding(_F_, *undefined*).
1. Append _F_ to _instantiatedVarNames_.
Expand Down