Skip to content

Commit

Permalink
PR Feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
rbuckton committed Jun 24, 2021
1 parent d7353de commit 5319cfe
Showing 1 changed file with 44 additions and 18 deletions.
62 changes: 44 additions & 18 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -4212,7 +4212,7 @@ <h1>The ClassStaticBlockDefinition Record Specification Type</h1>
</tr>
<tr>
<td>
[[Body]]
[[BodyFunction]]
</td>
<td>
An function object.
Expand Down Expand Up @@ -5853,7 +5853,7 @@ <h1>EvaluateStaticBlock ( _receiver_, _blockRecord_ )</h1>
<emu-alg>
1. Assert: Type(_receiver_) is Object.
1. Assert: _blockRecord_ is a ClassStaticBlockDefinition Record.
1. Perform ? Call(_blockRecord_.[[Body]], _receiver_).
1. Perform ? Call(_blockRecord_.[[BodyFunction]], _receiver_).
</emu-alg>
</emu-clause>
</emu-clause>
Expand Down Expand Up @@ -6423,7 +6423,7 @@ <h1>Static Semantics: LexicallyDeclaredNames</h1>
<emu-alg>
1. Return TopLevelLexicallyDeclaredNames of |StatementList|.
</emu-alg>
<emu-grammar>ClassStaticBlockStatementList: [empty]</emu-grammar>
<emu-grammar>ClassStaticBlockStatementList : [empty]</emu-grammar>
<emu-alg>
1. Return a new empty List.
</emu-alg>
Expand Down Expand Up @@ -11387,6 +11387,13 @@ <h1>Runtime Semantics: EvaluateBody</h1>
<emu-note>
<p>Even though field initializers constitute a function boundary, calling FunctionDeclarationInstantiation does not have any observable effect and so is omitted.</p>
</emu-note>
<emu-grammar>
ClassStaticBlockBody : ClassStaticBlockStatementList
</emu-grammar>
<emu-grammar>
1. Assert: _argumentsList_ is empty.
1. Return ? EvaluateClassStaticBlockBody of |ClassStaticBlockBody| with argument _functionObject_.
</emu-grammar>
</emu-clause>

<emu-clause id="sec-ordinarycallevaluatebody" aoid="OrdinaryCallEvaluateBody">
Expand Down Expand Up @@ -21244,28 +21251,28 @@ <h1>Static Semantics: Early Errors</h1>
<emu-grammar>ClassStaticBlockBody: ClassStaticBlockStatementList</emu-grammar>
<ul>
<li>
<p>It is a Syntax Error if the LexicallyDeclaredNames of |ClassStaticBlockStatementList| contains any duplicate entries.</p>
It is a Syntax Error if the LexicallyDeclaredNames of |ClassStaticBlockStatementList| contains any duplicate entries.
</li>
<li>
<p>It is a Syntax Error if any element of the LexicallyDeclaredNames of |ClassStaticBlockStatementList| also occurs in the VarDeclaredNames of |ClassStaticBlockStatementList|.</p>
It is a Syntax Error if any element of the LexicallyDeclaredNames of |ClassStaticBlockStatementList| also occurs in the VarDeclaredNames of |ClassStaticBlockStatementList|.
</li>
<li>
<p>It is a Syntax Error if ContainsDuplicateLabels of |ClassStaticBlockStatementList| with argument &laquo; &raquo; is *true*.</p>
It is a Syntax Error if ContainsDuplicateLabels of |ClassStaticBlockStatementList| with argument &laquo; &raquo; is *true*.
</li>
<li>
<p>It is a Syntax Error if ContainsUndefinedBreakTarget of |ClassStaticBlockStatementList| with argument &laquo; &raquo; is *true*.</p>
It is a Syntax Error if ContainsUndefinedBreakTarget of |ClassStaticBlockStatementList| with argument &laquo; &raquo; is *true*.
</li>
<li>
<p>It is a Syntax Error if ContainsUndefinedContinueTarget of |ClassStaticBlockStatementList| with arguments &laquo; &raquo; and &laquo; &raquo; is *true*.</p>
It is a Syntax Error if ContainsUndefinedContinueTarget of |ClassStaticBlockStatementList| with arguments &laquo; &raquo; and &laquo; &raquo; is *true*.
</li>
<li>
<p>It is a Syntax Error if ContainsArguments of |ClassStaticBlockStatementList| is *true*.</p>
It is a Syntax Error if ContainsArguments of |ClassStaticBlockStatementList| is *true*.
</li>
<li>
<p>It is a Syntax Error if |ClassStaticBlockStatementList| Contains |SuperCall| is *true*.</p>
It is a Syntax Error if |ClassStaticBlockStatementList| Contains |SuperCall| is *true*.
</li>
<li>
<p>It is a Syntax Error if ContainsAwait of |ClassStaticBlockStatementList| is *true*.</p>
It is a Syntax Error if ContainsAwait of |ClassStaticBlockStatementList| is *true*.
</li>
</ul>
</emu-clause>
Expand Down Expand Up @@ -21444,6 +21451,8 @@ <h1>Static Semantics: PrivateBoundIdentifiers</h1>
<emu-grammar>
ClassElementName : PropertyName

