Skip to content

Commit 5319cfe

Browse files
committed
PR Feedback
1 parent d7353de commit 5319cfe

File tree

1 file changed

+44
-18
lines changed

1 file changed

+44
-18
lines changed

spec.html

Lines changed: 44 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4212,7 +4212,7 @@ <h1>The ClassStaticBlockDefinition Record Specification Type</h1>
42124212
</tr>
42134213
<tr>
42144214
<td>
4215-
[[Body]]
4215+
[[BodyFunction]]
42164216
</td>
42174217
<td>
42184218
An function object.
@@ -5853,7 +5853,7 @@ <h1>EvaluateStaticBlock ( _receiver_, _blockRecord_ )</h1>
58535853
<emu-alg>
58545854
1. Assert: Type(_receiver_) is Object.
58555855
1. Assert: _blockRecord_ is a ClassStaticBlockDefinition Record.
5856-
1. Perform ? Call(_blockRecord_.[[Body]], _receiver_).
5856+
1. Perform ? Call(_blockRecord_.[[BodyFunction]], _receiver_).
58575857
</emu-alg>
58585858
</emu-clause>
58595859
</emu-clause>
@@ -6423,7 +6423,7 @@ <h1>Static Semantics: LexicallyDeclaredNames</h1>
64236423
<emu-alg>
64246424
1. Return TopLevelLexicallyDeclaredNames of |StatementList|.
64256425
</emu-alg>
6426-
<emu-grammar>ClassStaticBlockStatementList: [empty]</emu-grammar>
6426+
<emu-grammar>ClassStaticBlockStatementList : [empty]</emu-grammar>
64276427
<emu-alg>
64286428
1. Return a new empty List.
64296429
</emu-alg>
@@ -11387,6 +11387,13 @@ <h1>Runtime Semantics: EvaluateBody</h1>
1138711387
<emu-note>
1138811388
<p>Even though field initializers constitute a function boundary, calling FunctionDeclarationInstantiation does not have any observable effect and so is omitted.</p>
1138911389
</emu-note>
11390+
<emu-grammar>
11391+
ClassStaticBlockBody : ClassStaticBlockStatementList
11392+
</emu-grammar>
11393+
<emu-grammar>
11394+
1. Assert: _argumentsList_ is empty.
11395+
1. Return ? EvaluateClassStaticBlockBody of |ClassStaticBlockBody| with argument _functionObject_.
11396+
</emu-grammar>
1139011397
</emu-clause>
1139111398

1139211399
<emu-clause id="sec-ordinarycallevaluatebody" aoid="OrdinaryCallEvaluateBody">
@@ -21244,28 +21251,28 @@ <h1>Static Semantics: Early Errors</h1>
2124421251
<emu-grammar>ClassStaticBlockBody: ClassStaticBlockStatementList</emu-grammar>
2124521252
<ul>
2124621253
<li>
21247-
<p>It is a Syntax Error if the LexicallyDeclaredNames of |ClassStaticBlockStatementList| contains any duplicate entries.</p>
21254+
It is a Syntax Error if the LexicallyDeclaredNames of |ClassStaticBlockStatementList| contains any duplicate entries.
2124821255
</li>
2124921256
<li>
21250-
<p>It is a Syntax Error if any element of the LexicallyDeclaredNames of |ClassStaticBlockStatementList| also occurs in the VarDeclaredNames of |ClassStaticBlockStatementList|.</p>
21257+
It is a Syntax Error if any element of the LexicallyDeclaredNames of |ClassStaticBlockStatementList| also occurs in the VarDeclaredNames of |ClassStaticBlockStatementList|.
2125121258
</li>
2125221259
<li>
21253-
<p>It is a Syntax Error if ContainsDuplicateLabels of |ClassStaticBlockStatementList| with argument &laquo; &raquo; is *true*.</p>
21260+
It is a Syntax Error if ContainsDuplicateLabels of |ClassStaticBlockStatementList| with argument &laquo; &raquo; is *true*.
2125421261
</li>
2125521262
<li>
21256-
<p>It is a Syntax Error if ContainsUndefinedBreakTarget of |ClassStaticBlockStatementList| with argument &laquo; &raquo; is *true*.</p>
21263+
It is a Syntax Error if ContainsUndefinedBreakTarget of |ClassStaticBlockStatementList| with argument &laquo; &raquo; is *true*.
2125721264
</li>
2125821265
<li>
21259-
<p>It is a Syntax Error if ContainsUndefinedContinueTarget of |ClassStaticBlockStatementList| with arguments &laquo; &raquo; and &laquo; &raquo; is *true*.</p>
21266+
It is a Syntax Error if ContainsUndefinedContinueTarget of |ClassStaticBlockStatementList| with arguments &laquo; &raquo; and &laquo; &raquo; is *true*.
2126021267
</li>
2126121268
<li>
21262-
<p>It is a Syntax Error if ContainsArguments of |ClassStaticBlockStatementList| is *true*.</p>
21269+
It is a Syntax Error if ContainsArguments of |ClassStaticBlockStatementList| is *true*.
2126321270
</li>
2126421271
<li>
21265-
<p>It is a Syntax Error if |ClassStaticBlockStatementList| Contains |SuperCall| is *true*.</p>
21272+
It is a Syntax Error if |ClassStaticBlockStatementList| Contains |SuperCall| is *true*.
2126621273
</li>
2126721274
<li>
21268-
<p>It is a Syntax Error if ContainsAwait of |ClassStaticBlockStatementList| is *true*.</p>
21275+
It is a Syntax Error if ContainsAwait of |ClassStaticBlockStatementList| is *true*.
2126921276
</li>
2127021277
</ul>
2127121278
</emu-clause>
@@ -21444,6 +21451,8 @@ <h1>Static Semantics: PrivateBoundIdentifiers</h1>
2144421451
<emu-grammar>
2144521452
ClassElementName : PropertyName
2144621453

