Commit graph

83049 commits

Author SHA1 Message Date
asiva
0b7c7e09b0 [VM / Runtime] Fix GetLastErrorAsString to use the correct status on
Windows

TEST=cq

Bug:47911
Change-Id: I52184d34d8dc61a98416b3836cc994e3090b2f04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223742
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2021-12-14 16:27:44 +00:00
Alexander Thomas
81723904c8 [infra] Fix flutter-frontend
The third_party directory was removed in d45d838266

Change-Id: Ib487b801d7446a151b6a1f231e3761ef6158a73f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223801
Reviewed-by: William Hesse <whesse@google.com>
2021-12-14 12:21:04 +00:00
Alexander Thomas
d2da75a5e0 [release] Add 2.15.1 to the changelog
Change-Id: I16329c5526533bde598c0557bf3d538b42e19046
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223802
Reviewed-by: Michael Thomsen <mit@google.com>
2021-12-14 12:00:35 +00:00
Alexander Thomas
baf56df325 [infra] Remove client directory
Change-Id: If4b76234e5b8988faef4ed4df66df7d7d6ec5638
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223422
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2021-12-14 06:11:18 +00:00
Nicholas Shahan
d33e94f1a7 [ddc] Migrate js_typerep libraries to null safety
Change-Id: I73a1f7da1c62bc12d832da7d22a5288425ee99aa
Issue: https://github.com/dart-lang/sdk/issues/46617
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223362
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-12-14 01:31:15 +00:00
Stephen Adams
b628d00b00 [dart2js] Correct evaluation order of named arguments in redirecting/super initializers
Minor refactoring to share building the map from argument names to
compiled instructions.

Fixes #47047

Change-Id: I20b8d37673bd4cb18aa8b2091af79e40ec498370
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223381
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-12-14 00:27:24 +00:00
Nicholas Shahan
0868f39099 [ddc] Migrate js_interop library to null safety
Change-Id: Ic08b68dcc50e22826203efdc491f7d56dc95ec2b
Issue: https://github.com/dart-lang/sdk/issues/46617
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223363
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-12-14 00:23:54 +00:00
Sam Rawlins
f370d5c5ca analyzer: Wrap error message and correction message strings
This just adds a wrapping step to message generation to generate
Dart strings that are wrapped at (or before) 80 characters.

Change-Id: I55b2e307c73beac567cf15492fcca733e1c61a12
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223442
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-12-14 00:01:53 +00:00
Ryan Macnak
e925ff9a26 [vm, gc] Fix TSAN failure caused by loading a TypedDataView's backing store's header.
This header is only used by an assert, but the load was not removed by the C++ compiler in release mode. Explicitly exclude the loads with the preprocessor so they only happen in debug mode, and limit the assert reading the backing store's header to non-parallel scavenges only.

TEST=tsan
Bug: https://github.com/dart-lang/sdk/issues/47895
Change-Id: Idbbdb743404d8ee15b0f8e13332c022453de085c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223660
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-12-13 23:56:44 +00:00
Nicholas Shahan
9a0400b82a [ddc] Migrate native_types to null safety
Change-Id: I9e169000855fafc3ae11389818ceefc374cc2af4
Issue: https://github.com/dart-lang/sdk/issues/46617
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223361
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-12-13 23:29:44 +00:00
Nate Bosch
56a0874a7e Update to the latest package:csslib
This version has reverted a change which was incompatible with google3
during the last roll.

Change-Id: I004cba8695aa8c7ce3d1f96b4f92974db6cec673
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/222360
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Leon Senft <leonsenft@google.com>
Commit-Queue: Leon Senft <leonsenft@google.com>
2021-12-13 23:23:53 +00:00
Ryan Macnak
ecdf148428 [vm] Refactor generation of identity hashes.
Generating identity hashes from the runtime no longer calls into Dart. On 32-bit systems, generating identity hashes from Dart now does only one runtime transition.

TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/47873
Change-Id: Ib21156cb05706f81744eb4e5ccb644f40aa84c96
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/222326
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2021-12-13 22:31:46 +00:00
asiva
08e0a567a6 [VM/Runtime] - Account for TransferableTypedData in Api Messages
Account for TransferableTypedData when receiving messages in
native ports and not crash.

TEST=added new API test

Bug:47686
Change-Id: I2dfad694532f544df3000cd97015089ebb5176fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/222031
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2021-12-13 22:26:24 +00:00
Srujan Gaddam
0d66f87747 [pkg:js] Roll 0.6.4 to include static interop changes
Roll the version number and constrain the sdk version with this
new roll. Next beta will be 2.16, so use that as the minimum.

Change-Id: I50ac1309255f9553ec2faa21958759e15e7712cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/222940
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2021-12-13 22:13:16 +00:00
Konstantin Shcheglov
214668c3c5 Prepare to publish analyzer 3.0.0 and _fe_analyzer_shared 32.0.0
Change-Id: Ief9890c035c9b8784741be297169db9cad956791
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223640
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2021-12-13 21:44:22 +00:00
Nicholas Shahan
6c98722611 [ddc] Bump default language version to 2.15.0
Start using constructor tearoffs in libraries that have been migrated to
null safety.

Change-Id: I1a448a42b811c2f278d25a823356ee60a452848f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223341
Reviewed-by: Anna Gringauze <annagrin@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-12-13 20:28:12 +00:00
Alexander Markov
d950043abd [vm] Remove redirecting factories from source coverage report
Redirecting factories are never hit in source coverage report because
front-end replaces calls to redirecting factories with calls to their
targets. This change excludes redirecting factories from source
coverage reports.

TEST=vm/cc/SourceReport_Regress95008_RedirectingFactory
Fixes https://github.com/flutter/flutter/issues/95008

Change-Id: I0f6af291f7ee0c042521c92063092f990426b995
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223600
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2021-12-13 19:47:04 +00:00
Keerti Parthasarathy
498d976e1e Implement signature help for cider.
Change-Id: I4b10d4a2a61d3c1fc0bcec652694b7a1b7d0393d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/222841
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2021-12-13 18:02:18 +00:00
Konstantin Shcheglov
f25b9a0601 Tweaks for IMPORT_LIBRARY_PREFIX.
Change-Id: I8a91de92a41a9ed33ea74c53c6a77eb4c36901af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223480
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-13 16:38:27 +00:00
Konstantin Shcheglov
a11017b30d Share implementation for choosing extensions between analyzer and analysis server.
Change-Id: Ie73b74f1c1af00b85402a8dce43442dff4bdc758
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223520
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-13 16:37:55 +00:00
Konstantin Shcheglov
b2f2aac4b9 Use 'packagesRootPath' in 'Import Library' tests.
Change-Id: I106a4bbca5ae3dfe1d08211eb91a321827227b68
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223460
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-13 16:30:24 +00:00
Konstantin Shcheglov
30ea5d1167 Return variable to either getter or setter.
Change-Id: I412b1747f95505c37812a4f72f5f1e0fe6fff81f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223500
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-13 16:29:53 +00:00
Michal Terepeta
5185680657 [analysis_server] Fix a problem with a cast when running in sound mode
Change-Id: I90c2a319cacc856b807b807d675099163261f7ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223180
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Michal Terepeta <michalt@google.com>
2021-12-13 16:03:03 +00:00
Chloe Stefantsova
843583f356 [cfe] Add some of the compile-time errors for super parameters
Part of https://github.com/dart-lang/sdk/issues/47525

Change-Id: Ic0ad44656f6b5f6fa56f8c130e3e44b8729a9659
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223160
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2021-12-13 12:32:23 +00:00
Johnni Winther
29f58b0328 [cfe] Avoid crash when reading entry point
Reading a library as an entry point, which is done for entry points
of script compilation, for files in modular compilation, _or_ for
invalidated files in incremental compilation, doesn't provide an
accessor library which is otherwise used to check if loading of
platform private libraries is allowed.

