Nicholas Shahan
da79baa962
[ddc] Fix bug in FutureOr type normalization
...
The correct normalization should only normalize FutureOr<Never>
when Never is non-nullable.
Change-Id: I592f3a4856c219b33a8f1ac8377567a956e1148c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261000
Commit-Queue: Nicholas Shahan <nshahan@google.com >
Reviewed-by: Mayank Patke <fishythefish@google.com >
Reviewed-by: Erik Ernst <eernst@google.com >
2022-10-03 20:09:38 +00:00
Nicholas Shahan
76a4d351b8
[ddc] Add non-null assertions when setting fields
...
!!! NOTE to Google3 rollers:
If this change causes test failures in google3 you can temporarily
set `null_safety_asserts = False` on the failing
`dart_browser_binary` targets until we can fix the mistyped code.
That should allow the test to pass with this change.
Of course feel free to revert this change again if the number of
failures is too high.
Re-land previously reverted change:
https://dart-review.googlesource.com/c/sdk/+/258780
Adds additional tests and more checks to ensure assertions are only
added in libraries that have been migrated to null safety.
Issue: https://github.com/dart-lang/sdk/issues/49918
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259120
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Nicholas Shahan <nshahan@google.com >
Change-Id: Idcab0fe49a8dd98cdd73192eabae4439aebe2013
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260070
2022-09-23 01:22:11 +00:00
Oleh Prypin
c0b40136e5
Revert "[ddc] Add non-null assertions when setting fields"
...
This reverts commit c590001ef0 .
Reason for revert: Breaks google3 (b/247639927)
Original change's description:
> [ddc] Add non-null assertions when setting fields
>
> Re-land previously reverted change:
> https://dart-review.googlesource.com/c/sdk/+/258780
>
> Adds additional tests and more checks to ensure assertions are only
> added in libraries that have been migrated to null safety.
>
> Issue: https://github.com/dart-lang/sdk/issues/49918
> Change-Id: If0b9bca9fe0d7db5e15023fe03ccac891af568e8
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259120
> Reviewed-by: Sigmund Cherem <sigmund@google.com >
> Commit-Queue: Nicholas Shahan <nshahan@google.com >
TBR=sigmund@google.com ,nshahan@google.com ,annagrin@google.com
Change-Id: Iee2d33005cbabfacab7fc5c45046c6eeb8e31b01
Issue: https://github.com/dart-lang/sdk/issues/49918
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260106
Reviewed-by: Oleh Prypin <oprypin@google.com >
Reviewed-by: Alexander Thomas <athom@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
2022-09-20 17:19:38 +00:00
Nicholas Shahan
c590001ef0
[ddc] Add non-null assertions when setting fields
...
Re-land previously reverted change:
https://dart-review.googlesource.com/c/sdk/+/258780
Adds additional tests and more checks to ensure assertions are only
added in libraries that have been migrated to null safety.
Issue: https://github.com/dart-lang/sdk/issues/49918
Change-Id: If0b9bca9fe0d7db5e15023fe03ccac891af568e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259120
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Nicholas Shahan <nshahan@google.com >
2022-09-19 23:39:03 +00:00
Srujan Gaddam
8a081b95c6
[pkg:js] Add type/conformance checking for createStaticInteropMock
...
Bug: https://github.com/dart-lang/sdk/issues/49351
Adds checks for the following cases:
- Type arguments to createStaticInteropMock are correct
- No missing members in implementing class
- Inherited and non-overridden @staticInterop members are implemented
- Dart class can implement through inheritance and mixins
- Implemented members are correct subtypes of @staticInterop members
- Potential extension member conflicts that are attempted to be
resolved through subtyping rules
Change-Id: Iacbe5846040ba7fab41459aa19be77351cf1efca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255761
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Riley Porter <rileyporter@google.com >
2022-09-16 20:13:30 +00:00
Emmanuel Pellereau
727e792e77
Revert "[ddc] Add non-null assertions when setting fields"
...
This reverts commit 27099c121c .
Reason for revert: Breaks google3 (b/246251728)
Original change's description:
> [ddc] Add non-null assertions when setting fields
>
> Fixes: https://github.com/dart-lang/sdk/issues/49918
> Change-Id: I6dddda878afa504bebebb00a80855bac636f8efd
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258220
> Reviewed-by: Sigmund Cherem <sigmund@google.com >
> Commit-Queue: Nicholas Shahan <nshahan@google.com >
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I5e3fb1c151a85e11025135b8fc95c65192b33791
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258780
Commit-Queue: Emmanuel Pellereau <emmanuelp@google.com >
Reviewed-by: Emmanuel Pellereau <emmanuelp@google.com >
Reviewed-by: Alexander Thomas <athom@google.com >
2022-09-12 11:21:06 +00:00
Nicholas Shahan
27099c121c
[ddc] Add non-null assertions when setting fields
...
Fixes: https://github.com/dart-lang/sdk/issues/49918
Change-Id: I6dddda878afa504bebebb00a80855bac636f8efd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258220
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Nicholas Shahan <nshahan@google.com >
2022-09-09 21:05:25 +00:00
Chloe Stefantsova
ddff459c7f
[cfe] Add RecordType, RecordLiteral, and associated nodes
...
TEST=Covered by upcoming language and co19 tests.
Change-Id: Ibe8ecfb7f854adce5646125f6909066e27424665
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256066
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
Reviewed-by: Nicholas Shahan <nshahan@google.com >
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
2022-08-25 10:33:35 +00:00
Srujan Gaddam
9f10a3bc16
[pkg:js] Add JsInteropChecks to Wasm backend
...
Also cleans up and unifies some behavior across the backends:
- avoiding reinstantiating JsInteropChecks for every library
- having the native classes as a member instead of recomputing on dart2js
Now that these checks exist, we can add lib/js/static_interop_test to
the test directories the wasm trybot runs.
Change-Id: I912aae988afe7915e80cc13d00b8c47818dfa520
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255760
Commit-Queue: Srujan Gaddam <srujzs@google.com >
Reviewed-by: Joshua Litt <joshualitt@google.com >
Reviewed-by: William Hesse <whesse@google.com >
2022-08-19 17:48:38 +00:00
Chloe Stefantsova
1611fe6f45
[cfe] Separate out IntersectionType from TypeParameterType
...
TEST=Covered by existing tests
Change-Id: Ie7b99b1c109edff5198cfbf5d22e1cfb1dc130d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253665
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Mayank Patke <fishythefish@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Reviewed-by: Nicholas Shahan <nshahan@google.com >
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com >
2022-08-18 08:47:29 +00:00
Anna Gringauze
af1d9eefe8
Remove erroneous cast
...
Closes: https://github.com/dart-lang/sdk/issues/49580
Change-Id: I3a31a7ef575c910aa2c87f3c3ca17452b9a0c311
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254562
Reviewed-by: Mark Zhou <markzipan@google.com >
Commit-Queue: Anna Gringauze <annagrin@google.com >
2022-08-11 16:08:18 +00:00
Mark Zhou
e3a91f01d3
[ddc] Adding a header comment to DDC-compiled JS.
...
Displays platform compilation information, module name, and some flags.
Example output:
// Generated by DDC, the Dart Development Compiler (to JavaScript).
// Version: 2.19.0-edge.4d13ff534d0c078ce1140cee1f7f2e112b9df96b (be) (Thu Jul 21 02:51:32 2022 +0000) on "macos_arm64"
// Module: hello_world
// Flags: canary, soundNullSafety(false), enableAsserts(true)
// Experiments: someExperiment
Change-Id: I5966b9653e17dd5ccd897135f8264598dff52ea7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253605
Reviewed-by: Nicholas Shahan <nshahan@google.com >
Commit-Queue: Mark Zhou <markzipan@google.com >
2022-08-09 18:04:45 +00:00
Nicholas Shahan
21bc7377aa
[ddc] Avoid tagging late local lowering methods
...
Late local variables are lowered to local get and set functions.
These functions should never need to be tagged with their types.
Avoids including and executing unneeded code in the compiled
output.
Change-Id: I0c7448147a2b5493f818a66dcebae827c36c5330
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253825
Commit-Queue: Nicholas Shahan <nshahan@google.com >
Reviewed-by: Anna Gringauze <annagrin@google.com >
2022-08-09 17:58:06 +00:00
Srujan Gaddam
61abaeda3f
[CFE/web] Move static interop erasure and remove outline stubber
...
Deletes the outline stubber as it's not necessary on any backend.
DDC should compile the entire sources and outline dill in one step.
dart2wasm operates similarly, and so only needs the modular transformer.
dart2js moves the erasure to a global transform.
Also, this CL reverts now unnecessary plumbing that was needed for the
outline stubber.
Change-Id: Ic085c4fad5a6bdfc7d6916f7fa575c6ef9b20110
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253000
Reviewed-by: Joshua Litt <joshualitt@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Srujan Gaddam <srujzs@google.com >
2022-08-01 18:17:44 +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
a6478ba4c5
[ddc] Migrate ddb script to null safety
...
Issue: https://github.com/dart-lang/sdk/issues/46617
Change-Id: I34e9c11f6c721ca460a39f0037bf841afb6725f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250352
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Nicholas Shahan <nshahan@google.com >
2022-07-19 22:49:54 +00:00
Nicholas Shahan
017401cb35
[ddc] Migrate stack trace utilities to null safety
...
Issue: https://github.com/dart-lang/sdk/issues/46617
Change-Id: Idfd614e3bcc4e3e8ae1597d69c97d007b7efd306
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250351
Commit-Queue: Nicholas Shahan <nshahan@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2022-07-19 21:37:34 +00:00
Nicholas Shahan
a710f9727d
[ddc] Migrate compile sdk script to null safety
...
Issue: https://github.com/dart-lang/sdk/issues/46617
Change-Id: I48dcf20dc3cada2bd9d0c9dfb0e1f27f07d5e521
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250350
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Nicholas Shahan <nshahan@google.com >
2022-07-19 19:35:24 +00:00
Nicholas Shahan
ca8b500908
[ddc] Migrate dartdevc entrypoint to null safety
...
Issue: https://github.com/dart-lang/sdk/issues/46617
Change-Id: I6ba216ba41a6c115f9c46908378d21bee0940bdc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250349
Commit-Queue: Nicholas Shahan <nshahan@google.com >
Reviewed-by: Mark Zhou <markzipan@google.com >
2022-07-19 18:45:44 +00:00
Nicholas Shahan
768d6ca0ec
[ddc] Migrate dev_compiler library to null safety
...
Issue: https://github.com/dart-lang/sdk/issues/46617
Change-Id: I87d8bcb65e22f4d25cc24694ababa1a16d42bdd7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250348
Reviewed-by: Mark Zhou <markzipan@google.com >
Commit-Queue: Nicholas Shahan <nshahan@google.com >
2022-07-19 17:50:14 +00:00
Nicholas Shahan
5cc2856daa
[ddc] Migrate ddc library to null safety
...
Issue: https://github.com/dart-lang/sdk/issues/46617
Change-Id: I15468560685b1107ec5481f2bda5a0fcb2a6bb7c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250341
Reviewed-by: Mark Zhou <markzipan@google.com >
Commit-Queue: Nicholas Shahan <nshahan@google.com >
2022-07-19 00:03:04 +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
624dd76b6f
[ddc] Move FutureOr normalization to its own visitor
...
Will make it easier to reuse the normalization when compiling
with the new runtime type representation.
Change-Id: Ie767a2b676950205b0b50eadac305c29914433f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247420
Reviewed-by: Srujan Gaddam <srujzs@google.com >
Commit-Queue: Nicholas Shahan <nshahan@google.com >
2022-07-01 18:55:50 +00:00
Nicholas Shahan
f3daca2ef6
[ddc] Fix cast when retrieving annotation name
...
Name can be null and cast failures start appearing here when
running with sound null safety.
Issue: https://github.com/dart-lang/sdk/issues/46617
Change-Id: I3d96e80283889915cc28a310a1db940a9c6bcab1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250409
Reviewed-by: Mark Zhou <markzipan@google.com >
Commit-Queue: Nicholas Shahan <nshahan@google.com >
2022-07-01 18:29:10 +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
Srujan Gaddam
b372fd4c52
[CFE/pkg:js] Find reference of stub if it already exists
...
Fixes #49301
From https://github.com/dart-lang/sdk/issues/49301#issuecomment-1165536192
Adds referenceFromIndex to outline transformations so that the eraser
can use it to find the reference for the stub if it was already created.
This is needed when the module where the stub exists is invalidated.
Since references in other modules should still be valid, we should
attempt to get that reference.
Change-Id: I5905a002480444aecd57de650cd439bdc34d4eba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249729
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Joshua Litt <joshualitt@google.com >
2022-06-28 18:36:02 +00:00
Johnni Winther
e18977ed9c
[cfe] Report error for missing concrete super target
...
In response to https://github.com/dart-lang/sdk/issues/47406
The error is currently not reported if the mixin declaration is from
an outline dill.
Change-Id: I94a61d6409d0c238614d9f377b5f324153360bc6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249184
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2022-06-24 14:04:49 +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
Johnni Winther
391540c889
[cfe] Make (Abstract)Super*.interfaceTarget non-nullable
...
This is a step towards improving the semantics of these nodes.
TEST=existing
Change-Id: I95bdb86790414b38af73e9e932cc228b3c0f1f6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249040
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
Reviewed-by: Joshua Litt <joshualitt@google.com >
2022-06-23 09:16:55 +00:00
Nicholas Shahan
fed11104ee
[ddc] Fix google3 null safety migration break
...
The code path exercised here is used in google3 and expects
a list of preallocated size.
Change-Id: I807603a8bddb1bfead8f3377df4a6252949a8c3e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249545
Commit-Queue: Nicholas Shahan <nshahan@google.com >
Reviewed-by: Mark Zhou <markzipan@google.com >
2022-06-23 00:07:55 +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
de90931be4
[ddc] Migrate compiler to null safety
...
Issue: https://github.com/dart-lang/sdk/issues/46617
Change-Id: Id6a5e2e435b22fad4afcb5d06d0a50dc617f4bf3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248705
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
Nicholas Shahan
c53c6890c4
[ddc] Migrate shared_command to null safety
...
Update CFE API for ddc to mirror the nullability of fields in
`CompilerOptions`.
Issue: https://github.com/dart-lang/sdk/issues/46617
Change-Id: I08d8cc2c5bb1dba4823cb3a7e1f4a540fb3bfef5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248181
Commit-Queue: Nicholas Shahan <nshahan@google.com >
Reviewed-by: Mark Zhou <markzipan@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2022-06-21 23:22:18 +00:00
Srujan Gaddam
459d57c8b8
[package:js] Add static interop stub for outlines
...
Fixes b/235393918
@staticInterop replaces factories with a new named node, a static
method. In order to persist this transformation in modular
compilation, this needs to be done to outlines that can then be
consumed by the source library. In order to allow erasure at the
time of 'performOutlineTransformations', coreTypes is added to that
API.
Change-Id: I90d17fff8bbe143982fcd12cfb06dc3e8d58781a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247928
Commit-Queue: Srujan Gaddam <srujzs@google.com >
Reviewed-by: Joshua Litt <joshualitt@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2022-06-17 19:58:49 +00:00
Sigmund Cherem
c367a0162e
[ddc] Fix ddb to pass VM options properly.
...
Since we removed the dartdevc script, we cannot use the environment
anymore to provide the VM flags. These instead have to be provided
explicitly to the dart command.
Change-Id: I7742815ee43ef89a41644b364ba07335358fe976
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248641
Reviewed-by: Nicholas Shahan <nshahan@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
2022-06-16 21:06:59 +00:00
Ahmed Ashour
85700570f6
Fix typos
...
Fixes #49241
TEST=ci
Change-Id: I6117bf816fc8c4613cce66927f952fef75632725
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248120
Reviewed-by: Alexander Thomas <athom@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Ben Konyi <bkonyi@google.com >
Reviewed-by: Nicholas Shahan <nshahan@google.com >
Commit-Queue: Alexander Thomas <athom@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2022-06-15 11:08:28 +00:00
Sigmund Cherem
69249df50b
[web] remove top-level scripts for dartdevc and dart2js.
...
This completes the breaking change that was previously announced in
https://github.com/dart-lang/sdk/issues/46100
Change-Id: Ie81665e7932fe00a8c1fee9f67ee8294cd4c89e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248342
Reviewed-by: Joshua Litt <joshualitt@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Nicholas Shahan <nshahan@google.com >
2022-06-14 18:29:17 +00:00
Konstantin Shcheglov
26e4595411
Import dart:typed_data for BytesBuilder instead of dart:io
...
See https://dart-review.googlesource.com/c/sdk/+/248343
Change-Id: Ibfc8db983c271b5e27ba8f03ed7e192e042da1fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248352
Reviewed-by: Nicholas Shahan <nshahan@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2022-06-14 17:36:34 +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
Sigmund Cherem
e808fa1751
[jsinterop] Add static check for JSName of static class members.
...
Static class members could technically be mapped to a name with dots,
but in the early days of JSInterop we thought this was not necessary
since it could also be modeled as a top-level member or by adding
additional classes and exposing the member as a simple name on a deeper
class.
This invariant was assumed by DDC (which crashed if this was not the
case) and ignored by dart2js.
This change adds a static check to ensure both compilers act
consistenlty.
Fixes https://github.com/dart-lang/sdk/issues/27926
Change-Id: I20e59fbb75f0378a58ca88dc3910e079b4eeb7a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247180
Reviewed-by: Riley Porter <rileyporter@google.com >
Commit-Queue: Riley Porter <rileyporter@google.com >
2022-06-03 17:02:26 +00:00