Commit Graph

1105 Commits

Author SHA1 Message Date
Anna Gringauze 6387f7345a Fix incorrect record types
- Access record elements starting from 1 when creating record type.
- Add record tests for the expression compiler.

Closes: https://github.com/dart-lang/sdk/issues/51197
Change-Id: I02af94a1f09cbcb9801b6b3a5b0effdfd33aab2b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280204
Commit-Queue: Anna Gringauze <annagrin@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2023-02-01 01:56:38 +00:00
Nicholas Shahan 7c5445074b [ddc] Refactor modular test suites
- Move DDC modular pipeline to helper library.
- Add null safety flag to `SourceToSummaryDillStep`.
- Add null safety and canary mode flags to `DDCStep`.
- Add new suite that runs in canary mode without sound null safety.

Change-Id: I3b5450c2f07913a8bdc9a210e16d26fe162ff1c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279478
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-01-27 23:57:30 +00:00
Nicholas Shahan fa8c14a3e3 [ddc] Add scope offset test in sound null safety
Change-Id: Ic050932eb5a082330a18d4aeaefb106cbd2819ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279907
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Anna Gringauze <annagrin@google.com>
2023-01-27 00:32:38 +00:00
Nicholas Shahan d56b9b3988 [ddc] Remove unsound .dill files from SDK
Dart 3 requires all code to be null safe.

Compiling with --no-sound-null safety requires manually passing
an unsound SDK outline. This is no longer provided by default
and is not packaged with the SDK at all.

Fixes: https://github.com/dart-lang/sdk/issues/50700
Change-Id: Ic4bd7dc5e96b42c7c10a29f273371c6a680936f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278999
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-01-26 22:34:38 +00:00
Nicholas Shahan 5b1e6ca6c6 [ddc] Cleanup sourcemap and stacktrace tests
- Remove all refrences to "ddk" vs "ddc".
- Update throw_in_instance_method to reflect the current sourcemappings
  and start running the test again.

Change-Id: Iff82f971e676346b3495a327d2d86cabd73cea03
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279473
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-01-26 21:43:18 +00:00
Nicholas Shahan 41f57cd3f8 [ddc] Cleanup names of modular tests
Fix names in test matrix to match what is actually running on
each bot.

Updated file names:
- Runs with sound null safety
  modular_suite_nnbd.dart -> modular_suite.dart

- Runs without sound null safety
  modular_suite.dart -> modular_suite_unsound.dart

Updated configs to record status:
- Sound
  dartdevk-strong-linux-release-chrome
- Unsound
  dartdevk-checked-linux-release-chrome
  dartdevk-checked-mac-release-chrome
  dartdevk-checked-win-release-chrome
  dartdevc-canary-weak-linux-release-chrome-x64

Change-Id: I21d1df41a174824b26154584315cb300a37103f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279471
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-01-26 20:18:39 +00:00
Nicholas Shahan 1b2ecbda40 [ddc] Cleanup JavaScript files in packaged SDK
- Removes all versions of `dart_sdk.js` and `dart_sdk.js.map` from the
  packaged SDK. All supported build systems compile their own versions
  of these files.
- Removes `dart-sdk/lib/dev_compiler/kernel/common/run.js`.
  No supported build system uses the "common" module system.
- Moves `dart-sdk/lib/dev_compiler/kernel/amd/require.js` to
  `dart-sdk/lib/dev_compiler/amd/require.js` cleaning up the
  unnecessary `kernel/` sub-directory.

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

Change-Id: Id4173ddec31a6c0260009924bf1e1ae3d3f32abf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275482
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-01-18 01:34:57 +00:00
Nicholas Shahan c140324e1e [ddc] Rename .dill files
- Makes the names consistent with dart2js and dart2wasm.
- Prepares for the upcoming removal of the weak null safety .dill file.

Change-Id: Idcf694b27cd4731db8f7ed6f0fdab7766ced08a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/277183
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2023-01-18 01:34:57 +00:00
Srujan Gaddam 572d545c72 [dart:_js_interop] Add dart:_js_interop
Adds dart:_js_interop for use in the web backends. This library
only exports dart:_js_annotations' @JS for now. In the future,
we'll add more to this library and mark it public. Also refactors
some tests to use dart:_js_interop.