A recent change to how the entry point of a script compilation is
tracked, exposed a throwing path, added to ensure that reading libraries
through imports, exports and parts provided the accessing library. This
check should have been an assert, since its omission has no immediate
negative effect, and by reordering the code, could even behandled with
null safety.

The exposed throwing path has been seen to cause crashes in incremental
compilation: https://github.com/flutter/flutter/issues/95014

This change removes the throwing path and therefore avoids the crashes
seen in incremental compilation.

Change-Id: Ibff76dae727204b727389bb9f80c5c733855242c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223420
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-12-13 12:01:53 +00:00
Tess Strickland
69ca60fdd9 [vm] Restore the write barrier invariant for field init stubs.
With this, LoadInstanceFieldInstr and LoadStaticFieldInstr can
always return false from CanCallDart, and thus avoid invalidating
some write barrier removals.

TEST=vm/cc/IRTest_WriteBarrierElimination_LoadLate{,Static}Field
     vm/dart/write_barrier_load_late_field

Change-Id: I800bc2c0e66303fd78a74b67d9f72e3250aa081d
Bug: b/210069239
Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-linux-release-ia32-try,vm-kernel-linux-release-x64-try,vm-kernel-nnbd-linux-release-ia32-try,vm-kernel-nnbd-linux-release-simarm-try,vm-kernel-nnbd-linux-release-simarm64-try,vm-kernel-nnbd-linux-release-x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-linux-release-simarm_x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-nnbd-linux-release-simarm64-try,vm-kernel-precomp-nnbd-linux-release-simarm_x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223101
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2021-12-13 11:26:17 +00:00
Michael Thomsen
5bef7fe3fb Add 2.15 release date
Fixes https://github.com/dart-lang/sdk/issues/47909

Bug: https://github.com/dart-lang/sdk/issues/47909
Change-Id: I7a2c81ba3888b52db2f69df36e17c58de7522179
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223424
Reviewed-by: Alexander Thomas <athom@google.com>
2021-12-13 10:46:26 +00:00
Sergey G. Grekhov
2f9b2d10cc [co19] HttpRequestUpload tests enabled in status files
Change-Id: Ied7cdc131541711f80cd1d053660438bfcdc55ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223421
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2021-12-13 09:39:49 +00:00
Konstantin Shcheglov
979f3ea79e Use LibraryElement(s) to find extensions for 'Import Library' quick fix.
So, we don't need ExtensionCache anymore.

This fixes the issue with importing a library from lib/src sometimes.

Bug: https://github.com/dart-lang/sdk/issues/47842
Change-Id: I9a28fb2e1e14ab96a58c3ef72daa87562f1bccd6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223441
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-12 17:39:22 +00:00
Konstantin Shcheglov
7f07c9d3ff Replace Predicate with Function, remove java_engine.dart
Change-Id: If3ac722f855106c2350c3217c8e7d7ba69dfbaed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223440
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-12 03:32:31 +00:00
Konstantin Shcheglov
4122236c30 Remove deprecated methods from TypeProvider.
Change-Id: Iaf28b39d5e4efe1f2d0378ad794ccf38bad95254
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/222980
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-11 19:46:10 +00:00
Konstantin Shcheglov
5cc2d95815 Implement DartFixContext.getTopLevelDeclarations() as a method.
Change-Id: Iaf58027c46cd6824e76c66139a4b13fb03825ffb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223340
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-11 18:51:20 +00:00
Konstantin Shcheglov
95644dcde5 Stop using the remaining methods of StringUtilities.
Change-Id: I099c4f79f2cd5dede474412e72d6d53ef555deff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223300
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-11 18:50:01 +00:00
Johnni Winther
5f32f4d7b6 [cfe] Separate patch from regular libraries
+ handle them through the origin library.

This prepares for supporting multiple patch libraries for the same
library.

