Commit Graph

7806 Commits

Author SHA1 Message Date
Erik Ernst 149af9d3ae Simplify primary constructor grammar rule
This CL simplifies the grammar rule for a primary constructor and the
place where it's used (`classNamePart`) - the proposal no longer uses
a version that cannot have the modifier `const`. Also, it de-inlines
`typeWithParameters` for consistency and brevity.

Change-Id: Idbd2182a6a29256d61c617c9eb2f631213cb3234
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/455400
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2025-10-20 01:31:44 -07:00
Nate Biggs a8a2303fa7 [dart2wasm] Fix wasm unit test structure.
Previously these were being run with the standard "pkg" unit test suite.
All the other backends have their own unit test suite so this introduces
one for dart2wasm.

This ensures the tests run with the correct fileset (including d8).

Change-Id: I29cd0048a4d6731da3a20110f6e496fe7da0c3b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/454760
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2025-10-15 09:44:09 -07:00
Erik Ernst ad5a1bb54f Simplify the grammar to use just memberDeclaration
The spec_parser grammars have previously made a distinction among the
different kinds of members that a class, mixin, extension type, etc
could have. This is not very useful, though, so this CL changes the
grammar such that they all just contain a sequence of general member
declarations `<memberDeclaration>`. It is then up to non-parser based
error checks to prevent whatever should not exist (e.g., until we add
constructors to extensions it is an error to declare a constructor in
an `extension`, but this will be an ad-hoc check rather than a syntax
error).

Change-Id: Ifca2713af86eb3f569732ebef844135b772a5465
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/454280
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2025-10-09 04:11:18 -07:00
Robert Nystrom 557db62620 Add experiment flag for "Private Named Parameters".
Fix #61631.

Change-Id: If797277e0ff294f11515ccfec845381b07c34a11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/453643
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Kallen Tu <kallentu@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2025-10-07 17:15:11 -07:00
Kallen Tu 5e7187d77f Update experimental_features with additional analyzer updates.
- Added running `dart pkg/analyzer/tool/api/generate.dart` to prevent
people from finding out they have to update the `api.txt` only when they
run try-jobs.
- We should also update
`pkg/analyzer_testing/lib/experiments/experiments.dart` at this point. I
always forget and spend time wondering why my tests aren't working. And
this is probably the most ideal step to do this at.

Change-Id: I68a33a39d7b5360e586f7aa17f223cf9d9014885
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/453644
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Kallen Tu <kallentu@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2025-10-07 11:17:59 -07:00
Kallen Tu 4cdf9740e9 Add 'declaring-constructors' experiment flag.
This CL adds the flag for the primary/declaring constructors feature.
We'll develop the feature under this flag.

Bug: https://github.com/dart-lang/sdk/issues/61526
Change-Id: I0318998cef7ee1a306af243f4dc15c65ae9f8d96
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/453640
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-10-07 11:17:17 -07:00
Ivan Inozemtsev 1974c2360e [release] Increase version on main to 3.11
Change-Id: I54e1e60e05ce31b77b02745870c80a878918793a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449805
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
2025-10-06 18:46:13 -07:00
Erik Ernst 37c3b5b443 Add support for declaring constructors to the spec parser
Also fixes a bug whereby the file name message came after the first
syntax error diagnostic for each file.

Change-Id: Ice2da1e337fa54787696989b387d057ab5674819
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/453280
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2025-10-03 05:29:00 -07:00
Alexander Aprelev a4016ebd7d [gardening] Fix generate_package_config script so it works on Windows.
Fixes https://ci.chromium.org/ui/p/dart/builders/ci.sandbox/pkg-win-release/34622/overview

Change-Id: Ia42a52adcf65b41ef6e7a45b5c59539308880600
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/452905
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2025-10-01 15:14:15 -07:00
Martin Kustermann 8322e6af37 [dart2wasm] Add support for reading wasm files to package:wasm_builder
This adds a wasm binary reader that produces an `ir.Module`.

