Commit graph

2958 commits

Author SHA1 Message Date
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
Mark Zhou 143c6df41b [ddc] Stubbing package:dart2js_runtime_metrics
This allows the package to be discoverable across web backends

Change-Id: I7d870a7232543d3b719d47de1424017d7f578434
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244261
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2022-05-11 22:31:45 +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
Nicholas Shahan 112cba1957 [ddc] Add flag to use the new runtime type system
Currently the flag does nothing. Follow up changes will add support
incrementally.

Add a `--canary` flag to DDC that will enable all features in
development to simplify use in tests and benchmarks.

Issue: https://github.com/dart-lang/sdk/issues/48950

Change-Id: I4878c771bdb4f4c6e8b8cd618737009268b02cbe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237602
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Anna Gringauze <annagrin@google.com>
2022-05-10 23:47:04 +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
Nicholas Shahan be6ca10956 [ddc] Migrate module_containers to null safety
Change-Id: Idc8e6a13f6b253b4b1030fe0d0b9a272cebbd079
Issue: https://github.com/dart-lang/sdk/issues/48585
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243843
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
2022-05-05 20:51:35 +00:00
Nicholas Shahan 651350bc3b [ddc] Avoid emitting dead branches in conditionals
Don't emit dead code branches that are guarded by boolean literals.

Add a single level of simplification for !true -> false, and
!false -> true.

While this might not be very common in code, it does allow for a
useful pattern in the runtime libraries. Branches can be included
into the compiled code or not based on a compile time flag.

Change-Id: Ib90e1e951cea3ef8c75b944635776b292759594a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243363
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Anna Gringauze <annagrin@google.com>
2022-05-03 20:17:44 +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
pq cdaf885546 no_leading_underscores_for_local_identifiers
These will be flagged by the next linter release which updates `non_constant_identifier_names` to flag local functions.

Change-Id: Idf2b91fa3b845d8b921b7eb68b937d19c4ea188e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242502
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2022-04-27 00:15:04 +00:00
Sigmund Cherem 441a762352 [modular_test] no longer generate .packages within modular test suites
Since the null-safety test migration we've been generating both a .packages file
and a package_config.json file. This deletes the use of the old .packages file
and updates all references to use the new file.

Change-Id: Iecef64ac8ed8579338795ad5327765118d643236
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240650
Reviewed-by: Joshua Litt <joshualitt@google.com>
2022-04-09 00:35:13 +00:00
Mark Zhou 471fcee079 [ddc] Adding support for static setters of const fields
Fixes #48717

Change-Id: I45145bc992bb129d54962b1ed9cfebbdbac41f92
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239730
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2022-04-01 23:51:15 +00:00
Nicholas Shahan f384a42ebb [ddc] Enforce more lints and cleanup violations
These are now enforced in pkg/js_ast so we don't need to worry about
introducing unwanted diffs between the forked versions.

Change-Id: I89efc97f53a433f98e2a06747690ac7a635c388d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239560
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-04-01 19:39:39 +00:00
Nicholas Shahan ff3e340815 [ddc] Migrate js_names and js_utils to null safety
Change-Id: I187c547d9922185dd20db3e773eb4c8fbe7ec0a6
Issue: https://github.com/dart-lang/sdk/issues/46617
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239544
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-04-01 18:40:19 +00:00
Nicholas Shahan 74caf5f7b9 [ddc] Migrate source_map_printer to null safety
Change-Id: I89826ba3af91f1392d6291b008b41af94c0072b1
Issue: https://github.com/dart-lang/sdk/issues/46617
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239585
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-04-01 18:26:39 +00:00
Nicholas Shahan e30e017600 [ddc] Add context to the undetermined nullability error
When an unexpected "Undetermined Nullability" is encountered the
compiler will throw a message that contains the library being
compiled and the problematic type.

Change-Id: I0d6c3335b8c207b0344354dc4e9a2d7152571b12
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239722
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-04-01 00:04:35 +00:00
Joshua Litt b1fbe0c01d [dart2js] Support running modular analysis alongside building a dill.
Change-Id: If10385445c5f6267e2de20b090b37e1741b7ace7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237925
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-03-30 23:59:00 +00:00
Mark Zhou 818f886f1d [ddc] Adding support for arm64 build paths for DDB
- Adds a flag `-a` for specifying the architecture (only works for MacOS at the moment).
- Calls '-uname -m' when no architecture is specified on MacOS.
  - uname values from: https://en.wikipedia.org/wiki/Uname

Change-Id: Id5eb530e6571d2de452acd90d3b0d7e24fb32747
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239468
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2022-03-30 23:51:14 +00:00
Mark Zhou a75656502a [ddc] Removing enum field optimizations due to enhanced enums supporting static fields.
Some enhanced enum fields need to be emitted lazily, as they can potentially reference other static fields.

Also see: https://github.com/dart-lang/sdk/issues/48700

