Commit graph

5245 commits

Author SHA1 Message Date
Nate Biggs af589a8f6b [dart2js] Migrate abstract_value_domain to nnbd
Change-Id: Ic4258db7fcf29d23607d392e5ed2e6672221f6c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244700
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2022-05-17 03:04:25 +00:00
Nate Bosch 6ebd2633cd Use any deps for all unpublished packages
It should not be necessary to ever run `pub get` for a package which is
not published. All packages used in the SDK are controlled by a single
package config, so it's not necessary to declare versions or paths for
any packages.

Remove all dependency overrides.

R=devoncarew@google.com

Change-Id: Icb328813b471f35ee4c99995f4e90aac4d8ed438
Tested: Covered by existing static analysis.
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244767
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2022-05-17 01:22:25 +00:00
Nate Biggs ebce8e8dd0 [dart2js] Migrate elements/indexed.dart to nnbd
Change-Id: Ice865c35a5bc0641622da22c47cb5d56e782bcf3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244600
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2022-05-14 03:15:36 +00:00
Nate Biggs f6dd05939d [dart2js] Migrate ir/annotations.dart to nnbd
Change-Id: Iec104f841b1900fc8dd47e2a41ea201a7e900286
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244601
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2022-05-14 01:10:57 +00:00
Nate Bosch 1e04fe1fd0 Reland "Sync packages from shelf mono repo"
This is a reland of commit 072603d40a

Original change's description:
> Sync packages from shelf mono repo
>
> Drop the DEPS entries for the repositories which will be archived. Each
> of the packages has been merged into the `shelf` repository.
>
> Add the `shelf` repository to the specially handled directories with
> nested packages in `generate_package_config`.
>
> Update path dependencies in pubspecs to the new location.
>
> R=devoncarew@google.com
>
> Change-Id: Iefca4fdb2abb6bafa273b9b6b1b4f25d6c91b005
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243929
> Reviewed-by: Alexander Thomas <athom@google.com>
> Reviewed-by: Devon Carew <devoncarew@google.com>
> Commit-Queue: Nate Bosch <nbosch@google.com>
> Auto-Submit: Nate Bosch <nbosch@google.com>

Change-Id: I064d9bc87263e02357021c1def2b656afe45cf22
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244725
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Auto-Submit: Nate Bosch <nbosch@google.com>
2022-05-12 21:35:55 +00:00
Nate Bosch 4c8654eb10 Revert "Sync packages from shelf mono repo"
This reverts commit 243ac04dbf.

Reason for revert: Breaks roll to flutter engine still.

Original change's description:
> Sync packages from shelf mono repo
>
> Keep the DEPS entries and directories for the old locations for these
> packages, but ignore them in `generate_package_config`. Removing the
> hashes and directories would invalidate the DEPS file in the flutter
> engine repository.
>
> Add the `shelf` repository to the specially handled directories with
> nested packages in `generate_package_config`.
>
> Update path dependencies in pubspecs to the new location.
>
> Reland of https://dart-review.googlesource.com/c/sdk/+/243929
> without the removal of the old directory locations.
>
> R=​devoncarew@google.com
>
> Change-Id: I3d3b3eb0722f3eba518a6a1034ed9c24f83c70f0
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244300
> Reviewed-by: Devon Carew <devoncarew@google.com>
> Commit-Queue: Nate Bosch <nbosch@google.com>

TBR=devoncarew@google.com,nbosch@google.com

Change-Id: Ied6d9aa685208eddea6d82d04ca8876937651051
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244302
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2022-05-12 00:00:34 +00:00
Mayank Patke 4ea2b74256 [dart2js] Initialize all primitive constants in field allocators.
Change-Id: I6e1c3618758b1a569ee6d5d6c21520571d3234fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244361
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2022-05-11 23:37:44 +00:00
Mayank Patke 41ba014616 [dart2js] Clean up .isXXX members on ConstantValue.
Bug: #48974
Change-Id: If70fac64e69f60fb5228492eac5591d620f25f77
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244360
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2022-05-11 20:25:44 +00:00
Nate Bosch 3c231e4f57 Read package_config.json in more tests
Towards #48275