We also make a few changes to existing code

* Represent the import section with an `ir.Imports` object (similar to
  `ir.Exports`, `ir.Functions`, ...)

* We make a bunch of data structures allocatable in uninitialized state
  (the fields being usually uninitialized `late final` fields) where the
  deserializer can create those objects and then fill in details later.

  => This comes partly due to the way wasm binaries are structured
     themselves: The "data count" section comes first so a reader knows
     how many data sections there will be, then the "code section" can
     refer to those data sections. Then afterwards the actual "data
     segment" comes that fills in the data of the section.

* We make names consistently optional: Wasm objects don't have to have
  names, so the names should be optional, so we make them `String?`. We
  also make them non-final as that's consistent with other names.

* We make the `ir.Types`, `ir.Functions`, ... objects have `operator[]`
  and the index used is the same index used e.g. in wasm instructions.

* We make static constants for section ids and custom section names.

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

Change-Id: I5394d6b82cf4dc68d24cea1dee66c5b33eb2f60f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/452144
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
2025-10-01 03:37:31 -07:00
Ryan Macnak fe967a1adf [infra] Split GCC and MSVC builder configurations.
Change-Id: I5f17ac79843eac883584f957b3b5d405894de721
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/452360
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2025-09-30 11:14:14 -07:00
Ryan Macnak d65c6da10e [infra] Add more sanitizer configurations.
Change-Id: I58b170359fc76c31b408b05c77a7a1d5ae9bcf2a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/451121
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-09-23 16:31:24 -07:00
Moritz 7ab10ef0a4 [hooks] Add data-assets flag
Add an experimental data-assets flag to enable data assets in hooks.

Change-Id: I0df53c225638414db625a0433498ef2c10d31d96
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/450781
Commit-Queue: Moritz Sümmermann <mosum@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2025-09-23 01:02:15 -07:00
Ryan Macnak b50a115d15 [infra] Reduce Android shard count.
When the shard count is greater than the number of machines in the pool, shards are guarenteed to wait, increase latency relative to a lower shard count.

Change-Id: I1fd61a59837b767748c13120dec30ca6eb352f28
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/450946
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-09-22 12:40:24 -07:00
Ryan Macnak 333587b206 [dartfuzz] Reduce duration so it finishes before the nightly builders start.
Change-Id: I70f93c97cc89c23c900df951920e21c7f15d6cba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/450944
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2025-09-22 11:19:44 -07:00
DEPS Autoroller 6152811eda Roll ninja from 2@1.11.1.chromium.6 to 3@1.13.1.chromium.4
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/ninja-dart-sdk
Please CC dart-engprod@google.com,dart-vm-gardener@grotations.appspotmail.com,dart-vm-team@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in ninja: https://bugs.chromium.org/p/chromium/issues/list
To file a bug in Dart SDK: https://github.com/dart-lang/sdk/issues

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Cq-Include-Trybots: luci.dart.try:dart-sdk-linux-try;luci.dart.try:dart-sdk-linux-arm64-try;luci.dart.try:dart-sdk-mac-try;luci.dart.try:dart-sdk-mac-arm64-try;luci.dart.try:dart-sdk-win-try
Change-Id: I94379b6282696480ce450e9fb013e1b5f04be103
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/450774
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2025-09-22 10:15:35 -07:00
Chloe Stefantsova 62902d28e8 [language] Add experimental flag 'static-extensions'
Part of https://github.com/dart-lang/sdk/issues/61485
Part of https://github.com/dart-lang/sdk/issues/61484

Change-Id: I6b88a2df4fd4f01826c178138c21a4b300818e92
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449300
Reviewed-by: Michael Thomsen <mit@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2025-09-22 04:21:01 -07:00
Ben Konyi be2d42a11f [ VM ] Remove dead fork of Observatory from runtime/
Observatory was moved to pkg/observatory in a previous CL.

TEST=N/A

