diff --git a/spec.html b/spec.html index 7bdb7a9f263..405333492da 100644 --- a/spec.html +++ b/spec.html @@ -14294,7 +14294,7 @@

- 1. Let _len_ be the number of elements of _argumentsList_. + 1. Let _len_ be the number of elements in _argumentsList_. 1. Let _obj_ be OrdinaryObjectCreate(%Object.prototype%, « [[ParameterMap]] »). 1. Set _obj_.[[ParameterMap]] to *undefined*. 1. Perform ! DefinePropertyOrThrow(_obj_, *"length"*, PropertyDescriptor { [[Value]]: 𝔽(_len_), [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *true* }). @@ -14322,7 +14322,7 @@

1. Assert: _formals_ does not contain a rest parameter, any binding patterns, or any initializers. It may contain duplicate identifiers. - 1. Let _len_ be the number of elements of _argumentsList_. + 1. Let _len_ be the number of elements in _argumentsList_. 1. Let _obj_ be MakeBasicObject(« [[Prototype]], [[Extensible]], [[ParameterMap]] »). 1. Set _obj_.[[GetOwnProperty]] as specified in . 1. Set _obj_.[[DefineOwnProperty]] as specified in . @@ -14333,7 +14333,7 @@

1. Let _map_ be OrdinaryObjectCreate(*null*). 1. Set _obj_.[[ParameterMap]] to _map_. 1. Let _parameterNames_ be the BoundNames of _formals_. - 1. Let _numberOfParameters_ be the number of elements of _parameterNames_. + 1. Let _numberOfParameters_ be the number of elements in _parameterNames_. 1. Let _index_ be 0. 1. Repeat, while _index_ < _len_, 1. Let _val_ be _argumentsList_[_index_]. @@ -18397,7 +18397,7 @@

Static Semantics: Early Errors

  • - It is a Syntax Error if the number of elements of the result of TemplateStrings of |TemplateLiteral| with argument *false* is greater than 232 - 1. + It is a Syntax Error if the number of elements in the result of TemplateStrings of |TemplateLiteral| with argument *false* is greater than 232 - 1.
@@ -18505,7 +18505,7 @@

1. Return _e_.[[Array]]. 1. Let _rawStrings_ be TemplateStrings of _templateLiteral_ with argument *true*. 1. Let _cookedStrings_ be TemplateStrings of _templateLiteral_ with argument *false*. - 1. Let _count_ be the number of elements of the List _cookedStrings_. + 1. Let _count_ be the number of elements in the List _cookedStrings_. 1. Assert: _count_ ≤ 232 - 1. 1. Let _template_ be ! ArrayCreate(_count_). 1. Let _rawObj_ be ! ArrayCreate(_count_). @@ -29687,7 +29687,7 @@

1. Let _bodySym_ be the grammar symbol |AsyncGeneratorBody|. 1. Let _parameterSym_ be the grammar symbol |FormalParameters[+Yield, +Await]|. 1. Let _fallbackProto_ be *"%AsyncGeneratorFunction.prototype%"*. - 1. Let _argCount_ be the number of elements of _args_. + 1. Let _argCount_ be the number of elements in _args_. 1. Let _P_ be the empty String. 1. If _argCount_ = 0, let _bodyArg_ be the empty String. 1. Else if _argCount_ = 1, let _bodyArg_ be _args_[0]. @@ -29812,7 +29812,7 @@

Function.prototype.bind ( _thisArg_, ..._args_ )

1. Else, 1. Let _targetLenAsInt_ be ! ToIntegerOrInfinity(_targetLen_). 1. Assert: _targetLenAsInt_ is finite. - 1. Let _argCount_ be the number of elements of _args_. + 1. Let _argCount_ be the number of elements in _args_. 1. Set _L_ to max(_targetLenAsInt_ - _argCount_, 0). 1. Perform SetFunctionLength(_F_, _L_). 1. Let _targetName_ be ? Get(_Target_, *"name"*). @@ -32449,7 +32449,7 @@

Date ( ..._values_ )

1. If NewTarget is *undefined*, then 1. Let _now_ be the time value (UTC) identifying the current time. 1. Return ToDateString(_now_). - 1. Let _numberOfArgs_ be the number of elements of _values_. + 1. Let _numberOfArgs_ be the number of elements in _values_. 1. If _numberOfArgs_ = 0, then 1. Let _dv_ be the time value (UTC) identifying the current time. 1. Else if _numberOfArgs_ = 1, then @@ -33504,7 +33504,7 @@

String.raw ( _template_, ..._substitutions_ )

This function may be called with a variable number of arguments. The first argument is _template_ and the remainder of the arguments form the List _substitutions_.

It performs the following steps when called:

- 1. Let _substitutionCount_ be the number of elements of _substitutions_. + 1. Let _substitutionCount_ be the number of elements in _substitutions_. 1. Let _cooked_ be ? ToObject(_template_). 1. Let _literals_ be ? ToObject(? Get(_cooked_, *"raw"*)). 1. Let _literalCount_ be ? LengthOfArrayLike(_literals_). @@ -34020,7 +34020,7 @@

1. Let _digits_ be the substring of _templateRemainder_ from 1 to 1 + _digitCount_. 1. Let _index_ be ℝ(StringToNumber(_digits_)). 1. Assert: 0 ≤ _index_ ≤ 99. - 1. Let _captureLen_ be the number of elements of _captures_. + 1. Let _captureLen_ be the number of elements in _captures_. 1. If 1 ≤ _index_ ≤ _captureLen_, then 1. Let _capture_ be _captures_[_index_ - 1]. 1. If _capture_ is *undefined*, then @@ -34169,7 +34169,7 @@

String.prototype.split ( _separator_, _limit_ )

1. Repeat, while _j_ is not -1, 1. Let _T_ be the substring of _S_ from _i_ to _j_. 1. Append _T_ to _substrings_. - 1. If the number of elements of _substrings_ is _lim_, return CreateArrayFromList(_substrings_). + 1. If the number of elements in _substrings_ is _lim_, return CreateArrayFromList(_substrings_). 1. Set _i_ to _j_ + _separatorLength_. 1. Set _j_ to StringIndexOf(_S_, _R_, _i_). 1. Let _T_ be the substring of _S_ from _i_. @@ -34404,7 +34404,7 @@

Properties of String Instances

length

-

The number of elements of the String value represented by this String object.

+

The number of elements in the String value represented by this String object.

Once a String object is initialized, this property is unchanging. It has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *false* }.

