diff --git a/spec.html b/spec.html index 3191db9794..0d3aa34edd 100644 --- a/spec.html +++ b/spec.html @@ -5037,12 +5037,12 @@

ToIntegerOrInfinity ( - _argument_: unknown, + _argument_: an ECMAScript language value, )

description
-
It converts _argument_ to an integer, +∞, or -∞.
+
It converts _argument_ to an integer representing its Number value with fractional part truncated, or to +∞ or -∞ when that Number value is infinite.
1. Let _number_ be ? ToNumber(_argument_). @@ -5582,12 +5582,12 @@

ToLength ( - _argument_: unknown, + _argument_: an ECMAScript language value, )

description
-
It converts _argument_ to an integral Number suitable for use as the length of an array-like object.
+
It clamps _argument_ to an integral Number suitable for use as the length of an array-like object.
1. Let _len_ be ? ToIntegerOrInfinity(_argument_). @@ -5618,22 +5618,22 @@

ToIndex ( - _value_: unknown, + _value_: an ECMAScript language value, )

description
-
It returns _value_ argument converted to a non-negative integer if it is a valid integer index value.
+
It converts _value_ to a non-negative integer if the corresponding decimal representation, as a String, is an integer index.
1. If _value_ is *undefined*, then 1. Return 0. 1. Else, - 1. Let _integerIndex_ be 𝔽(? ToIntegerOrInfinity(_value_)). - 1. If _integerIndex_ < *+0*𝔽, throw a *RangeError* exception. - 1. Let _index_ be ! ToLength(_integerIndex_). - 1. If ! SameValue(_integerIndex_, _index_) is *false*, throw a *RangeError* exception. - 1. Return ℝ(_index_). + 1. Let _integer_ be ? ToIntegerOrInfinity(_value_). + 1. Let _clamped_ be ! ToLength(𝔽(_integer_)). + 1. If ! SameValue(𝔽(_integer_), _clamped_) is *false*, throw a *RangeError* exception. + 1. Assert: 0 ≤ _integer_ ≤ 253 - 1. + 1. Return _integer_.