Skip to content

Commit da3d674

Browse files
michaelficarraljharb
authored andcommitted
Editorial: work around ecmarkup limit with replacement step numbering (#2688)
1 parent b17f73b commit da3d674

File tree

1 file changed

+31
-28
lines changed

1 file changed

+31
-28
lines changed

spec.html

Lines changed: 31 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -47541,25 +47541,26 @@ <h1>Changes to FunctionDeclarationInstantiation</h1>
4754147541
<h1>Changes to GlobalDeclarationInstantiation</h1>
4754247542
<p>During GlobalDeclarationInstantiation the following steps are performed in place of step <emu-xref href="#step-globaldeclarationinstantiation-web-compat-insertion-point"></emu-xref>:</p>
4754347543
<emu-alg replaces-step="step-globaldeclarationinstantiation-web-compat-insertion-point">
47544-
1. Let _strict_ be IsStrict of _script_.
47545-
1. If _strict_ is *false*, then
47546-
1. Let _declaredFunctionOrVarNames_ be the list-concatenation of _declaredFunctionNames_ and _declaredVarNames_.
47547-
1. For each |FunctionDeclaration| _f_ that is directly contained in the |StatementList| of a |Block|, |CaseClause|, or |DefaultClause| Contained within _script_, do
47548-
1. Let _F_ be StringValue of the |BindingIdentifier| of _f_.
47549-
1. If replacing the |FunctionDeclaration| _f_ with a |VariableStatement| that has _F_ as a |BindingIdentifier| would not produce any Early Errors for _script_, then
47550-
1. If _env_.HasLexicalDeclaration(_F_) is *false*, then
47551-
1. Let _fnDefinable_ be ? _env_.CanDeclareGlobalVar(_F_).
47552-
1. If _fnDefinable_ is *true*, then
47553-
1. NOTE: A var binding for _F_ is only instantiated here if it is neither a VarDeclaredName nor the name of another |FunctionDeclaration|.
47554-
1. If _declaredFunctionOrVarNames_ does not contain _F_, then
47555-
1. Perform ? _env_.CreateGlobalVarBinding(_F_, *false*).
47556-
1. Append _F_ to _declaredFunctionOrVarNames_.
47557-
1. When the |FunctionDeclaration| _f_ is evaluated, perform the following steps in place of the |FunctionDeclaration| Evaluation algorithm provided in <emu-xref href="#sec-function-definitions-runtime-semantics-evaluation"></emu-xref>:
47558-
1. Let _genv_ be the running execution context's VariableEnvironment.
47559-
1. Let _benv_ be the running execution context's LexicalEnvironment.
47560-
1. Let _fobj_ be ! _benv_.GetBindingValue(_F_, *false*).
47561-
1. Perform ? <emu-meta effects="user-code">_genv_.SetMutableBinding</emu-meta>(_F_, _fobj_, *false*).
47562-
1. Return ~unused~.
47544+
1. Perform the following steps:
47545+
1. Let _strict_ be IsStrict of _script_.
47546+
1. If _strict_ is *false*, then
47547+
1. Let _declaredFunctionOrVarNames_ be the list-concatenation of _declaredFunctionNames_ and _declaredVarNames_.
47548+
1. For each |FunctionDeclaration| _f_ that is directly contained in the |StatementList| of a |Block|, |CaseClause|, or |DefaultClause| Contained within _script_, do
47549+
1. Let _F_ be StringValue of the |BindingIdentifier| of _f_.
47550+
1. If replacing the |FunctionDeclaration| _f_ with a |VariableStatement| that has _F_ as a |BindingIdentifier| would not produce any Early Errors for _script_, then
47551+
1. If _env_.HasLexicalDeclaration(_F_) is *false*, then
47552+
1. Let _fnDefinable_ be ? _env_.CanDeclareGlobalVar(_F_).
47553+
1. If _fnDefinable_ is *true*, then
47554+
1. NOTE: A var binding for _F_ is only instantiated here if it is neither a VarDeclaredName nor the name of another |FunctionDeclaration|.
47555+
1. If _declaredFunctionOrVarNames_ does not contain _F_, then
47556+
1. Perform ? _env_.CreateGlobalVarBinding(_F_, *false*).
47557+
1. Append _F_ to _declaredFunctionOrVarNames_.
47558+
1. When the |FunctionDeclaration| _f_ is evaluated, perform the following steps in place of the |FunctionDeclaration| Evaluation algorithm provided in <emu-xref href="#sec-function-definitions-runtime-semantics-evaluation"></emu-xref>:
47559+
1. Let _genv_ be the running execution context's VariableEnvironment.
47560+
1. Let _benv_ be the running execution context's LexicalEnvironment.
47561+
1. Let _fobj_ be ! _benv_.GetBindingValue(_F_, *false*).
47562+
1. Perform ? <emu-meta effects="user-code">_genv_.SetMutableBinding</emu-meta>(_F_, _fobj_, *false*).
47563+
1. Return ~unused~.
4756347564
</emu-alg>
4756447565
</emu-annex>
4756547566

@@ -47643,11 +47644,12 @@ <h1>Changes to BlockDeclarationInstantiation</h1>
4764347644
</emu-alg>
4764447645
<p>During BlockDeclarationInstantiation the following steps are performed in place of step <emu-xref href="#step-blockdeclarationinstantiation-initializebinding"></emu-xref>:</p>
4764547646
<emu-alg replaces-step="step-blockdeclarationinstantiation-initializebinding">
47646-
1. If the binding for _fn_ in _env_ is an uninitialized binding, then
47647-
1. Perform ! _env_.InitializeBinding(_fn_, _fo_).
47648-
1. Else,
47649-
1. Assert: _d_ is a |FunctionDeclaration|.
47650-
1. Perform ! _env_.SetMutableBinding(_fn_, _fo_, *false*).
47647+
1. Perform the following steps:
47648+
1. If the binding for _fn_ in _env_ is an uninitialized binding, then
47649+
1. Perform ! _env_.InitializeBinding(_fn_, _fo_).
47650+
1. Else,
47651+
1. Assert: _d_ is a |FunctionDeclaration|.
47652+
1. Perform ! _env_.SetMutableBinding(_fn_, _fo_, *false*).
4765147653
</emu-alg>
4765247654
</emu-annex>
4765347655
</emu-annex>
@@ -47775,10 +47777,11 @@ <h1>Changes to ToBoolean</h1>
4777547777

4777647778
<emu-annex id="sec-IsHTMLDDA-internal-slot-aec">
4777747779
<h1>Changes to IsLooselyEqual</h1>
47778-
<p>The following steps replace step <emu-xref href="#step-abstract-equality-comparison-web-compat-insertion-point"></emu-xref> of the IsLooselyEqual algorithm:</p>
47779-
<emu-alg>
47780-
1. If Type(_x_) is Object and _x_ has an [[IsHTMLDDA]] internal slot and _y_ is either *null* or *undefined*, return *true*.
47781-
1. If _x_ is either *null* or *undefined* and Type(_y_) is Object and _y_ has an [[IsHTMLDDA]] internal slot, return *true*.
47780+
<p>During IsLooselyEqual the following steps are performed in place of step <emu-xref href="#step-abstract-equality-comparison-web-compat-insertion-point"></emu-xref>:</p>
47781+
<emu-alg replaces-step="step-abstract-equality-comparison-web-compat-insertion-point">
47782+
1. Perform the following steps:
47783+
1. If Type(_x_) is Object and _x_ has an [[IsHTMLDDA]] internal slot and _y_ is either *null* or *undefined*, return *true*.
47784+
1. If _x_ is either *null* or *undefined* and Type(_y_) is Object and _y_ has an [[IsHTMLDDA]] internal slot, return *true*.
4778247785
</emu-alg>
4778347786
</emu-annex>
4778447787

0 commit comments

Comments
 (0)