Change-Id: Ie0e7cb71799408cefe30d2c72b4dfd7bd43747ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/450221
Auto-Submit: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2025-09-17 15:15:26 -07:00
Alexander Aprelev 7cf3727191 [gardening] Ensure to fetch flutter repo tags before running flutter.
Lack of tags cause flutter get outdated version name, causing runtime errors like https://ci.chromium.org/ui/p/dart/builders/ci.sandbox/flutter-analyze/29634/infra

TEST=ci

Change-Id: Ibad39a5eb8f45aff9af22741b0c81c895e5ef4c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/450103
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2025-09-17 11:03:04 -07:00
Daco Harkes 942989e76f [native_assets] Enable code assets for next stable release
Make it available on the stable branch.

Fix the version numbers for when it was enabled. (3.9 as experiment
enabled is not entirely correct, as the experiment was not available
on the stable channel in 3.9, only on betas of 3.9.)

And disable passing data assets under the same experiment flag.

Note: It seems that it was accidentally still marked as 3.9 and then
got swept up in https://dart-review.googlesource.com/c/sdk/+/443803.

TEST=dartdev native assets tests

Bug: https://github.com/dart-lang/sdk/issues/50565
Change-Id: I4c44ad22e32673d6a951017d0cf6d3374dd20429
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-arm64-try,pkg-win-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449803
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Michael Goderbauer <goderbauer@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2025-09-17 06:58:29 -07:00
Ryan Macnak 496a2bdc9b Roll clang to 49f39b349db181ca516eb0253462105ff0e2c634.
TEST=ci
Change-Id: I38e9ad7b16ffb0a9d380c3ed23b17854dca5a32f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/447440
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2025-09-15 10:00:29 -07:00
Lasse R.H. Nielsen 83b2c5d3c3 Retire and remove 3.9 experiment flags.
Change-Id: I72262910b590f93ca5de7b3286c226d5ecaf3276
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/443803
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2025-09-09 04:50:35 -07:00
Jens Johansen a757154d93 [infra] Shard dart2js modular tests
* Shard dart2js modular tests (and decrease the shards of the
  unit tests)
* Remove folders we look for dart files in --- the remove folders
  doesn't contain any anyway and would have to be copied if keeping
  these lines.
* Fix sharding, previously trying to shard in 2 shards would only allow
  you to run ~50% of the tests:

```
$ out/ReleaseX64/dart-sdk/bin/dart pkg/compiler/tool/modular_test_suite.dart -nweb-unittest-asserts-linux --verbose --use-sdk --shards=2 --shard=0
Error: shard should be between 0 and 1, but got 0

$ out/ReleaseX64/dart-sdk/bin/dart pkg/compiler/tool/modular_test_suite.dart -nweb-unittest-asserts-linux --verbose --use-sdk --shards=2 --shard=2
Error: shard should be between 0 and 1, but got 2
```

  This has been corrected to allow from `1..n` for `n` shards to fit
  with what the testing system sends when specifying `shards` in
  `tools/bots/test_matrix.json`.

For previous try runs I extracted this:

Build 60615:
Shard #1: --- Total time: 04:27 ---
Shard #2: --- Total time: 05:19 ---
Shard #3: --- Total time: 04:23 ---
Shard #4: --- Total time: 10:29 ---
 => A total of 24:35 --- combined finish of 10:29
Modular tests: 32:19
Total bot runtime: 35:48

Build 60614:
Shard #1: --- Total time: 03:57 ---
Shard #2: --- Total time: 05:18 ---
Shard #3: --- Total time: 05:21 ---
Shard #4: --- Total time: 05:34 ---
 => A total of 20:10 --- combined finish of 5:34
Modular tests: 29:41 secs
Total bot runtime: 35:55

Build: 60613
Shard #1: --- Total time: 03:56 ---
Shard #2: --- Total time: 05:15 ---
Shard #3: --- Total time: 04:32 ---
Shard #4: --- Total time: 05:34 ---
 => A total of 19:17 --- combined finish of 5:34