@@ -35186,7 +35186,7 @@

1. Let _m_ be CompileSubpattern of |Disjunction| with arguments _rer_ and ~forward~. 1. Return a new Abstract Closure with parameters (_Input_, _index_) that captures _rer_ and _m_ and performs the following steps when called: 1. Assert: _Input_ is a List of characters. - 1. Assert: _index_ is a non-negative integer which is ≤ the number of elements of _Input_. + 1. Assert: _index_ is a non-negative integer which is ≤ the number of elements in _Input_. 1. Let _c_ be a new MatcherContinuation with parameters (_y_) that captures nothing and performs the following steps when called: 1. Assert: _y_ is a MatchState. 1. Return _y_. @@ -35407,7 +35407,7 @@

1. Assert: _c_ is a MatcherContinuation. 1. Let _Input_ be _x_'s _input_. 1. Let _e_ be _x_'s _endIndex_. - 1. Let _InputLength_ be the number of elements of _Input_. + 1. Let _InputLength_ be the number of elements in _Input_. 1. If _e_ = _InputLength_, or if _rer_.[[Multiline]] is *true* and the character _Input_[_e_] is one of |LineTerminator|, then 1. Return _c_(_x_). 1. Return ~failure~. @@ -35510,7 +35510,7 @@

- 1. Let _InputLength_ be the number of elements of _Input_. + 1. Let _InputLength_ be the number of elements in _Input_. 1. If _e_ = -1 or _e_ is _InputLength_, return *false*. 1. Let _c_ be the character _Input_[_e_]. 1. If _c_ is in WordCharacters(_rer_), return *true*. @@ -35681,7 +35681,7 @@

1. Let _e_ be _x_'s _endIndex_. 1. If _direction_ is ~forward~, let _f_ be _e_ + 1. 1. Else, let _f_ be _e_ - 1. - 1. Let _InputLength_ be the number of elements of _Input_. + 1. Let _InputLength_ be the number of elements in _Input_. 1. If _f_ < 0 or _f_ > _InputLength_, return ~failure~. 1. Let _index_ be min(_e_, _f_). 1. Let _ch_ be the character _Input_[_index_]. @@ -35720,7 +35720,7 @@

