Skip to content

Commit

Permalink
Editorial: update Annex E with incompatibilities from previous editions
Browse files Browse the repository at this point in the history
 - 2016: the Unicode change affected what was considered whitespace (tc39#300 / 24dad16)
 - 2018: changed tagged template literal objects to be cached per source location rather than per realm (tc39#890)
 - 2019: Atomics.wake was renamed to Atomics.notify (tc39#1220)
 - 2019: `await` was changed to require fewer ticks (tc39#1250)
  • Loading branch information
ljharb committed Sep 16, 2019
1 parent 01d8244 commit c1aa31a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -41513,8 +41513,10 @@ <h1>Corrections and Clarifications in ECMAScript 2015 with Possible Compatibilit

<emu-annex id="sec-additions-and-changes-that-introduce-incompatibilities-with-prior-editions">
<h1>Additions and Changes That Introduce Incompatibilities with Prior Editions</h1>
<p><emu-xref href="#sec-tonumber-applied-to-the-string-type"></emu-xref>: In ECMAScript 2015, ToNumber applied to a String value now recognizes and converts |BinaryIntegerLiteral| and |OctalIntegerLiteral| numeric strings. In previous editions such strings were converted to *NaN*.</p>
<p><emu-xref href="#sec-reference-specification-type"></emu-xref>: In ECMAScript 2015, Function calls are not allowed to return a Reference value.</p>
<p><emu-xref href="#sec-tonumber-applied-to-the-string-type"></emu-xref>: In ECMAScript 2015, ToNumber applied to a String value now recognizes and converts |BinaryIntegerLiteral| and |OctalIntegerLiteral| numeric strings. In previous editions such strings were converted to *NaN*.</p>
<p><emu-xref href="#sec-code-realms"></emu-xref>: In ECMAScript 2018, Template objects are canonicalized based on Parse Node (source location), instead of per Realm as in previous editions.</p>
<p><emu-xref href="#sec-white-space"></emu-xref> In ECMASCript 2016, Unicode 8.0.0 or higher is mandated, as opposed to ECMAScript 2015, where Unicode 5.1 is mandated. In particular, this caused U+180E (MONGOLIAN VOWEL SEPARATOR), which was in the Zs category and thus treated as whitespace in ECMAScript 2015, to be moved to the Cf category (as of Unicode 6.3.0). This will cause whitespace-sensitive methods to behave differently - consider: `"\u180e".trim().length` which would be `0` in previous editions, but `1` in ECMAScript 2016 and later.</p>
<p><emu-xref href="#sec-names-and-keywords"></emu-xref>: In ECMAScript 2015, the valid code points for an |IdentifierName| are specified in terms of the Unicode properties &ldquo;ID_Start&rdquo; and &ldquo;ID_Continue&rdquo;. In previous editions, the valid |IdentifierName| or |Identifier| code points were specified by enumerating various Unicode code point categories.</p>
<p><emu-xref href="#sec-rules-of-automatic-semicolon-insertion"></emu-xref>: In ECMAScript 2015, Automatic Semicolon Insertion adds a semicolon at the end of a do-while statement if the semicolon is missing. This change aligns the specification with the actual behaviour of most existing implementations.</p>
<p><emu-xref href="#sec-object-initializer-static-semantics-early-errors"></emu-xref>: In ECMAScript 2015, it is no longer an early error to have duplicate property names in Object Initializers.</p>
Expand Down Expand Up @@ -41552,6 +41554,8 @@ <h1>Additions and Changes That Introduce Incompatibilities with Prior Editions</
<p><emu-xref href="#sec-regexp-pattern-flags"></emu-xref> In ECMAScript 2015, If the _pattern_ argument is a RegExp instance and the _flags_ argument is not *undefined*, a new RegExp instance is created just like _pattern_ except that _pattern_'s flags are replaced by the argument _flags_. In previous editions a *TypeError* exception was thrown when _pattern_ was a RegExp instance and _flags_ was not *undefined*.</p>
<p><emu-xref href="#sec-properties-of-the-regexp-prototype-object"></emu-xref> In ECMAScript 2015, the RegExp prototype object is not a RegExp instance. In previous editions it was a RegExp instance whose pattern is the empty string.</p>
<p><emu-xref href="#sec-properties-of-the-regexp-prototype-object"></emu-xref> In ECMAScript 2015, `source`, `global`, `ignoreCase`, and `multiline` are accessor properties defined on the RegExp prototype object. In previous editions they were data properties defined on RegExp instances.</p>
<p><emu-xref href="#sec-atomics.notify"></emu-xref> In ECMAScript 2019, `Atomics.notify` has been renamed `Atomics.wake` to prevent confusion with `Atomics.wait`</p>
<p><emu-xref="#sec-asyncfromsynciteratorcontinuation"></emu-xref> &amp; <emu-xref href="#sec-asyncgeneratorresumenext"></emu-xref> in ECMAScript 2019, the number of Jobs enqueued by `await` was reduced.</p>
</emu-annex>
<emu-annex id="sec-colophon">
<h1>Colophon</h1>
Expand Down

0 comments on commit c1aa31a

Please sign in to comment.