Modular tests: 33:39
Total bot runtime: 38:51

With the new sharding I'd estimate that the unit tests and modular tests
would have finished in less than 13 minutes, making the bots finish in
~17 minutes, ~20 minutes and ~19 minutes instead.
The try-run with this ran in 17:06

Possibly a follow-up could do more stuff on the "main bot".

Change-Id: Ie5c96206deb9c0c6db3385bbca04ae6f4eab4c3a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/448381
Reviewed-by: Nate Biggs <natebiggs@google.com>
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2025-09-04 23:11:30 -07:00
Alexander Markov 9a3349ed41 [bots] Add vm-ffi-dyn-mac-{debug,release}-simarm64_arm64 bots to test dynamic modules on simarm64_arm64
Change-Id: I82d97b705c97d95b160f4faf96c01931b5ee58a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/447600
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
2025-08-28 11:28:01 -07:00
Ryan Macnak e01d4b3cc6 [vm, compiler] Get the full Dart stack in TSAN reports.
Call __tsan_func_entry/__tsan_func_exit in functions that use __tsan_read/__tsan_write or call other functions. Call __tsan_func_exit once per frame when unwinding for exceptions. Do so only in AOT, since TSAN won't be able to symbolize JIT functions anyway.

TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/61352
Cq-Include-Trybots: luci.dart.try:vm-tsan-linux-release-arm64-try,vm-tsan-linux-release-x64-try
Change-Id: Ie52c978c25664d78b834e9b72ecf7eb2a12cc2ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/444181
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-08-26 11:50:13 -07:00
Ryan Macnak 3bc1985977 [infra] Add configuration for vm-tsan-mac-release-arm64.
Change-Id: I83e472910ed22394d9704afa48e24085fc65ebe4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/447001
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-08-26 11:46:56 -07:00
Alexander Markov d93cd6040f [test_matrix] Add vm-dyn-mac-debug-arm64 builder
Change-Id: I0f48f229f5517b5f5f0c9e160fe1d7c5cd445998
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/446003
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2025-08-19 13:16:34 -07:00
Ryan Macnak 048f059ce9 [infra] Increase Linux ARM64 testing to match Linux X64.
Making use of new capacity.

Also remove dead configuration for vm-checked-mac-release-arm64.

Change-Id: I3347d9ddf87e660ed00f7d88a91d058e78a0a564
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/445800
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-08-19 08:15:22 -07:00
Ryan Macnak fd091ab155 [infra] Remove old Debian package building scripts.
Change-Id: I46f00aa913e9dddb3f75b38ca384d126ffe9a265
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/445786
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2025-08-19 08:15:11 -07:00
Kallen Tu f93aea7c54 Enable 'dot-shorthands' feature flag for Dart 3.10
This CL enables the dot shorthand feature by default in Dart 3.10.

Dot shorthands allow you to omit the type name when accessing a static member in a context where that type is expected.

These are some examples of ways you can use dot shorthands:

```dart
Color color = .blue;
switch (color) {
  case .blue:
    print('blue');
  case .red:
    print('red');
  case .green:
    print('green');
}
```

```dart
Column(
  crossAxisAlignment: .start,
  mainAxisSize: .min,
  children: widgets,
)
```

To learn more about the feature, check out the feature specification located here: https://github.com/dart-lang/language/blob/main/working/3616%20-%20enum%20value%20shorthand/proposal-simple-lrhn.md

Tested: Feature tested with language tests and unit tests for the frontends, VM, web.
Bug: https://github.com/dart-lang/sdk/issues/57036
Fixes: https://github.com/dart-lang/sdk/issues/57037
Change-Id: I4e2cab29e33ed266603942eaebf3f9671ef60766
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/427802
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2025-08-18 12:38:35 -07:00
Paul Berry ae835a68d9 [tools] Switch error code references in verify_docs.dart to camelCase
This is a follow-up to
https://dart-review.googlesource.com/c/sdk/+/444921, which renamed
analyzer error codes from SCREAMING_CAPS conventions to camelCase
conventions. That CL left a few deprecated error codes in place
because they were referred to in
`tools/verify_docs/bin/verify_docs.dart`, and those references
couldn't be fixed in an automated fashion.