Change-Id: Iaf738fe95de08b96cc438fbe35fabe907af54566
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239580
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2022-03-30 23:48:40 +00:00
Nicholas Shahan ba4e18b531 [ddc] Remove more diffs with pkg/js_ast
- Remove lint ignores and cleanup violations when they are either
  in code that doesn't exist in or are already fixed in the pkg/js_ast
  version.
- Migrate the builder_test.dart (the small test file).

Issue: https://github.com/dart-lang/sdk/issues/46617
Change-Id: I1083235de93f028e5f338180b97308f52a45f17f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239363
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-03-30 19:53:30 +00:00
Nicholas Shahan 4193c18160 [ddc] Migrate js_ast libraries to null safety
- builder.dart
- template.dart

Change-Id: Ie399e7e5ba3261dea36d5139239ddc3d014981f9
Issue: https://github.com/dart-lang/sdk/issues/46617
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239222
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-03-29 19:23:29 +00:00
Nicholas Shahan 5d184a74d0 [ddc] Migrate js_ast libraries to null safety
- characters.dart
- nodes.dart
- precedence.dart
- printer.dart

Change-Id: I038d2ea9f8a265123c34de92723078df53e5e4fe
Issue: https://github.com/dart-lang/sdk/issues/46617
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/238960
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-03-28 23:39:20 +00:00
Brian Wilkerson e5f118d194 Remove an unneeded ignore comment in dev_compiler
Change-Id: I90d4ee37e1599ad6981b379ca35c282efef923eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/238982
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-03-26 00:08:27 +00:00
Nicholas Shahan a34c8a6776 [ddc] Break SwitchCase into Case and Default nodes
- Removes another diff between this version and the package:js_ast.
- This is helpful for the null safety migration as the expression
  in the Case node can now be non-nullable.

Change-Id: Ia6626b2ee8a4e8b66bc6b53ea74d16d2d9f81f7a
Issue: https://github.com/dart-lang/sdk/issues/46617
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/238663
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-03-24 22:09:09 +00:00
Stephen Adams 2e984a382d [js_ast, dev_compiler/js_ast] Use libraries instead of parts
This will allow more gradual migration of js_ast.

Change-Id: I3e948ad5c79fa9880b7eb3bccd7c15cbf9786e32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/238660
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2022-03-24 18:38:14 +00:00
Stephen Adams 8fb1d7084b [js_ast, dev_compiler/js_ast] Pre-migration cleanup 1
This won't promote for a nullable field `foo`, so use `?.`:

    if (foo != null) foo.accept(this);
-->
    foo?.accept(this);

Change-Id: I0f3c92803f8756c44a959d17dfe29b12f9db362c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/238501
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-03-24 18:28:30 +00:00
Nicholas Shahan ac2c6502ed [web] Update format of comments
Reduce the number of diffs between pkg/js_ast and
pkg/dev_compiler/lib/src/js_ast

Change-Id: Ic00e1614b23e11118383e954a0ee31365d65ebe6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/238388
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2022-03-24 16:51:29 +00:00
Nicholas Shahan fdf5a4130c [ddc] Prepare nodes.dart for null safety migration
Preliminary changes to better isolate the nullability.

Change-Id: I3fed4ccbcb62185c84ff53e1463426322cdc1fbd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/238387
Reviewed-by: Stephen Adams <sra@google.com>
2022-03-24 16:51:29 +00:00
pq d2882856ef lints 2.0 fixes
In anticipation of lints v 2.0.

See: https://dart-review.googlesource.com/c/sdk/+/237746


Change-Id: If6ec7f0bae314af3aa84e4d8a7b9fc1b8219c128
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237763
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2022-03-18 01:42:47 +00:00
Chloe Stefantsova f83b5c251d [ddc] Update the test that declared a custom 'index' in an enum
Landing of https://dart-review.googlesource.com/c/sdk/+/237365 made
the test fail due to a custom declaration of a member named
'index'. This CL adjusts the test, removing the declaration.

Change-Id: I8f967a6ec473cb1aac8690d740d90647e01bc55f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237584
Auto-Submit: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2022-03-16 21:28:44 +00:00
Nicholas Shahan ea0ecbd78a [ddc] Add expression evaluation tests
- Add tests for calling constructors that use super parameters.
- Reorganize tests for 2.17 language features into their own suite.
  Going forward this will keep each test smaller and hopefully avoid
  timeouts on the test bots.

Change-Id: Ia6056b497fe342c5ddaabb90d212b976dda3d5c5
Fixes: https://github.com/dart-lang/sdk/issues/48065
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235981
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-03-09 17:30:14 +00:00
Mark Zhou e68c3e8bc8 [ddc] Adding expression eval tests for enums and enhanced enums.
Change-Id: I90881f00866ed8099142b0d1f9335aa49a8b7c26
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233527
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2022-02-25 18:03:02 +00:00
Nicholas Shahan 2b3595ff97 [ddc] Add named-arguments-anywhere tests
- Plumb through language experiment flags.
- Add expression compiler tests for the
  named-arguments-anywhere feature.