1. Let _len_ be _re_ - _rs_. 1. If _direction_ is ~forward~, let _f_ be _e_ + _len_. 1. Else, let _f_ be _e_ - _len_. - 1. Let _InputLength_ be the number of elements of _Input_. + 1. Let _InputLength_ be the number of elements in _Input_. 1. If _f_ < 0 or _f_ > _InputLength_, return ~failure~. 1. Let _g_ be min(_e_, _f_). 1. If there exists an integer _i_ in the interval from 0 (inclusive) to _len_ (exclusive) such that Canonicalize(_rer_, _Input_[_rs_ + _i_]) is not the same character value as Canonicalize(_rer_, _Input_[_g_ + _i_]), return ~failure~. @@ -36681,7 +36681,7 @@

1. If _fullUnicode_ is *true*, set _e_ to GetStringIndex(_S_, _e_). 1. If _global_ is *true* or _sticky_ is *true*, then 1. Perform ? Set(_R_, *"lastIndex"*, 𝔽(_e_), *true*). - 1. Let _n_ be the number of elements of _r_'s _captures_ List. + 1. Let _n_ be the number of elements in _r_'s _captures_ List. 1. Assert: _n_ = _R_.[[RegExpRecord]].[[CapturingGroupsCount]]. 1. Assert: _n_ < 232 - 1. 1. Let _A_ be ! ArrayCreate(_n_ + 1). @@ -36843,7 +36843,7 @@

- 1. Let _n_ be the number of elements of _indices_. + 1. Let _n_ be the number of elements in _indices_. 1. Assert: _n_ < 232 - 1. 1. Assert: _groupNames_ has _n_ - 1 elements. 1. NOTE: The _groupNames_ List contains elements aligned with the _indices_ List starting at _indices_[1]. @@ -36968,7 +36968,7 @@

Array ( ..._values_ )

1. If NewTarget is *undefined*, let _newTarget_ be the active function object; else let _newTarget_ be NewTarget. 1. Let _proto_ be ? GetPrototypeFromConstructor(_newTarget_, *"%Array.prototype%"*). - 1. Let _numberOfArgs_ be the number of elements of _values_. + 1. Let _numberOfArgs_ be the number of elements in _values_. 1. If _numberOfArgs_ = 0, then 1. Return ! ArrayCreate(0, _proto_). 1. Else if _numberOfArgs_ = 1, then @@ -37075,7 +37075,7 @@

Array.isArray ( _arg_ )

Array.of ( ..._items_ )

This method performs the following steps when called:

- 1. Let _len_ be the number of elements of _items_. + 1. Let _len_ be the number of elements in _items_. 1. Let _lenNumber_ be 𝔽(_len_). 1. Let _C_ be the *this* value. 1. If IsConstructor(_C_) is *true*, then @@ -37770,7 +37770,7 @@

Array.prototype.push ( ..._items_ )

1. Let _O_ be ? ToObject(*this* value). 1. Let _len_ be ? LengthOfArrayLike(_O_). - 1. Let _argCount_ be the number of elements of _items_. + 1. Let _argCount_ be the number of elements in _items_. 1. If _len_ + _argCount_ > 253 - 1, throw a *TypeError* exception. 1. For each element _E_ of _items_, do 1. Perform ? Set(_O_, ! ToString(𝔽(_len_)), _E_, *true*). @@ -38061,7 +38061,7 @@

1. Let _kValue_ be ? Get(_obj_, _Pk_). 1. Append _kValue_ to _items_. 1. Set _k_ to _k_ + 1. - 1. Let _itemCount_ be the number of elements of _items_. + 1. Let _itemCount_ be the number of elements in _items_. 1. [id="step-array-sort"] Sort _items_ using an implementation-defined sequence of calls to _SortCompare_. If any such call returns an abrupt completion, stop before performing any further calls to _SortCompare_ and return that Completion Record. 1. Let _j_ be 0. 1. Repeat, while _j_ < _itemCount_, @@ -38126,7 +38126,7 @@

