Commit Graph

2058 Commits

Author SHA1 Message Date
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
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
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
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
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
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 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
Nicholas Shahan 73f4377011 [ddc] Fix named args in redirecting constructors
Change-Id: Iaed36c3cab43672338a5b1750aad25951428052c
Fixes: https://github.com/dart-lang/sdk/issues/47831
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221887
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-12-03 00:02:57 +00:00
Nicholas Shahan ae7304fc1b [ddc] Fix missing super getter and setter helpers
Previously only a super helper would be created as needed when there was
a super getter or setter call a constructor. If both a get and set exist
only the first encountered would trigger a helper to be generated. The
second helper would be missing and the call to it would trigger an
exception.

Now the helpers are tracked with unique names to avoid collisions.

Fixes: https://github.com/dart-lang/sdk/issues/47698
Change-Id: I561adc0ce8f97e81a9e12d749d4d80e1f5e73f38
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221743
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
2021-12-02 22:12:57 +00:00
Johnni Winther 39533c285b [cfe] Pass tracked dill libraries through incremental compiler result
This avoids have tracked dill libraries as part of the incremental
compiler state, and avoids the need for public mutable state on the
incremental compiler.

Change-Id: Ia61f22499f619d7ead4eed23d3d1eb24b8caec9a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221464
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2021-11-30 11:07:34 +00:00
Johnni Winther f060f58c6e [cfe] Remove non-test access to targets on IncrementalCompiler
This is a move towards fully encapsulating the state of the incremental
compiler from outside usage.

Change-Id: I1243602aa6c4bcc3e6fbf8450bd8cdf7fa5ad5d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221327
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2021-11-30 08:19:35 +00:00
Johnni Winther 87c953bd0c [cfe] Pass class hierarchy and core types through IncrementalCompilerResult
TEST=existing

Change-Id: I78a61147998a630d88997e0cebccb3e815592822
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221088
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2021-11-25 11:27:29 +00:00
Johnni Winther e92e60da78 [cfe] Change computeDelta to return a result object
This prepares for returning more that just the component from an
incremental compilation.

TEST=existing

Change-Id: I3ee269083290097f1a92d77d105b607a6a02f1f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221086
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2021-11-25 10:15:07 +00:00
Joshua Litt ce8bd6d17a [ddc] Move dartdevc.dart to lib/.
This minor change makes it a bit easier to consume ddc as a library.

Change-Id: Ie98a4fa78c313d827cf1a395b26a4f7859a9413c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220120
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2021-11-16 18:50:52 +00:00
Nicholas Shahan ecdcde3a83 [ddc] Ensure mixin class is emitted before use
Moves the class definition to appear before uses in compiled
code.

Change-Id: I00558040a510c7bc8668794b82fa3bd67dde64e9
Fixes: https://github.com/dart-lang/sdk/issues/47645
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220071
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-11-12 19:21:52 +00:00
Kevin Moore cc7fcb5f70 dev_compiler: migrate to pkg:lints
Change-Id: I0111e74d312f6d3aeebb80f017a4f48fc6186109
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218220
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2021-10-27 23:15:56 +00:00
Johnni Winther 114ad79698 [cfe] Ensure separation between StaticGet/StaticTearOff/ConstructorTearOff
Change-Id: I5b8d1103c10fecaf8fdaa69ee62215deb7eebc38
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217641
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-10-26 04:53:00 +00:00
Nicholas Shahan cc9353ac46 [ddc] Tag classes with names of static members
Temporarily add names of static members so they can be accessed by the
debugger. Eventually, these will be accessible through the symbol data
and should be removed from the compiled Javascript.

This increases the size of the compiled output by ~1% in a large
google3 application.

Names and types of static members were originally removed from the
compiled output in https://dart-review.googlesource.com/c/sdk/+/48455
because they are not needed for runtime correctness.


Change-Id: Idfd827ececec80d903586917676ec027e2a5a9e8
Issue: https://github.com/dart-lang/sdk/issues/40273
Issue: https://github.com/dart-lang/webdev/issues/1430
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217501
Reviewed-by: Anna Gringauze <annagrin@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-10-25 21:53:20 +00:00
Johnni Winther 50d885e53c Reland "[cfe] Encapsulate Dill/SourceLoader.builders"
This is a reland of 2bbb5dc907