R=mit@google.com

Change-Id: I38cc986937543c5e4d1f2a2cd4c7804d180a2741
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244304
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
Auto-Submit: Nate Bosch <nbosch@google.com>
2022-05-11 18:58:44 +00:00
Nate Bosch 243ac04dbf Sync packages from shelf mono repo
Keep the DEPS entries and directories for the old locations for these
packages, but ignore them in `generate_package_config`. Removing the
hashes and directories would invalidate the DEPS file in the flutter
engine repository.

Add the `shelf` repository to the specially handled directories with
nested packages in `generate_package_config`.

Update path dependencies in pubspecs to the new location.

Reland of https://dart-review.googlesource.com/c/sdk/+/243929
without the removal of the old directory locations.

R=devoncarew@google.com

Change-Id: I3d3b3eb0722f3eba518a6a1034ed9c24f83c70f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244300
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2022-05-11 15:10:14 +00:00
Mayank Patke 34ebfc6594 [dart2js] Add regression test for https://dart-review.googlesource.com/c/sdk/+/225320
Change-Id: Iff348b9ce13ea249b8c63f8c0952cd446ad5cb7d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243528
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2022-05-10 22:56:23 +00:00
Mayank Patke e5498bcd40 [dart2js] Clean up some file paths.
* The wrapped abstract value domain is moved out of the powersets folder
  since they're unrelated.
* {inferrer,ssa}/builder_kernel.dart renamed to just builder.dart since
  we only operate on kernel.
* inferrer/inferrer_engine.dart renamed to engine.dart since it was
  redundant.

Change-Id: I355e626431d8a49e9a944341360b2d6401895929
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243645
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2022-05-10 21:36:13 +00:00
Joshua Litt 2783cca57d [dart2js] Fix bug in impact data serialization.
Change-Id: I1e4915624b609aafa9392fc651f5935bf658a71b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244184
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Auto-Submit: Joshua Litt <joshualitt@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2022-05-10 03:34:13 +00:00
Nate Bosch fac9bbb5d6 Revert "Sync packages from shelf mono repo"
This reverts commit 072603d40a.

Reason for revert: Causing issues with rolling into flutter engine.

Original change's description:
> Sync packages from shelf mono repo
>
> Drop the DEPS entries for the repositories which will be archived. Each
> of the packages has been merged into the `shelf` repository.
>
> Add the `shelf` repository to the specially handled directories with
> nested packages in `generate_package_config`.
>
> Update path dependencies in pubspecs to the new location.
>
> R=​devoncarew@google.com
>
> Change-Id: Iefca4fdb2abb6bafa273b9b6b1b4f25d6c91b005
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243929
> Reviewed-by: Alexander Thomas <athom@google.com>
> Reviewed-by: Devon Carew <devoncarew@google.com>
> Commit-Queue: Nate Bosch <nbosch@google.com>
> Auto-Submit: Nate Bosch <nbosch@google.com>

TBR=devoncarew@google.com,athom@google.com,nbosch@google.com

Change-Id: Ic610d47a3294a7dac9503e8a7b160173e0009056
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244140
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2022-05-09 22:58:22 +00:00
Nate Bosch 072603d40a Sync packages from shelf mono repo
Drop the DEPS entries for the repositories which will be archived. Each
of the packages has been merged into the `shelf` repository.

Add the `shelf` repository to the specially handled directories with
nested packages in `generate_package_config`.

Update path dependencies in pubspecs to the new location.

R=devoncarew@google.com

Change-Id: Iefca4fdb2abb6bafa273b9b6b1b4f25d6c91b005
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243929
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Auto-Submit: Nate Bosch <nbosch@google.com>
2022-05-09 19:14:52 +00:00
Stephen Adams daba3529cb [dart2js] Migrate constants/constant_system.dart
Most of the change is changing `foo.isInt` to `foo is IntConstantValue` to get promotion and avoid downcasts.

