diff --git a/spec.html b/spec.html index efce5daff17..aaa597a0b66 100644 --- a/spec.html +++ b/spec.html @@ -3446,7 +3446,7 @@

ToBoolean ( _argument_ )

String - If _argument_ is the empty String (its length is zero), return *false*; otherwise return *true*. + If _argument_ is the empty String (its length is +0), return *false*; otherwise return *true*. @@ -24655,7 +24655,7 @@

Properties of the Function Prototype Object

The value of the [[Prototype]] internal slot of the Function prototype object is the intrinsic object %ObjectPrototype%. The initial value of the [[Extensible]] internal slot of the Function prototype object is *true*.

The Function prototype object does not have a `prototype` property.

-

The value of the `length` property of the Function prototype object is 0.

+

The value of the `length` property of the Function prototype object is +0.

The value of the `name` property of the Function prototype object is the empty String.

@@ -25575,7 +25575,7 @@

Number.prototype.toExponential ( _fractionDigits_ )

1. Let _x_ be ? thisNumberValue(*this* value). 1. Let _f_ be ? ToInteger(_fractionDigits_). - 1. Assert: _f_ is 0, when _fractionDigits_ is *undefined*. + 1. Assert: _f_ is ±0, when _fractionDigits_ is *undefined*. 1. If _x_ is *NaN*, return the String `"NaN"`. 1. Let _s_ be the empty String. 1. If _x_ < 0, then @@ -26126,12 +26126,12 @@

Math.ceil ( _x_ )

Math.clz32 ( _x_ )

When `Math.clz32` is called with one argument _x_, the following steps are taken:

- 1. Let _n_ be ToUint32(_x_). + 1. Let _n_ be ! ToUint32(_x_). 1. Let _p_ be the number of leading zero bits in the 32-bit binary representation of _n_. 1. Return _p_. -

If _n_ is 0, _p_ will be 32. If the most significant bit of the 32-bit binary encoding of _n_ is 1, _p_ will be 0.

+

If _n_ is +0, _p_ will be 32. If the most significant bit of the 32-bit binary encoding of _n_ is 1, _p_ will be +0.

@@ -26711,9 +26711,9 @@

Year Number

TimeFromYear(_y_) = msPerDay × DayFromYear(_y_)

A time value determines a year by:

YearFromTime(_t_) = the largest integer _y_ (closest to positive infinity) such that TimeFromYear(_y_) ≤ _t_ -

The leap-year function is 1 for a time within a leap year and otherwise is zero:

+

The leap-year function is 1 for a time within a leap year and otherwise is +0:

InLeapYear(_t_) - = 0 if DaysInYear(YearFromTime(_t_)) = 365 + = +0 if DaysInYear(YearFromTime(_t_)) = 365 = 1 if DaysInYear(YearFromTime(_t_)) = 366 @@ -27152,7 +27152,7 @@

Date.now ( )

Date.parse ( _string_ )

The `parse` function applies the ToString operator to its argument. If ToString results in an abrupt completion the Completion Record is immediately returned. Otherwise, `parse` interprets the resulting String as a date and time; it returns a Number, the UTC time value corresponding to the date and time. The String may be interpreted as a local time, a UTC time, or a time in some other time zone, depending on the contents of the String. The function first attempts to parse the format of the String according to the rules (including extended years) called out in Date Time String Format (). If the String does not conform to that format the function may fall back to any implementation-specific heuristics or implementation-specific date formats. Unrecognizable Strings or dates containing illegal element values in the format String shall cause `Date.parse` to return *NaN*.

-

If `x` is any Date object whose milliseconds amount is zero within a particular implementation of ECMAScript, then all of the following expressions should produce the same numeric value in that implementation, if all the properties referenced have their initial values:

+

If `x` is any Date object whose milliseconds amount is ±0 within a particular implementation of ECMAScript, then all of the following expressions should produce the same numeric value in that implementation, if all the properties referenced have their initial values:


           x.valueOf()
           Date.parse(x.toString())
@@ -27759,7 +27759,7 @@ 

Date.prototype.toString ( )

1. Return ToDateString(_tv_). -

For any Date object `d` whose milliseconds amount is zero, the result of `Date.parse(d.toString())` is equal to `d.valueOf()`. See .

+

For any Date object `d` whose milliseconds amount is ±0, the result of `Date.parse(d.toString())` is equal to `d.valueOf()`. See .