Original change's description:
> [cfe] Encapsulate Dill/SourceLoader.builders
>
> Change-Id: Ie98b3a243932cebeb845adb1cbe6c2cab1e92e0e
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216287
> Reviewed-by: Jens Johansen <jensj@google.com>
> Commit-Queue: Johnni Winther <johnniwinther@google.com>

Change-Id: I11611645337b4ea745d00a846a822ffcaedc9dec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217580
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-10-21 12:00:37 +00:00
Ahmed Ashour d041cf0478 Remove extra the, be and of
Fixes #https://github.com/dart-lang/sdk/issues/47504

TEST=No tests needed, only comments affected.

Change-Id: Ie096307b5ce314d328fea6780f396aaa226ad3b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216182
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2021-10-20 09:29:01 +00:00
Johnni Winther 3006908d7e Revert "[cfe] Encapsulate Dill/SourceLoader.builders" and "[cfe] Move createLibraryBuilder methods to loaders"
This reverts commits 2bbb5dc907 and 0e7d0f5205.

Change-Id: I140ae6eab70102d39b1bec665bedd3a3dbfb02bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217300
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-10-19 23:14:11 +00:00
Sigmund Cherem 38b5a841de [dart-web] Remove dart:web_sql library.
The WebSQL standard was abandoned more than 10 years ago and is not
supported by many browsers.

The `dart:web_sql` library was marked as deprecated in Dart 2.14. This
CL makes the library inaccesible, removes support for `dart:web_sql` imports,
and removes the `Window.openDatabase` API. The old code for `dart:web_sql` is
still generated by the html generators. Removing that will be handled by a
separate change.

Closes https://github.com/dart-lang/sdk/issues/46316

Change-Id: I892107396b3b227b4f33344377585aa5e5328288
Bug: https://github.com/dart-lang/sdk/issues/46316
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216080
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2021-10-19 01:00:08 +00:00
Johnni Winther 2bbb5dc907 [cfe] Encapsulate Dill/SourceLoader.builders
Change-Id: Ie98b3a243932cebeb845adb1cbe6c2cab1e92e0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216287
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-10-14 20:34:45 +00:00
Johnni Winther 56490f9776 [cfe] Add Procedure.signatureType
The added field holds the interface signature type for a Procedure when
this is different from the class signature type (implied by the function
parameters and return type). This is needed for forwarding semi stubs
when its declared type is different from the called super member.

Closes https://github.com/dart-lang/sdk/issues/47072

TEST=pkg/front_end/testcases/general/implement_semi_stub.dart and more

Change-Id: I4a7cdc9d564fb0a59e7b06e83646b5410d8d82f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216420
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <dmitryas@google.com>
2021-10-13 11:31:16 +00:00
Nicholas Shahan 1345eb8baa [ddc] Fix list literal control flow optimization
Restore the behavior originally added in
https://dart-review.googlesource.com/c/sdk/+/172082 to call `.push()`
on Javascript Arrays directly when it is safe.

After some experimenting this optimization no longer appears to be
as effective for lists of native types (the type check is little
overhead) but is still observable for lists of user defined
interface types.

Change-Id: I034666a512a7886e5022498e2d6bd3f8aaceebbd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215483
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-10-08 20:41:37 +00:00
Nicholas Shahan 198dc43075 [ddc] Migrate module_metadata to null safety
* Migrate the library and tests.
* Update comments per effective dart recommendations.

Change-Id: Ibc8da1fe68c977fb3c084208b96734354ad2705b
Issue: https://github.com/dart-lang/sdk/issues/46617
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215122
Reviewed-by: Anna Gringauze <annagrin@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-10-05 22:57:42 +00:00
Paul Berry b2c2acee09 Adjust front end nomenclature for error messages.
This change updates the classes Message, MessageCode, Template,
LocatedMessage, and FormattedMessage so that they uniformly refer to
error message text using the terminology `problemMessage` and to
correction suggestions using the terminology `correctionMessage`.
This brings them into alignment with the names we've decided to use to
unify the structure of front_end and analyzer, and makes them match
the names used in the anlayzer and front end's `messages.yaml` files.

Change-Id: Idcbb7ccfff6bb4e99ca22a3ef3c19d83880cf3c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215154
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-10-04 13:32:46 +00:00