This CL cleans up the references in `verify_docs.dart` to use the new
camelCase constants, and removes the deprecated SCREAMING_CAPS
constants that are no longer needed.

Change-Id: I6a6a69644eb8cfe7841d7582fd520f081010544d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/445106
Reviewed-by: Moritz Sümmermann <mosum@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2025-08-14 09:27:53 -07:00
Ryan Macnak 922aff883b [test] Check we can scale to large numbers of classes, interfaces, fields, type parameters, etc.
Bug: https://github.com/dart-lang/sdk/issues/61310
Change-Id: Idf8557f996d1274a0120458b32604fbd356bd7a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271220
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-08-13 15:36:19 -07:00
Paul Berry a9a9c37d57 [analyzer] Prepare to rename error codes to camelCase.
A temporary script is added,
`pkg/analyzer/tool/messages/rename_error_constants.dart`, which will
rename every error code in the analyzer (and related packages) from
SCREAMING_CAPS to camelCase.

Also, the error message code generator is enhanced so that it can
generate error codes using either SCREAMING_CAPS or camelCase, based
on the setting of a temporary constant, `_useLowerCamelCaseNames`. The
constant is currently set to `false`; `rename_error_constants.dart`
will change it to `true`.

There are a few references to the old SCREAMING_CAPS names that won't
be able to be automatically addressed by the script. To avoid
breakages, a mechanism has been added to the error message code
generator to preserve those names after the migration, as deprecated
aliases. The names that will be preserved are listed in the
`ErrorClassInfo.deprecatedSnakeCaseNames` field, in
`error_code_info.dart`. These will be cleaned up in future CLs.

Once the rename is complete, the temporary script and constant will be
removed.

Change-Id: I6a6a69640b077c6bc4da92cec97686e4b2c3b906
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/444920
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Moritz Sümmermann <mosum@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2025-08-13 15:27:31 -07:00
Ryan Macnak e1619544a2 [infra] Increase Linux ARM64 sharding.
Making use of increased capacity.

Change-Id: I8161f39efdcb8cbc99f8b264afdb6ad13ef86d24
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/444925
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-08-13 09:45:50 -07:00
Erik Ernst 57799724ff Eliminate deprecation warning
'SpecParser.java' has always been using an `ANTLRFileStream`, but this
class has been deprecated at this time. Changing the code to use
`CharStreams.fromFileName(...)`.

Change-Id: I35fce3b381ac2e819794c08faef7f97c4c3bea50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/444840
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2025-08-12 06:22:15 -07:00
Alexander Markov ed1d4a5461 Run all tests on vm-dyn-linux-debug-x64 configuration
Change-Id: I660787d59b9cb905e5309f07d8aa4de69690c847
Cq-Include-Trybots: luci.dart.try:vm-aot-dyn-linux-debug-x64-try,vm-aot-dyn-linux-product-x64-try,vm-dyn-linux-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/444369
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2025-08-11 09:49:46 -07:00
Kallen Tu a5502f91c9 [tools] Update documentation about experimentalReleaseVersion in experiment flags.
Tweaking the documentation a tad to enforce the new process of:
1. Add an `experimentalReleaseVersion` when you make the flag and set it to the current latest version at the time of creation.
2. Bump the `experimentalReleaseVersion` when you make a relevant change in the allowlist that would allow those libs/packages to use the feature by default.

The chat thread context: https://chat.google.com/room/AAAA4GpVqbE/r2QigevCdQo/tP7lLb8I728?cls=10

