Skip to content

Commit f2b2d52

Browse files
jmdyckljharb
authored andcommitted
Editorial: Eliminate "Contained within" (#3361)
Change the 3 occurrences of a |Block|, |CaseClause|, or |DefaultClause| Contained within _code_ to any |Block|, |CaseClause|, or |DefaultClause| _x_ such that _code_ Contains _x_ is *true* (See #2663 (comment))
1 parent 5885b6c commit f2b2d52

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

spec.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -51033,7 +51033,7 @@ <h1>Changes to FunctionDeclarationInstantiation</h1>
5103351033
<p>During FunctionDeclarationInstantiation the following steps are performed in place of step <emu-xref href="#step-functiondeclarationinstantiation-web-compat-insertion-point"></emu-xref>:</p>
5103451034
<emu-alg replaces-step="step-functiondeclarationinstantiation-web-compat-insertion-point">
5103551035
1. If _strict_ is *false*, then
51036-
1. For each |FunctionDeclaration| _f_ that is directly contained in the |StatementList| of a |Block|, |CaseClause|, or |DefaultClause| Contained within _code_, do
51036+
1. For each |FunctionDeclaration| _f_ that is directly contained in the |StatementList| of any |Block|, |CaseClause|, or |DefaultClause| _x_ such that _code_ Contains _x_ is *true*, do
5103751037
1. Let _F_ be the StringValue of the |BindingIdentifier| of _f_.
5103851038
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
5103951039
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|.
@@ -51058,7 +51058,7 @@ <h1>Changes to GlobalDeclarationInstantiation</h1>
5105851058
1. Let _strict_ be ScriptIsStrict of _script_.
5105951059
1. If _strict_ is *false*, then
5106051060
1. Let _declaredFunctionOrVarNames_ be the list-concatenation of _declaredFunctionNames_ and _declaredVarNames_.
51061-
1. For each |FunctionDeclaration| _f_ that is directly contained in the |StatementList| of a |Block|, |CaseClause|, or |DefaultClause| Contained within _script_, do
51061+
1. For each |FunctionDeclaration| _f_ that is directly contained in the |StatementList| of any |Block|, |CaseClause|, or |DefaultClause| _x_ such that _script_ Contains _x_ is *true*, do
5106251062
1. Let _F_ be the StringValue of the |BindingIdentifier| of _f_.
5106351063
1. If replacing the |FunctionDeclaration| _f_ with a |VariableStatement| that has _F_ as a |BindingIdentifier| would not produce any Early Errors for _script_, then
5106451064
1. If _env_.HasLexicalDeclaration(_F_) is *false*, then
@@ -51083,7 +51083,7 @@ <h1>Changes to EvalDeclarationInstantiation</h1>
5108351083
<emu-alg replaces-step="step-evaldeclarationinstantiation-web-compat-insertion-point">
5108451084
1. If _strict_ is *false*, then
5108551085
1. Let _declaredFunctionOrVarNames_ be the list-concatenation of _declaredFunctionNames_ and _declaredVarNames_.
51086-
1. For each |FunctionDeclaration| _f_ that is directly contained in the |StatementList| of a |Block|, |CaseClause|, or |DefaultClause| Contained within _body_, do
51086+
1. For each |FunctionDeclaration| _f_ that is directly contained in the |StatementList| of any |Block|, |CaseClause|, or |DefaultClause| _x_ such that _body_ Contains _x_ is *true*, do
5108751087
1. Let _F_ be the StringValue of the |BindingIdentifier| of _f_.
5108851088
1. If replacing the |FunctionDeclaration| _f_ with a |VariableStatement| that has _F_ as a |BindingIdentifier| would not produce any Early Errors for _body_, then
5108951089
1. Let _bindingExists_ be *false*.

0 commit comments

Comments
 (0)