diff --git a/spec.html b/spec.html index 282860796c2..1e9671434a6 100644 --- a/spec.html +++ b/spec.html @@ -4212,7 +4212,7 @@

The ClassStaticBlockDefinition Record Specification Type

- [[Body]] + [[BodyFunction]] An function object. @@ -5853,7 +5853,7 @@

EvaluateStaticBlock ( _receiver_, _blockRecord_ )

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_). @@ -6423,7 +6423,7 @@

Static Semantics: LexicallyDeclaredNames

1. Return TopLevelLexicallyDeclaredNames of |StatementList|. - ClassStaticBlockStatementList: [empty] + ClassStaticBlockStatementList : [empty] 1. Return a new empty List. @@ -11387,6 +11387,13 @@

Runtime Semantics: EvaluateBody

Even though field initializers constitute a function boundary, calling FunctionDeclarationInstantiation does not have any observable effect and so is omitted.

+ + ClassStaticBlockBody : ClassStaticBlockStatementList + + + 1. Assert: _argumentsList_ is empty. + 1. Return ? EvaluateClassStaticBlockBody of |ClassStaticBlockBody| with argument _functionObject_. + @@ -21244,28 +21251,28 @@

Static Semantics: Early Errors

ClassStaticBlockBody: ClassStaticBlockStatementList
@@ -21444,6 +21451,8 @@

Static Semantics: PrivateBoundIdentifiers

ClassElementName : PropertyName + ClassElement : ClassStaticBlock + ClassElement : `;` @@ -21660,7 +21669,7 @@

Static Semantics: ComputedPropertyContainsAwait

PropertyName : ComputedPropertyName - 1. Return the result of ComputedPropertyContainsAwait for |ComputedPropertyName|. + 1. Return the result of ContainsAwait for |ComputedPropertyName|. MethodDefinition : @@ -21681,10 +21690,14 @@

Static Semantics: ComputedPropertyContainsAwait

ClassElementList : ClassElementList ClassElement - 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|. - ClassElement : `;` + + ClassElement : ClassStaticBlock + + ClassElement : `;` + 1. Return *false*. @@ -21738,11 +21751,21 @@

Runtime Semantics: ClassStaticBlockDefinitionEvaluation

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_, « », |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_, « », |ClassStaticBlockBody|, ~non-lexical-this~, _lex_, _privateScope_). + 1. Perform MakeMethod(_bodyFunction_, _homeObject_). + 1. Return the ClassStaticBlockDefinition Record { [[BodyFunction]]: _bodyFunction_ }. + + The function _bodyFunction_ is never directly accessible to ECMAScript code. + + + +

Runtime Semantics: EvaluateClassStaticBlockBody

+

With parameter _functionObject_.

+ ClassStaticBlockBody : ClassStaticBlockStatementList + + 1. Perform ? FunctionDeclarationInstantiation(_functionObject_, « »). + 1. Return the result of evaluating |ClassStaticBlockStatementList|. - The function created for _body_ is never directly accessible to ECMAScript code.
@@ -41901,6 +41924,9 @@

Functions and Classes

+ + +