Commit Graph

7774 Commits

Author SHA1 Message Date
Ryan Macnak cf5494aa89 [build] Make generating the VM's version strings work with Ninja's restat feature.
If the version is unchanged, don't write to the file. Ninja will notice the modification time is unchanged and avoid rebuilding the target's dependents.

In particular, this means merely adding or amending a commit will no longer make the VM and all SDK snapshots dirty.

Change-Id: I25617c6c584d1d1094a339fe14716d18b28c688f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/506101
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-05-26 10:03:28 -07:00
Ryan Macnak 53733077b2 Revert "[standalone] Remove the fallback root certificates."
This reverts commit 039aef728a.

Reason for revert: b/515601247

Original change's description:
> [standalone] Remove the fallback root certificates.
>
> The discovery of the system root certificates is more robust after 2142d8e148.
>
> TEST=ci
> Change-Id: I8215cb92f98e620b82f21261c13e061a2b488b5d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/433923
> Reviewed-by: Slava Egorov <vegorov@google.com>
> Commit-Queue: Ryan Macnak <rmacnak@google.com>

TEST=ci
Change-Id: Ib07de221ff1160461d930f7165a7cd8179b4e3f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/506100
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2026-05-26 07:49:52 -07:00
kevmoo 7679be813f [dart2wasm] cleanup owners
Change-Id: I63e9b69a07471641aaf32f7d0cdbbc4cd73877ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/502260
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
2026-05-22 11:06:09 -07:00
Alexander Markov 514be1781f [modular_aot] Add corelib tests to vm-modaot-mac-debug-arm64 bot
Issue: https://github.com/dart-lang/sdk/issues/61635
Change-Id: I68b4c1ad40d21aa57cf79c802ce50073046cb208
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/505380
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2026-05-21 12:38:04 -07:00
Ryan Macnak b2911c0bf1 Fix GCC build.
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/63406
Change-Id: I3bb3963fcc182777c5d2c0e062ae4bbf3c5aae75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/504800
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-05-20 08:21:30 -07:00
Sam Rawlins 3de2ddee09 Reapply "Switch on building devtools from source when building the Dart SDK"
This reverts commit 2a93a26d91, which a change to use `defined` so that the GN script does not crash in
Flutter.

Fixes flutter/devtools#9786

See go/moving-devtools-to-dart-sdk-2025.

In this change, we make the source of devtools be configurable, in
actions like build_sdk.

If `build_devtools_from_sources` is true, we build local devtools,
and if false, we continue to use the prebuilt sources.

This may be an intermediate step, while we test out building devtools
from source. Or it may be permanently be a choice, if we keep building
with CIPD.

Change-Id: I9d509b07971942f2c4884224a6efda9001522bd4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/502120
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2026-05-19 20:55:22 -07:00
Ryan Macnak 039aef728a [standalone] Remove the fallback root certificates.
The discovery of the system root certificates is more robust after 2142d8e148.

TEST=ci
Change-Id: I8215cb92f98e620b82f21261c13e061a2b488b5d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/433923
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-05-19 11:20:48 -07:00
Ryan Macnak a8419fb546 [build] Fix building the Debian package on Resolute.
dpkg-buildpackage now wants a timestamp in the changelog.

Also remove --git-revision-file and --git-timestamp-file, which were part of the previous way to build Debian packages.

Change-Id: Idbcf418571889ad7588424e6d8ae6e81ec79942b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/504280
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-05-19 07:18:47 -07:00
Ryan Macnak 6613ac694e [infra] Fix wasted parent machine time on vm-mac-{debug,release}-arm64.
A test shard will run on the parent only if the tests are the last step.

Change-Id: Ib251abe84c631330432b1cdd75897cb0f540a6fc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/504281
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
2026-05-19 07:17:52 -07:00
Ryan Macnak d36adbacaf [vm] Remove the VM isolate.
The former contents of the VM isolate are now included into each isolate group. This makes each isolate group's heap independent, and in particular allows each heap to be allocated to a separate pointer cage (not done in this CL).

The duplicated stubs that allowed PC relative calls are removed, since the originals can now be the target of PC relative calls.

