diff --git a/spec.html b/spec.html index a92856565d..043ed8ccb2 100644 --- a/spec.html +++ b/spec.html @@ -4248,8 +4248,8 @@

Abstract Relational Comparison

1. If _py_ is a prefix of _px_, return *false*. (A String value _p_ is a prefix of String value _q_ if _q_ can be the string-concatenation of _p_ and some other String _r_. Note that any String is a prefix of itself, because _r_ may be the empty String.) 1. If _px_ is a prefix of _py_, return *true*. 1. Let _k_ be the smallest nonnegative integer such that the code unit at index _k_ within _px_ is different from the code unit at index _k_ within _py_. (There must be such a _k_, for neither String is a prefix of the other.) - 1. Let _m_ be the integer that is the code unit value at index _k_ within _px_. - 1. Let _n_ be the integer that is the code unit value at index _k_ within _py_. + 1. Let _m_ be the integer that is the numeric value of the code unit at index _k_ within _px_. + 1. Let _n_ be the integer that is the numeric value of the code unit at index _k_ within _py_. 1. If _m_ < _n_, return *true*. Otherwise, return *false*. 1. Else, 1. Let _nx_ be ? ToNumber(_px_). Because _px_ and _py_ are primitive values evaluation order is not important. @@ -10445,13 +10445,13 @@

Static Semantics: SV