Change-Id: I8ddad40e0ac82b6deaae9a6671bec4d47ea07fba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/443636
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2025-08-06 08:56:28 -07:00
Alexander Markov bbdc543c4d [tests] Run co19 tests on dynamic modules bots
Change-Id: Ie801f5c2c9f6c36cedf8f68b9a1eae5d5f322b93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/443580
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2025-08-04 14:23:21 -07:00
Alexander Markov 24b158ac6a [vm,compiler] Avoid slow LookupFunctionAllowPrivate when reading kernel
When reading kernel function names are already mangled using private
key, so slower *AllowPrivate lookups are not needed.

Also cleaned up unused functions related to *AllowPrivate lookups.

TEST=runtime/tests/vm/dart/many_functions_test.dart
Fixes https://github.com/dart-lang/sdk/issues/61196

Change-Id: I8dd0b8b907ecea79314480dbc39e0edda8a243d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/443151
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2025-08-04 14:05:01 -07:00
Alexander Markov c237ac8e23 [vm] Extract runtime offsets as JSON
Print constants as JSON in runtime/vm/compiler/offsets_extractor.cc
instead of generating C++ declarations.

tools/run_offsets_extractor.dart reads JSON and generates C++
declarations (runtime/vm/compiler/runtime_offsets_extracted.h).

This would allow us to have different output formats in future
(e.g. C++ and Dart).

TEST=dart tools/run_offsets_extractor.dart

Change-Id: Ib8576766ae8cc21583b5a7b27998fd88b733b3a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/443140
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2025-08-04 10:23:41 -07:00
Nate Biggs 7f44c726a4 [dart2wasm] Add natebiggs@ as wasm owner.
Change-Id: I37f541c6455b8f12018994b08d333c0069d1cc4a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/442961
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2025-07-30 13:52:55 -07:00
Kallen Tu 8b1400713f Dot shorthands: Add experiment release version.
Added an experiment released version for Dart 3.9.

Context:
https://github.com/dart-lang/webdev/blob/main/fixtures/_experimentSound/web/main.dart
and tests outside of the SDK broke once we bumped to 3.10.
The experiment released version will allow us to use dot shorthands in
the 3.9 version.

Bug: https://github.com/dart-lang/sdk/issues/57037
Change-Id: I066d366f36e3ce1debb7b3e0e492b6a61bcddb74
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/442162
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2025-07-26 18:50:44 -07:00
asiva ab44b20ab8 Reapply "[VM/dartdev] Switch dartdev to use an AOT runtime." and
Add the fixes that were done after original CL landed.

This reverts commit 97bc401163.

TEST=ci

Change-Id: I26373aecc325e4c0c379c92e779aa301e3a58c5a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/441700
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2025-07-24 14:48:03 -07:00
Daco Harkes 2af31661c6 [pkg] Introduce dart_data_home
The directory location depends on the current OS:
 - on Windows:
   - `%LOCALAPPDATA%\Dart\<tool>`
 - on Mac OS:
   - `$HOME/Library/Application Support/Dart/<tool>`
 - on Linux:
   - `$XDG_STATE_HOME/Dart/<tool>` if `$XDG_STATE_HOME` is defined,
      and
   - `$HOME/.local/state/Dart/<tool>` otherwise.

The Dart data home can be overridden with the `DART_DATA_HOME`
environment variable.

This CL does not start using the new location yet.

Bug: https://github.com/dart-lang/sdk/issues/60922
Bug: https://github.com/dart-lang/sdk/issues/41560
Bug: https://github.com/flutter/flutter/issues/59430
Change-Id: I55e0ba610f8665ea3c9f053b36c943b097313046
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-arm64-try,pkg-win-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/440462
Reviewed-by: Alexander Thomas <athom@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2025-07-16 01:05:13 -07:00
Daco Harkes 04e4fd2ddf [infra] setup interop OWNERS file
Change-Id: Ibb9c368c6dfd1aeb34a4ac6e146a41f983bbb894
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/440463
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2025-07-15 06:19:44 -07:00
Ivan Inozemtsev e694eb261a [release] Bump version on main to 3.10
Change-Id: I502950fa3cf72958628512634ad0d62ca54f61cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/434804
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
2025-07-14 22:47:12 -07:00
asiva 97bc401163 Revert "[VM/dartdev] Switch dartdev to use an AOT runtime."
This reverts commit 5399dbf6f6.