21454+
ClassElement : ClassStaticBlock
21455+
2144721456
ClassElement : `;`
2144821457
</emu-grammar>
2144921458
<emu-alg>
@@ -21660,7 +21669,7 @@ <h1>Static Semantics: ComputedPropertyContainsAwait</h1>
2166021669
</emu-alg>
2166121670
<emu-grammar>PropertyName : ComputedPropertyName</emu-grammar>
2166221671
<emu-alg>
21663-
1. Return the result of ComputedPropertyContainsAwait for |ComputedPropertyName|.
21672+
1. Return the result of ContainsAwait for |ComputedPropertyName|.
2166421673
</emu-alg>
2166521674
<emu-grammar>
2166621675
MethodDefinition :
@@ -21681,10 +21690,14 @@ <h1>Static Semantics: ComputedPropertyContainsAwait</h1>
2168121690
</emu-alg>
2168221691
<emu-grammar>ClassElementList : ClassElementList ClassElement</emu-grammar>
2168321692
<emu-alg>
21684-
1. Let ComputedPropertyContainsAwait for |ClassElementList| is *true*, return *true*.
21693+
1. If ComputedPropertyContainsAwait for |ClassElementList| is *true*, return *true*.
2168521694
1. Return the result of ComputedPropertyContainsAwait for |ClassElement|.
2168621695
</emu-alg>
21687-
<emu-grammar>ClassElement : `;`</emu-grammar>
21696+
<emu-grammar>
21697+
ClassElement : ClassStaticBlock
21698+
21699+
ClassElement : `;`
21700+
</emu-grammar>
2168821701
<emu-alg>
2168921702
1. Return *false*.
2169021703
</emu-alg>
@@ -21738,11 +21751,21 @@ <h1>Runtime Semantics: ClassStaticBlockDefinitionEvaluation</h1>
2173821751
1. Let _lex_ be the running execution context's LexicalEnvironment.
2173921752
1. Let _privateScope_ be the running execution context's PrivateEnvironment.
2174021753
1. Let _sourceText_ be the empty sequence of Unicode code points.
21741-
1. Let _body_ be OrdinaryFunctionCreate(%Function.prototype%, _sourceText_, &laquo; &raquo;, |ClassStaticBlockBody|, ~non-lexical-this~, _lex_, _privateScope_).
21742-
1. Perform MakeMethod(_body_, _homeObject_).
21743-
1. Return the ClassStaticBlockDefinition Record { [[Body]]: _body_ }.
21754+
1. Let _bodyFunction_ be OrdinaryFunctionCreate(%Function.prototype%, _sourceText_, &laquo; &raquo;, |ClassStaticBlockBody|, ~non-lexical-this~, _lex_, _privateScope_).
21755+
1. Perform MakeMethod(_bodyFunction_, _homeObject_).
21756+
1. Return the ClassStaticBlockDefinition Record { [[BodyFunction]]: _bodyFunction_ }.
21757+
</emu-alg>
21758+
<emu-note>The function _bodyFunction_ is never directly accessible to ECMAScript code.</emu-note>
21759+
</emu-clause>
21760+
21761+
<emu-clause id="sec-runtime-semantics-evaluateclassstaticblockbody" type="sdo" aoid="EvaluateClassStaticBlockBody">
21762+
<h1>Runtime Semantics: EvaluateClassStaticBlockBody</h1>
21763+
<p>With parameter _functionObject_.</p>
21764+
<emu-grammar>ClassStaticBlockBody : ClassStaticBlockStatementList</emu-grammar>
21765+
<emu-alg>
21766+
1. Perform ? FunctionDeclarationInstantiation(_functionObject_, &laquo; &raquo;).
21767+
1. Return the result of evaluating |ClassStaticBlockStatementList|.
2174421768
</emu-alg>
21745-
<emu-note>The function created for _body_ is never directly accessible to ECMAScript code.</emu-note>
2174621769
</emu-clause>
2174721770

2174821771
<emu-clause id="sec-static-semantics-classelementevaluation" type="sdo" aoid="ClassElementEvaluation">
@@ -41901,6 +41924,9 @@ <h1>Functions and Classes</h1>
4190141924
<emu-prodref name="ClassElement"></emu-prodref>
4190241925
<emu-prodref name="FieldDefinition"></emu-prodref>
4190341926
<emu-prodref name="ClassElementName"></emu-prodref>
41927+
<emu-prodref name="ClassStaticBlock"></emu-prodref>
41928+
<emu-prodref name="ClassStaticBlockBody"></emu-prodref>
41929+
<emu-prodref name="ClassStaticBlockBodyStatementList"></emu-prodref>
4190441930
</emu-annex>
4190541931

4190641932
<emu-annex id="sec-scripts-and-modules">

0 commit comments

Comments
 (0)