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

dart2js: target modern browsers and use modern JS #45092

Open
6 of 11 tasks
sigmundch opened this issue Feb 23, 2021 · 6 comments
Open
6 of 11 tasks

dart2js: target modern browsers and use modern JS #45092

sigmundch opened this issue Feb 23, 2021 · 6 comments
Labels
area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. P2 A bug or feature request we're likely to work on web-dart2js

Comments

@sigmundch
Copy link
Member

sigmundch commented Feb 23, 2021

Two years ago we announced a plan to deprecate support for IE11, but due to change in priorities we have not yet made the underlying changes.

This bug is to track any work to enable modern JS features and start using them in our compiler. This includes:

  • increase test coverage of --no-legacy-javascript
  • fix current failures with the flag
  • explore other features we'd like to include in an initial version of this flag, this may include:
    • syntax changes (e.g. method syntax has come up, but it requires careful integration with internal stack deobfuscation tools)
    • use of symbols for various reasons (e.g. today we feature detect to use it in rti)
    • Use of ES6 maps
    • Use ES6 math functions (Add ES6 Math Functions #29623)
    • Removing IE11 polyfills in dart:html
  • measure performance and code-size changes
  • dogfood the flag on a couple internal apps
  • enable the flag by default
@sigmundch sigmundch added web-dart2js P2 A bug or feature request we're likely to work on area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. labels Feb 23, 2021
@lexaknyazev
Copy link
Contributor

Please explore including #29623 in this plan.

@sigmundch
Copy link
Member Author

Thanks for the suggestion, I went ahead and added it to the list above.

@ghost
Copy link

ghost commented Mar 11, 2021

it is very sad that you have to adapt to a poor javascript system, instead of developing your own virtual machine for the browser

@lexaknyazev
Copy link
Contributor

Please consider promoting BigInt into language. With modern JS, it implies:

@MrBirb
Copy link

MrBirb commented Sep 19, 2021

I believe in 2.14 this is the default behavior?

@sigmundch
Copy link
Member Author

Yes, the flag was flipped by default in 2.14. So far, though, we only use ES6 method syntax, which was the change that was providing the biggest win in terms of code-size reduction (as much as 4% on some of our large internal apps).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. P2 A bug or feature request we're likely to work on web-dart2js
Projects
None yet
Development

No branches or pull requests

3 participants