Change-Id: I7b60c950a39038a586756b7c9c10c6e31f1ab4cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278694
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2023-01-16 22:31:33 +00:00
Nicholas Shahan b84aa5a7f9 [ddc] Cleanup uses of ignored cli args
The `-k`, `--kernel`, and `--dart-sdk` flags are ignored by DDC.

Change-Id: Ic2bf5c87a26cab7dcbcfeafa39dae1ea1b20c711
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/277180
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-12-22 21:50:08 +00:00
Nicholas Shahan b9469f452a [ddc] Always explicitly pass null safety mode
Add explicit mode flags for DDC related compiles.

Change-Id: Icb9e21a4b8786a0de620bcc387cafbe8d27d0e86
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/277042
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
2022-12-21 23:35:45 +00:00
Anna Gringauze 3bb1323b92 Reland "Cache expression compilers in incremental DDC mode"
- Fix ddc null dereference while generating symbols with mixins
- Fix incremental compiler failure on non-SCC components
- Reworked expression compiler worker tests for effiiciency
- Create module configuration in tests only once
- Add test case of compiling expression in an non-SCC module
- Add test case of compiling expression in an SCC module

This is a reland of commit e6f779bcdd

Original change's description:
> Cache expression compilers in incremental DDC mode
>
> - cache expression compilers in expression compiler worker
>   to improve performance of exression compilation.
> - pass module format in expression compiler worker
>   (the ddc format tests were not running!)
> - fix an issue where the same library was imported twice
>   in module_builder.dart
> - add verbose mode timeline logging to ProgramCompiler.
> - update tests.
>
> Closes: https://github.com/dart-lang/sdk/issues/49944
> Change-Id: Ie7408dcd42e757b1eb5e7f5ccbc1b078b6417011
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/268361
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Mark Zhou <markzipan@google.com>
> Commit-Queue: Anna Gringauze <annagrin@google.com>
> Reviewed-by: Nicholas Shahan <nshahan@google.com>

Change-Id: I80546773d957f37ec5b2353ea060b50f3fba0aa7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271801
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Anna Gringauze <annagrin@google.com>
2022-12-05 18:39:17 +00:00
Anna Gringauze bca6278b3b Revert "Cache expression compilers in incremental DDC mode"
This reverts commit e6f779bcdd.

Reason for revert: Broke expression compilation in google3

Original change's description:
> Cache expression compilers in incremental DDC mode
>
> - cache expression compilers in expression compiler worker
>   to improve performance of exression compilation.
> - pass module format in expression compiler worker
>   (the ddc format tests were not running!)
> - fix an issue where the same library was imported twice
>   in module_builder.dart
> - add verbose mode timeline logging to ProgramCompiler.
> - update tests.
>
> Closes: https://github.com/dart-lang/sdk/issues/49944
> Change-Id: Ie7408dcd42e757b1eb5e7f5ccbc1b078b6417011
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/268361
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Mark Zhou <markzipan@google.com>
> Commit-Queue: Anna Gringauze <annagrin@google.com>
> Reviewed-by: Nicholas Shahan <nshahan@google.com>

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I6c7209ffb03416dbb8d34c1a6f520f21766d9190
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/270840
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Anna Gringauze <annagrin@google.com>
Reviewed-by: Anna Gringauze <annagrin@google.com>
2022-11-21 20:27:43 +00:00
Anna Gringauze e6f779bcdd Cache expression compilers in incremental DDC mode
- cache expression compilers in expression compiler worker
  to improve performance of exression compilation.
- pass module format in expression compiler worker
  (the ddc format tests were not running!)
- fix an issue where the same library was imported twice
  in module_builder.dart
- add verbose mode timeline logging to ProgramCompiler.
- update tests.

Closes: https://github.com/dart-lang/sdk/issues/49944
Change-Id: Ie7408dcd42e757b1eb5e7f5ccbc1b078b6417011
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/268361
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Anna Gringauze <annagrin@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2022-11-09 21:40:54 +00:00
Sigmund Cherem 9846309cf0 [ddc] use snapshot when running worker test.
The snapshot is already available in the build directory, this makes the
test save up 11 times all the parse and warmup costs of loading the
compiler in the VM.

In aggregate, this made the test run in 5 seconds instead of 2 and half
minutes on my local desktop.

Change-Id: Ic0f1ef030b06467999fd0178b599de697f8ccc94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264730
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2022-10-19 01:27:41 +00:00
Nicholas Shahan 901d01a45c [ddc] Fix the use of the wrong null literal
This code should be using a `LiteralNull` from the JS AST but was
accidentally using the `NullLiteral` from the Kernel AST.