The bootstrapping needing to load an AppJIT or AppAOT snapshot is reduced to allocating the oddballs. The code is entirely dropped in the AOT runtime, but the JIT runtime still has it to allow for flags to affect the compilation of the stub code. Further refactoring might be able to remove this for the JIT runtime too, with only gen_snapshot knowing how to bootstrap.

Class serialization no longer distinguishes predefined classes.

The page containing null is marked as never-evacuate. null, false and true must not move because the compiler relies on their low bits having certain patterns for some optimizations. (Previously, the entire VM isolate heap never moved.)

Compaction is disabled for IA32. Due to register pressure, some stub calls must not use a scratch register and embed the address of Code.

The page containing the call-through-safepoint stub is frozen when running with --write-protect-code and the stub is created at runtime (instead of loaded from an AppJIT or AppAOT snapshot). This stub must remain executable even during a safepoint, as a foreign call might during return during a safepoint and only block after the stub directs it to the runtime.

The snapshot symbols are renamed to kDartSnapshotData and kDartSnapshotText. There is no need to distinguish the VM isolate's snapshot, and snaphots are per isolate group not per isolate. Aliases with the old names are added to ease migration.

Some global flags that were automatically set based on the VM isolate's snapshot are now isolate group flags and automatically set by the isolate group's snapshot.

TEST=ci
Change-Id: Iee82016057d609112e9b021d178fc3d4d18b5044
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/500621
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
SLSA-Policy-Verified: SLSA Policy Verification Service <devtools-gerritcodereview-exitgate@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-05-18 11:35:03 -07:00
Adil Burak Şen a93e065e54 fix: prevent path traversal in sourceMapViewer /file endpoint
Closes https://github.com/dart-lang/sdk/pull/63389

GitOrigin-RevId: 882cfd8dcdbd2d615bd0f7da40d3d83105924fbc
Change-Id: If510820433729765a09c9784f0364bbb52e703c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/504020
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2026-05-18 08:42:05 -07:00
Martin Kustermann 5ae8a02eec [dart2wasm/infra] Add dart2wasm-linux-mac builder to tools/bots/test_matrix.json
The configuration was already added long ago in [0]

[0] https://dart-review.googlesource.com/c/sdk/+/426461

Change-Id: If78a1d40311bda1ed3d2c1325cbc3063685ab9c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/501501
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2026-05-18 01:26:32 -07:00
Kallen Tu 8bfb683892 Enable 'primary-constructors' feature flag.
This CL enables the primary constructors feature by default in Dart 3.13.

The primary constructors feature is a brevity feature. There are no new semantics, but it allows us to express declarations in a less verbose way.

This feature allows one constructor and a set of instance variables to be specified in the header of a declaration.

Currently a declaration with a constructor and some fields is written as:

```dart
// Current syntax.
class Point {
  int x;
  int y;
  Point(this.x, this.y);
}
```

With a primary constructor, we would write the above as:

```
class Point(var int x, var int y);
```

If a primary constructor needs an initializer list or a body, they can be
specified inside the class using the `this` body syntax:

```dart
class Point(var int x, var int y) {
  this : assert(x >= 0) {
    print('Point created at $x, $y');
  }
}
```

As part of this feature, you can also use the `new` and `factory` keywords to
declare constructors in the class body without repeating the class name:
```dart
class Point {
  int x, y;

  // Equivalent to Point(this.x, this.y)
  new(this.x, this.y);

  // Equivalent to Point.origin()
  new origin() : x = 0, y = 0;

  // Equivalent to factory Point.clone(Point other)
  factory clone(Point other) => Point(other.x, other.y);
}
```

To learn more about the feature, check out the feature specification located here: https://github.com/dart-lang/language/blob/main/accepted/future-releases/primary-constructors/feature-specification.md

Tested: Has existing language, CFE, analyzer, analysis server tests.
Bug: https://github.com/dart-lang/sdk/issues/61524
Change-Id: I296f2fcd918b87bf2a1dd00256340759866c2423
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/489241
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2026-05-04 15:09:49 -07:00
Ryan Macnak 017f2570d9 [test] Add missing FFI tests to the Fuchsia test package.
Change-Id: I333c5d99051e89b64aca9056b7892d245fda0fe6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/500480
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-05-04 10:40:32 -07:00
kevmoo a2055fbb82 pkg:api_summary
- Moved existing summary logic to the new package