Change-Id: Ib4934fd2f2c7f743fa342dae86002ac72d57f9a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/222304
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2021-12-10 22:11:29 +00:00
Konstantin Shcheglov
a2d1136620 Simplify 'Import Library' support in Cider.
Change-Id: Ife204362816bcddaaa0757e07b86e0393bebbfbe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223260
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-10 21:50:24 +00:00
Sam Rawlins
5aa240ae7c Correct mock impl of ProcessStartMode
Change-Id: I4a341cdf6c580760a7aff83aa6f32e8ec195640b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223142
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-12-10 21:46:52 +00:00
Konstantin Shcheglov
932bd93fae Replace StringUtilities.printListOfQuotedNames() with quotedAndCommaSeparatedWithAnd.
Change-Id: I8579b2037999967b865f4ebaa2a7ff67b05d2a94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223240
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-10 21:09:40 +00:00
Johnni Winther
62b1a6c2ee [cfe] Emit default values for generative constructors in outlines
These are needed to support generating forwarding constructors in
mixin applications.

Change-Id: I71813295c3445752cbdbe1ba5245b2ba9057c622
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223060
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2021-12-10 20:50:55 +00:00
Konstantin Shcheglov
e0752585f2 Use available files and element models for 'Import Library' quick fix.
We still use `ExtensionCache` to fix members.
I will try to change this next.

Change-Id: I047250b0fc9187673fcc88e80b1d40fc421db475
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/222542
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-10 20:35:40 +00:00
Danny Tuppeny
08aeef0303 [analysis_server] Switch assert() to expect() in test function
+ tweak dartdoc on RangeFactory method.

Change-Id: I8026132f808f195cf0ca68673147efaa8cc95364
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223100
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-12-10 19:51:35 +00:00
Chloe Stefantsova
fa90dbad96 [cfe] Add the missing .modular.expect file
Change-Id: I01e883e3214fbf1a0927eda8a0dadd55bd6eac42
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223161
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Auto-Submit: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2021-12-10 19:40:39 +00:00
Konstantin Shcheglov
95a3d3cab1 Remove unused methods from StringUtilities.
Change-Id: I986dab76cff97007a2c9e513da9b6da8fbfc41de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223200
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-10 19:39:00 +00:00
Nicholas Shahan
427c83345a [ddc] Enable null safety in module_symbols library
Also migrate the library test and the module_symbols_collector library.

Change-Id: Id00ac050e8f36ed7016b6d1d49b10fa4297aaeb6
Issue: https://github.com/dart-lang/sdk/issues/46617
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216760
Reviewed-by: Anna Gringauze <annagrin@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-12-10 18:51:30 +00:00
Srujan Gaddam
6f4f2f5f12 [dart:html] Make Native web classes extend JavaScriptObject
Now that JavaScriptObject is the new parent class of the old
JavaScriptObject (now called LegacyJavaScriptObject), web classes
should extend it instead.

Change-Id: I94613177bd073e131bff70d8e00e4e6ae8e8949f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216275
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Riley Porter <rileyporter@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2021-12-10 18:36:00 +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
aea4018aa6 [pkg:js] Filter synthetic procedures from static interop errors
Pre-null safety, `Object` procedures are synthesized in classes.
Since these are instance members, this triggers static interop
errors on all classes, so they need to be filtered out.

Change-Id: I5c66da6277c4d93c19cce930d54e933d842ecf85
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216560
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Riley Porter <rileyporter@google.com>
2021-12-10 18:36:00 +00:00
Srujan Gaddam
2494a1bdba [pkg:js] Enable staticInterop annotations
With erasure and small changes to RTI, these can be uncommented.

Change-Id: I3fb29cd9984b60a8fde74eb47849436b6cb6dd44
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216273
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Riley Porter <rileyporter@google.com>
2021-12-10 18:36:00 +00:00
Srujan Gaddam
45c350052d [dart2js/ddc] Rename BaseJavaScriptObject to JavaScriptObject
Part 2 of the renaming to create the new parent type. Also modifies
some existing tests to reflect the change in name and function of
JavaScriptObject.

Change-Id: If37f34dd8477b7fc1fe459d3225ecf2537fb9f1a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217156
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Mayank Patke <fishythefish@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