Add a test to trigger this code path in the expression compiler
because there must not be a source location for the code being
compiled.

Add a retry duration for getting a chrome tab in the test suite.
This fixes a failure I was seeing when I run the test locally.

Change-Id: I6900ace6280f1105c77ccafce4f47d0fc5771d6b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252540
Reviewed-by: Anna Gringauze <annagrin@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-07-25 19:22:49 +00:00
Nicholas Shahan 3526954466 [ddc] Update content-length to not be negative
The null safety migration changed the 'content-length' from null to
-1 but a separate change at the same time disallowed negative
values.

Now returning what the 'content-length' would be if the request was
a GET.

Fixes: https://github.com/dart-lang/sdk/issues/49483

Change-Id: I2ba3ce1fb604c0fac50f354f56b3d29de6465caa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252005
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-07-21 00:45:35 +00:00
Nicholas Shahan 2f39f86198 [ddc] Migrate last tests to null safety
Issue: https://github.com/dart-lang/sdk/issues/46617
Change-Id: I972864df3d5f036a19d3731052e4d5369c399ae7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250340
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
2022-07-18 23:04:44 +00:00
Nicholas Shahan d795274248 [ddc] Migrate module symbol tests to null safety
Issue: https://github.com/dart-lang/sdk/issues/46617
Change-Id: I168a02faeb2288430f4daa998a294ab6bd970031
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250321
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Anna Gringauze <annagrin@google.com>
2022-07-18 21:59:43 +00:00
Nicholas Shahan 38dc4ed707 [ddc] Migrate expression_compiler_worker
Migrate library and tests to null safety.

Issue: https://github.com/dart-lang/sdk/issues/46617
Change-Id: I6657ebdeda7c9b4650cc6286229d2f4babdca5be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250260
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Anna Gringauze <annagrin@google.com>
2022-07-18 21:14:53 +00:00
Lasse R.H. Nielsen 3fc0bf7e59 Retire the 2.17 language feature experiment flags.
Remove them from tests.
(They should have been removed from tests before launcing 2.17.)

Change-Id: I546f6cb90fdf9e6ed1bb560f3715f9db163b7c68
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250384
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2022-07-11 13:02:22 +00:00
Nicholas Shahan 0f2e021da8 [ddc] Fix non-null assertion crash
`VariableDeclaration.name` could be null when the variable
was synthetically introduced by the compiler. In this case the
expression compiler can ignore the variable because it's value
doesn't reflect the value of a variable in the original dart
source code.

Add a regression test for the expression compiler that
ensures code that introduces a synthetic variable will not
cause a crash when you stop at a breakpoint.

Fixes: https://github.com/dart-lang/sdk/issues/49373
Change-Id: Ifc5f72ab4e5733ead17a20889c222bcc46921f6b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250343
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Anna Gringauze <annagrin@google.com>
2022-07-01 16:15:53 +00:00
Jens Johansen b4e2012f5b [CFE] Remove support for .packages file
This CL:
* Removed the redirect from .packages to .dart_tool/package_config.json
  (whenever such a file existed).
* Removes support for the old format entirely.
* Updates all tests etc that were found.

Fixes https://github.com/dart-lang/sdk/issues/48939

TEST=Existing tests updated.

Change-Id: Iccf711c455ac1885189aa773ca74dd8f55012964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248603
Reviewed-by: Michael Thomsen <mit@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2022-06-24 08:20:39 +00:00
Nicholas Shahan f1d2813f12 [ddc] Migrate more tests to null safety
Issue: https://github.com/dart-lang/sdk/issues/46617
Change-Id: I7f27810c0ca825ea777e6c6bfcade6a8ee2b06e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249065
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-06-22 22:05:25 +00:00
Nicholas Shahan 4c5a046f9d [ddc] Migrate sourcemap and stacktrace tests
- Migrate suites and test files to null safety.
- Fix previous migration of sourcemap_testing to ensure list of
  expected stops could include null values.

Issue: https://github.com/dart-lang/sdk/issues/46617
Change-Id: Idd3b0937942cef18ae66d35137230437e1e971a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249063
Reviewed-by: Mark Zhou <markzipan@google.com>
2022-06-22 22:05:25 +00:00
Nicholas Shahan 9b9bfc34e9 [ddc] Migrate tests to null safety
Migrate the tests for expression_compiler.

