Commit graph

10 commits

Author SHA1 Message Date
Srujan Gaddam b6526beeab [pkg:js] Disallow staticInterop generative constructors
Fixes https://github.com/dart-lang/sdk/issues/48730

Change-Id: I4c7f687ec8d2724de0e031aa5ebe887f93843761
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254101
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2022-10-18 17:47:29 +00:00
Srujan Gaddam 911f3a8012 [pkg:js] Handle mutually recursive libraries
Related issue: #49301

We have an invariant to make sure stubs aren't created across other
libraries but really the invariant should test for other
components, as it's valid to have two libraries call each other's
factories. Similarly, stubs need to be added to the class before we
clone the body, as the body may mutually recurse. Tests are changed
to reflect this.

Change-Id: I529b682f107a55791a52fa79f082cc8ef5fce1f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249546
Reviewed-by: Riley Porter <rileyporter@google.com>
2022-06-28 18:36:02 +00:00
Ahmed Ashour a6fcb56901 Fix typos
Fixes #49094

TEST=ci

Change-Id: I23cdcb5ad2fc83e5e91d80e34b66af186c0cb923
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/245820
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2022-05-24 09:10:51 +00:00
Srujan Gaddam 2da95997c3 Rename status files in tests/web
Renames `dart2js.status` files to their corresponding directory so they
are used. Moves the filters in `dart2js_native.status` files up to the
parent directory's status files.

Change-Id: Iced14c2d7d40034173768b2d15cf7558c13e7555
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229064
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2022-01-20 18:35:27 +00:00
Srujan Gaddam 4c924bb669 Add tests for static interop type erasure/typing
Tests to make sure static interop classes are erased as expected,
can be used as expected, and that the typing/subtyping relationships
are correct.

Change-Id: Icd68b63f4b7b7f06ec1490a411e31792e9e1fea8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216274
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Riley Porter <rileyporter@google.com>
2021-12-10 18:36:00 +00:00
Srujan Gaddam da01ce02fc [dart2js/ddc] Rename JavaScriptObject to LegacyJavaScriptObject
Changes in type hierarchy will have JavaScriptObject as the new
parent class of interop and native types instead. Also modifies
js_interop_constructor_name tests to reflect addition of static
interop.

Change-Id: I74957ca89aea1726a01e0677548fbb3c5c981323
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215949
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2021-12-10 18:36:00 +00:00
Srujan Gaddam 758cb462f5 [pkg:js] Erase static interop types
Closes https://github.com/dart-lang/sdk/issues/47324

Erases static interop class types in favor of `BaseJavaScriptObject`.
Types are erased everywhere except for constructors, whose invocations
are instead wrapped with a cast. Constructor type erasure is avoided
to ensure the AST is still type-valid. Factories with bodies have
static stubs added instead, and tests are added for this change.

Change-Id: I7231aaaf32d22bc6261adb672a602e8a9e6c86a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215948
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Riley Porter <rileyporter@google.com>
2021-12-10 18:36:00 +00:00
Stephen Adams 5ff2459d88 Remove obsolete internal dart2js annotations
These annotations have all been replaced with @pragma('dart2js:xxx')
versions:

@ForceInline, @NoInline, @NoThrows, @NoSideEffects, @AssumeDynamic.

Change-Id: Ia4730670c6864ccbe0fa4120108c3c16ab887c23
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208863
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-08-04 23:27:18 +00:00
Joshua Litt 343682c4ac Fix web/native/native_exceptions1_frog_test.
An earlier cl fixed the test in web_2, this is just backporting that
fix.

earlier cl:
https://dart-review.googlesource.com/c/sdk/+/200020

Change-Id: Id34bfbc77b5d7774f0e464170c65fd84fa5e9d17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203827
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2021-06-16 22:00:27 +00:00
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