From fdf0aade697676834202126697cbdee31e1a4d2a Mon Sep 17 00:00:00 2001 From: Michael Ficarra Date: Mon, 26 Sep 2022 18:50:59 -0700 Subject: [PATCH 1/2] Editorial: consistency in phrasing of ranges and inclusivity/exclusivity (#2848) --- spec.html | 96 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 52 insertions(+), 44 deletions(-) diff --git a/spec.html b/spec.html index 153ae732ff..6ea0072aed 100644 --- a/spec.html +++ b/spec.html @@ -1027,6 +1027,14 @@

Mathematical Operations

floor(_x_) = _x_ - (_x_ modulo 1).

+

An interval from lower bound _a_ to upper bound _b_ is a possibly-infinite, possibly-empty set of numeric values of the same numeric type. Each bound will be described as either inclusive or exclusive, but not both. There are four kinds of intervals, as follows:

+ +

For example, the interval from 1 (inclusive) to 2 (exclusive) consists of all mathematical values between 1 and 2, including 1 and not including 2. For the purpose of defining intervals, *-0*𝔽 < *+0*𝔽, so, for example, an inclusive interval with a lower bound of *+0*𝔽 includes *+0*𝔽 but not *-0*𝔽. *NaN* is never included in an interval.

@@ -1071,7 +1079,7 @@

The Boolean Type

The String Type

The String type is the set of all ordered sequences of zero or more 16-bit unsigned integer values (“elements”) up to a maximum length of 253 - 1 elements. The String type is generally used to represent textual data in a running ECMAScript program, in which case each element in the String is treated as a UTF-16 code unit value. Each element is regarded as occupying a position within the sequence. These positions are indexed with non-negative integers. The first element (if any) is at index 0, the next element (if any) at index 1, and so on. The length of a String is the number of elements (i.e., 16-bit values) within it. The empty String has length zero and therefore contains no elements.

-

ECMAScript operations that do not interpret String contents apply no further semantics. Operations that do interpret String values treat each element as a single UTF-16 code unit. However, ECMAScript does not restrict the value of or relationships between these code units, so operations that further interpret String contents as sequences of Unicode code points encoded in UTF-16 must account for ill-formed subsequences. Such operations apply special treatment to every code unit with a numeric value in the inclusive range 0xD800 to 0xDBFF (defined by the Unicode Standard as a leading surrogate, or more formally as a high-surrogate code unit) and every code unit with a numeric value in the inclusive range 0xDC00 to 0xDFFF (defined as a trailing surrogate, or more formally as a low-surrogate code unit) using the following rules:

+

ECMAScript operations that do not interpret String contents apply no further semantics. Operations that do interpret String values treat each element as a single UTF-16 code unit. However, ECMAScript does not restrict the value of or relationships between these code units, so operations that further interpret String contents as sequences of Unicode code points encoded in UTF-16 must account for ill-formed subsequences. Such operations apply special treatment to every code unit with a numeric value in the inclusive interval from 0xD800 to 0xDBFF (defined by the Unicode Standard as a leading surrogate, or more formally as a high-surrogate code unit) and every code unit with a numeric value in the inclusive interval from 0xDC00 to 0xDFFF (defined as a trailing surrogate, or more formally as a low-surrogate code unit) using the following rules:

  • A code unit that is not a and not a is interpreted as a code point with the same value. @@ -1109,7 +1117,7 @@

    1. Let _len_ be the length of _string_. 1. If _searchValue_ is the empty String and _fromIndex_ ≤ _len_, return _fromIndex_. 1. Let _searchLen_ be the length of _searchValue_. - 1. For each integer _i_ starting with _fromIndex_ such that _i_ ≤ _len_ - _searchLen_, in ascending order, do + 1. For each integer _i_ such that _fromIndex_ ≤ _i_ ≤ _len_ - _searchLen_, in ascending order, do 1. Let _candidate_ be the substring of _string_ from _i_ to _i_ + _searchLen_. 1. If _candidate_ is the same sequence of code units as _searchValue_, return _i_. 1. Return -1. @@ -1765,17 +1773,17 @@

    The Number Type

    _s_ × _m_ × 2_e_
    -

    where _s_ is 1 or -1, _m_ is an integer such that 252 ≤ _m_ < 253, and _e_ is an integer such that -1074 ≤ _e_ ≤ 971.

    +

    where _s_ is 1 or -1, _m_ is an integer in the interval from 252 (inclusive) to 253 (exclusive), and _e_ is an integer in the inclusive interval from -1074 to 971.

    The remaining 9,007,199,254,740,990 (that is, 253 - 2) values are denormalized, having the form

    _s_ × _m_ × 2_e_
    -

    where _s_ is 1 or -1, _m_ is an integer such that 0 < _m_ < 252, and _e_ is -1074.

    +

    where _s_ is 1 or -1, _m_ is an integer in the interval from 0 (exclusive) to 252 (exclusive), and _e_ is -1074.

    Note that all the positive and negative integers whose magnitude is no greater than 253 are representable in the Number type. The integer 0 has two representations in the Number type: *+0*𝔽 and *-0*𝔽.

    A finite number has an odd significand if it is non-zero and the integer _m_ used to express it (in one of the two forms shown above) is odd. Otherwise, it has an even significand.

    In this specification, the phrase “the Number value for _x_” where _x_ represents an exact real mathematical quantity (which might even be an irrational number such as π) means a Number value chosen in the following manner. Consider the set of all finite values of the Number type, with *-0*𝔽 removed and with two additional values added to it that are not representable in the Number type, namely 21024 (which is +1 × 253 × 2971) and -21024 (which is -1 × 253 × 2971). Choose the member of this set that is closest in value to _x_. If two values of the set are equally close, then the one with an even significand is chosen; for this purpose, the two extra values 21024 and -21024 are considered to have even significands. Finally, if 21024 was chosen, replace it with *+∞*𝔽; if -21024 was chosen, replace it with *-∞*𝔽; if *+0*𝔽 was chosen, replace it with *-0*𝔽 if and only if _x_ < 0; any other chosen value is used unchanged. The result is the Number value for _x_. (This procedure corresponds exactly to the behaviour of the IEEE 754-2019 roundTiesToEven mode.)

    The Number value for +∞ is *+∞*𝔽, and the Number value for -∞ is *-∞*𝔽.

    -

    Some ECMAScript operators deal only with integers in specific ranges such as -231 through 231 - 1, inclusive, or in the range 0 through 216 - 1, inclusive. These operators accept any value of the Number type but first convert each such value to an integer value in the expected range. See the descriptions of the numeric conversion operations in .

    +

    Some ECMAScript operators deal only with integers in specific ranges such as the inclusive interval from -231 to 231 - 1 or the inclusive interval from 0 to 216 - 1. These operators accept any value of the Number type but first convert each such value to an integer value in the expected range. See the descriptions of the numeric conversion operations in .

    @@ -4472,7 +4480,7 @@

    The Abstract Closure Specification Type

    Data Blocks

    -

    The Data Block specification type is used to describe a distinct and mutable sequence of byte-sized (8 bit) numeric values. A byte value is an integer value in the range 0 through 255, inclusive. A Data Block value is created with a fixed number of bytes that each have the initial value 0.

    +

    The Data Block specification type is used to describe a distinct and mutable sequence of byte-sized (8 bit) numeric values. A byte value is an integer in the inclusive interval from 0 to 255. A Data Block value is created with a fixed number of bytes that each have the initial value 0.

    For notational convenience within this specification, an array-like syntax can be used to access the individual bytes of a Data Block value. This notation presents a Data Block value as a 0-origined integer-indexed sequence of bytes. For example, if _db_ is a 5 byte Data Block value then _db_[2] can be used to access its 3rd byte.

    A data block that resides in memory that can be referenced from multiple agents concurrently is designated a Shared Data Block. A Shared Data Block has an identity (for the purposes of equality testing Shared Data Block values) that is address-free: it is tied not to the virtual addresses the block is mapped to in any process, but to the set of locations in memory that the block represents. Two data blocks are equal only if the sets of the locations they contain are equal; otherwise, they are not equal and the intersection of the sets of locations they contain is empty. Finally, Shared Data Blocks can be distinguished from Data Blocks.

    The semantics of Shared Data Blocks is defined using Shared Data Block events by the memory model. Abstract operations below introduce Shared Data Block events and act as the interface between evaluation semantics and the event semantics of the memory model. The events form a candidate execution, on which the memory model acts as a filter. Please consult the memory model for full semantics.

    @@ -5178,7 +5186,7 @@

    description
    -
    It converts _argument_ to one of 232 integral Number values in the range 𝔽(-231) through 𝔽(231 - 1), inclusive.
    +
    It converts _argument_ to one of 232 integral Number values in the inclusive interval from 𝔽(-231) to 𝔽(231 - 1).
    1. Let _number_ be ? ToNumber(_argument_). @@ -5211,7 +5219,7 @@

    description
    -
    It converts _argument_ to one of 232 integral Number values in the range *+0*𝔽 through 𝔽(232 - 1), inclusive.
    +
    It converts _argument_ to one of 232 integral Number values in the inclusive interval from *+0*𝔽 to 𝔽(232 - 1).
    1. Let _number_ be ? ToNumber(_argument_). @@ -5247,7 +5255,7 @@

    description
    -
    It converts _argument_ to one of 216 integral Number values in the range 𝔽(-215) through 𝔽(215 - 1), inclusive.
    +
    It converts _argument_ to one of 216 integral Number values in the inclusive interval from 𝔽(-215) to 𝔽(215 - 1).
    1. Let _number_ be ? ToNumber(_argument_). @@ -5266,7 +5274,7 @@

    description
    -
    It converts _argument_ to one of 216 integral Number values in the range *+0*𝔽 through 𝔽(216 - 1), inclusive.
    +
    It converts _argument_ to one of 216 integral Number values in the inclusive interval from *+0*𝔽 to 𝔽(216 - 1).
    1. Let _number_ be ? ToNumber(_argument_). @@ -5296,7 +5304,7 @@

    description
    -
    It converts _argument_ to one of 28 integral Number values in the range *-128*𝔽 through *127*𝔽, inclusive.
    +
    It converts _argument_ to one of 28 integral Number values in the inclusive interval from *-128*𝔽 to *127*𝔽.
    1. Let _number_ be ? ToNumber(_argument_). @@ -5315,7 +5323,7 @@

    description
    -
    It converts _argument_ to one of 28 integral Number values in the range *+0*𝔽 through *255*𝔽, inclusive.
    +
    It converts _argument_ to one of 28 integral Number values in the inclusive interval from *+0*𝔽 to *255*𝔽.
    1. Let _number_ be ? ToNumber(_argument_). @@ -5334,7 +5342,7 @@

    description
    -
    It converts _argument_ to one of 28 integral Number values in the range *+0*𝔽 through *255*𝔽, inclusive.
    +
    It converts _argument_ to one of 28 integral Number values in the inclusive interval from *+0*𝔽 to *255*𝔽.
    1. Let _number_ be ? ToNumber(_argument_). @@ -5493,7 +5501,7 @@

    description
    -
    It converts _argument_ to one of 264 BigInt values in the range ℤ(-263) through ℤ(263-1), inclusive.
    +
    It converts _argument_ to one of 264 BigInt values in the inclusive interval from ℤ(-263) to ℤ(263-1).
    1. Let _n_ be ? ToBigInt(_argument_). @@ -5510,7 +5518,7 @@

    description
    -
    It converts _argument_ to one of 264 BigInt values in the range *0* through the BigInt value for ℤ(264-1), inclusive.
    +
    It converts _argument_ to one of 264 BigInt values in the inclusive interval from *0* to ℤ(264-1).
    1. Let _n_ be ? ToBigInt(_argument_). @@ -6101,7 +6109,7 @@

    1. [id="step-arc-string-check"] If _px_ is a String and _py_ is a String, then 1. Let _lx_ be the length of _px_. 1. Let _ly_ be the length of _py_. - 1. For each integer _i_ starting with 0 such that _i_ < min(_lx_, _ly_), in ascending order, do + 1. For each integer _i_ such that 0 ≤ _i_ < min(_lx_, _ly_), in ascending order, do 1. Let _cx_ be the integer that is the numeric value of the code unit at index _i_ within _px_. 1. Let _cy_ be the integer that is the numeric value of the code unit at index _i_ within _py_. 1. If _cx_ < _cy_, return *true*. @@ -14232,7 +14240,7 @@

    [[OwnPropertyKeys]] ( ): a normal completion containing a List of property k 1. Let _str_ be _O_.[[StringData]]. 1. Assert: _str_ is a String. 1. Let _len_ be the length of _str_. - 1. For each integer _i_ starting with 0 such that _i_ < _len_, in ascending order, do + 1. For each integer _i_ such that 0 ≤ _i_ < _len_, in ascending order, do 1. Append ! ToString(𝔽(_i_)) to _keys_. 1. For each own property key _P_ of _O_ such that _P_ is an array index and ! ToIntegerOrInfinity(_P_) ≥ _len_, in ascending numeric index order, do 1. Append _P_ to _keys_. @@ -14697,7 +14705,7 @@

    [[OwnPropertyKeys]] ( ): a normal completion containing a List of property k 1. Let _keys_ be a new empty List. 1. If IsDetachedBuffer(_O_.[[ViewedArrayBuffer]]) is *false*, then - 1. For each integer _i_ starting with 0 such that _i_ < _O_.[[ArrayLength]], in ascending order, do + 1. For each integer _i_ such that 0 ≤ _i_ < _O_.[[ArrayLength]], in ascending order, do 1. Append ! ToString(𝔽(_i_)) to _keys_. 1. For each own property key _P_ of _O_ such that _P_ is a String and _P_ is not an integer index, in ascending chronological order of property creation, do 1. Append _P_ to _keys_. @@ -31194,7 +31202,7 @@

    Number.prototype.toPrecision ( _precision_ )

    Number.prototype.toString ( [ _radix_ ] )

    -

    The optional _radix_ should be an integral Number value in the inclusive range *2*𝔽 to *36*𝔽. If _radix_ is *undefined* then *10*𝔽 is used as the value of _radix_.

    +

    The optional _radix_ should be an integral Number value in the inclusive interval from *2*𝔽 to *36*𝔽. If _radix_ is *undefined* then *10*𝔽 is used as the value of _radix_.

    This method performs the following steps when called:

    @@ -31331,7 +31339,7 @@

    BigInt.prototype.toLocaleString ( [ _reserved1_ [ , _reserved2_ ] ] )

    BigInt.prototype.toString ( [ _radix_ ] )

    -

    The optional _radix_ should be an integral Number value in the inclusive range *2*𝔽 to *36*𝔽. If _radix_ is *undefined* then *10*𝔽 is used as the value of _radix_.

    +

    The optional _radix_ should be an integral Number value in the inclusive interval from *2*𝔽 to *36*𝔽. If _radix_ is *undefined* then *10*𝔽 is used as the value of _radix_.

    This method performs the following steps when called:

    @@ -31465,7 +31473,7 @@

    Math.abs ( _x_ )

    Math.acos ( _x_ )

    -

    This function returns the inverse cosine of _x_. The result is expressed in radians and ranges from *+0*𝔽 to 𝔽(π), inclusive.

    +

    This function returns the inverse cosine of _x_. The result is expressed in radians and is in the inclusive interval from *+0*𝔽 to 𝔽(π).

    It performs the following steps when called:

    1. Let _n_ be ? ToNumber(_x_). @@ -31490,7 +31498,7 @@

    Math.acosh ( _x_ )

    Math.asin ( _x_ )

    -

    This function returns the inverse sine of _x_. The result is expressed in radians and ranges from 𝔽(-π / 2) to 𝔽(π / 2), inclusive.

    +

    This function returns the inverse sine of _x_. The result is expressed in radians and is in the inclusive interval from 𝔽(-π / 2) to 𝔽(π / 2).

    It performs the following steps when called:

    1. Let _n_ be ? ToNumber(_x_). @@ -31513,7 +31521,7 @@

    Math.asinh ( _x_ )

    Math.atan ( _x_ )

    -

    This function returns the inverse tangent of _x_. The result is expressed in radians and ranges from 𝔽(-π / 2) to 𝔽(π / 2), inclusive.

    +

    This function returns the inverse tangent of _x_. The result is expressed in radians and is in the inclusive interval from 𝔽(-π / 2) to 𝔽(π / 2).

    It performs the following steps when called:

    1. Let _n_ be ? ToNumber(_x_). @@ -31540,7 +31548,7 @@

    Math.atanh ( _x_ )

    Math.atan2 ( _y_, _x_ )

    -

    This function returns the inverse tangent of the quotient _y_ / _x_ of the arguments _y_ and _x_, where the signs of _y_ and _x_ are used to determine the quadrant of the result. Note that it is intentional and traditional for the two-argument inverse tangent function that the argument named _y_ be first and the argument named _x_ be second. The result is expressed in radians and ranges from -π to +π, inclusive.

    +

    This function returns the inverse tangent of the quotient _y_ / _x_ of the arguments _y_ and _x_, where the signs of _y_ and _x_ are used to determine the quadrant of the result. Note that it is intentional and traditional for the two-argument inverse tangent function that the argument named _y_ be first and the argument named _x_ be second. The result is expressed in radians and is in the inclusive interval from -π to +π.

    It performs the following steps when called:

    1. Let _ny_ be ? ToNumber(_y_). @@ -32013,7 +32021,7 @@

    Year Number

    Month Number

    -

    Months are identified by an integral Number in the range *+0*𝔽 to *11*𝔽, inclusive. The mapping MonthFromTime(_t_) from a time value _t_ to a month number is defined by:

    +

    Months are identified by an integral Number in the inclusive interval from *+0*𝔽 to *11*𝔽. The mapping MonthFromTime(_t_) from a time value _t_ to a month number is defined by:

    MonthFromTime(_t_) = *+0*𝔽 if *+0*𝔽 ≤ DayWithinYear(_t_) < *31*𝔽 @@ -32036,7 +32044,7 @@

    Month Number

    Date Number

    -

    A date number is identified by an integral Number in the range *1*𝔽 through *31*𝔽, inclusive. The mapping DateFromTime(_t_) from a time value _t_ to a date number is defined by:

    +

    A date number is identified by an integral Number in the inclusive interval from *1*𝔽 to *31*𝔽. The mapping DateFromTime(_t_) from a time value _t_ to a date number is defined by:

    DateFromTime(_t_) = DayWithinYear(_t_) + *1*𝔽 if MonthFromTime(_t_) = *+0*𝔽 @@ -33700,10 +33708,10 @@

    String.prototype.lastIndexOf ( _searchString_ [ , _position_ ] )

    1. Assert: If _position_ is *undefined*, then _numPos_ is *NaN*. 1. If _numPos_ is *NaN*, let _pos_ be +∞; otherwise, let _pos_ be ! ToIntegerOrInfinity(_numPos_). 1. Let _len_ be the length of _S_. - 1. Let _start_ be the result of clamping _pos_ between 0 and _len_. + 1. Let _start_ be the result of clamping _pos_ between 0 and _len_ - _searchLen_. 1. If _searchStr_ is the empty String, return 𝔽(_start_). 1. Let _searchLen_ be the length of _searchStr_. - 1. For each non-negative integer _i_ starting with _start_ such that _i_ ≤ _len_ - _searchLen_, in descending order, do + 1. For each integer _i_ such that 0 ≤ _i_ ≤ _start_, in descending order, do 1. Let _candidate_ be the substring of _S_ from _i_ to _i_ + _searchLen_. 1. If _candidate_ is the same sequence of code units as _searchStr_, return 𝔽(_i_). 1. Return *-1*𝔽. @@ -33946,7 +33954,7 @@

    description
    -
    For the purposes of this abstract operation, a decimal digit is a code unit in the range 0x0030 (DIGIT ZERO) to 0x0039 (DIGIT NINE) inclusive.
    +
    For the purposes of this abstract operation, a decimal digit is a code unit in the inclusive interval from 0x0030 (DIGIT ZERO) to 0x0039 (DIGIT NINE).
    1. Let _stringLength_ be the length of _str_. @@ -34505,21 +34513,21 @@

    Syntax

    [+UnicodeMode] `u{` CodePoint `}` UnicodeLeadSurrogate :: - > any Unicode code point in the inclusive range U+D800 to U+DBFF + > any Unicode code point in the inclusive interval from U+D800 to U+DBFF UnicodeTrailSurrogate :: - > any Unicode code point in the inclusive range U+DC00 to U+DFFF + > any Unicode code point in the inclusive interval from U+DC00 to U+DFFF

    Each `\\u` |HexTrailSurrogate| for which the choice of associated `u` |HexLeadSurrogate| is ambiguous shall be associated with the nearest possible `u` |HexLeadSurrogate| that would otherwise have no corresponding `\\u` |HexTrailSurrogate|.

    HexLeadSurrogate :: - Hex4Digits [> but only if the MV of |Hex4Digits| is in the inclusive range 0xD800 to 0xDBFF] + Hex4Digits [> but only if the MV of |Hex4Digits| is in the inclusive interval from 0xD800 to 0xDBFF] HexTrailSurrogate :: - Hex4Digits [> but only if the MV of |Hex4Digits| is in the inclusive range 0xDC00 to 0xDFFF] + Hex4Digits [> but only if the MV of |Hex4Digits| is in the inclusive interval from 0xDC00 to 0xDFFF] HexNonSurrogate :: - Hex4Digits [> but only if the MV of |Hex4Digits| is not in the inclusive range 0xD800 to 0xDFFF] + Hex4Digits [> but only if the MV of |Hex4Digits| is not in the inclusive interval from 0xD800 to 0xDFFF] IdentityEscape[UnicodeMode] :: [+UnicodeMode] SyntaxCharacter @@ -35275,7 +35283,7 @@

    1. If _max_ is +∞, let _max2_ be +∞; otherwise let _max2_ be _max_ - 1. 1. Return RepeatMatcher(_m_, _min2_, _max2_, _greedy_, _y_, _c_, _parenIndex_, _parenCount_). 1. Let _cap_ be a copy of _x_'s _captures_ List. - 1. [id="step-repeatmatcher-clear-captures"] For each integer _k_ such that _parenIndex_ < _k_ and _k_ ≤ _parenIndex_ + _parenCount_, set _cap_[_k_] to *undefined*. + 1. [id="step-repeatmatcher-clear-captures"] For each integer _k_ in the inclusive interval from _parenIndex_ + 1 to _parenIndex_ + _parenCount_, set _cap_[_k_] to *undefined*. 1. Let _Input_ be _x_'s _input_. 1. Let _e_ be _x_'s _endIndex_. 1. Let _xr_ be the State (_Input_, _e_, _cap_). @@ -35679,7 +35687,7 @@

    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_ between 0 (inclusive) and _len_ (exclusive) such that Canonicalize(_rer_, _Input_[_rs_ + _i_]) is not the same character value as Canonicalize(_rer_, _Input_[_g_ + _i_]), return ~failure~. + 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~. 1. Let _y_ be the State (_Input_, _f_, _cap_). 1. Return _c_(_y_). @@ -36659,7 +36667,7 @@

    1. Let _groups_ be *undefined*. 1. Let _hasGroups_ be *false*. 1. Perform ! CreateDataPropertyOrThrow(_A_, *"groups"*, _groups_). - 1. For each integer _i_ such that _i_ ≥ 1 and _i_ ≤ _n_, in ascending order, do + 1. For each integer _i_ such that 1 ≤ _i_ ≤ _n_, in ascending order, do 1. Let _captureI_ be _i_th element of _r_'s _captures_ List. 1. If _captureI_ is *undefined*, then 1. Let _capturedValue_ be *undefined*. @@ -36768,7 +36776,7 @@

    1. Assert: _match_.[[StartIndex]] is a non-negative integer less than or equal to the length of _S_. - 1. Assert: _match_.[[EndIndex]] is an integer between _match_.[[StartIndex]] and the length of _S_, inclusive. + 1. Assert: _match_.[[EndIndex]] is an integer in the inclusive interval from _match_.[[StartIndex]] to the length of _S_. 1. Return the substring of _S_ from _match_.[[StartIndex]] to _match_.[[EndIndex]]. @@ -36784,7 +36792,7 @@

    1. Assert: _match_.[[StartIndex]] is a non-negative integer less than or equal to the length of _S_. - 1. Assert: _match_.[[EndIndex]] is an integer between _match_.[[StartIndex]] and the length of _S_, inclusive. + 1. Assert: _match_.[[EndIndex]] is an integer in the inclusive interval from _match_.[[StartIndex]] to the length of _S_. 1. Return CreateArrayFromList(« 𝔽(_match_.[[StartIndex]]), 𝔽(_match_.[[EndIndex]]) »). @@ -36811,7 +36819,7 @@

    1. Else, 1. Let _groups_ be *undefined*. 1. Perform ! CreateDataPropertyOrThrow(_A_, *"groups"*, _groups_). - 1. For each integer _i_ starting with 0 such that _i_ < _n_, in ascending order, do + 1. For each integer _i_ such that 0 ≤ _i_ < _n_, in ascending order, do 1. Let _matchIndices_ be _indices_[_i_]. 1. If _matchIndices_ is not *undefined*, then 1. Let _matchIndexPair_ be GetMatchIndexPair(_S_, _matchIndices_). @@ -39429,7 +39437,7 @@

    %TypedArray%.prototype.sort ( _comparefn_ )

    %TypedArray%.prototype.subarray ( _begin_, _end_ )

    -

    This method returns a new _TypedArray_ whose element type is the same as this _TypedArray_ and whose ArrayBuffer is the same as the ArrayBuffer of this _TypedArray_, referencing the elements at _begin_, inclusive, up to _end_, exclusive. If either _begin_ or _end_ is negative, it refers to an index from the end of the array, as opposed to from the beginning.

    +

    This method returns a new _TypedArray_ whose element type is the same as this _TypedArray_ and whose ArrayBuffer is the same as the ArrayBuffer of this _TypedArray_, referencing the elements in the interval from _begin_ (inclusive) to _end_ (exclusive). If either _begin_ or _end_ is negative, it refers to an index from the end of the array, as opposed to from the beginning.

    It performs the following steps when called:

    1. Let _O_ be the *this* value. @@ -41004,7 +41012,7 @@

    1. Let _readEvent_ be ReadSharedMemory { [[Order]]: _order_, [[NoTear]]: _noTear_, [[Block]]: _block_, [[ByteIndex]]: _byteIndex_, [[ElementSize]]: _elementSize_ }. 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 _byteIndex_ (inclusive) through _byteIndex_ + _elementSize_ (exclusive). + 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 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_). @@ -42820,7 +42828,7 @@

    1. Return _final_. -

    The representation of arrays includes only the elements between zero and `array.length` - 1 inclusive. Properties whose keys are not array indices are excluded from the stringification. An array is stringified as an opening LEFT SQUARE BRACKET, elements separated by COMMA, and a closing RIGHT SQUARE BRACKET.

    +

    The representation of arrays includes only the elements in the interval from *+0*𝔽 (inclusive) to `array.length` (exclusive). Properties whose keys are not array indices are excluded from the stringification. An array is stringified as an opening LEFT SQUARE BRACKET, elements separated by COMMA, and a closing RIGHT SQUARE BRACKET.

    @@ -46478,7 +46486,7 @@

    Valid Chosen Reads

    1. Let _readLen_ be the number of elements of _readValue_. 1. If _chosenLen_ ≠ _readLen_, then 1. Return *false*. - 1. If _chosenValue_[_i_] ≠ _readValue_[_i_] for any integer value _i_ in the range 0 through _chosenLen_, exclusive, then + 1. If _chosenValue_[_i_] ≠ _readValue_[_i_] for some integer _i_ in the interval from 0 (inclusive) to _chosenLen_ (exclusive), then 1. Return *false*. 1. Return *true*.
    From 2600c07e661cc39ab619169c3305992cd3033362 Mon Sep 17 00:00:00 2001 From: Michael Ficarra Date: Mon, 26 Sep 2022 18:51:07 -0700 Subject: [PATCH 2/2] Meta: update ecmarkup (#2848) --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index b8c962afce..f51efbe7f7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "SEE LICENSE IN https://tc39.es/ecma262/#sec-copyright-and-software-license", "dependencies": { - "ecmarkup": "^14.1.1" + "ecmarkup": "^14.1.2" }, "devDependencies": { "glob": "^7.1.6", @@ -724,9 +724,9 @@ } }, "node_modules/ecmarkup": { - "version": "14.1.1", - "resolved": "https://registry.npmjs.org/ecmarkup/-/ecmarkup-14.1.1.tgz", - "integrity": "sha512-fS38NCH/v875qztGyhXnNh+SBoiXdnNkg7S/n76Jq98cDidLJ6iFg/UHCiLEduIZ0Tcr5yNngzvOLUdFEcvYHA==", + "version": "14.1.2", + "resolved": "https://registry.npmjs.org/ecmarkup/-/ecmarkup-14.1.2.tgz", + "integrity": "sha512-NGjrwxDivSnT2Pxyryc2G3Grlsc0qLDmEvxCtwVyr8xJp+xXq5YEBo6UakXpNUSD0RDloivdIKnVVsUprqWcNw==", "dependencies": { "chalk": "^4.1.2", "command-line-args": "^5.2.0", @@ -2940,9 +2940,9 @@ } }, "ecmarkup": { - "version": "14.1.1", - "resolved": "https://registry.npmjs.org/ecmarkup/-/ecmarkup-14.1.1.tgz", - "integrity": "sha512-fS38NCH/v875qztGyhXnNh+SBoiXdnNkg7S/n76Jq98cDidLJ6iFg/UHCiLEduIZ0Tcr5yNngzvOLUdFEcvYHA==", + "version": "14.1.2", + "resolved": "https://registry.npmjs.org/ecmarkup/-/ecmarkup-14.1.2.tgz", + "integrity": "sha512-NGjrwxDivSnT2Pxyryc2G3Grlsc0qLDmEvxCtwVyr8xJp+xXq5YEBo6UakXpNUSD0RDloivdIKnVVsUprqWcNw==", "requires": { "chalk": "^4.1.2", "command-line-args": "^5.2.0", diff --git a/package.json b/package.json index 327b9a9028..1a76aada24 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "license": "SEE LICENSE IN https://tc39.es/ecma262/#sec-copyright-and-software-license", "homepage": "https://tc39.es/ecma262/", "dependencies": { - "ecmarkup": "^14.1.1" + "ecmarkup": "^14.1.2" }, "devDependencies": { "glob": "^7.1.6",