Issue: https://github.com/dart-lang/sdk/issues/46617
Change-Id: I075787dff4ad33d13115b66170bf89260a52015f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248949
Reviewed-by: Mark Zhou <markzipan@google.com>
2022-06-22 22:05:25 +00:00
Nicholas Shahan 3f104a2ab4 [ddc] Migrate command to null safety
Revert small diffs introduced in earlier migrations to avoid an
import of command.dart before it was migrated.

Issue: https://github.com/dart-lang/sdk/issues/46617
Change-Id: Ia728fd727417fd4fdf8c454a0044e096e9de5756
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248948
Reviewed-by: Anna Gringauze <annagrin@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-06-22 21:30:16 +00:00
Nicholas Shahan 6366fddf12 [ddc] Migrate expression_compiler to null safety
Migrate the test file that is unblocked.

Issue: https://github.com/dart-lang/sdk/issues/46617
Change-Id: I65598f5837115d7dce1c51389bb7c762c1ce451e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248884
Reviewed-by: Anna Gringauze <annagrin@google.com>
2022-06-22 21:30:16 +00:00
Nicholas Shahan c52dd252f8 [ddc] Migrate nullable_inference to null safety
Also migrate the test file and temporarily inline some path
generation logic to break import of command.dart until it is
migrated.

Issue: https://github.com/dart-lang/sdk/issues/46617
Change-Id: I50c158729346f3e31059241b90008ba861a65422
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248341
Reviewed-by: Anna Gringauze <annagrin@google.com>
2022-06-22 21:30:16 +00:00
Sigmund Cherem f80ad75e76 [ddc] emit full dill as part of modular tests.
This small change brings the modular test closer to the behavior we have
internally in our bazel rules.

Turns out that recently we discovered a bug in the static erasure
transformation when emitting the full dill generated by DDC. This change
will allow us to detect these kind of failures in our SDK repo as well.

Change-Id: I9032d2563f741692ae03035b9fc9be59ab4b3a38
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247761
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2022-06-09 19:34:48 +00:00
Nicholas Shahan d50097a4ec [ddc] Break import cycle in shared_command.dart
Reduces the number of libraries that must be migrated to null safety
atomically.

Change-Id: I498f2956471be0435558c1b1a4badcba619f15de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247521
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-06-09 16:55:45 +00:00
Nicholas Shahan ec1fa84691 [web] Enabled lints and cleanup violations
Change-Id: I1b559215cd8b55fca2b247d4279bef8b61f653b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243700
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-05-24 23:59:16 +00:00
Aske Simon Christensen 5ecebdbddd Update d8 to 10.4.31
The length limit for array.init has been bumped to 10,000 elements.
This gives dart2wasm more breathing room to create large constant lists,
maps and sets, until a more general mechanism for large constant arrays
in WasmGC has been decided and implemented.

Change-Id: I267ed7919bed4509481f37d453f2335dc51bb37c
Cq-Include-Trybots: luci.dart.try:dart2wasm-linux-x64-d8-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/245373
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2022-05-20 16:49:42 +00:00
Nicholas Shahan 44f8583425 [ddc] Migrate modular test suite runners to null safety
- Migrate the test runner suites to null safety.
- Cleanup old "non-nullable" experiment flags
- Force null safety mode in the two suites:
  - modular_suite.dart: weak null safety
  - modular_suite_nnbd.dart: sound null safety
  NOTE: in both cases the source code is treated as null safe code.
  There are no tests written in a legacy dart version.

Change-Id: I19ec25f7b5abc712971771a193c02ebd5283b987
Fixes: https://github.com/dart-lang/sdk/issues/43096
Issue: https://github.com/dart-lang/sdk/issues/46617
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244500
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-05-13 19:10:56 +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
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
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
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
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
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
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
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 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
Sam Rawlins 976cffc4c2 Use strict-casts in js and dev_complier
strict-casts is mostly a drop-in replacement for the deprecated
`implicit-casts: false` option. One big difference, seen in this CL, is that
strict-casts will report a non-Iterable (or non-Stream) in a for-each loop.

Change-Id: Ibc463ae9c870b6a795483c5dea0d2b856e7fd883
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221546
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-11-29 23:22:44 +00:00