diff --git a/spec.html b/spec.html index e9c2591c916..15e14c27fa7 100644 --- a/spec.html +++ b/spec.html @@ -10398,7 +10398,7 @@

Static Semantics: UTF16Encoding ( _cp_ )

1. If _cp_ ≤ 0xFFFF, return _cp_. 1. Let _cu1_ be floor((_cp_ - 0x10000) / 0x400) + 0xD800. 1. Let _cu2_ be ((_cp_ - 0x10000) modulo 0x400) + 0xDC00. - 1. Return the code unit sequence consisting of _cu1_ followed by _cu2_. + 1. Return the string-concatenation of _cu1_ and _cu2_. @@ -10406,7 +10406,7 @@

Static Semantics: UTF16Encoding ( _cp_ )

Static Semantics: UTF16Encode ( _text_ )

The abstract operation UTF16Encode takes argument _text_ (a sequence of Unicode code points). It converts _text_ into a String value, as described in . It performs the following steps when called:

- 1. Return the string-concatenation of the code units that are the UTF16Encoding of each code point in _text_, in order. + 1. Return the string-concatenation of the Strings that are the UTF16Encoding of each code point in _text_, in order. @@ -11454,55 +11454,55 @@

Static Semantics: StringValue

`'` SingleStringCharacters? `'` - 1. Return the String value whose code units are the SV of this |StringLiteral|. + 1. Return the SV of this |StringLiteral|.

Static Semantics: SV

-

A string literal stands for a value of the String type. The String value (SV) of the literal is described in terms of code unit values contributed by the various parts of the string literal. As part of this process, some Unicode code points within the string literal are interpreted as having a mathematical value (MV), as described below or in .

+

A string literal stands for a value of the String type. The String value (SV) of the literal is described in terms of String values contributed by the various parts of the string literal. As part of this process, some Unicode code points within the string literal are interpreted as having a mathematical value (MV), as described below or in .