Change-Id: I3c28247343a858978e8d420b73f38b498bce66d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231361
Reviewed-by: Anna Gringauze <annagrin@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-02-22 23:29:32 +00:00
Alexander Thomas 30beab0f43 [infra] Add OWNERS to the Dart SDK
* Add team "groups" in tools/OWNERS_<group name>.
* Add top-level OWNERS as a fallback.
* Add OWNERS for all top-level directories.
* Add OWNERS to all packages.

For additional background information see go/dart-sdk-owners.

TEST=No op until code-owners is enabled.
Bug: b/200915407
Change-Id: I7fe6116cc599c749cd50ca16151d6d6a801d99d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229147
Reviewed-by: Jonas Termansen <sortie@google.com>
2022-02-14 14:06:34 +00:00
Devon Carew 7f026d6e46 [dev_compiler] remove the dep on package:cli_util
Change-Id: I34c17dc76a0c608ac3536bfdf2c0e39bb8daa6c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232424
Auto-Submit: Devon Carew <devoncarew@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-02-11 00:50:31 +00:00
Nate Bosch 33e174084a Replace Uri.scheme == with Uri.isScheme
Use `hasScheme` in place of comparing against the empty string, and
`isScheme` to compare against all other schemes.

TEST=No behavior changes.

Change-Id: Ifc9fd13c6cf37933ebd4a754c4b500dedbcb291b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231185
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2022-02-08 21:38:57 +00:00
Nicholas Shahan 72d7e5b0ce [ddc] Cleanup non-nullable experiment flag
Also remove dead code that was a workaround when there were
two forks of the SDK libraries but one version the dart:_runtime.

Change-Id: I1192fcc5238fb84ab1cda533bee8bef63d289a2e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231743
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-02-07 19:03:25 +00:00
Nate Bosch bc40873f98 Use package_config.json over .packages in DDC
Towards #48275

Change-Id: Ie4fe50d0d5afb04d4d3e7dde55c441e952218cc4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231184
Auto-Submit: Nate Bosch <nbosch@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-02-02 23:56:45 +00:00
Nicholas Shahan 3af828a347 [ddc] Inline and remove cast from unsafeCast()
Avoids an extra function call and removes a casts that are
always expected to succeed from the compiled code in the
sdk async library. The motivating changes are introduced in
https://dart-review.googlesource.com/c/sdk/+/230240.

Change-Id: I4da07a54f025ee4e2d0a5a0b4fd4ce9c7e765454
Issue: https://github.com/dart-lang/sdk/issues/48225
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/230884
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-02-01 23:09:05 +00:00
Sigmund Cherem b1b9378f6b [ddc]: fix worker_test to run in windows
Change-Id: I882654acf1cdf67cec64efa9c4fdb3ecaba83b50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/230826
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2022-01-29 00:45:22 +00:00
Sigmund Cherem 93e87899f4 [ddc] delete unused/unsupported internal scripts to run ddc.
All internal development uses pkg/dev_compiler/tool/ddb instead

Change-Id: I1a3cd9cef48063be16b2aa0c3bcb950e4c2b248d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229305
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2022-01-27 21:13:41 +00:00
Sigmund Cherem 6f917703d3 [ddc] update documentation
Change-Id: I5d3caaffca378584cd2a4488889c84386777a218
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229302
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2022-01-27 21:13:41 +00:00
Michael Thomsen e2acafdf80 Remove stale docs
Change-Id: I8d8c6a777eea03d92f3a5790eb38128fefe9886c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229150
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2022-01-24 15:07:06 +00:00
Johnni Winther 8510f27d37 [cfe] Change encoding of supported dart: libraries
This CL changes the way dart: libraries are considered supported when
used in conditional imports or bool.fromEnvironment constant using
the "dart.library.*" values.

Library nodes now has an isUnsupported flag which is set according to
the "supported" property in the libraries specification. Furthermore
the Target now supplies a DartLibrarySupport interface that allows
targets to override whether dart: libraries are unsupported.

This allows the JIT/AOT to use the same platform file but still
consider dart:mirrors unsupported in AOT mode, and dart2js to consider
the internal library `dart:_dart2js_runtime_metrics` supported.

Furthermore, the internal handling is changed so that condition imports
and bool.fromEnvironments constants are computed through the same logic
for "dart.library.*" values, avoiding the need for passing these values
through the environment.

TEST=pkg/front_end/testcases/general/supported_libraries/main

Closes https://github.com/dart-lang/sdk/issues/48057
Closes https://github.com/dart-lang/sdk/issues/47814
Closes https://github.com/dart-lang/sdk/issues/47243
Closes https://github.com/dart-lang/sdk/issues/32657
Closes https://github.com/dart-lang/sdk/issues/36460

Change-Id: Ie8f8dff99167de64ced51b71d89918bf0f3bbd13
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/227020
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2022-01-11 14:52:38 +00:00
Nicholas Shahan 8ac87895fe [ddc] Migrate AssetFileSystem to null safety
Change-Id: Icf79bb882a863e333cc30620a1b0a5154763cdd0
Issue: https://github.com/dart-lang/sdk/issues/46617
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223280
Reviewed-by: Anna Gringauze <annagrin@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-01-10 21:58:03 +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
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
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
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