The `toString` function is intentionally generic; it does not require that its *this* value be a Date object. Therefore, it can be transferred to other kinds of objects for use as a method.

@@ -28115,7 +28115,7 @@

String.fromCharCode ( ..._codeUnits_ )

1. Let _nextCU_ be ? ToUint16(_next_). 1. Append _nextCU_ to the end of _elements_. 1. Let _nextIndex_ be _nextIndex_ + 1. - 1. Return the String value whose elements are, in order, the elements in the List _elements_. If _length_ is 0, the empty string is returned. + 1. Return the String value whose elements are, in order, the elements in the List _elements_. If _length_ is +0, the empty string is returned.

The `length` property of the `fromCharCode` function is 1.

@@ -28136,7 +28136,7 @@

String.fromCodePoint ( ..._codePoints_ )

1. If _nextCP_ < 0 or _nextCP_ > 0x10FFFF, throw a *RangeError* exception. 1. Append the elements of the UTF16Encoding of _nextCP_ to the end of _elements_. 1. Let _nextIndex_ be _nextIndex_ + 1. - 1. Return the String value whose elements are, in order, the elements in the List _elements_. If _length_ is 0, the empty string is returned. + 1. Return the String value whose elements are, in order, the elements in the List _elements_. If _length_ is +0, the empty string is returned.

The `length` property of the `fromCodePoint` function is 1.

@@ -28158,7 +28158,7 @@

String.raw ( _template_, ..._substitutions_ )

1. Let _cooked_ be ? ToObject(_template_). 1. Let _raw_ be ? ToObject(? Get(_cooked_, `"raw"`)). 1. Let _literalSegments_ be ? ToLength(? Get(_raw_, `"length"`)). - 1. If _literalSegments_ ≤ 0, return the empty string. + 1. If _literalSegments_ is +0, return the empty string. 1. Let _stringElements_ be a new empty List. 1. Let _nextIndex_ be 0. 1. Repeat, @@ -28182,7 +28182,7 @@

String.raw ( _template_, ..._substitutions_ )

Properties of the String Prototype Object

-

The String prototype object is the intrinsic object %StringPrototype%. The String prototype object is a String exotic object and has the internal methods specified for such objects. It has a [[StringData]] internal slot with the value *""*. It has a `length` property whose initial value is 0 and whose attributes are { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *false* }.

+

The String prototype object is the intrinsic object %StringPrototype%. The String prototype object is a String exotic object and has the internal methods specified for such objects. It has a [[StringData]] internal slot with the value *""*. It has a `length` property whose initial value is +0 and whose attributes are { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *false* }.

The value of the [[Prototype]] internal slot of the String prototype object is the intrinsic object %ObjectPrototype%.

Unless explicitly stated otherwise, the methods of the String prototype object defined below are not generic and the *this* value passed to them must be either a String value or an object that has a [[StringData]] internal slot that has been initialized to a String value.

The abstract operation thisStringValue(_value_) performs the following steps:

@@ -28511,7 +28511,7 @@

String.prototype.repeat ( _count_ )

1. Let _n_ be ? ToInteger(_count_). 1. If _n_ < 0, throw a *RangeError* exception. 1. If _n_ is *+∞*, throw a *RangeError* exception. - 1. Let _T_ be the String value that is made from _n_ copies of _S_ appended together. If _n_ is 0, _T_ is the empty String. + 1. Let _T_ be the String value that is made from _n_ copies of _S_ appended together. If _n_ is ±0, _T_ is the empty String. 1. Return _T_. @@ -28545,7 +28545,7 @@

String.prototype.replace ( _searchValue_, _replaceValue_ )

1. Let _captures_ be a new empty List. 1. Let _replStr_ be GetSubstitution(_matched_, _string_, _pos_, _captures_, *undefined*, _replaceValue_). 1. Let _tailPos_ be _pos_ + the number of code units in _matched_. - 1. Let _newString_ be the string-concatenation of the first _pos_ code units of _string_, _replStr_, and the trailing substring of _string_ starting at index _tailPos_. If _pos_ is 0, the first element of the concatenation will be the empty String. + 1. Let _newString_ be the string-concatenation of the first _pos_ code units of _string_, _replStr_, and the trailing substring of _string_ starting at index _tailPos_. If _pos_ is +0, the first element of the concatenation will be the empty String. 1. Return _newString_. @@ -29793,10 +29793,10 @@