Change-Id: Ie38bc5500dcb22ed9e194e6b810702dd94f2f79e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243926
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2022-05-07 01:05:50 +00:00
Stephen Adams e3e9aed1f5 [dart2js] Migrate constants/values.dart
Change-Id: Ia042b4ba17407bd8a4da404ce832ae83d046cb1a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243880
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
2022-05-06 15:58:15 +00:00
Stephen Adams b488bd1a75 [dart2js] Migrating cycle in io/ and js/
This migrates js/js.dart which will unblock the {ConstantValue,OutputUnit} cycle.


Change-Id: I6d49c2c588ac3a58e7698228e1b276d4cfb931d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243531
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
2022-05-06 03:54:16 +00:00
Sigmund Cherem bf2cff83d5 [dart2js]: Update README
One pass to update the general description of the compiler pipeline.

Change-Id: I0597958139e9ea11b27dcb6072b8d70a90c9c937
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242505
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2022-05-06 01:16:25 +00:00
Nate Biggs c6173d3686 [dart2js] Correctness updates for async lowering.
- Wrap returns in Future.value to ensure the returned Future has the async function's return type.
- Skip any function that has try/catch/finally as these introduce more complex control flow. (Might be able to convert these using an onError callback in the future).
- Don't assume futureValueType since CFE might not populate it in Kernel when syntax is incorrect.

Change-Id: Ice3954da52a10a74f93b0adc6409a2d98e13cb3b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241260
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2022-05-05 21:25:45 +00:00
Stephen Adams 56765625e0 [dart2js] Migrate more of serialization/ to NNBD
This CL reduces the number of part files in serialization/ by moving
classes into smaller libraries.

This allows the {Data,Binary,Object}{Sink,Source} to be migrated to
NNBD while sink.dart and source.dart still have dependencies.

Change-Id: I0ea44f95841f18978e78c2e1697fbc97a3bf73c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243711
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2022-05-05 20:04:45 +00:00
Mark Zhou bf5690dd0c [dart2js] Removing size checks from main output unit dump info tests
These were far too sensitive to code size changes and causing unhelpful failures.

Change-Id: I5293c7d281a5db2d36af35f67966f4d47413a78a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243561
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2022-05-03 23:14:04 +00:00
Mark Zhou 9c572f08ca [dart2js] Adding closure tests for dump info members
Change-Id: I73d6e262941fa1b8278f32c3e17689e45dea4ebd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243383
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2022-05-03 20:53:34 +00:00
Stephen Adams 7836057041 [dart2js] Share late-check name strings
0.925% reduction in specific Dart Angular app.

Change-Id: Ic4828a3175775060397a8f9cb513b18f175f5c6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242424
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2022-05-03 06:03:58 +00:00
Mark Zhou 9925c72e55 [dart2js] Adding program-level info to dump info tests
Change-Id: I3df11ad508259ac12080bab6595377550124c8a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243023
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2022-05-02 22:00:52 +00:00
Stephen Adams 0d5d34a2ed [dart2js] Migrate more serialization methods
Change-Id: I1fb46ff661197c321afad040d284d0da33ff2ed3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243024
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2022-05-02 20:14:12 +00:00
Sigmund Cherem 6eb527be4d [dart2js] migrate program split constraints to null safety
Change-Id: Ice2bcf15d55e0b9bff0a11376c0b9ff42e012b50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243025
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2022-05-02 19:30:54 +00:00
Nate Biggs 017393ecdc [dart2js] Migrate member_data.dart and node_indexer.dart to nnbd
Change-Id: I0e80d9aacb6e2f15afa2388543ad3dcbd68065ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242700
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2022-05-02 18:02:28 +00:00
Mark Zhou a0b35de326 [dart2js] Moving runtime allocations to pkg:dart2js_runtime_metrics
* Stores runtime information on `$runtimeMetrics` instead of `$__dart_deferred_initializers__`
* Keys each app's runtime allocations onto self.runtimeMetrics.$currentScript

Change-Id: I6612fd2a5ac792bfcb7580ffe91d5391b80d5965
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242507
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2022-04-29 21:48:41 +00:00
Stephen Adams f092184371 [dart2js] Migrate io/source_file.dart
Change-Id: Ic5c29160ed048ebce5ee48d05734096d9e451edb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243041
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2022-04-29 21:27:13 +00:00
Stephen Adams c50157e099 Support invoking JS operators through dart:js_util.
Some JS functionality is only exposed through operators, such as
implicit type conversions and BigInt arithmetic. Other than requiring
some minor additions for the exponentiation (`**`) operator, supporting
these through `dart:js_util` is trivial.

