"dartdevc" and "dartdevk" have been replaced with "ddc".
Change-Id: I823bc029a0bbe1295fd731efcc32961e61c6c175
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/282485
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
This reverts commit 1f6d4ae1a8.
Reason for revert: Broke Flutter with dart2wasm
Original change's description:
> [dart:js_interop] Add literal constructors for inline classes
>
> Adds @ObjectLiteral annotation to denote object literal constructors,
> and implements it in all the backends. For dart2js, this involves
> modifying the SSA and for dart2wasm, we create a one-per-shape
> forwarding procedure to a specialized JS method that returns the
> literal. This also modifies @anonymous semantics in dart2wasm to
> be consistent with the other backends.
>
> CoreLibraryReviewExempt: Backend-specific, just adding annotation.
> Change-Id: I4d7a9ea9ed097f4f378709b40f8bd74f02e26b23
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283922
> Commit-Queue: Srujan Gaddam <srujzs@google.com>
> Reviewed-by: Joshua Litt <joshualitt@google.com>
Change-Id: Ifce611e1150d8aa275f9e312743bded56a572176
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/285342
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Adds @ObjectLiteral annotation to denote object literal constructors,
and implements it in all the backends. For dart2js, this involves
modifying the SSA and for dart2wasm, we create a one-per-shape
forwarding procedure to a specialized JS method that returns the
literal. This also modifies @anonymous semantics in dart2wasm to
be consistent with the other backends.
CoreLibraryReviewExempt: Backend-specific, just adding annotation.
Change-Id: I4d7a9ea9ed097f4f378709b40f8bd74f02e26b23
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283922
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
There's been some talks about weird failures on DDC and there was
ideas that this was caused by some sort of leak (of kernel libraries).
I haven't really found any "meaningful" leaks that should be able
to cause that.
What I have found is this:
* a temporary leak where the vm seemingly gets "one behind".
That's fixed here by creating a class for the ddc batch compiler,
having things in field variables etc. It shouldn't influence results.
* a leaks via https://github.com/dart-lang/sdk/issues/51317 --- but
that's just wasted memory, I can't see how that should influence
results.
* a leak via kernels dummy nodes --- again it shouldn't influence
results (unless we're leaving dummy nodes in the output somewhere
--- which, considering I'm removing that in my test by null'ing out
the parent pointer and stuff still working I'm guessing we're not).
* another leak via some ports map after a crash, but that seems
to go away on its own (the VM cleaning it up later than I think it
should?). Again it shouldn't influence anything other than
(temporary) wasted space.
I've wired up the leak testing stuff into the DDC batch mode so that
one can go into "leak test mode" by doing `export DDC_LEAK_TEST="true"`
on the terminal (I think `set DDC_LEAK_TEST="true"` on Windows).
Then one could run test.py, say
```
python3 tools/test.py -t10000 -c dartdevk --nnbd weak -m release \
-r none --enable-asserts --no-use-sdk -j 1 co19/LanguageFeatures/
```
and attach the leak tester via
```
out/ReleaseX64/dart \
pkg/front_end/test/vm_service_for_leak_detection.dart --dart-leak-test
```
Currently this finds - if I recall correctly - 3 leaks (I think all via
the ports map stuff), but it all goes away again on it's own, so likely
another case of the VM somehow getting "one behind".
Change-Id: Idbf057e3aedfe7b256370f90ddf72f1f8e6798a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/282027
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Types still need to be sealed, so this library is exposed with a
disclaimer that users should not subtype any types.
CoreLibraryReviewExempt: Backend-specific library for JS and Wasm.
Change-Id: I2ed8b0db6b2de60932a551047c6c9eae4a34ce2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/281343
Reviewed-by: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
This flag is no longer used by the front-end and can be removed.
TEST=ci
Change-Id: Ia19e9927d48d4ae486ee7ffa110abb9960a0840d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/281461
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
TargetFlags.enableNullSafety is set to true by default and
also renamed to TargetFlags.soundNullSafety to better reflect its
meaning.
TEST=ci
Change-Id: I2c2f30c2af6502fd9a96141dc60e4afbf8c524fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280216
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
- 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>
Fixes#51095
TEST=ci
CoreLibraryReviewExempt: There are no API changes, just removal of superfluous words in the comments.
Change-Id: Ib1020c62fe6baed5ca68f0074323f025cc90e9f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279500
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
An update for co19 is available at https://github.com/dart-lang/co19/pull/1759
TEST=Existing tests run after change, two new tests for edge cases.
Change-Id: I408e398d532ba2c2e8e60777bb4f7bd0057e27fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278912
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
- 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>
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>
- 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>
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>
This message was added to assist in the transition from the analyzer
to the CFE based version of DDC. Old versions of build_web_compilers that would pass analyzer summaries no longer version solve with this
SDK version.
Change-Id: Ie34b2c21b615a0978d6089567458827fe2ddb0f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279235
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
- 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>
- 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>
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>
There are a number of js_util methods that we use for transformations e.g.
_getPropertyTrustType. In order to avoid unnecessary method calls, we inline
them directly in DDC here. This includes:
- _getPropertyTrustType
- _setPropertyUnchecked
- _callMethodUnchecked*
- _callConstructorUnchecked*
Change-Id: I7f6905ec1daadcf5228eafde4fda5d435d6c8b23
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/277661
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Lowers top-level external package:js members to their respective
js_util transformation, taking into account any namespacing in the
member's name. We only do this transformation for code that uses the
@JS annotation from dart:_js_annotations and isn't from dart:ui. This
is to avoid a breaking change for Dart 3. As such, we allow
dart:_js_annotations to be used in some test paths. In the future, we
will export the dart:_js_annotations @JS annotation through
dart:js_interop instead.
Change-Id: I3b92a3a8cd1340c50913b9df6fdc743e2790259e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/277048
Reviewed-by: Sigmund Cherem <sigmund@google.com>
The `-k`, `--kernel`, and `--dart-sdk` arguments have been
ignored since v2.8.1.
Change-Id: I28e793f3e2023cc09c279ca65d08295b1ed11028
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/276771
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
The `--no-sound-null-safety` can still be passed explicitly to compile
with weak null safety.
Change-Id: If77eb58c77f63bb53a62d62c153c39de903d4525
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/276764
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
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>
Fixes https://github.com/dart-lang/sdk/issues/46967
Creates classes for non-external factories and static members, and
modifies invocations to point to these members instead. Tear-offs of
interop constructors (external or otherwise) are now supported since
they're just non-external static methods.
Change-Id: Id754fb4bc872051a8df4169aefd4bdc078452fb5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/270501
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
In the new runtime type system when running with weak null safety,
perform type tests multiple times to produce optional warnings or
errors when a test passes but would fail in sound null safety.
This is the same technique DDC uses with the current type system.
Issue: https://github.com/dart-lang/sdk/issues/48585
Change-Id: Ic1514987a6f4ffeb127a0d2be5ec15b606016212
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266543
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Anna Gringauze <annagrin@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
- 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>
Generate type hierarchy rules for all interface types used in a
module. These rules are utilized by the `isSubtype()` to determine
interface subtypes.
Issue: https://github.com/dart-lang/sdk/issues/48585
Change-Id: I63f64075d4947f234eca5e730ad15588e60b9e1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266542
Reviewed-by: Anna Gringauze <annagrin@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Overriding fields can change the type to remove nullability and
can also be final so they override the getters only.
For DDC that means there is an inherited setter that could still be nullable and a forwarding setter that should allow null even though
the type of the overriding field is non-nullable. With enhanced null
safety asserts enabled in weak mode there should be no failure when
setting the inherited field to null.
Fixes: https://github.com/dart-lang/sdk/issues/50569
Change-Id: Ie6af0d1e265a5f3b15469311fa1f7e2a184d95ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272480
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
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>