Term

Runtime Semantics: RepeatMatcher ( _m_, _min_, _max_, _greedy_, _x_, _c_, _parenIndex_, _parenCount_ )

The abstract operation RepeatMatcher takes eight parameters, a Matcher _m_, an integer _min_, an integer (or ∞) _max_, a Boolean _greedy_, a State _x_, a Continuation _c_, an integer _parenIndex_, and an integer _parenCount_, and performs the following steps:

- 1. If _max_ is zero, return _c_(_x_). + 1. If _max_ is 0, return _c_(_x_). 1. Let _d_ be an internal Continuation closure that takes one State argument _y_ and performs the following steps when evaluated: - 1. If _min_ is zero and _y_'s _endIndex_ is equal to _x_'s _endIndex_, return ~failure~. - 1. If _min_ is zero, let _min2_ be zero; otherwise let _min2_ be _min_-1. + 1. If _min_ is 0 and _y_'s _endIndex_ is equal to _x_'s _endIndex_, return ~failure~. + 1. If _min_ is 0, let _min2_ be zero; otherwise let _min2_ be _min_-1. 1. If _max_ is ∞, let _max2_ be ∞; otherwise let _max2_ be _max_-1. 1. Call RepeatMatcher(_m_, _min2_, _max2_, _greedy_, _y_, _c_, _parenIndex_, _parenCount_) and return its result. 1. Let _cap_ be a copy of _x_'s _captures_ List. @@ -29862,7 +29862,7 @@

Assertion

1. Return an internal AssertionTester closure that takes a State argument _x_ and performs the following steps when evaluated: 1. Let _e_ be _x_'s _endIndex_. - 1. If _e_ is zero, return *true*. + 1. If _e_ is 0, return *true*. 1. If _Multiline_ is *false*, return *false*. 1. If the character _Input_[_e_-1] is one of |LineTerminator|, return *true*. 1. Return *false*. @@ -31556,7 +31556,7 @@

get Array [ @@species ]

Properties of the Array Prototype Object

-