Change-Id: I47d032f5a253cfa32d9b685d9ff18bb08f534177
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/499440
Commit-Queue: Vijay Menon <vsm@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2026-05-01 11:29:56 -07:00
kevmoo be63771661 tools/build_and_test_fast: fix an issue with wasm
- Added the required `wasm-opt` target for dart2wasm compiler
- Using diamonds instead of stars to be less obnoxious
- Made emoji lines the same length
- A bit louder about success cases

Change-Id: Iaa9e964d3384f5282721f1e3e5bfca2d2f84e5a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/499340
Reviewed-by: Nate Bosch <nbosch@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2026-04-29 15:34:20 -07:00
kevmoo 548dd73afd OWNERS: remove xooglers
Change-Id: Id4a6cc997c4f891efe1f58f459c67ab312446a43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/499321
Commit-Queue: Nate Bosch <nbosch@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2026-04-29 15:28:51 -07:00
Liam Appelbe 2a93a26d91 Revert "Switch on building devtools from source when building the Dart SDK"
This reverts commit d0d8184d1a.

Reason for revert: Doesn't build in Flutter
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8683246937886984145/+/u/gn_--target-dir_ci_host_debug_--runtime-mode_debug_--no-prebuilt-dart-sdk_--build-embedder-examples_--no-lto_--rbe_--no-goma_--rbe-server-address_unix:___b_s_w_ir_x_w_rc_rbebn74b14k_reproxy.sock/stdout

Original change's description:
> Switch on building devtools from source when building the Dart SDK
>
> Fixes https://github.com/flutter/devtools/issues/9786
>
> See go/moving-devtools-to-dart-sdk-2025.
>
> In this change, we make the source of devtools be configurable, in
> actions like build_sdk.
>
> If `build_devtools_from_sources` is true, we build local devtools,
> and if false, we continue to use the prebuilt sources.
>
> This may be an intermediate step, while we test out building devtools
> from source. Or it may be permanently be a choice, if we keep building
> with CIPD.
>
> Change-Id: I7b46d6359c69b34f316e59dccc475e211a18f965
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/498640
> Reviewed-by: Alexander Aprelev <aam@google.com>
> Commit-Queue: Samuel Rawlins <srawlins@google.com>

Change-Id: I20381d6bf1d9cba192c46efde99cb57dc75e7cae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/499160
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
2026-04-28 18:13:10 -07:00
kevmoo a5d8c88952 [tools] Add build_test_fast.py for a faster edit-compile-test loop
This change introduces `tools/build_test_fast.py`, a developer-focused
wrapper script that automatically infers and builds the *minimal* required
GN targets needed to run a specific test, avoiding the expensive overhead
of building the full SDK (e.g. `create_sdk`) during local iteration.

Features:
- Infers the correct `test.py` compiler (`-c`) from the provided test
  paths (e.g., `tests/web/wasm` -> `dart2wasm`).
- Infers the correct minimal GN targets for the selected compiler.
  For example, DDC tests now only build `ddc_stable_test_local` and
  `create_common_sdk`, taking ~4 seconds instead of 5 minutes.
- Automatically defaults web compilers (`dart2js`, `dart2wasm`, `ddc`)
  to use the `d8` runtime to prevent noisy browser popups during testing,
  unless explicitly overridden.
- Synchronizes the default `mode` between `build.py` (debug) and
  `test.py` (release) to prevent silent snapshot resolution failures.
- Prints clear, copy-pasteable execution commands for both the build
  and test phases.
- Displays a prominent warning if a test fails, reminding the developer
  to verify the minimal target mapping against `tools/bots/test_matrix.json`.
- Adds documentation for the script to `docs/Testing.md`.

Change-Id: I75473cdacca13f78dd271d9a31d5dcb15df57f6f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/499043
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2026-04-28 15:19:09 -07:00
Sam Rawlins d0d8184d1a Switch on building devtools from source when building the Dart SDK
Fixes https://github.com/flutter/devtools/issues/9786