ClassElement : ClassStaticBlock

ClassElement : `;`
</emu-grammar>
<emu-alg>
Expand Down Expand Up @@ -21660,7 +21669,7 @@ <h1>Static Semantics: ComputedPropertyContainsAwait</h1>
</emu-alg>
<emu-grammar>PropertyName : ComputedPropertyName</emu-grammar>
<emu-alg>
1. Return the result of ComputedPropertyContainsAwait for |ComputedPropertyName|.
1. Return the result of ContainsAwait for |ComputedPropertyName|.
</emu-alg>
<emu-grammar>
MethodDefinition :
Expand All @@ -21681,10 +21690,14 @@ <h1>Static Semantics: ComputedPropertyContainsAwait</h1>
</emu-alg>
<emu-grammar>ClassElementList : ClassElementList ClassElement</emu-grammar>
<emu-alg>
1. Let ComputedPropertyContainsAwait for |ClassElementList| is *true*, return *true*.
1. If ComputedPropertyContainsAwait for |ClassElementList| is *true*, return *true*.
1. Return the result of ComputedPropertyContainsAwait for |ClassElement|.
</emu-alg>
<emu-grammar>ClassElement : `;`</emu-grammar>
<emu-grammar>
ClassElement : ClassStaticBlock

ClassElement : `;`
</emu-grammar>
<emu-alg>
1. Return *false*.
</emu-alg>
Expand Down Expand Up @@ -21738,11 +21751,21 @@ <h1>Runtime Semantics: ClassStaticBlockDefinitionEvaluation</h1>
1. Let _lex_ be the running execution context's LexicalEnvironment.
1. Let _privateScope_ be the running execution context's PrivateEnvironment.
1. Let _sourceText_ be the empty sequence of Unicode code points.
1. Let _body_ be OrdinaryFunctionCreate(%Function.prototype%, _sourceText_, &laquo; &raquo;, |ClassStaticBlockBody|, ~non-lexical-this~, _lex_, _privateScope_).
1. Perform MakeMethod(_body_, _homeObject_).
1. Return the ClassStaticBlockDefinition Record { [[Body]]: _body_ }.
1. Let _bodyFunction_ be OrdinaryFunctionCreate(%Function.prototype%, _sourceText_, &laquo; &raquo;, |ClassStaticBlockBody|, ~non-lexical-this~, _lex_, _privateScope_).
1. Perform MakeMethod(_bodyFunction_, _homeObject_).
1. Return the ClassStaticBlockDefinition Record { [[BodyFunction]]: _bodyFunction_ }.
</emu-alg>
<emu-note>The function _bodyFunction_ is never directly accessible to ECMAScript code.</emu-note>
</emu-clause>

<emu-clause id="sec-runtime-semantics-evaluateclassstaticblockbody" type="sdo" aoid="EvaluateClassStaticBlockBody">
<h1>Runtime Semantics: EvaluateClassStaticBlockBody</h1>
<p>With parameter _functionObject_.</p>
<emu-grammar>ClassStaticBlockBody : ClassStaticBlockStatementList</emu-grammar>
<emu-alg>
1. Perform ? FunctionDeclarationInstantiation(_functionObject_, &laquo; &raquo;).
1. Return the result of evaluating |ClassStaticBlockStatementList|.
</emu-alg>
<emu-note>The function created for _body_ is never directly accessible to ECMAScript code.</emu-note>
</emu-clause>

<emu-clause id="sec-static-semantics-classelementevaluation" type="sdo" aoid="ClassElementEvaluation">
Expand Down Expand Up @@ -41901,6 +41924,9 @@ <h1>Functions and Classes</h1>
<emu-prodref name="ClassElement"></emu-prodref>
<emu-prodref name="FieldDefinition"></emu-prodref>
<emu-prodref name="ClassElementName"></emu-prodref>
<emu-prodref name="ClassStaticBlock"></emu-prodref>
<emu-prodref name="ClassStaticBlockBody"></emu-prodref>
<emu-prodref name="ClassStaticBlockBodyStatementList"></emu-prodref>
</emu-annex>

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

0 comments on commit 5319cfe

Please sign in to comment.