Array.prototype.splice ( _start_, _deleteCount_, ..._items_ )

1. If _relativeStart_ is -∞, let _actualStart_ be 0. 1. Else if _relativeStart_ < 0, let _actualStart_ be max(_len_ + _relativeStart_, 0). 1. Else, let _actualStart_ be min(_relativeStart_, _len_). - 1. Let _itemCount_ be the number of elements of _items_. + 1. Let _itemCount_ be the number of elements in _items_. 1. If _start_ is not present, then 1. Let _actualDeleteCount_ be 0. 1. Else if _deleteCount_ is not present, then @@ -38238,7 +38238,7 @@

Array.prototype.unshift ( ..._items_ )

1. Let _O_ be ? ToObject(*this* value). 1. Let _len_ be ? LengthOfArrayLike(_O_). - 1. Let _argCount_ be the number of elements of _items_. + 1. Let _argCount_ be the number of elements in _items_. 1. If _argCount_ > 0, then 1. If _len_ + _argCount_ > 253 - 1, throw a *TypeError* exception. 1. Let _k_ be _len_. @@ -38652,7 +38652,7 @@

%TypedArray%.from ( _source_ [ , _mapfn_ [ , _thisArg_ ] ] )

1. Let _usingIterator_ be ? GetMethod(_source_, @@iterator). 1. If _usingIterator_ is not *undefined*, then 1. Let _values_ be ? IterableToList(_source_, _usingIterator_). - 1. Let _len_ be the number of elements of _values_. + 1. Let _len_ be the number of elements in _values_. 1. Let _targetObj_ be ? TypedArrayCreate(_C_, « 𝔽(_len_) »). 1. Let _k_ be 0. 1. Repeat, while _k_ < _len_, @@ -38687,7 +38687,7 @@

%TypedArray%.from ( _source_ [ , _mapfn_ [ , _thisArg_ ] ] )

%TypedArray%.of ( ..._items_ )

This method performs the following steps when called:

- 1. Let _len_ be the number of elements of _items_. + 1. Let _len_ be the number of elements in _items_. 1. Let _C_ be the *this* value. 1. If IsConstructor(_C_) is *false*, throw a *TypeError* exception. 1. Let _newObj_ be ? TypedArrayCreate(_C_, « 𝔽(_len_) »). @@ -39649,7 +39649,7 @@

_TypedArray_ ( ..._args_ )

1. If NewTarget is *undefined*, throw a *TypeError* exception. 1. Let _constructorName_ be the String value of the Constructor Name value specified in for this TypedArray constructor. 1. Let _proto_ be "%TypedArray.prototype%". - 1. Let _numberOfArgs_ be the number of elements of _args_. + 1. Let _numberOfArgs_ be the number of elements in _args_. 1. If _numberOfArgs_ = 0, then 1. Return ? AllocateTypedArray(_constructorName_, NewTarget, _proto_, 0). 1. Else, @@ -39793,7 +39793,7 @@

- 1. Let _len_ be the number of elements of _values_. + 1. Let _len_ be the number of elements in _values_. 1. Perform ? AllocateTypedArrayBuffer(_O_, _len_). 1. Let _k_ be 0. 1. Repeat, while _k_ < _len_, @@ -39911,7 +39911,7 @@

Keyed Collections

Map Objects

Maps are collections of key/value pairs where both the keys and values may be arbitrary ECMAScript language values. A distinct key value may only occur in one key/value pair within the Map's collection. Distinct key values are discriminated using the SameValueZero comparison algorithm.

-

Maps must be implemented using either hash tables or other mechanisms that, on average, provide access times that are sublinear on the number of elements of the collection. The data structure used in this specification is only intended to describe the required observable semantics of Maps. It is not intended to be a viable implementation model.

+

Maps must be implemented using either hash tables or other mechanisms that, on average, provide access times that are sublinear on the number of elements in the collection. The data structure used in this specification is only intended to describe the required observable semantics of Maps. It is not intended to be a viable implementation model.

The Map Constructor

@@ -40070,15 +40070,15 @@

Map.prototype.forEach ( _callbackfn_ [ , _thisArg_ ] )