See go/moving-devtools-to-dart-sdk-2025.

In this change, we make the source of devtools be configurable, in
actions like build_sdk.

If `build_devtools_from_sources` is true, we build local devtools,
and if false, we continue to use the prebuilt sources.

This may be an intermediate step, while we test out building devtools
from source. Or it may be permanently be a choice, if we keep building
with CIPD.

Change-Id: I7b46d6359c69b34f316e59dccc475e211a18f965
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/498640
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2026-04-27 12:46:37 -07:00
Nate Biggs d43d9df1a7 [dart2wasm] Remove dynamic modules support from the dart2wasm compiler.
Change-Id: If92f55296dfe83b64165a2bd07eaefb7d137198c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/497341
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2026-04-24 12:04:23 -07:00
Sam Rawlins 335ab1588d infra: Use built SDK when analyzing flutter packages
Change-Id: Ie1cae3bd803b1608a4ce70971e8d94c0d19a2daa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/498023
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2026-04-24 10:52:37 -07:00
Jessy Yameogo a909051679 [dwds][dwds_test_common] Migrate package to the SDK repository
This CL migrates the `dwds` and `dwds_test_common` packages into the Dart SDK
repository.

Key Changes:
- Monorepo Compliance: Updated the pubspecs to align with the SDK pub workspace setup.
- Excluded `pkg/dwds_test_common/fixtures/` from `package_deps.dart`.
- Updated pkg to status to skip `dwds/test/integration/*` & `dwds_test_common/fixtures/*` until DWDS migration is complete.
- Remove package `build_daemon` from DWDS' `pubspec.yaml` as it's not approved for SDK env.
- Added `@skip_package_deps_validation` to the following files to ignore import checks for package:build_daemon: `server.dart`, `utilities.dart`, `context.dart`.
- Created `pkg/dwds/lib/src/utilities/test_path_utils.dart` to fix path resolution failures in tests (ie. `build_script_test.dart` and `ensure_version_test.dart`).

Testing:
- All tests passing locally.
- CI try bots are green.

Design Doc: http://goto.google.com/migrating-webdev and http://goto.google.com/migrating-dwds

Fixes https://github.com/dart-lang/sdk/issues/62100
Fixes https://github.com/dart-lang/sdk/issues/62101
Fixes https://github.com/dart-lang/sdk/issues/62102
Fixes https://github.com/dart-lang/sdk/issues/62103

Cq-Include-Trybots: luci.dart.try:pkg-win-release-try,pkg-win-release-arm64-try,pkg-mac-release-try,pkg-mac-release-arm64-try,pkg-linux-release-try,pkg-linux-release-arm64-try,pkg-linux-debug-try

Change-Id: I6130be8b7e0b42fbbf81b26a4950a2c4282e3a48
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/494660
Commit-Queue: Jessy Yameogo <yjessy@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2026-04-23 13:18:18 -07:00
Sam Rawlins 0abe294f46 Build devtools with a Python script, rather than Dart
I could not get the Dart script to successfully run from GN, and I
also could not find examples of the same. Everything is Python, so
Python it is.

Change-Id: I767aaf42d1584ae331d028ef073a534e5d36b77b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/496402
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2026-04-23 08:57:21 -07:00
Jake Macdonald 1e477f108f Bump ai to 3d3b7fdaddead83ce262377e5c4ce5b2a843066c
Also updates manage_deps.dart to handle trailing slashes.

Changes:
```
> git log --format="%C(auto) %h %s" 07df396..3d3b7fd
 https://dart.googlesource.com/ai.git/+/3d3b7fd Enable roots tools always, collapse under one tool (440)

```

Diff: https://dart.googlesource.com/ai.git/+/f1cddc8e1905b9a5753a93ce451522e564311251..3d3b7fdaddead83ce262377e5c4ce5b2a843066c/
Change-Id: Ia09061667c3e5f8642a45d6fd491143ac80556c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/495060
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
2026-04-13 16:05:17 -07:00
Sam Rawlins 82bcae5657 [release] Increase version on main to 3.13
Change-Id: Ice6dfd3b694637da4e20529af9374fece32eda4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/491821
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-04-08 01:10:34 -07:00
Leon Senft 500c7f6893 Remove myself from OWNERS_WEB
I'm not an owner nor maintainer of anything in this repository.