@@ -11656,10 +11656,10 @@

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 whose value is the MV of |HexEscapeSequence|. + The SV of HexEscapeSequence :: `x` HexDigit HexDigit is the String value consisting of the code unit whose value is the MV of |HexEscapeSequence|.
  • - The SV of Hex4Digits :: HexDigit HexDigit HexDigit HexDigit is the code unit whose value is the MV of |Hex4Digits|. + The SV of Hex4Digits :: HexDigit HexDigit HexDigit HexDigit is the String value consisting of the code unit whose value is the MV of |Hex4Digits|.
  • The SV of UnicodeEscapeSequence :: `u{` CodePoint `}` is the UTF16Encoding of the MV of |CodePoint|. @@ -11822,28 +11822,28 @@

    Syntax

    Static Semantics: TV and TRV

    -

    A template literal component is interpreted as a sequence of Unicode code points. The Template Value (TV) of a literal component is described in terms of code unit values (SV, ) contributed by the various parts of the template literal component. As part of this process, some Unicode code points within the template component are interpreted as having a mathematical value (MV, ). In determining a TV, escape sequences are replaced by the UTF-16 code unit(s) of the Unicode code point represented by the escape sequence. The Template Raw Value (TRV) is similar to a Template Value with the difference that in TRVs escape sequences are interpreted literally.

    +

    A template literal component is interpreted as a sequence of Unicode code points. The Template Value (TV) of a literal component is described in terms of String values (SV, ) contributed by the various parts of the template literal component. As part of this process, some Unicode code points within the template component are interpreted as having a mathematical value (MV, ). In determining a TV, escape sequences are replaced by the UTF-16 code unit(s) of the Unicode code point represented by the escape sequence. The Template Raw Value (TRV) is similar to a Template Value with the difference that in TRVs escape sequences are interpreted literally.

    • - The TV and TRV of NoSubstitutionTemplate :: ``` ``` is the empty code unit sequence. + The TV and TRV of NoSubstitutionTemplate :: ``` ``` is the empty String.
    • - The TV and TRV of TemplateHead :: ``` `${` is the empty code unit sequence. + The TV and TRV of TemplateHead :: ``` `${` is the empty String.
    • - The TV and TRV of TemplateMiddle :: `}` `${` is the empty code unit sequence. + The TV and TRV of TemplateMiddle :: `}` `${` is the empty String.
    • - The TV and TRV of TemplateTail :: `}` ``` is the empty code unit sequence. + The TV and TRV of TemplateTail :: `}` ``` is the empty String.
    • - The TV of TemplateCharacters :: TemplateCharacter TemplateCharacters is *undefined* if either the TV of |TemplateCharacter| is *undefined* or the TV of |TemplateCharacters| is *undefined*. Otherwise, it is a sequence consisting of the code units of the TV of |TemplateCharacter| followed by the code units of the TV of |TemplateCharacters|. + The TV of TemplateCharacters :: TemplateCharacter TemplateCharacters is *undefined* if either the TV of |TemplateCharacter| is *undefined* or the TV of |TemplateCharacters| is *undefined*. Otherwise, it is the string-concatenation of the TV of |TemplateCharacter| and the TV of |TemplateCharacters|.
    • The TV of TemplateCharacter :: SourceCharacter but not one of ``` or `\` or `$` or LineTerminator is the UTF16Encoding of the code point value of |SourceCharacter|.
    • - The TV of TemplateCharacter :: `$` is the code unit 0x0024 (DOLLAR SIGN). + The TV of TemplateCharacter :: `$` is the String value consisting of the code unit 0x0024 (DOLLAR SIGN).
    • The TV of TemplateCharacter :: `\` EscapeSequence is the SV of |EscapeSequence|. @@ -11855,55 +11855,55 @@

      Static Semantics: TV and TRV

      The TV of TemplateCharacter :: LineTerminatorSequence is the TRV of |LineTerminatorSequence|.
    • - The TV of LineContinuation :: `\` LineTerminatorSequence is the empty code unit sequence. + The TV of LineContinuation :: `\` LineTerminatorSequence is the empty String.
    • - The TRV of TemplateCharacters :: TemplateCharacter TemplateCharacters is a sequence consisting of the code units of the TRV of |TemplateCharacter| followed by the code units of the TRV of |TemplateCharacters|. + The TRV of TemplateCharacters :: TemplateCharacter TemplateCharacters is the string-concatenation of the TRV of |TemplateCharacter| and the TRV of |TemplateCharacters|.
    • The TRV of TemplateCharacter :: SourceCharacter but not one of ``` or `\` or `$` or LineTerminator is the UTF16Encoding of the code point value of |SourceCharacter|.
    • - The TRV of TemplateCharacter :: `$` is the code unit 0x0024 (DOLLAR SIGN). + The TRV of TemplateCharacter :: `$` is the String value consisting of the code unit 0x0024 (DOLLAR SIGN).
    • - The TRV of TemplateCharacter :: `\` EscapeSequence is the sequence consisting of the code unit 0x005C (REVERSE SOLIDUS) followed by the code units of TRV of |EscapeSequence|. + The TRV of TemplateCharacter :: `\` EscapeSequence is the string-concatenation of the code unit 0x005C (REVERSE SOLIDUS) and the TRV of |EscapeSequence|.
    • - The TRV of TemplateCharacter :: `\` NotEscapeSequence is the sequence consisting of the code unit 0x005C (REVERSE SOLIDUS) followed by the code units of TRV of |NotEscapeSequence|. + The TRV of TemplateCharacter :: `\` NotEscapeSequence is the string-concatenation of the code unit 0x005C (REVERSE SOLIDUS) and the TRV of |NotEscapeSequence|.
    • - The TRV of EscapeSequence :: `0` is the code unit 0x0030 (DIGIT ZERO). + The TRV of EscapeSequence :: `0` is the String value consisting of the code unit 0x0030 (DIGIT ZERO).
    • - The TRV of NotEscapeSequence :: `0` DecimalDigit is the sequence consisting of the code unit 0x0030 (DIGIT ZERO) followed by the code units of the TRV of |DecimalDigit|. + The TRV of NotEscapeSequence :: `0` DecimalDigit is the string-concatenation of the code unit 0x0030 (DIGIT ZERO) and the TRV of |DecimalDigit|.
    • - The TRV of NotEscapeSequence :: `x` [lookahead <! HexDigit] is the code unit 0x0078 (LATIN SMALL LETTER X). + The TRV of NotEscapeSequence :: `x` [lookahead <! HexDigit] is the String value consisting of the code unit 0x0078 (LATIN SMALL LETTER X).
    • - The TRV of NotEscapeSequence :: `x` HexDigit [lookahead <! HexDigit] is the sequence consisting of the code unit 0x0078 (LATIN SMALL LETTER X) followed by the code units of the TRV of |HexDigit|. + The TRV of NotEscapeSequence :: `x` HexDigit [lookahead <! HexDigit] is the string-concatenation of the code unit 0x0078 (LATIN SMALL LETTER X) and the TRV of |HexDigit|.
    • - The TRV of NotEscapeSequence :: `u` [lookahead <! HexDigit] [lookahead != `{`] is the code unit 0x0075 (LATIN SMALL LETTER U). + The TRV of NotEscapeSequence :: `u` [lookahead <! HexDigit] [lookahead != `{`] is the String value consisting of the code unit 0x0075 (LATIN SMALL LETTER U).
    • - The TRV of NotEscapeSequence :: `u` HexDigit [lookahead <! HexDigit] is the sequence consisting of the code unit 0x0075 (LATIN SMALL LETTER U) followed by the code units of the TRV of |HexDigit|. + The TRV of NotEscapeSequence :: `u` HexDigit [lookahead <! HexDigit] is the string-concatenation of the code unit 0x0075 (LATIN SMALL LETTER U) and the TRV of |HexDigit|.
    • - The TRV of NotEscapeSequence :: `u` HexDigit HexDigit [lookahead <! HexDigit] is the sequence consisting of the code unit 0x0075 (LATIN SMALL LETTER U) followed by the code units of the TRV of the first |HexDigit| followed by the code units of the TRV of the second |HexDigit|. + The TRV of NotEscapeSequence :: `u` HexDigit HexDigit [lookahead <! HexDigit] is the string-concatenation of the code unit 0x0075 (LATIN SMALL LETTER U), the TRV of the first |HexDigit|, and the TRV of the second |HexDigit|.
    • - The TRV of NotEscapeSequence :: `u` HexDigit HexDigit HexDigit [lookahead <! HexDigit] is the sequence consisting of the code unit 0x0075 (LATIN SMALL LETTER U) followed by the code units of the TRV of the first |HexDigit| followed by the code units of the TRV of the second |HexDigit| followed by the code units of the TRV of the third |HexDigit|. + The TRV of NotEscapeSequence :: `u` HexDigit HexDigit HexDigit [lookahead <! HexDigit] is the string-concatenation of the code unit 0x0075 (LATIN SMALL LETTER U), the TRV of the first |HexDigit|, the TRV of the second |HexDigit|, and the TRV of the third |HexDigit|.
    • - The TRV of NotEscapeSequence :: `u` `{` [lookahead <! HexDigit] is the sequence consisting of the code unit 0x0075 (LATIN SMALL LETTER U) followed by the code unit 0x007B (LEFT CURLY BRACKET). + The TRV of NotEscapeSequence :: `u` `{` [lookahead <! HexDigit] is the string-concatenation of the code unit 0x0075 (LATIN SMALL LETTER U) and the code unit 0x007B (LEFT CURLY BRACKET).
    • - The TRV of NotEscapeSequence :: `u` `{` NotCodePoint [lookahead <! HexDigit] is the sequence consisting of the code unit 0x0075 (LATIN SMALL LETTER U) followed by the code unit 0x007B (LEFT CURLY BRACKET) followed by the code units of the TRV of |NotCodePoint|. + The TRV of NotEscapeSequence :: `u` `{` NotCodePoint [lookahead <! HexDigit] is the string-concatenation of the code unit 0x0075 (LATIN SMALL LETTER U), the code unit 0x007B (LEFT CURLY BRACKET), and the TRV of |NotCodePoint|.
    • - The TRV of NotEscapeSequence :: `u` `{` CodePoint [lookahead <! HexDigit] [lookahead != `}`] is the sequence consisting of the code unit 0x0075 (LATIN SMALL LETTER U) followed by the code unit 0x007B (LEFT CURLY BRACKET) followed by the code units of the TRV of |CodePoint|. + The TRV of NotEscapeSequence :: `u` `{` CodePoint [lookahead <! HexDigit] [lookahead != `}`] is the string-concatenation of the code unit 0x0075 (LATIN SMALL LETTER U), the code unit 0x007B (LEFT CURLY BRACKET), and the TRV of |CodePoint|.
    • The TRV of DecimalDigit :: one of `0` `1` `2` `3` `4` `5` `6` `7` `8` `9` is the UTF16Encoding of the single code point matched by this production. @@ -11915,40 +11915,40 @@

      Static Semantics: TV and TRV

      The TRV of SingleEscapeCharacter :: one of `'` `"` `\` `b` `f` `n` `r` `t` `v` is the UTF16Encoding of the single code point matched by this production.
    • - The TRV of HexEscapeSequence :: `x` HexDigit HexDigit is the sequence consisting of the code unit 0x0078 (LATIN SMALL LETTER X) followed by TRV of the first |HexDigit| followed by the TRV of the second |HexDigit|. + The TRV of HexEscapeSequence :: `x` HexDigit HexDigit is the string-concatenation of the code unit 0x0078 (LATIN SMALL LETTER X), the TRV of the first |HexDigit|, and the TRV of the second |HexDigit|.
    • - The TRV of UnicodeEscapeSequence :: `u` Hex4Digits is the sequence consisting of the code unit 0x0075 (LATIN SMALL LETTER U) followed by TRV of |Hex4Digits|. + The TRV of UnicodeEscapeSequence :: `u` Hex4Digits is the string-concatenation of the code unit 0x0075 (LATIN SMALL LETTER U) and the TRV of |Hex4Digits|.
    • - The TRV of UnicodeEscapeSequence :: `u{` CodePoint `}` is the sequence consisting of the code unit 0x0075 (LATIN SMALL LETTER U) followed by the code unit 0x007B (LEFT CURLY BRACKET) followed by TRV of |CodePoint| followed by the code unit 0x007D (RIGHT CURLY BRACKET). + The TRV of UnicodeEscapeSequence :: `u{` CodePoint `}` is the string-concatenation of the code unit 0x0075 (LATIN SMALL LETTER U), the code unit 0x007B (LEFT CURLY BRACKET), the TRV of |CodePoint|, and the code unit 0x007D (RIGHT CURLY BRACKET).
    • - The TRV of Hex4Digits :: HexDigit HexDigit HexDigit HexDigit is the sequence consisting of the TRV of the first |HexDigit| followed by the TRV of the second |HexDigit| followed by the TRV of the third |HexDigit| followed by the TRV of the fourth |HexDigit|. + The TRV of Hex4Digits :: HexDigit HexDigit HexDigit HexDigit is the string-concatenation of the TRV of the first |HexDigit|, the TRV of the second |HexDigit|, the TRV of the third |HexDigit|, and the TRV of the fourth |HexDigit|.
    • - The TRV of HexDigits :: HexDigits HexDigit is the sequence consisting of TRV of |HexDigits| followed by TRV of |HexDigit|. + The TRV of HexDigits :: HexDigits HexDigit is the string-concatenation of the TRV of |HexDigits| and the TRV of |HexDigit|.
    • The TRV of HexDigit :: one of `0` `1` `2` `3` `4` `5` `6` `7` `8` `9` `a` `b` `c` `d` `e` `f` `A` `B` `C` `D` `E` `F` is the UTF16Encoding of the single code point matched by this production.
    • - The TRV of LineContinuation :: `\` LineTerminatorSequence is the sequence consisting of the code unit 0x005C (REVERSE SOLIDUS) followed by the code units of TRV of |LineTerminatorSequence|. + The TRV of LineContinuation :: `\` LineTerminatorSequence is the string-concatenation of the code unit 0x005C (REVERSE SOLIDUS) and the TRV of |LineTerminatorSequence|.
    • - The TRV of LineTerminatorSequence :: <LF> is the code unit 0x000A (LINE FEED). + The TRV of LineTerminatorSequence :: <LF> is the String value consisting of the code unit 0x000A (LINE FEED).
    • - The TRV of LineTerminatorSequence :: <CR> is the code unit 0x000A (LINE FEED). + The TRV of LineTerminatorSequence :: <CR> is the String value consisting of the code unit 0x000A (LINE FEED).
    • - The TRV of LineTerminatorSequence :: <LS> is the code unit 0x2028 (LINE SEPARATOR). + The TRV of LineTerminatorSequence :: <LS> is the String value consisting of the code unit 0x2028 (LINE SEPARATOR).
    • - The TRV of LineTerminatorSequence :: <PS> is the code unit 0x2029 (PARAGRAPH SEPARATOR). + The TRV of LineTerminatorSequence :: <PS> is the String value consisting of the code unit 0x2029 (PARAGRAPH SEPARATOR).
    • - The TRV of LineTerminatorSequence :: <CR> <LF> is the sequence consisting of the code unit 0x000A (LINE FEED). + The TRV of LineTerminatorSequence :: <CR> <LF> is the String value consisting of the code unit 0x000A (LINE FEED).
    @@ -12834,7 +12834,7 @@

    Static Semantics: PropName

    LiteralPropertyName : StringLiteral - 1. Return the String value whose code units are the SV of |StringLiteral|. + 1. Return the SV of |StringLiteral|. LiteralPropertyName : NumericLiteral @@ -12885,7 +12885,7 @@

    Runtime Semantics: Evaluation

    LiteralPropertyName : StringLiteral - 1. Return the String value whose code units are the SV of |StringLiteral|. + 1. Return the SV of |StringLiteral|. LiteralPropertyName : NumericLiteral @@ -13213,7 +13213,7 @@

    Runtime Semantics: SubstitutionEvaluation

    Runtime Semantics: Evaluation

    TemplateLiteral : NoSubstitutionTemplate - 1. Return the String value whose code units are the elements of the TV of |NoSubstitutionTemplate| as defined in . + 1. Return the TV of |NoSubstitutionTemplate| as defined in . SubstitutionTemplate : TemplateHead Expression TemplateSpans @@ -13230,8 +13230,7 @@

    Runtime Semantics: Evaluation

    TemplateSpans : TemplateTail - 1. Let _tail_ be the TV of |TemplateTail| as defined in . - 1. Return the String value consisting of the code units of _tail_. + 1. Return the TV of |TemplateTail| as defined in . TemplateSpans : TemplateMiddleList TemplateTail @@ -13246,7 +13245,7 @@

    Runtime Semantics: Evaluation

    1. Let _subRef_ be the result of evaluating |Expression|. 1. Let _sub_ be ? GetValue(_subRef_). 1. Let _middle_ be ? ToString(_sub_). - 1. Return the sequence of code units consisting of the code units of _head_ followed by the elements of _middle_. + 1. Return the string-concatenation of _head_ and _middle_.

    The string conversion semantics applied to the |Expression| value are like `String.prototype.concat` rather than the `+` operator.

    @@ -13259,7 +13258,7 @@

    Runtime Semantics: Evaluation

    1. Let _subRef_ be the result of evaluating |Expression|. 1. Let _sub_ be ? GetValue(_subRef_). 1. Let _last_ be ? ToString(_sub_). - 1. Return the sequence of code units consisting of the elements of _rest_ followed by the code units of _middle_ followed by the elements of _last_. + 1. Return the string-concatenation of _rest_, _middle_, and _last_.

    The string conversion semantics applied to the |Expression| value are like `String.prototype.concat` rather than the `+` operator.

    @@ -42127,7 +42126,7 @@

    Syntax

    Static Semantics

    • - The SV of EscapeSequence :: LegacyOctalEscapeSequence is the code unit whose value is the MV of |LegacyOctalEscapeSequence|. + The SV of EscapeSequence :: LegacyOctalEscapeSequence is the String value consisting of the code unit whose value is the MV of |LegacyOctalEscapeSequence|.
    • The MV of LegacyOctalEscapeSequence :: ZeroToThree OctalDigit is (8 times the MV of |ZeroToThree|) plus the MV of |OctalDigit|.