1. Perform ? RequireInternalSlot(_M_, [[MapData]]). 1. If IsCallable(_callbackfn_) is *false*, throw a *TypeError* exception. 1. Let _entries_ be the List that is _M_.[[MapData]]. - 1. Let _numEntries_ be the number of elements of _entries_. + 1. Let _numEntries_ be the number of elements in _entries_. 1. Let _index_ be 0. 1. Repeat, while _index_ < _numEntries_, 1. Let _e_ be the Record { [[Key]], [[Value]] } that is the value of _entries_[_index_]. 1. Set _index_ to _index_ + 1. 1. If _e_.[[Key]] is not ~empty~, then 1. Perform ? Call(_callbackfn_, _thisArg_, « _e_.[[Value]], _e_.[[Key]], _M_ »). - 1. NOTE: The number of elements of _entries_ may have increased during execution of _callbackfn_. - 1. Set _numEntries_ to the number of elements of _entries_. + 1. NOTE: The number of elements in _entries_ may have increased during execution of _callbackfn_. + 1. Set _numEntries_ to the number of elements in _entries_. 1. Return *undefined*.
@@ -40202,7 +40202,7 @@

1. Let _closure_ be a new Abstract Closure with no parameters that captures _map_ and _kind_ and performs the following steps when called: 1. Let _entries_ be the List that is _map_.[[MapData]]. 1. Let _index_ be 0. - 1. Let _numEntries_ be the number of elements of _entries_. + 1. Let _numEntries_ be the number of elements in _entries_. 1. Repeat, while _index_ < _numEntries_, 1. Let _e_ be the Record { [[Key]], [[Value]] } that is the value of _entries_[_index_]. 1. Set _index_ to _index_ + 1. @@ -40213,8 +40213,8 @@

1. Assert: _kind_ is ~key+value~. 1. Let _result_ be CreateArrayFromList(« _e_.[[Key]], _e_.[[Value]] »). 1. Perform ? GeneratorYield(CreateIterResultObject(_result_, *false*)). - 1. NOTE: The number of elements of _entries_ may have increased while execution of this abstract operation was paused by Yield. - 1. Set _numEntries_ to the number of elements of _entries_. + 1. NOTE: The number of elements in _entries_ may have increased while execution of this abstract operation was paused by Yield. + 1. Set _numEntries_ to the number of elements in _entries_. 1. Return *undefined*. 1. Return CreateIteratorFromClosure(_closure_, *"%MapIteratorPrototype%"*, %MapIteratorPrototype%). @@ -40249,7 +40249,7 @@

%MapIteratorPrototype% [ @@toStringTag ]

Set Objects

Set objects are collections of ECMAScript language values. A distinct value may only occur once as an element of a Set's collection. Distinct values are discriminated using the SameValueZero comparison algorithm.

-

Set objects must be implemented using either hash tables or other mechanisms that, on average, provide access times that are sublinear on the number of elements of the collection. The data structure used in this specification is only intended to describe the required observable semantics of Set objects. It is not intended to be a viable implementation model.

+

Set objects must be implemented using either hash tables or other mechanisms that, on average, provide access times that are sublinear on the number of elements in the collection. The data structure used in this specification is only intended to describe the required observable semantics of Set objects. It is not intended to be a viable implementation model.

The Set Constructor

@@ -40395,15 +40395,15 @@

Set.prototype.forEach ( _callbackfn_ [ , _thisArg_ ] )

1. Perform ? RequireInternalSlot(_S_, [[SetData]]). 1. If IsCallable(_callbackfn_) is *false*, throw a *TypeError* exception. 1. Let _entries_ be the List that is _S_.[[SetData]]. - 1. Let _numEntries_ be the number of elements of _entries_. + 1. Let _numEntries_ be the number of elements in _entries_. 1. Let _index_ be 0. 1. Repeat, while _index_ < _numEntries_, 1. Let _e_ be _entries_[_index_]. 1. Set _index_ to _index_ + 1. 1. If _e_ is not ~empty~, then 1. Perform ? Call(_callbackfn_, _thisArg_, « _e_, _e_, _S_ »). - 1. NOTE: The number of elements of _entries_ may have increased during execution of _callbackfn_. - 1. Set _numEntries_ to the number of elements of _entries_. + 1. NOTE: The number of elements in _entries_ may have increased during execution of _callbackfn_. + 1. Set _numEntries_ to the number of elements in _entries_. 1. Return *undefined*. @@ -40497,7 +40497,7 @@

