Sigmund Cherem
912005267d
[web] rename suite dart2js -> web.
...
Change-Id: I46be49b2effec3e38a3dc44cd45cfe736f77fa78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182680
Commit-Queue: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Joshua Litt <joshualitt@google.com >
Reviewed-by: Nicholas Shahan <nshahan@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2021-02-04 23:11:32 +00:00
Srujan Gaddam
ed009afc4c
[package:js] Add static errors for invalid extends
...
Bug: https://github.com/dart-lang/sdk/issues/37896
dart2js disallows JS interop classes from extending Dart classes,
and ddc does not work as expected. Dart classes that extends JS
interop classes can't be declared in ddc and throw an error on
usage in dart2js. This CL adds static errors for both cases.
Change-Id: I72001d2e8bec046c0e1ab4c06fed8fcf84ade259
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164840
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Srujan Gaddam <srujzs@google.com >
2020-10-28 16:04:15 +00:00
Srujan Gaddam
c990450628
[package:js] Add checks for external keyword
...
Checks to see if a JS interop member is correctly annotated with
the `external` keyword. If it is not, it must be one of several
exceptions to be allowed.
This CL also changes static errors to first check for `JS` and
`external` before processing the member as a JS interop member.
This makes it clearer whether a member is a JS member.
Change-Id: I412eeafbfe8773847bfb9c864e4fb9b65e2d632a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158083
Commit-Queue: Srujan Gaddam <srujzs@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2020-09-25 23:30:34 +00:00
Mayank Patke
5be3a355e7
[dart2js] Clean up --experimental-trust-js-interop-type-annotations
...
flag.
Change-Id: I8622e88afdd1fc3f65f36814eebc8e124de2bc25
Fixes: https://github.com/dart-lang/sdk/issues/43470
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164422
Commit-Queue: Mayank Patke <fishythefish@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2020-09-25 00:17:09 +00:00
Srujan Gaddam
7bb0d1f39a
[package:js] Add error for params in factories of anon classes
...
Adds a static error to check that factory constructors in anonymous
classes contain no positional parameters.
Change-Id: Iae7c5c1d9e2dc91390c85c58eb5e96718e808f9a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156145
Reviewed-by: Nate Bosch <nbosch@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Srujan Gaddam <srujzs@google.com >
2020-08-03 23:20:42 +00:00
Srujan Gaddam
7c40665f91
[package:js] Add static errors for named parameters and tests
...
Adds error for named params in JS interop functions, static error
tests, and removes redundant code from dart2js.
Change-Id: Ie16ebdd7a816983c1250579ea346e31e77227112
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154752
Commit-Queue: Srujan Gaddam <srujzs@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2020-07-20 20:27:07 +00:00
Harry Terkelsen
54fe29e965
support @JS annotation from SDK
...
Attempt at fixing https://github.com/dart-lang/sdk/issues/39740 to allow the flutter web engine to use @JS
interop to avoid the overhead of the SDK available js interop.
Bug: 39740
Change-Id: I7ba9c8981e639cd267bee3086ba900b89bfc0d6f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150501
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Harry Terkelsen <het@google.com >
2020-06-09 17:10:15 +00:00
Joshua Litt
20faaa5d94
[dart2js] Move dart2js unit tests to pkg/compiler/test.
...
Change-Id: Ib18f554c1076f27a3f7c0df5a36410da41a1f467
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148784
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2020-05-28 18:51:11 +00:00