The SV of NonEscapeCharacter :: SourceCharacter but not one of EscapeCharacter or LineTerminator is the UTF16Encoding of the code point value of |SourceCharacter|.
  • - The SV of HexEscapeSequence :: `x` HexDigit HexDigit is the code unit value that is (16 times the MV of the first |HexDigit|) plus the MV of the second |HexDigit|. + The SV of HexEscapeSequence :: `x` HexDigit HexDigit is the code unit whose value is (16 times the MV of the first |HexDigit|) plus the MV of the second |HexDigit|.
  • The SV of UnicodeEscapeSequence :: `u` Hex4Digits is the SV of |Hex4Digits|.
  • - The SV of Hex4Digits :: HexDigit HexDigit HexDigit HexDigit is the code unit value that is (0x1000 times the MV of the first |HexDigit|) plus (0x100 times the MV of the second |HexDigit|) plus (0x10 times the MV of the third |HexDigit|) plus the MV of the fourth |HexDigit|. + The SV of Hex4Digits :: HexDigit HexDigit HexDigit HexDigit is the code unit whose value is (0x1000 times the MV of the first |HexDigit|) plus (0x100 times the MV of the second |HexDigit|) plus (0x10 times the MV of the third |HexDigit|) plus the MV of the fourth |HexDigit|.
  • The SV of UnicodeEscapeSequence :: `u{` CodePoint `}` is the UTF16Encoding of the MV of |CodePoint|. @@ -23468,13 +23468,13 @@

    Runtime Semantics: Encode ( _string_, _unescapedSet_ )

    1. Let _S_ be the String value containing only the code unit _C_. 1. Set _R_ to the string-concatenation of the previous value of _R_ and _S_. 1. Else _C_ is not in _unescapedSet_, - 1. If the code unit value of _C_ is not less than 0xDC00 and not greater than 0xDFFF, throw a *URIError* exception. - 1. If the code unit value of _C_ is less than 0xD800 or greater than 0xDBFF, then + 1. If the numeric value of _C_ is not less than 0xDC00 and not greater than 0xDFFF, throw a *URIError* exception. + 1. If the numeric value of _C_ is less than 0xD800 or greater than 0xDBFF, then 1. Let _V_ be the code point with the same numeric value as code unit _C_. 1. Else, 1. Increase _k_ by 1. 1. If _k_ equals _strLen_, throw a *URIError* exception. - 1. Let _kChar_ be the code unit value of the code unit at index _k_ within _string_. + 1. Let _kChar_ be the numeric value of the code unit at index _k_ within _string_. 1. If _kChar_ is less than 0xDC00 or greater than 0xDFFF, throw a *URIError* exception. 1. Let _V_ be UTF16Decode(_C_, _kChar_). 1. Let _Octets_ be the array of octets resulting by applying the UTF-8 transformation to _V_, and let _L_ be the array size. @@ -23508,7 +23508,7 @@

    Runtime Semantics: Decode ( _string_, _reservedSet_ )

    1. Let _B_ be the 8-bit value represented by the two hexadecimal digits at index (_k_ + 1) and (_k_ + 2). 1. Increment _k_ by 2. 1. If the most significant bit in _B_ is 0, then - 1. Let _C_ be the code unit with code unit value _B_. + 1. Let _C_ be the code unit whose value is _B_. 1. If _C_ is not in _reservedSet_, then 1. Let _S_ be the String value containing only the code unit _C_. 1. Else _C_ is in _reservedSet_, @@ -28149,7 +28149,7 @@

    String.prototype.charAt ( _pos_ )

    String.prototype.charCodeAt ( _pos_ )

    -

    Returns a Number (a nonnegative integer less than 216) that is the code unit value of the string element at index _pos_ within the String resulting from converting this object to a String. If there is no element at that index, the result is *NaN*.

    +

    Returns a Number (a nonnegative integer less than 216) that is the numeric value of the code unit at index _pos_ within the String resulting from converting this object to a String. If there is no element at that index, the result is *NaN*.

    When the `charCodeAt` method is called with one argument _pos_, the following steps are taken:

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

    String.prototype.charCodeAt ( _pos_ )

    1. Let _position_ be ? ToInteger(_pos_). 1. Let _size_ be the length of _S_. 1. If _position_ < 0 or _position_ ≥ _size_, return *NaN*. - 1. Return a value of Number type, whose value is the code unit value of the element at index _position_ within the String _S_. + 1. Return a value of Number type, whose value is the numeric value of the code unit at index _position_ within the String _S_.

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

    @@ -28178,9 +28178,9 @@

    String.prototype.codePointAt ( _pos_ )

    1. Let _position_ be ? ToInteger(_pos_). 1. Let _size_ be the length of _S_. 1. If _position_ < 0 or _position_ ≥ _size_, return *undefined*. - 1. Let _first_ be the code unit value of the element at index _position_ within the String _S_. + 1. Let _first_ be the numeric value of the code unit at index _position_ within the String _S_. 1. If _first_ < 0xD800 or _first_ > 0xDBFF or _position_+1 = _size_, return _first_. - 1. Let _second_ be the code unit value of the element at index _position_+1 within the String _S_. + 1. Let _second_ be the numeric value of the code unit at index _position_+1 within the String _S_. 1. If _second_ < 0xDC00 or _second_ > 0xDFFF, return _first_. 1. Return UTF16Decode(_first_, _second_). @@ -28925,10 +28925,10 @@

    %StringIteratorPrototype%.next ( )

    1. If _position_ ≥ _len_, then 1. Set _O_.[[IteratedString]] to *undefined*. 1. Return CreateIterResultObject(*undefined*, *true*). - 1. Let _first_ be the code unit value at index _position_ within _s_. + 1. Let _first_ be the numeric value of the code unit at index _position_ within _s_. 1. If _first_ < 0xD800 or _first_ > 0xDBFF or _position_+1 = _len_, let _resultString_ be the String value consisting of the single code unit _first_. 1. Else, - 1. Let _second_ be the code unit value at index _position_+1 within the String _S_. + 1. Let _second_ be the numeric value of the code unit at index _position_+1 within the String _S_. 1. If _second_ < 0xDC00 or _second_ > 0xDFFF, let _resultString_ be the String value consisting of the single code unit _first_. 1. Else, let _resultString_ be the string-concatenation of the code unit _first_ and the code unit _second_. 1. Let _resultSize_ be the number of code units in _resultString_. @@ -29810,7 +29810,7 @@

    Runtime Semantics: Canonicalize ( _ch_ )

    1. Assert: _u_ is a String value. 1. If _u_ does not consist of a single code unit, return _ch_. 1. Let _cu_ be _u_'s single code unit element. - 1. If _ch_'s code unit value ≥ 128 and _cu_'s code unit value < 128, return _ch_. + 1. If the numeric value of _ch_ ≥ 128 and the numeric value of _cu_ < 128, return _ch_. 1. Return _cu_. @@ -30502,9 +30502,9 @@

    AdvanceStringIndex ( _S_, _index_, _unicode_ )

    1. If _unicode_ is *false*, return _index_+1. 1. Let _length_ be the number of code units in _S_. 1. If _index_+1 ≥ _length_, return _index_+1. - 1. Let _first_ be the code unit value at index _index_ within _S_. + 1. Let _first_ be the numeric value of the code unit at index _index_ within _S_. 1. If _first_ < 0xD800 or _first_ > 0xDBFF, return _index_+1. - 1. Let _second_ be the code unit value at index _index_+1 within _S_. + 1. Let _second_ be the numeric value of the code unit at index _index_+1 within _S_. 1. If _second_ < 0xDC00 or _second_ > 0xDFFF, return _index_+1. 1. Return _index_+2. @@ -35940,10 +35940,10 @@

    Runtime Semantics: QuoteJSONString ( _value_ )

    1. Set _product_ to the string-concatenation of _product_ and _abbrev_. - 1. Else if _C_ has a code unit value less than 0x0020 (SPACE), then + 1. Else if _C_ has a numeric value less than 0x0020 (SPACE), then 1. Set _product_ to the string-concatenation of _product_ and the code unit 0x005C (REVERSE SOLIDUS). 1. Set _product_ to the string-concatenation of _product_ and `"u"`. - 1. Let _hex_ be the string result of converting the numeric code unit value of _C_ to a String of four lowercase hexadecimal digits. + 1. Let _hex_ be the string result of converting the numeric value of _C_ to a String of four lowercase hexadecimal digits. 1. Set _product_ to the string-concatenation of _product_ and _hex_. 1. Else, 1. Set _product_ to the string-concatenation of _product_ and _C_.