R=rmacnak@google.com

Change-Id: Ibcb926990ffdbda46617d7f95c1610805f3ad5dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/490340
Auto-Submit: Leon Senft <leonsenft@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-03-24 12:24:00 -07:00
Lasse R.H. Nielsen 56505e0575 Stop using Match.group.
The `Match.operator[]` does the same thing and is
generally recommended (and shorter).
(I want to deprecate `group` and `groups`)

Tested: Refactoring.
CoreLibraryReviewExempt: Calling equivalent function.
Change-Id: I4c758968ae622fe16b7322be1b29b05b91e7fcd9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/489021
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2026-03-20 09:09:46 -07:00
Simon Binder b4cfeb1093 dart2wasm: Prepare standalone target
When compiled to WebAssembly, the Dart SDK needs access to external
host functions to implement regular expressions, stack traces, timers
and more. Currently, `dart2wasm` relies on `js_interop` definition to
implement these functions in JavaScript.

As discussed in https://github.com/dart-lang/sdk/issues/53884, an
alternative is to use `wasm:import` annotations to let an arbitrary
embedder that doesn't necessarily run in a JavaScript context inject
implementations for these host functions.

This would allow running `dart2wasm` apps by e.g.

  - using a runtime like wasmtime and defining host functions in Rust.
  - defining a wrapper module implementing required functions by
    delegating to WASI definitions, and then using say `wasm-merge` to
    run the app in any WASI-compatible runtime.

This prepares the `--standalone` flag on `dart2wasm` to do just that.
When enabled, the compiler uses a different SDK platform to use imports
instead of JS interop. For now, these platforms are almost identical:
I've ported the timer logic to use wasm imports as a demo, but the rest
is still based on existing patch files. We can revisit in subsequent
CLs to incrementally reduce `js_interop` dependencies before removing
that library from the `dart2wasm_standalone` target entirely.

Change-Id: I3f406afbf2dab65506094de5c3f4067f4db66f3e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/486380
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2026-03-19 01:25:57 -07:00
Brian Quinlan c7e58f832a [tools] make rev_sdk_deps.dart work with packaged references
third_party/pkg/protobuf (and possibly others) uses a compressed reference file (.git/packed-refs) rather than the .git/refs/heads/(master|main) file expected by rev_sdk_deps.dart.

modify rev_sdk_deps.dart to use "git show-ref --verify refs/remotes/origin/main" instead.

TEST: I ran the script and it produced the expected commit hashes for both a package that uses a "main" default branch and a "master" default branch.

Change-Id: Ibe2ec2cf368d859ca78d1873f287722eb73e481b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/488262
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
2026-03-16 13:28:10 -07:00
Ben Konyi f7a049dfb4 [ Service ] Initial implementation of VM Service based on package:dart_runtime_service
This change includes an initial implementation of the new VM service
implementation based on `package:dart_runtime_service`, along with the
necessary plumbing to start it in place of the legacy VM service
implementation.

The entrypoint for the new VM service implementation is located in
dart_runtime_service_vm/bin/vm_service_entrypoint.dart, which is
compiled into AppJIT and AOT snapshots when the
`--include-experimental-vm-service` flag is provided to `build.py`. To run
the VM with the new VM service implementation, the
`--experimental-vm-service` flag must be provided.

Currently, the experimental VM service implementation supports:

  - User specified ports
  - Authentication code flags
  - Enabling the HTTP server via SIGQUIT
  - Some service protocol RPCs that don't require an isolate ID (e.g.,
    `getVM`)

See go/dart-runtime-services-unification for more details.

TEST=Manual

CoreLibraryReviewExempt: dart:_vmservice is private
Change-Id: I4a58cd1fa0a386313baa3d5c5345720231279123
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/484820
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2026-03-10 13:27:01 -07:00
Erik Ernst 05ae94dc91 Support static abstract variables and require initializers
This CL adds a grammar rule to Dart.g and Dart.g4 such that a
variable declaration can be `static abstract`. It also changes the rule
for `static final` and `static const` variable declarations such that
it is a syntax error if they do not have an initializing expression.