Reason for revert : Flutter rolls are failing

TEST=ci

Change-Id: I76fede849705514496adbc2ab7f6c262de4103ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/439661
Reviewed-by: Jason Simmons <jsimmons@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2025-07-09 23:08:28 -07:00
Alexander Markov c124f459ac [vm,test_runner] Run vm/* tests against interpreter
Introduce Dart_LoadLibraryFromBytecode to support loading unit test
libraries from bytecode.

TEST=ci

Change-Id: I7706fdb2acaf906f01f27f671e7193b9755efe0f
Cq-Include-Trybots: luci.dart.try:vm-aot-dyn-linux-debug-x64-try,vm-aot-dyn-linux-product-x64-try,vm-dyn-linux-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/439080
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2025-07-08 06:49:34 -07:00
Srujan Gaddam 67bda7c22b [dart2js/ddc/dart2wasm/dart:js_interop] Support SharedArrayBuffers in JS typed data wrappers
https://github.com/dart-lang/sdk/issues/56455

The existing native typed data implementation in dart2js/ddc
and the JS typed data wrappers in dart2wasm do not support
SharedArrayBuffers.

In dart2js/ddc, this is because the native type for ByteBuffer
is simply ArrayBuffer, leading to type failures when using
SharedArrayBuffers. To handle this, this change makes NativeByteBuffer
an abstract parent class to NativeArrayBuffer and NativeSharedArrayBuffer.
This allows ByteBuffer to support both types. There is a preexisting
SharedArrayBuffer type in dart:html that we should avoid breaking, so
we add an interface that NativeSharedArrayBuffer implements and expose
that interface.

In dart2wasm, JSArrayBufferImpl only allows ArrayBuffers as its
extern ref. This change makes that wrapper support SharedArrayBuffers
as well.

In dart:js_interop, the existing toJS conversion on ByteBuffer
now throws if the underlying buffer was actually a SharedArrayBuffer.
This is to support the return type of JSArrayBuffer. This behavior
technically already existed due to type differences in the JS
compilers, but was never possible with dart2wasm.

CoreLibraryReviewExempt: Backend-specific libraries with no real functional changes to public APIs.
Change-Id: I4dac9fb808590bf0c274da815c152cd4637316b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437526
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2025-07-07 12:50:25 -07:00
asiva 5399dbf6f6 [VM/dartdev] Switch dartdev to use an AOT runtime.
- split the Dart CLI tool out of the VM into it's own embedder which
  runs in AOT mode. The pure Dart VM executable is called 'dartvm' and
  has no Dart CLI functionality in it
- the Dart CLI executable parses the CLI commands and invokes the rest
  of the AOT tools in the same process, for the 'run' and 'test'
  commands it execs a process which runs 'dartvm' to run
- 'dart hello.dart' execs the 'dartvm' process and runs 'hello.dart'
- the Dart CLI is not generated for ia32 as we are not shipping a
  Dart SDK for ia32 anymore (support to execute the 'dartvm' for ia32
  architecture is retained)
- the Dart CLI tool is not built in the internal Dart SDK builds

TEST=ci

Some performance improvement numbers
'dart format pkg/dartdev' goes from 1.17 secs to 0.22 secs
'dart doc pkg/dartdev' goes from 100.2 secs to 66.6 secs
'dart fix pkg/dartdev' goes from 19.3 secs to 14.5 secs

Change-Id: I66984a26cb2ab014b34dc1873f1f3d2884e13518
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/364202
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2025-07-04 13:22:13 -07:00