The Array prototype object is the intrinsic object %ArrayPrototype%. The Array prototype object is an Array exotic object and has the internal methods specified for such objects. It has a `length` property whose initial value is 0 and whose attributes are { [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }.

+

The Array prototype object is the intrinsic object %ArrayPrototype%. The Array prototype object is an Array exotic object and has the internal methods specified for such objects. It has a `length` property whose initial value is +0 and whose attributes are { [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }.

The value of the [[Prototype]] internal slot of the Array prototype object is the intrinsic object %ObjectPrototype%.

The Array prototype object is specified to be an Array exotic object to ensure compatibility with ECMAScript code that was created prior to the ECMAScript 2015 specification.

@@ -31875,7 +31875,7 @@

Array.prototype.includes ( _searchElement_ [ , _fromIndex_ ] )

1. Let _O_ be ? ToObject(*this* value). 1. Let _len_ be ? ToLength(? Get(_O_, `"length"`)). - 1. If _len_ is 0, return *false*. + 1. If _len_ is ±0, return *false*. 1. Let _n_ be ? ToInteger(_fromIndex_). (If _fromIndex_ is *undefined*, this step produces the value 0.) 1. If _n_ ≥ 0, then 1. Let _k_ be _n_. @@ -31909,7 +31909,7 @@

Array.prototype.indexOf ( _searchElement_ [ , _fromIndex_ ] )

1. Let _O_ be ? ToObject(*this* value). 1. Let _len_ be ? ToLength(? Get(_O_, `"length"`)). - 1. If _len_ is 0, return -1. + 1. If _len_ is ±0, return -1. 1. Let _n_ be ? ToInteger(_fromIndex_). (If _fromIndex_ is *undefined*, this step produces the value 0.) 1. If _n_ ≥ _len_, return -1. 1. If _n_ ≥ 0, then @@ -31980,7 +31980,7 @@

Array.prototype.lastIndexOf ( _searchElement_ [ , _fromIndex_ ] )

1. Let _O_ be ? ToObject(*this* value). 1. Let _len_ be ? ToLength(? Get(_O_, `"length"`)). - 1. If _len_ is 0, return -1. + 1. If _len_ is ±0, return -1. 1. If _fromIndex_ is present, let _n_ be ? ToInteger(_fromIndex_); else let _n_ be _len_-1. 1. If _n_ ≥ 0, then 1. If _n_ is *-0*, let _k_ be *+0*; else let _k_ be min(_n_, _len_ - 1). @@ -32043,7 +32043,7 @@

Array.prototype.pop ( )

1. Let _O_ be ? ToObject(*this* value). 1. Let _len_ be ? ToLength(? Get(_O_, `"length"`)). - 1. If _len_ is zero, then + 1. If _len_ is ±0, then 1. Perform ? Set(_O_, `"length"`, 0, *true*). 1. Return *undefined*. 1. Else _len_ > 0, @@ -32099,7 +32099,7 @@

Array.prototype.reduce ( _callbackfn_ [ , _initialValue_ ] )

1. Let _O_ be ? ToObject(*this* value). 1. Let _len_ be ? ToLength(? Get(_O_, `"length"`)). 1. If IsCallable(_callbackfn_) is *false*, throw a *TypeError* exception. - 1. If _len_ is 0 and _initialValue_ is not present, throw a *TypeError* exception. + 1. If _len_ is ±0 and _initialValue_ is not present, throw a *TypeError* exception. 1. Let _k_ be 0. 1. Let _accumulator_ be *undefined*. 1. If _initialValue_ is present, then @@ -32141,8 +32141,8 @@

Array.prototype.reduceRight ( _callbackfn_ [ , _initialValue_ ] )

1. Let _O_ be ? ToObject(*this* value). 1. Let _len_ be ? ToLength(? Get(_O_, `"length"`)). 1. If IsCallable(_callbackfn_) is *false*, throw a *TypeError* exception. - 1. If _len_ is 0 and _initialValue_ is not present, throw a *TypeError* exception. - 1. Let _k_ be _len_-1. + 1. If _len_ is ±0 and _initialValue_ is not present, throw a *TypeError* exception. + 1. Let _k_ be _len_ - 1. 1. Let _accumulator_ be *undefined*. 1. If _initialValue_ is present, then 1. Set _accumulator_ to _initialValue_. @@ -32220,7 +32220,7 @@

Array.prototype.shift ( )

1. Let _O_ be ? ToObject(*this* value). 1. Let _len_ be ? ToLength(? Get(_O_, `"length"`)). - 1. If _len_ is zero, then + 1. If _len_ is ±0, then 1. Perform ? Set(_O_, `"length"`, 0, *true*). 1. Return *undefined*. 1. Let _first_ be ? Get(_O_, `"0"`). @@ -33021,7 +33021,7 @@

%TypedArray% ( )

1. Throw a *TypeError* exception. -

The `length` property of the %TypedArray% constructor function is 0.

+

The `length` property of the %TypedArray% constructor function is +0.

@@ -37466,7 +37466,7 @@

Runtime Semantics: PerformPromiseAll( _iteratorRecord_, _constructor_, _resu 1. If _next_ is *false*, then 1. Set _iteratorRecord_.[[Done]] to *true*. 1. Set _remainingElementsCount_.[[Value]] to _remainingElementsCount_.[[Value]] - 1. - 1. If _remainingElementsCount_.[[Value]] is 0, then + 1. If _remainingElementsCount_.[[Value]] is ±0, then 1. Let _valuesArray_ be CreateArrayFromList(_values_). 1. Perform ? Call(_resultCapability_.[[Resolve]], *undefined*, « _valuesArray_ »). 1. Return _resultCapability_.[[Promise]]. @@ -37502,7 +37502,7 @@

`Promise.all` Resolve Element Functions

1. Let _remainingElementsCount_ be _F_.[[RemainingElements]]. 1. Set _values_[_index_] to _x_. 1. Set _remainingElementsCount_.[[Value]] to _remainingElementsCount_.[[Value]] - 1. - 1. If _remainingElementsCount_.[[Value]] is 0, then + 1. If _remainingElementsCount_.[[Value]] is ±0, then 1. Let _valuesArray_ be CreateArrayFromList(_values_). 1. Return ? Call(_promiseCapability_.[[Resolve]], *undefined*, « _valuesArray_ »). 1. Return *undefined*. @@ -38210,7 +38210,7 @@

Proxy Revocation Functions

1. Set _p_.[[ProxyHandler]] to *null*. 1. Return *undefined*. -

The `length` property of a Proxy revocation function is 0.

+

The `length` property of a Proxy revocation function is +0.