1. Let _closure_ be a new Abstract Closure with no parameters that captures _set_ and _kind_ and performs the following steps when called: 1. Let _index_ be 0. 1. Let _entries_ be the List that is _set_.[[SetData]]. - 1. Let _numEntries_ be the number of elements of _entries_. + 1. Let _numEntries_ be the number of elements in _entries_. 1. Repeat, while _index_ < _numEntries_, 1. Let _e_ be _entries_[_index_]. 1. Set _index_ to _index_ + 1. @@ -40508,8 +40508,8 @@

1. Else, 1. Assert: _kind_ is ~value~. 1. Perform ? GeneratorYield(CreateIterResultObject(_e_, *false*)). - 1. NOTE: The number of elements of _entries_ may have increased while execution of this abstract operation was paused by Yield. - 1. Set _numEntries_ to the number of elements of _entries_. + 1. NOTE: The number of elements in _entries_ may have increased while execution of this abstract operation was paused by Yield. + 1. Set _numEntries_ to the number of elements in _entries_. 1. Return *undefined*. 1. Return CreateIteratorFromClosure(_closure_, *"%SetIteratorPrototype%"*, %SetIteratorPrototype%). @@ -40694,7 +40694,7 @@

Properties of WeakMap Instances

WeakSet Objects

WeakSets are collections of objects. A distinct object may only occur once as an element of a WeakSet's collection. A WeakSet may be queried to see if it contains a specific object, but no mechanism is provided for enumerating the objects it holds. In certain conditions, objects which are not live are removed as WeakSet elements, as described in .

An implementation may impose an arbitrarily determined latency between the time an object contained in a WeakSet becomes inaccessible and the time when the object is removed from the WeakSet. If this latency was observable to ECMAScript program, it would be a source of indeterminacy that could impact program execution. For that reason, an ECMAScript implementation must not provide any means to determine if a WeakSet contains a particular object that does not require the observer to present the observed object.

-

WeakSets must be implemented using either hash tables or other mechanisms that, on average, provide access times that are sublinear on the number of elements of the collection. The data structure used in this specification is only intended to describe the required observable semantics of WeakSets. It is not intended to be a viable implementation model.

+

WeakSets must be implemented using either hash tables or other mechanisms that, on average, provide access times that are sublinear on the number of elements in the collection. The data structure used in this specification is only intended to describe the required observable semantics of WeakSets. It is not intended to be a viable implementation model.

See the NOTE in .

@@ -41050,7 +41050,7 @@

1. Append _readEvent_ to _eventList_. 1. Append Chosen Value Record { [[Event]]: _readEvent_, [[ChosenValue]]: _rawValue_ } to _execution_.[[ChosenValues]]. 1. Else, let _rawValue_ be a List whose elements are bytes from _block_ at indices in the interval from _byteIndex_ (inclusive) to _byteIndex_ + _elementSize_ (exclusive). - 1. Assert: The number of elements of _rawValue_ is _elementSize_. + 1. Assert: The number of elements in _rawValue_ is _elementSize_. 1. If _isLittleEndian_ is not present, set _isLittleEndian_ to the value of the [[LittleEndian]] field of the surrounding agent's Agent Record. 1. Return RawBytesToNumeric(_type_, _rawValue_, _isLittleEndian_). @@ -46515,8 +46515,8 @@

Valid Chosen Reads

1. Let _chosenValueRecord_ be the element of _execution_.[[ChosenValues]] whose [[Event]] field is _R_. 1. Let _chosenValue_ be _chosenValueRecord_.[[ChosenValue]]. 1. Let _readValue_ be ValueOfReadEvent(_execution_, _R_). - 1. Let _chosenLen_ be the number of elements of _chosenValue_. - 1. Let _readLen_ be the number of elements of _readValue_. + 1. Let _chosenLen_ be the number of elements in _chosenValue_. + 1. Let _readLen_ be the number of elements in _readValue_. 1. If _chosenLen_ ≠ _readLen_, then 1. Return *false*. 1. If _chosenValue_[_i_] ≠ _readValue_[_i_] for some integer _i_ in the interval from 0 (inclusive) to _chosenLen_ (exclusive), then