From 1f67a0db1c0a3d913863671119ee0ac94fbd3f65 Mon Sep 17 00:00:00 2001 From: Michael Ficarra Date: Tue, 20 Sep 2022 17:02:29 -0700 Subject: [PATCH] Editorial: misc minor editorial changes (#2909) --- spec.html | 62 +++++++++++++++++++++++++++---------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/spec.html b/spec.html index fb0a844519..f2ca49170d 100644 --- a/spec.html +++ b/spec.html @@ -7604,7 +7604,7 @@

Static Semantics: LexicallyDeclaredNames ( ): a List of Strings

StatementListItem : Statement - 1. If |Statement| is Statement : LabelledStatement , return LexicallyDeclaredNames of |LabelledStatement|. + 1. If |Statement| is Statement : LabelledStatement, return LexicallyDeclaredNames of |LabelledStatement|. 1. Return a new empty List. StatementListItem : Declaration @@ -7728,7 +7728,7 @@

Static Semantics: LexicallyScopedDeclarations ( ): a List of Parse Nodes

StatementListItem : Statement - 1. If |Statement| is Statement : LabelledStatement , return LexicallyScopedDeclarations of |LabelledStatement|. + 1. If |Statement| is Statement : LabelledStatement, return LexicallyScopedDeclarations of |LabelledStatement|. 1. Return a new empty List. StatementListItem : Declaration @@ -8300,7 +8300,7 @@

Static Semantics: TopLevelLexicallyDeclaredNames ( ): a List of Strings

StatementListItem : Declaration - 1. If |Declaration| is Declaration : HoistableDeclaration , then + 1. If |Declaration| is Declaration : HoistableDeclaration, then 1. Return a new empty List. 1. Return the BoundNames of |Declaration|. @@ -8325,7 +8325,7 @@

Static Semantics: TopLevelLexicallyScopedDeclarations ( ): a List of Parse N StatementListItem : Declaration - 1. If |Declaration| is Declaration : HoistableDeclaration , then + 1. If |Declaration| is Declaration : HoistableDeclaration, then 1. Return a new empty List. 1. Return « |Declaration| ». @@ -8343,13 +8343,13 @@

Static Semantics: TopLevelVarDeclaredNames ( ): a List of Strings

StatementListItem : Declaration - 1. If |Declaration| is Declaration : HoistableDeclaration , then + 1. If |Declaration| is Declaration : HoistableDeclaration, then 1. Return the BoundNames of |HoistableDeclaration|. 1. Return a new empty List. StatementListItem : Statement - 1. If |Statement| is Statement : LabelledStatement , return TopLevelVarDeclaredNames of |Statement|. + 1. If |Statement| is Statement : LabelledStatement, return TopLevelVarDeclaredNames of |Statement|. 1. Return VarDeclaredNames of |Statement|. @@ -8361,7 +8361,7 @@

Static Semantics: TopLevelVarDeclaredNames ( ): a List of Strings

LabelledItem : Statement - 1. If |Statement| is Statement : LabelledStatement , return TopLevelVarDeclaredNames of |Statement|. + 1. If |Statement| is Statement : LabelledStatement, return TopLevelVarDeclaredNames of |Statement|. 1. Return VarDeclaredNames of |Statement|. LabelledItem : FunctionDeclaration @@ -8382,12 +8382,12 @@

Static Semantics: TopLevelVarScopedDeclarations ( ): a List of Parse Nodes StatementListItem : Statement - 1. If |Statement| is Statement : LabelledStatement , return TopLevelVarScopedDeclarations of |Statement|. + 1. If |Statement| is Statement : LabelledStatement, return TopLevelVarScopedDeclarations of |Statement|. 1. Return VarScopedDeclarations of |Statement|. StatementListItem : Declaration - 1. If |Declaration| is Declaration : HoistableDeclaration , then + 1. If |Declaration| is Declaration : HoistableDeclaration, then 1. Let _declaration_ be DeclarationPart of |HoistableDeclaration|. 1. Return « _declaration_ ». 1. Return a new empty List. @@ -8398,7 +8398,7 @@

Static Semantics: TopLevelVarScopedDeclarations ( ): a List of Parse Nodes LabelledItem : Statement - 1. If |Statement| is Statement : LabelledStatement , return TopLevelVarScopedDeclarations of |Statement|. + 1. If |Statement| is Statement : LabelledStatement, return TopLevelVarScopedDeclarations of |Statement|. 1. Return VarScopedDeclarations of |Statement|. LabelledItem : FunctionDeclaration @@ -10888,7 +10888,7 @@

Global Environment Records

CreateGlobalVarBinding(N, D) - Used to create and initialize to *undefined* a global `var` binding in the [[ObjectRecord]] component of a Global Environment Record. The binding will be a mutable binding. The corresponding global object property will have attribute values appropriate for a `var`. The String value _N_ is the bound name. If _D_ is *true* the binding may be deleted. Logically equivalent to CreateMutableBinding followed by a SetMutableBinding but it allows var declarations to receive special treatment. + Used to create and initialize to *undefined* a global `var` binding in the [[ObjectRecord]] component of a Global Environment Record. The binding will be a mutable binding. The corresponding global object property will have attribute values appropriate for a `var`. The String value _N_ is the bound name. If _D_ is *true*, the binding may be deleted. Logically equivalent to CreateMutableBinding followed by a SetMutableBinding but it allows var declarations to receive special treatment. @@ -10896,7 +10896,7 @@

Global Environment Records

CreateGlobalFunctionBinding(N, V, D) - Create and initialize a global `function` binding in the [[ObjectRecord]] component of a Global Environment Record. The binding will be a mutable binding. The corresponding global object property will have attribute values appropriate for a `function`. The String value _N_ is the bound name. _V_ is the initialization value. If the Boolean argument _D_ is *true* the binding may be deleted. Logically equivalent to CreateMutableBinding followed by a SetMutableBinding but it allows function declarations to receive special treatment. + Create and initialize a global `function` binding in the [[ObjectRecord]] component of a Global Environment Record. The binding will be a mutable binding. The corresponding global object property will have attribute values appropriate for a `function`. The String value _N_ is the bound name. _V_ is the initialization value. If the Boolean argument _D_ is *true*, the binding may be deleted. Logically equivalent to CreateMutableBinding followed by a SetMutableBinding but it allows function declarations to receive special treatment. @@ -11407,7 +11407,7 @@

1. Assert: _envRec_ does not already have a binding for _N_. - 1. Assert: When _M_.[[Environment]] is instantiated it will have a direct binding for _N2_. + 1. Assert: When _M_.[[Environment]] is instantiated, it will have a direct binding for _N2_. 1. Create an immutable indirect binding in _envRec_ for _N_ that references _M_ and _N2_ as its target binding and record that the binding is initialized. 1. Return ~unused~. @@ -14356,7 +14356,7 @@

1. Let _isMapped_ be ! HasOwnProperty(_map_, _P_). 1. Let _newArgDesc_ be _Desc_. 1. If _isMapped_ is *true* and IsDataDescriptor(_Desc_) is *true*, then - 1. If _Desc_ does not have a [[Value]] field, and _Desc_ has a [[Writable]] field, and _Desc_.[[Writable]] is *false*, then + 1. If _Desc_ does not have a [[Value]] field, _Desc_ has a [[Writable]] field, and _Desc_.[[Writable]] is *false*, then 1. Set _newArgDesc_ to a copy of _Desc_. 1. Set _newArgDesc_.[[Value]] to ! Get(_map_, _P_). 1. Let _allowed_ be ! OrdinaryDefineOwnProperty(_args_, _P_, _newArgDesc_). @@ -22719,7 +22719,7 @@

1. If _stmt_ is not a |LabelledStatement|, return *false*. 1. Let _item_ be the |LabelledItem| of _stmt_. - 1. If _item_ is LabelledItem : FunctionDeclaration , return *true*. + 1. If _item_ is LabelledItem : FunctionDeclaration, return *true*. 1. Let _subStmt_ be the |Statement| of _item_. 1. Return IsLabelledFunction(_subStmt_). @@ -26255,7 +26255,7 @@

Cyclic Module Records

a List of Strings - A List of all the |ModuleSpecifier| strings used by the module represented by this record to request the importation of a module. The List is source text occurrence ordered. + A List of all the |ModuleSpecifier| strings used by the module represented by this record to request the importation of a module. The List is in source text occurrence order. @@ -28681,10 +28681,10 @@

1. If _script_ is a List of errors, throw a *SyntaxError* exception. 1. If _script_ Contains |ScriptBody| is *false*, return *undefined*. 1. Let _body_ be the |ScriptBody| of _script_. - 1. If _inFunction_ is *false*, and _body_ Contains |NewTarget|, throw a *SyntaxError* exception. - 1. If _inMethod_ is *false*, and _body_ Contains |SuperProperty|, throw a *SyntaxError* exception. - 1. If _inDerivedConstructor_ is *false*, and _body_ Contains |SuperCall|, throw a *SyntaxError* exception. - 1. If _inClassFieldInitializer_ is *true*, and ContainsArguments of _body_ is *true*, throw a *SyntaxError* exception. + 1. If _inFunction_ is *false* and _body_ Contains |NewTarget|, throw a *SyntaxError* exception. + 1. If _inMethod_ is *false* and _body_ Contains |SuperProperty|, throw a *SyntaxError* exception. + 1. If _inDerivedConstructor_ is *false* and _body_ Contains |SuperCall|, throw a *SyntaxError* exception. + 1. If _inClassFieldInitializer_ is *true* and ContainsArguments of _body_ is *true*, throw a *SyntaxError* exception. 1. If _strictCaller_ is *true*, let _strictEval_ be *true*. 1. Else, let _strictEval_ be IsStrict of _script_. 1. Let _runningContext_ be the running execution context. @@ -30100,7 +30100,7 @@

Function.prototype.toString ( )

This method performs the following steps when called:

1. Let _func_ be the *this* value. - 1. If _func_ is an Object and _func_ has a [[SourceText]] internal slot and _func_.[[SourceText]] is a sequence of Unicode code points and HostHasSourceTextAvailable(_func_) is *true*, then + 1. If _func_ is an Object, _func_ has a [[SourceText]] internal slot, _func_.[[SourceText]] is a sequence of Unicode code points, and HostHasSourceTextAvailable(_func_) is *true*, then 1. Return CodePointsToString(_func_.[[SourceText]]). 1. If _func_ is a built-in function object, return an implementation-defined String source code representation of _func_. The representation must have the syntax of a |NativeFunction|. Additionally, if _func_ has an [[InitialName]] internal slot and _func_.[[InitialName]] is a String, the portion of the returned String that would be matched by |NativeFunctionAccessor?| |PropertyName| must be the value of _func_.[[InitialName]]. 1. If _func_ is an Object and IsCallable(_func_) is *true*, return an implementation-defined String source code representation of _func_. The representation must have the syntax of a |NativeFunction|. @@ -35848,7 +35848,7 @@

CharacterClassEscape :: `D` - 1. Return the CharSet containing all characters not in the CharSet returned by CharacterClassEscape :: `d` . + 1. Return the CharSet containing all characters not in the CharSet returned by CharacterClassEscape :: `d`. CharacterClassEscape :: `s` @@ -35856,7 +35856,7 @@

CharacterClassEscape :: `S` - 1. Return the CharSet containing all characters not in the CharSet returned by CharacterClassEscape :: `s` . + 1. Return the CharSet containing all characters not in the CharSet returned by CharacterClassEscape :: `s`. CharacterClassEscape :: `w` @@ -35864,7 +35864,7 @@

CharacterClassEscape :: `W` - 1. Return the CharSet containing all characters not in the CharSet returned by CharacterClassEscape :: `w` . + 1. Return the CharSet containing all characters not in the CharSet returned by CharacterClassEscape :: `w`. CharacterClassEscape :: `p{` UnicodePropertyValueExpression `}` @@ -44360,7 +44360,7 @@

Promise.race ( _iterable_ )

1. Return ? _result_.
-

If the _iterable_ argument is empty or if none of the promises in _iterable_ ever settle then the pending promise returned by this method will never be settled.

+

If the _iterable_ argument yields no values or if none of the promises yielded by _iterable_ ever settle, then the pending promise returned by this method will never be settled.

This function expects its *this* value to be a constructor function that supports the parameter conventions of the Promise constructor. It also expects that its *this* value provides a `resolve` method.

@@ -44757,7 +44757,7 @@

prototype

Whenever a GeneratorFunction instance is created another ordinary object is also created and is the initial value of the generator function's *"prototype"* property. The value of the prototype property is used to initialize the [[Prototype]] internal slot of a newly created Generator when the generator function object is invoked using [[Call]].

This property has the attributes { [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }.

-

Unlike Function instances, the object that is the value of the a GeneratorFunction's *"prototype"* property does not have a *"constructor"* property whose value is the GeneratorFunction instance.

+

Unlike Function instances, the object that is the value of a GeneratorFunction's *"prototype"* property does not have a *"constructor"* property whose value is the GeneratorFunction instance.

@@ -44861,10 +44861,10 @@

name

prototype

-

Whenever an AsyncGeneratorFunction instance is created another ordinary object is also created and is the initial value of the async generator function's *"prototype"* property. The value of the prototype property is used to initialize the [[Prototype]] internal slot of a newly created AsyncGenerator when the generator function object is invoked using [[Call]].

+

Whenever an AsyncGeneratorFunction instance is created, another ordinary object is also created and is the initial value of the async generator function's *"prototype"* property. The value of the prototype property is used to initialize the [[Prototype]] internal slot of a newly created AsyncGenerator when the generator function object is invoked using [[Call]].

This property has the attributes { [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }.

-

Unlike function instances, the object that is the value of the an AsyncGeneratorFunction's *"prototype"* property does not have a *"constructor"* property whose value is the AsyncGeneratorFunction instance.

+

Unlike function instances, the object that is the value of an AsyncGeneratorFunction's *"prototype"* property does not have a *"constructor"* property whose value is the AsyncGeneratorFunction instance.

@@ -46488,7 +46488,7 @@

Coherent Reads

1. For each element _W_ of _Ws_, do 1. If (_R_, _W_) is in _execution_.[[HappensBefore]], then 1. Return *false*. - 1. If there is a WriteSharedMemory or ReadModifyWriteSharedMemory event _V_ that has _byteLocation_ in its range such that the pairs (_W_, _V_) and (_V_, _R_) are in _execution_.[[HappensBefore]], then + 1. If there exists a WriteSharedMemory or ReadModifyWriteSharedMemory event _V_ that has _byteLocation_ in its range such that the pairs (_W_, _V_) and (_V_, _R_) are in _execution_.[[HappensBefore]], then 1. Return *false*. 1. Set _byteLocation_ to _byteLocation_ + 1. 1. Return *true*. @@ -46503,7 +46503,7 @@

Tear Free Reads

1. If _R_.[[NoTear]] is *true*, then 1. Assert: The remainder of dividing _R_.[[ByteIndex]] by _R_.[[ElementSize]] is 0. 1. For each event _W_ such that (_R_, _W_) is in _execution_.[[ReadsFrom]] and _W_.[[NoTear]] is *true*, do - 1. If _R_ and _W_ have equal ranges, and there is an event _V_ such that _V_ and _W_ have equal ranges, _V_.[[NoTear]] is *true*, _W_ is not _V_, and (_R_, _V_) is in _execution_.[[ReadsFrom]], then + 1. If _R_ and _W_ have equal ranges and there exists an event _V_ such that _V_ and _W_ have equal ranges, _V_.[[NoTear]] is *true*, _W_ is not _V_, and (_R_, _V_) is in _execution_.[[ReadsFrom]], then 1. Return *false*. 1. Return *true*. @@ -48242,7 +48242,7 @@

Corrections and Clarifications in ECMAScript 2015 with Possible Compatibilit

: If the year cannot be represented using the Date Time String Format specified in a RangeError exception is thrown. Previous editions did not specify the behaviour for that case.

: Previous editions did not specify the value returned by `Date.prototype.toString` when this time value is *NaN*. ECMAScript 2015 specifies the result to be the String value *"Invalid Date"*.

, : Any LineTerminator code points in the value of the *"source"* property of a RegExp instance must be expressed using an escape sequence. Edition 5.1 only required the escaping of `/`.

-

, : In previous editions, the specifications for `String.prototype.match` and `String.prototype.replace` was incorrect for cases where the pattern argument was a RegExp value whose `global` flag is set. The previous specifications stated that for each attempt to match the pattern, if `lastIndex` did not change it should be incremented by 1. The correct behaviour is that `lastIndex` should be incremented by one only if the pattern matched the empty String.

+

, : In previous editions, the specifications for `String.prototype.match` and `String.prototype.replace` was incorrect for cases where the pattern argument was a RegExp value whose `global` flag is set. The previous specifications stated that for each attempt to match the pattern, if `lastIndex` did not change, it should be incremented by 1. The correct behaviour is that `lastIndex` should be incremented by 1 only if the pattern matched the empty String.

: Previous editions did not specify how a *NaN* value returned by a _comparefn_ was interpreted by `Array.prototype.sort`. ECMAScript 2015 specifies that such as value is treated as if *+0*𝔽 was returned from the _comparefn_. ECMAScript 2015 also specifies that ToNumber is applied to the result returned by a _comparefn_. In previous editions, the effect of a _comparefn_ result that is not a Number value was implementation-defined. In practice, implementations call ToNumber.