This restores the approach which was used before augmentations were
added. It is possible to do this because the added flexibility
would only allow cases which are intended to be an error, because it
is no longer possible to "override" or "extend" an implementation
in an augmenting declaration.

Change-Id: Id7696880a948697678eaf368c69c390b9c8f4e7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/485440
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2026-03-04 04:24:07 -08:00
Erik Ernst 92c362a8b0 Align the specification parser with recent specification changes
This CL aligns Dart.g/Dart.g4 with the feature specs for
augmentations and primary constructors such that they allow for all
kinds of membered declaration bodies to be expressed as `;`.

Change-Id: I61fe4b4fe6541fd0962f8ca39590611827c1d127
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/483340
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2026-03-04 03:30:23 -08:00
Johnni Winther b5c437b03f [PrimaryConstructors] Set experimentReleasedVersion
This sets the `experimentReleaseVersion` of `primary-constructors` to `3.12.0`. This enables tests, outside the SDK in particular, to reliably pin tests that prepare for the feature to language version 3.12.

Change-Id: I85565b9434c052398be5a7839ce5731d71162416
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/482784
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Kallen Tu <kallentu@google.com>
Reviewed-by: Sarah Zakarias <zarah@google.com>
2026-02-27 00:58:37 -08:00
gurusai-voleti 138eaad8cb chore: Migrate gsutil usage to gcloud storage
Closes https://github.com/dart-lang/sdk/pull/62727

GitOrigin-RevId: 05bd7ecca1d5b6a9a0faf97b14ccb7d5966fe949
Change-Id: I3f8c3a3c62cd489864fc6928e6281da0ce465f8d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/482041
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2026-02-23 02:07:01 -08:00
Robert Nystrom c82716b216 Enable "private-named-parameters" experiment flag.
TEST=many language, co19, and other tests

Bug: https://github.com/dart-lang/sdk/issues/61629
Change-Id: I24d761cc2dc3fa2707a2486a39bfde1b8e847b1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/480384
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Morgan :) <davidmorgan@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2026-02-18 15:26:18 -08:00
Alexander Markov 588d91dbc0 [test_matrix] Add vm-modaot-mac-debug-arm64 bot
Issue: https://github.com/dart-lang/sdk/issues/61635
Change-Id: I18dd688879306bf647144e4988a1e1b0edba36eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/481460
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2026-02-18 10:14:13 -08:00
Lasse R.H. Nielsen 0a88f4ef73 Remove var or final from parameters.
Removed from `benchmarks/`, `runtime/`, `sdk/`, `tools/` and `utils/`.
(Leaving `tests/`, `pkg/` and `third_party/`.)

CoreLibraryReviewExempt: No real change.
Tested: No test changes for no real code changes.
Change-Id: Ieb42441457ca3d0ea4443dd153ee902ea33b28de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/480241
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2026-02-13 03:35:34 -08:00
Ben Konyi 27e03e18d5 [ Service ] Create package:dart_runtime_service
This change creates `pkg/dart_runtime_services/` with the initial
implementation of `package:dart_runtime_service`.

`package:dart_runtime_service` provides a simple interface to create
Dart services with common platform-agnostic features and behaviors,
while also allowing for configuration of custom service backends.

This initial implementation focuses on providing the initial shared
server functionality, including:

- Handlers for web socket and SSE connections
- Authentication code generation + validation
- Client management
- Initial RPC routing with two sample RPCs (getClientName, setClientName)

Change-Id: I1458269a5de7edd97120103a2c5fc2d0348eff31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/478760
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2026-02-09 08:01:30 -08:00
Lasse R.H. Nielsen c549b92ecd Retire experiments released in SDK 3.10.0.
Change-Id: I550649155a2c659d943e491d0f41704c79e64500
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/457022
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2026-02-09 05:34:14 -08:00
Jonas Finnemann Jensen 17b578f0d0 Update OWNERS_ECOSYSTEM to reflect new team
Change-Id: I8dbf0d6c0ecbcca75b25a94750d1c5ba8e5d1507
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/478560
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Auto-Submit: Jonas Jensen <jonasfj@google.com>
2026-02-05 02:23:38 -08:00
Erik Ernst 2a475cfe9e Align the specification grammar with the specifications
Adjust Dart.g and Dart.g4 to align them with the augmentations feature
specification and the language specification. In particular, the
handling of the keyword AUGMENT is simplified, and `topLevelDefinition`
is renamed.