Change-Id: I010674303e4f99b42d43b73095de69b8ddcdeb47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242680
Reviewed-by: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2022-04-28 21:18:40 +00:00
Stephen Adams c8ad81e0c3 [dart2js] Move ParameterStructureMethods back to ParameterStructure
This cleans up the temporary splitting of ParameterStructure into two
libraries.

Change-Id: I475ed3dfc67da81c1f4bcc85c5660095d5457374
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242781
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2022-04-28 19:57:43 +00:00
Stephen Adams 779f1341fd [dart2js] Migrate ir/{closure,constants,scope,scope_visitor}.dart
These libraries are a cycle.

Change-Id: I0d1145876dd4dc341c426de9dafd4a2ff817fd81
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242780
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2022-04-28 19:49:41 +00:00
Nate Biggs 8033bb0fa0 [dart2js] Add interner for DartTypes.
This interner handles both Kernel DartType and the dart2js model.

Some samples of memory usage before and after this change (from linking/output phase):

Before: https://screenshot.googleplex.com/ctYKkApkrqaoHDg
After: https://screenshot.googleplex.com/4fyCXXNNUbyWSyu

Before: https://screenshot.googleplex.com/4nLYCQ6CkqdzgaQ
After: https://screenshot.googleplex.com/5N9btNjGbsdHpW3


Change-Id: I1b86bc1a134703259830a6ea31b4ccb10abaea8b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241621
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2022-04-27 20:33:34 +00:00
Stephen Adams d50e9e9355 [dart2js] Migrate ir/static_type_cache.dart
Change-Id: Ife640422d829cf7e74015876788df1c83e4df3ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242522
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2022-04-27 19:08:04 +00:00
Stephen Adams 4d9da00440 [dart2js] Migrate elements/types.dart to NNBD
- create a small 'facade' interface CommonElementsForDartTypes so that common/elements.dart can implement this interface to break the cycle between common/elements.dart and elements/types.dart

- Separate the tagging enums used into serialization into a separate 'tags.dart' library.

- Scattered hints to help the migration tool.

Change-Id: I8dbb993ebeb85f240392bafa53e4cc235825f63e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242506
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2022-04-27 19:05:44 +00:00
Stephen Adams b314f3f5ea [dart2js] Migrate selector.dart and call_structure.dart
Change-Id: Idd3e326fb974118d593b1737f898ac78567a054c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242301
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2022-04-26 03:49:13 +00:00
Joshua Litt c242053202 [dart2js] Fix bug in constant impact visitor.
Currently we do not collect constants from UnevaluatedContants.

Change-Id: Ie9ff2cd09cdd654f2294f4eee42edbfdc652695f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242220
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-04-25 18:51:37 +00:00
Sigmund Cherem 2b806379e2 [dart2js] update pubspec.
My local IDE was happy using the .packages file that used to be
pre-generated by default.  That file was removed from the repo, so I
need to call "dart pub get" to generate it on my local workflow.
This changes makes it possible to do so.

Change-Id: I7c9433cb71423c60810c6a5fc18e7da73c9bbe0a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242261
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2022-04-25 18:29:02 +00:00
Mark Zhou dfd5109b64 [dart2js] Adding class and classtype dump info tests
Change-Id: Iba41106c2b75a8247123e36b505e0be42ad51fad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242181
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2022-04-24 20:05:20 +00:00
Mark Zhou ee5a62ff4e [dart2js] Adding dump info library tests
Change-Id: I1d9a30838dc08612032051f60344588f84b1d436
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242163
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2022-04-24 19:57:51 +00:00
Stephen Adams db5d9ffc16 [dart2js] Migrate common.dart
`diagnostic_listener.dart` is the last unmigrated import of
`common.dart`, which is imported in ~100 files.

`compiler_api.dart` is split to move the `compile` method with
unmigrated dependencies to another file to allow `compiler_api.dart` to
become migrated. Luckily there is only one reference to `compile`.

