Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support the Latest ECMAScript Standard #498

Closed
11 of 13 tasks
clover2123 opened this issue Nov 6, 2019 · 8 comments
Closed
11 of 13 tasks

Support the Latest ECMAScript Standard #498

clover2123 opened this issue Nov 6, 2019 · 8 comments
Labels
ES.Next New feature of the latest ECMAScript

Comments

@clover2123
Copy link
Contributor

clover2123 commented Nov 6, 2019

Update the ECMAScript 2019 (the latest standard) on Escargot

ECMAScript 2019 Standard : ecma-262/10.0

Based on the upper standard, we are going to update the new ES10 standard and missing features from ES7 to ES10.

New Features

ECMAScript 2016

  • Exponentiation Operator (**)
  • New Builtin Methods
  • Array.prototype.includes

ECMAScript 2017

  • Async Function
  • Shared Memory (not support)
  • Atomics (not support)
  • New Builtin Methods
  • Object.values
  • Object.entries
  • Object.getOwnPropertyDescriptors

ECMAScript 2018

  • Support for asynchronous iteration via the AsyncIterator protocol and async generators
  • Rest Parameter and Spread Operator for Object
  • New RegExp Features
  • dotAll flag
  • named capture groups
  • Unicode property escapes
  • look-behind assertions (not support)

ECMAScript 2019

  • New Builtin Methods
  • Array.prototype.flat, Array.prototype.flatMap
  • Object.fromEntries
  • String.prototype.trimStart, String.prototype.trimEnd
  • Updated Syntax
  • Optional catch binding parameters
  • Allowing U+2028 (LINE SEPARATOR) and U+2029 (PARAGRAPH SEPARATOR) in string literals
  • Update on Array.prototype.sort
  • Update on Function.prototype.toString
@clover2123 clover2123 added enhancement New feature or request ES.Next New feature of the latest ECMAScript and removed enhancement New feature or request labels Nov 6, 2019
@Achie72
Copy link
Contributor

Achie72 commented Nov 12, 2019

Do we want to have separate TC-s for separate functions under Escargot/es2010 like we did with ES6?

@clover2123
Copy link
Contributor Author

@Achie72 Since a new ECMAScript standard is released in every year, we think that it's not quite important to separate each ECMAScript version now. Therefore if you want to add any new TCs with the latest feature, please add it to the existing Escargot/es2015. I'll re-name the repositary soon (such as new_es).

@clover2123 clover2123 changed the title Support ECMAScript 2019 Standard Support the Latest ECMAScript Standard Nov 14, 2019
@clover2123 clover2123 pinned this issue Nov 18, 2019
@clover2123 clover2123 unpinned this issue Nov 18, 2019
@clover2123 clover2123 pinned this issue Nov 25, 2019
@rerobika rerobika unpinned this issue Feb 19, 2020
@rerobika rerobika pinned this issue Feb 20, 2020
@Achie72
Copy link
Contributor

Achie72 commented Apr 2, 2020

@clover2123 i think we can look into updating a few things here:

@clover2123
Copy link
Contributor Author

@Achie72
The list updated. Thanks.
It seems that almost all the necessary features are implemented except lookbehind assertions in regular expression.

@Achie72
Copy link
Contributor

Achie72 commented Apr 3, 2020

Lookbehind is only supported by a V8, where it is faulty as well, and no other big engines have it as far as i know.

/(?<=((x.)\2)+)a/.exec("xyxyxsxsa")

output:
(3) ["a", "xy", "xy", index: 8, input: "xyxyxsxsa", groups: undefined]

This is because it is a very controversial feature, as it not defined exactly how it should behave in complex situation, and if it is implemented, it is very resource intense and therefore sometimes it has limited or just tricked behavior to achieve an easier inner workings (see V8 example above).

If we still want this feature, we can look into it, but seeing as no other engines have it, maybe we should leave this one out too imo.

@zherczeg
Copy link
Contributor

zherczeg commented Apr 3, 2020

I think the problem with lookbehind, is that the trivial solution (scanning from the beginning of the subject string) is way too slow, and the opposite method - scanning backward - is kind of impossible to implement efficiently because of the corner cases. So far only Google tried it, and they failed. We could consider ignoring this feature.

@clover2123
Copy link
Contributor Author

@Achie72 @zherczeg
I didn't know the notoriety of that feature.
We decide not to support lookbehind feature as well.
Thanks for your feedback!

@clover2123
Copy link
Contributor Author

From now on, we will going to pass more TCs such as v8 (kangax too).
First of all I'll update vendor TCs to the latest version.
Thank you for all your contributions.

@clover2123 clover2123 unpinned this issue Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ES.Next New feature of the latest ECMAScript
Projects
None yet
Development

No branches or pull requests

3 participants