Change-Id: I99dc5c6e5e3135eae14f49587d60c530e303f0e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/476401
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Auto-Submit: Erik Ernst <eernst@google.com>
2026-01-29 02:54:31 -08:00
Alexander Markov f29628fe63 [vm] Move constants related to heap pages into Page
Moving these constants from global namespace to Page class prevents
possible conflicts with other kPageSize/kPageMask/kBlockSize constants
and allows us to export value of Page::kPageMask constant into runtime
offsets via runtime/vm/compiler/runtime_offsets_list.h.

TEST=ci

Change-Id: I4357f4644f0f5f7beba50184231fef55dd86b124
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/476147
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2026-01-28 13:49:00 -08:00
Ryan Macnak cff8dc5fd6 Roll Clang from f77ce52b56d0 to b153f17b8aeb.
Change-Id: Ie6b115b09c3376cd5b5720e17a99d2d66ffe1a3a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/476085
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-01-28 11:33:12 -08:00
Alexander Markov 24739822e4 Testing configuration for modular AOT compiler
Issue: https://github.com/dart-lang/sdk/issues/61635
Change-Id: I4c18cdb22b47ea805adb4295bc58d124954b0be7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/472980
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2026-01-16 07:24:51 -08:00
Alexander Aprelev 61c3fbc220 [vm/build/ubsan/win] Fix ubsan build on Windows
- copy sanitizer runtime when using ubsan;
- avoid use of winnt.h CONTAINING_RECORD since it triggers ubsan "member access within null-pointer of type" error, use our copy which uses `offsetof`;
- have default virtual destructor in `ValueObject` to avoid ubsan complains about "insufficient space for an object of type 'dart:ValueObject'" at NoTemporaryAllocator use/declaration site;
- have virtual destructor in ZoneAllocated to avoid ubsan complains about "not having enough space to allocate object" at new RegExpEmpty() instantiation site;
- avoid using crashpad with ubsan as it causes dartvm to exit with error code 3;
- switch to windows, mac-friendly `[[gnu::no_sanitize(check)]]` from `__GNUC__` and `__has_feature` checks.

TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/62267
Change-Id: I8b922a8da329af276d4cefaa88fb841cc0457124
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/469840
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2026-01-07 12:38:27 -08:00
Ivan Inozemtsev 5536cac9c4 [release] Increase version on main to 3.12
Change-Id: I278eb371cd7e8d776a71c1c6f6920b9d0f5598bc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/460043
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2026-01-07 00:02:21 -08:00
Jake Macdonald f65ff07719 generate vm tests concurrently to speed up gclient runhooks
This shaves 4-5 seconds off of gclient runhooks (11 -> 6). There is still a single generator which takes about 5 seconds to run on its own while all the others are sub-second, otherwise this would be much faster. We may want to investigate that one as a follow-up (runtime/tests/vm/dart/generated/many_double_literals_generator.dart).

Change-Id: I5246a69ed10782d89e53b0747cd4ae1764336902
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/470342
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2026-01-05 10:21:22 -08:00
Ryan Macnak cee7000c1a [test] Enable TSAN thread leak detection for most tests.
Disable for tests that use dart:io's exit.

Add missing thread joins to cc tests.

TEST=tsan
Bug: https://github.com/dart-lang/sdk/issues/41811
Change-Id: Id4e1a468a986c886fb5ae9e9677b4d8d0281cc79
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/468880
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-01-05 10:04:25 -08:00
Ryan Macnak 3fbd3ab070 [infra] Clean-up debugging temp file quarantine issue.
Change-Id: I8004c07ce0a60ac5134ac9c871cca2a9300b3583
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/467381
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-12-16 13:34:00 -08:00