We no longer allow null `SourceSpan`s and use `SourceSpan.unknown()`
instead.

Added `SpannableWithEntity` as a migrated interface that `HInstruction`
can implement to break the dependency on a large unmigrated ssa library.

Change-Id: I0a5ff6e6c36a34ff55d98f634c671bb8f1fb9e1c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242161
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2022-04-23 03:13:59 +00:00
Sigmund Cherem e5f4b85066 [dart2js] Fix deferred load URI when baseUrl has a single path segment
This fixes https://github.com/dart-lang/sdk/issues/48848

When the base URI is just a filename, then base was empty, and we accidentally
added a / in the first position.  This made the deferred URI absolute by
mistake.

Change-Id: I4d6a773f6ef8bfefbbf61417bfe7c005aa5e63ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241990
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2022-04-22 21:33:10 +00:00
Mark Zhou 3216e8ccb6 [dart2js] Adding external member test for dump info
Change-Id: I3f1541771a016d88e123252918bc648302887918
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241992
Auto-Submit: Mark Zhou <markzipan@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2022-04-22 21:14:09 +00:00
Mayank Patke e085928061 [dart2js] Cleanup some unused paramters in the locals handler.
Change-Id: Ic4fd58ab0c9b3b64a0911b5ae058e05ce311e3b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241880
Reviewed-by: Joshua Litt <joshualitt@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2022-04-21 21:10:58 +00:00
Mayank Patke 091559359e Reland "[dart2js] Lower late field checks during SSA."
This reverts commit 45c1e51bb3.

Reason for revert: Reland

Original change's description:
> Revert "[dart2js] Lower late field checks during SSA."
>
> This reverts commit 7187b2efe9.
>
> Reason for revert: Broke flutter roll
>
> Original change's description:
> > [dart2js] Lower late field checks during SSA.
> >
> > Change-Id: I80e7a30c6f2a461e46b4f52ebf7eb7a13fbc6227
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240501
> > Reviewed-by: Stephen Adams <sra@google.com>
> > Commit-Queue: Mayank Patke <fishythefish@google.com>
>
> TBR=sra@google.com,fishythefish@google.com
>
> Change-Id: Idf4eff95425db4d770137d589d4bb5484fc6e187
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241806
> Reviewed-by: Mayank Patke <fishythefish@google.com>
> Reviewed-by: Nate Biggs <natebiggs@google.com>
> Commit-Queue: Mayank Patke <fishythefish@google.com>


Change-Id: Iccba8947a5778f5310e194d814b398dc46465fbb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241807
Reviewed-by: Mayank Patke <fishythefish@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2022-04-21 21:10:58 +00:00
Mayank Patke ec49b532c5 [dart2js] Improve narrowing of late fields.
Checks for late sentinels now behave like null checks and refine the
local on each branch.

Change-Id: I71fdcf50529c52ef82e2cff81425a34174e5c366
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/225320
Reviewed-by: Stephen Adams <sra@google.com>
2022-04-21 21:10:58 +00:00
Mark Zhou 7f98a6dfe6 [dart2js] Adding holder info to dump info tests.
Change-Id: Ia45bc281cda289dcfa125aa40622a39e16f9422f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241500
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2022-04-21 17:55:58 +00:00
Stephen Adams 618db8a41d [dart2js] Rename lib/compiler.dart to lib/compiler_api.dart
Always import 'lib/compiler_api.dart' with prefix 'api'.
Remove import of 'lib/src/compiler.dart' with prefix 'api'.

Some of the test helper files under 'compiler/test' are a little tedious
with lots of 'api.' prefixes and I could be convinced to change them
back but I think we should stick with always using a prefix under
'compiler/lib/'.

Change-Id: I3f82d7d31f1c90a860c9811fce031a64cea04ddb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241867
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2022-04-21 03:42:39 +00:00
Joshua Litt 43cfa8cea3 [dart2js] Support trimming modular analysis data.
Change-Id: I0e0902813fd71c0bda5de6171487fa0e941f6bad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241246
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-04-20 21:58:29 +00:00