Commit Graph

110933 Commits

Author SHA1 Message Date
Ryan Macnak 894a5fa7d5 [vm, mac] Disable TSAN during profiler sample collection.
The suspended thread might hold a TSAN-internal lock to a location that will be read by the sampling thread, which would cause a dead lock.

TEST=tsan
Bug: https://github.com/dart-lang/sdk/issues/62332
Change-Id: I0ac6a05c25067749b52ed83b14f80ab1850013a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/471321
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2026-01-07 12:47:21 -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
Ryan Macnak d0cad8a098 [vm] Allocate guard regions around the compressed heap.
TEST=ci
Change-Id: Ifd053d426df5a5b777da63d2bb76a53530a7f8e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/461221
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-01-07 11:47:14 -08:00
Paul Berry ecc83311e1 [messages] Convert expected type arguments errors to literate diagnostic API.
Converts the analyzer's logic for reporting the following errors to
use the new literate diagnostic reporting API:

- expectedOneListTypeArguments
- expectedOneSetTypeArguments
- expectedTwoMapTypeArguments

Change-Id: I6a6a6964a1a020eee27d0636ddb39c7f71619fc3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/471302
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2026-01-07 11:44:10 -08:00
Konstantin Shcheglov ef20543995 Prepare to publish analyzer 10.0.0, _fe_analyzer_shared 93.0.0, analysis_server_plugin 0.3.5, analyzer_plugin 0.14.0, analyzer_testing 0.1.8
Change-Id: I22aaf17a81027ac44d5f23b114ece789d66eed93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/471120
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2026-01-07 11:25:23 -08:00
Paul Berry 9d5618a26b [messages] Rework invalid override diagnostic reporting.
Changes the diagnostic reporting logic for the following diagnostic
codes to use the analyzer's literate diagnostic reporting API:

- invalidImplementationOverride
- invalidImplementationOverrideSetter
- invalidOverride
- invalidOverrideSetter

Change-Id: I6a6a696433e729c1122995d9ac2a183c7cdbfa04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/471300
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2026-01-07 10:49:59 -08:00
Daco Harkes 6efd914b36 [dartdev] Delete and create dylibs instead of truncate - test
Roll in regression test https://github.com/dart-lang/native/pull/2933
to test https://dart-review.googlesource.com/c/sdk/+/471240.

Closes: https://github.com/dart-lang/native/issues/2921

Change-Id: Id3aab286f2aeb4654c69cbc34ee0d15f29013565
Cq-Include-Trybots: luci.dart.try:pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-win-release-try,pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-mac-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/471262
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Michael Goderbauer <goderbauer@google.com>
2026-01-07 10:29:56 -08:00
FMorschel ac0be94edd [analyzer] Adds lineNumberDifference and onSameLine methods to LineInfo
Bug: https://github.com/dart-lang/sdk/issues/61186
Change-Id: Ib0584203b000103f8137901c258a86ec571ff74c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/471061
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Auto-Submit: Felipe Morschel <git@fmorschel.dev>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2026-01-07 10:15:29 -08:00
Brian Wilkerson c4ed22e204 Update the member sorter to handle primary constructor bodies
With these changes, primary constructor bodies will sort with
constructors (based on whether `sort_members_first` is enabled), but
will always be before other constructors.

Change-Id: If6719dedd5178c384712a5d08b4e74a38aaf54a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/471280
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2026-01-07 09:29:04 -08:00
Konstantin Shcheglov 3c219ecc8b PrNP. Fixes for UnusedLocalElementsVerifier.
Report only declaring formal parameters.

Fix for the target length.

Change-Id: I858ee9e409a7312401a36e306ce89181c93e876f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/471029
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-01-07 09:22:40 -08:00
Daco Harkes 6f6edbc032 [deps] Roll dart-lang/native
Change-Id: Ic362e6eb7cdb25bf719bc52f3dd9e90c5c6a0663
Cq-Include-Trybots: luci.dart.try:pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-win-release-try,pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-mac-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/471260
Reviewed-by: Michael Goderbauer <goderbauer@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2026-01-07 09:21:02 -08:00
Alexander Markov d95e527aab [dyn_modules] Improve support for extendable mixins with private members
When mixin is applied, its instance members are cloned and copies
of the members would override original members.

This change fixes bugs and improved usability of extendable mixins with
private members:

- All instance members of extendable mixins and mixin classes are
  marked as can-be-overridden to allow overriding by cloned members
  when mixin is applied.

- TFA no longer takes privacy into account, as private members of
  mixins can be overridden by their clones in other libraries.

- Dynamic module validator always unwraps cloned members to originals
  before verifying if overriding is allowed. This eliminates overriding
  errors between clone(s) and original members of mixins.

TEST=pkg/dynamic_modules/test/data/mixin_private_member1,
     pkg/dynamic_modules/test/data/mixin_private_member2

Fixes b/470461203
Fixes b/469094721

Change-Id: If369c42c58e5ea4d707be83b1e7078ee9a8cc3ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/470803
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2026-01-07 08:26:38 -08:00
Sam Rawlins c193f19b69 analyze: Simplify ContextBuilderImpl
* `_getAnalysisOptions` did not use it's first parameter, so remove it.
* `_getAnalysisOptions` is only ever passed a non-nullable
  `optionsFile`, so make it non-nullable.
* `DriverBasedAnalysisContext.allAnalysisOptions` are
  AnalysisOptionsImpl objects, so leave them alone and prevent later
  casting.

Change-Id: Ida490f6a9eeba16c14727e48a306ea336a7ce8a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/470500
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2026-01-07 08:21:43 -08:00
Daco Harkes 3e020921c6 [dartdev] Delete and create dylibs instead of truncate
TEST=Tested locally. Will add a test case upstream in dart-lang/native
     and roll that in.

Bug: https://github.com/dart-lang/native/issues/2921
Change-Id: I8010131cc70afe5bcee30edf076f18efe0c9a8c4
Cq-Include-Trybots: luci.dart.try:pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-win-release-try,pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-mac-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/471240
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2026-01-07 03:52:21 -08:00
Slava Egorov 7b5bd07e87 [vm/io] Fix pausing read on SecureSocket
Pausing read on the SecureSocket should pause read on the underlying
socket, because otherwise we will be stuck calling _readHandler
which will not read anything but still schedule an SSL filter
wasting CPU time.

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

CoreLibraryReviewExempt: No API changes, VM specific implementation change
Change-Id: I4144815d34c1e77a68533b6ebcb66c146a6a6964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/467804
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2026-01-07 03:41:35 -08:00
Ömer Ağacan c552af0a9e [dart2wasm] Minor refactoring and comments in variable declaration compiler
Refactoring:

- Update the checks when updating a local for a captured variable to
  check whether `local` is null, instead of whether it's not updated.

  If the `local` is available then we know that it's not updated. It's
  more direct to check whether we've created a local for the variable or
  not.

- Add an assertion checking the the capture field and local for a
  variable can only differ in nullability.

Documentation:

- Document that context field for a captured local will always be
  nullable, to be able to allocate the context without dummy values.

- Document in a few places that `!capture.written` means the variable is
  captured but not updated, so they can be held in a local (instead of
  getting them from the context on every read).

Change-Id: I66048cb36f75e35ee3c479c41f2bbfca247a990f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/470981
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2026-01-07 03:38:06 -08:00
Ömer Ağacan 4b2f4cc809 [dart2wasm] Minor refactoring in dummy value code
- Remove redundant `prepareDummyValue` call in
  `getGlobalForStaticField`.

- With the previous change, `prepareDummyValue` can be made private.
  Make it private and rename it to `parepareDummyValueGlobal` to make it
  clear that it creates a global.

- Make `prepareDummyValueGlobal` return early when the type doesn't need
  a dummy value global. With the early return the function body is
  de-indented one level.

- Document `DummyValueCollector.dummyStructGlobal`.

Change-Id: I6dd93ca5fb25898c1b05dda03573905e76450923
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/471220
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2026-01-07 03:23:38 -08:00
Slava Egorov 9e18e03ba8 [vm/build] Update WINVER to match NTDDI_VERSION
We bumped NTDDI_VERSION to Windows 10 but have not updated WINVER in 
the same way making them diverge for no good reason.

FWIW NTDDI_VERSION should probably be set by winver config, but I am 
not going to fix that now.

Change-Id: I53cdf1cde40aa50911aa1311ca15705d6a6a6964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/471181
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2026-01-07 03:12:28 -08:00
Jens Johansen 7be40e97f9 [CFE] Fix leak introduced with "Add support for allowing imports of unsupported libraries"
https://dart-review.googlesource.com/c/sdk/+/469240 (originally landed
as https://dart-review.googlesource.com/c/sdk/+/465760) introduced a
leak by saving assessors on dill libraries. Note that we _do_ save
assessors on source libraries, but as these are converted to dill
libraries (via the incremental compiler, i.e. in the setting where the
leak happens) this is fine, but saving them on dill libraries means that
these will retain access to old/invalidated/recompiled libraries and
thus leak. The weekly bot has been red since the run on 2025-12-21.

This CL fixes the issue by reporting the wanted errors when processing
the import instead of later and can thus stop saving the data that
causes the leak. It also moves when it's done so the error is issued for
outline compiles too.

Change-Id: I88385ef193edfe45cd56b5e42a442c0e2bda7608
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/471200
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2026-01-07 02:45:15 -08:00
Daco Harkes 42249a3713 [dartdev] dart compile report which packages have hooks
Closes: https://github.com/dart-lang/sdk/issues/62320

Change-Id: I45d51abf0d50725f57cabe7e0b662ceaad88edc0
Cq-Include-Trybots: luci.dart.try:pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-win-release-try,pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-mac-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/471180
Reviewed-by: Michael Goderbauer <goderbauer@google.com>
Commit-Queue: Michael Goderbauer <goderbauer@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2026-01-07 01:23:35 -08:00
Johnni Winther 80e58d2d75 [cfe][PrimaryConstructors] Refactor building of initializers
This refactors building of initializers to be fully contained within the [_InitializerBuilder].

This prepares for handling primary constructor body declarations which require a change to how building of constructor initializers are triggered. Currently it is assumed the initializers can be processed with the constructor declaration has been parsed, but with primary constructor body declarations, such processing needs to be postponed. Streamlining the logic for processing the initializers makes it easier to accommodate this.

Change-Id: Ic12e208bce5d1ed9b3800335466afcaf391c1b9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/471000
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2026-01-07 00:50:33 -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
Nate Biggs 600f8a9601 [dart2wasm] Use default value sentinel when member body unreachable
This issue was partially fixed by:
https://dart-review.googlesource.com/c/sdk/+/428541

However, this only looked at the case of a member in an abstract class
that itself was made abstract if it was unused. TFA does not make the
member abstract if the enclosing class is not abstract:
pkg/vm/lib/transformations/type_flow/transformer.dart#L2289

Instead we can use the unreachable metadata to identify these
unreachable body members (that have default values cleared):
pkg/vm/lib/transformations/type_flow/transformer.dart#L736

Attached test fails prior to this fix.

Bug: https://github.com/dart-lang/sdk/issues/62273
Change-Id: I1ccb818ec41bbe805ee828be0b96ba23e73beae4
Tested: Introduced unit test.
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/469280
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2026-01-06 21:24:51 -08:00
Nate Bosch f4ad484867 Bump test to f95c0f5c10fa9af35014117cb00ec17d2a117265
Changes:
```
> git log --format="%C(auto) %h %s" c15153b..f95c0f5
 https://dart.googlesource.com/test.git/+/f95c0f5c Allow empty test source when parsing metadata (2583)
 https://dart.googlesource.com/test.git/+/c970e003 Remove the dependency on pubspec_parse (2580)
 https://dart.googlesource.com/test.git/+/6f795181 Bump the github-actions group with 5 updates (2582)
 https://dart.googlesource.com/test.git/+/da25976b Improve canUseSpecialChars on Linux and Mac (2545)
 https://dart.googlesource.com/test.git/+/b951efc0 Support --version in pub workspace (2538)
 https://dart.googlesource.com/test.git/+/75061472 Hide skip reasons in compact and failure reporters (2578)
 https://dart.googlesource.com/test.git/+/462b474b [coverage] Support workspaces in coverage filters (2574)
 https://dart.googlesource.com/test.git/+/30aa5410 Require a definition named `main` in test suites (2569)

```

Diff: https://dart.googlesource.com/test.git/+/c15153b9618afc4c5e8a43bac43339de130c2149..f95c0f5c10fa9af35014117cb00ec17d2a117265/
Change-Id: Idfc8a1fa076338987f2532a73175e5dfcaa81e7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/471026
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2026-01-06 18:26:30 -08:00
Konstantin Shcheglov 8be9f9fa3b PrNP. Use element model to report diag.privateNamedNonFieldParameter
Change-Id: If7790d834ad1d6ae15f03112bab516bff249e79c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/470943
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2026-01-06 14:55:55 -08:00
Paul Berry 76e703c68d [messages] Convert URI related messages to use literate API.
Converts the analyzer logic that reports the following messages to use
the literate diagnostic reporting API:
- duplicatePart
- invalidUri
- partOfDifferentLibrary
- partOfNonPart
- partOfUnnamedLibrary
- uriDoesNotExist
- uriHasNotBeenGenerated
- uriDoesNotExistInDocImport

Change-Id: I6a6a6964a121855a4a0407b829195f6c60d049fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/471024
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2026-01-06 14:48:15 -08:00
Paul Berry eff289f424 [messages] Convert duplicate definition messages to use literate API.
Changes the analyzer logic that reports the following messages to use
the literate diagnostic reporting API:
- duplicateDefinition
- duplicateFieldFormalParameter
- duplicateFieldName
- duplicateVariablePattern
- prefixCollidesWithTopLevelMember
- privateNamedParameterDuplicatePublicName

Also, makes the parameter lists for all these messages uniform: every
one of these messages now accepts a single String parameter named
`name`.

Change-Id: I6a6a696426d6176eb3ff2401e3b4d68bed823323
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/471023
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2026-01-06 14:47:51 -08:00
Jake Macdonald 1a0371034b Additional fixes for scenario replays
- Skip notifications from analyzer
- Hard code responses to certain startup logs if they are unexpected
- Use cli_util to show loading spinner and get sdk location
- Update normalize to substitute the sdk location
- Make id field optional on message (notifications don't have ids)

Change-Id: Ia5276eef554a3afefeae227fa7351f902d21131e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/471060
Auto-Submit: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2026-01-06 13:34:56 -08:00
Kevin Moore ad6fb28849 pkg:perf_witness update SDK constraint so it works with Flutter @ master
Change-Id: I91793402bdd4114822c5eff1d251bb2744721f05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/468982
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2026-01-06 13:10:38 -08:00
Paul Berry e24ab2a67d [messages] Convert creation_with_non_type messages to use literate diagnostic API.
Adds type parameter names to the diagnostic messages
`constWithNonType` and `newWithNonType` (both of which are reported to
the user as `creation_with_non_type`), and adjusts the code that
reports these diagnostic messages to use the new literate diagnostic
reporting API.

Change-Id: I6a6a696470bbc684950e65ccb0e5a780e79ea463
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/471021
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2026-01-06 11:52:04 -08:00
Konstantin Shcheglov 60f870baae PrNP. Move reporting errors to analyzer/ and front_end/.
This simplifies reporting logic by avoiding "already reported by the
parser" case. Also, in a follow up CL I plan to support declaring formal
parameters, which do not look as `this._foo` syntax. Supporting this in
the parser would require duplicating more complex logic of building
elements in the analyzer.

Another way to think about it, is that from parser point of view the
code is fine - we did not skip or add any tokens. We can parse and
format this code. But the semantics is not quite right, so it makes
sense to put it in a different place.

Change-Id: I783ed6780e6d66e276c5ed44f08e6ac04145cd1f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/470920
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-01-06 11:30:01 -08:00
Paul Berry 658b656941 [messages] Clean up constWithUndefinedConstructor diagnostic.
This diagnostic is reported in two circumstances:

- During resolution of a dot shorthand like `const .foo()`, when the
  implicitly-referred to class doesn't have a constructor with the
  given name.

- During resolution of a const constructor invocation like `const
  int.foo()`, when the explicitly-referred to class (`int` in this
  example) doesn't have a constructor with the given name.

In both cases, the diagnostic message includes the names of both the
class and the constructor that was sought. But in the first case, the
class name was accidentally derived from the type inference context
rather than the dot shorthand context; these are different in the case
where the dot shorthand appears on the RHS of `==`. Fixed by supplying
the correct context type.

This bug was discovered in the process of converting the analyzer to
use the new literate error reporting mechanism: I needed to assign a
type to the diagnostic message parameter that was to contain the class
name and discovered that I couldn't give a consistent type, because it
was sometimes being filled in with a class name string, and it was
sometimes being filled in with a type. With the fix, it is always
filled in with a class name string.

I also included tests of the other dot shorthand related diagnostics
that mention the class name (they don't exhibit the same bug), as well
as a typo fix for `wrongNumberOfTypeArgumentsDotShorthandConstructor`
(which had mismatched quote symbols).

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

Change-Id: I6a6a696421b68397b86aac9b1a6e91cce08250ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/470942
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2026-01-06 11:14:50 -08:00
Paul Berry f4dfbbe4a4 [messages] Convert more diagnostics to literate diagnostic reporting API.
The only changes in this CL that were manually written are those in
`messages.yaml`. The others were produced by running the standard
diagnostic message code generator and then running the script
`use_literate_api_in_analyzer.dart`.

Change-Id: I6a6a69645bab7cf8f26ec9524a7bc2294e4a3b3a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/471020
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-01-06 10:16:24 -08:00
Ryan Macnak b6881e8b5a [vm] Allocate aligned memory directly on Windows.
TEST=ci
Change-Id: I033327c7dffb197e7cc3c4014a3bdd4d9d5ff719
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/470821
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2026-01-06 09:51:51 -08:00
Sam Rawlins f81eee2ac4 analyzer: More CHANGELOG notes
Change-Id: If696fd117f5ec1b45a43c89df3b256dc2fad213f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/470806
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2026-01-06 09:25:47 -08:00
Elliott Brooks ab534be572 Update DevTools rev to b9d7fc1a4119b3d214a77939f9d75b0c0b25d36a
Change-Id: Icef505171cf867baf6fa9dd9b57694f8d67f407c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/470805
Commit-Queue: Elliott Brooks <elliottbrooks@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2026-01-06 09:22:03 -08:00
Konstantin Shcheglov a8f85d3d86 DeCo. Support for private named declaring formal parameters.
Bug: https://github.com/dart-lang/sdk/issues/61701
Change-Id: I5e1c142fe70bd7a17c9a87f5636e638209ce36e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/470841
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-01-06 09:15:41 -08:00
Alexander Markov a242cf768a Arm64 assembler
Issue: https://github.com/dart-lang/sdk/issues/61635
Change-Id: I3ce3c19e60b72ce879103936e0e33abe8729d9cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/468440
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2026-01-06 06:39:17 -08:00
Alexander Markov c985ba8e14 [vm,dyn_modules] Mark classes mentioned in supertypes as implicitly callable
When creating an instance of a class or calling a factory constructor,
dynamic module may pass a vector of instantator type arguments which
includes types mentioned in supertypes along with types specified
at the call site.

So, for every exposed generative constructor and factory all the types
mentioned in the supertypes of their declaring classes should be
annotated as implicitly callable in order to prevent their tree-shaking.

TEST=pkg/dynamic_modules/test/data/super_type_param
Fixes b/470446652

Change-Id: I6abe570261a8f23f8022cb77110c3a5ec40ccbe8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/470781
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2026-01-06 06:16:41 -08:00
Paul Berry 33d7b34d6e [messages] Convert uses of atElement2 in error_verifier.dart.
Changes the uses of `DiagnosticReporter.atElement2` in
`inheritance_override.dart` to use the new literate diagnostic
reporting mechanism.

Change-Id: I6a6a6964b4585d173bbdf2918b3ec1c9e27503fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/470804
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-01-06 05:54:31 -08:00
Paul Berry 8f3a678dce [messages] Convert more uses of atElement2.
Changes the uses of `DiagnosticReporter.atElement2` in
`evaluation.dart`, `base_or_final_type_verifier.dart`, and
`getter_setter_types_verifier.dart` to use the new literate diagnostic
reporting mechanism.

Change-Id: I6a6a6964cff8afd9867c2606f3aea334f135cf03
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/470820
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2026-01-06 05:54:20 -08:00
David Morgan 6d36ae2591 Bump tools to 87270e60a5c92f127acb29d6e0dbc2d920c3f669
Changes:
```
> git log --format="%C(auto) %h %s" 781e069..87270e6
 https://dart.googlesource.com/tools.git/+/87270e60 Ignore directory modify events on Mac. (2296)
 https://dart.googlesource.com/tools.git/+/436275d6 Fix watching when path has a trailing slash. (2294)

```

Diff: https://dart.googlesource.com/tools.git/+/781e069d8bd9306b065f19e09e2cedac7cc5405c..87270e60a5c92f127acb29d6e0dbc2d920c3f669/
Change-Id: Id944ef22c3d8ba382733927a4034599c64b3aa4f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/470980
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Morgan :) <davidmorgan@google.com>
2026-01-06 04:50:16 -08:00
Johnni Winther 77073f7992 [cfe][InternalNodes] Add Argument nodes
This adds the sealed class Argument with subclasses PositionalArgument and NamedArgument to the internal AST and uses these through out compilation. This cleans up a lot of the handling of arguments during inference.

Change-Id: If604895ee578d45874d4760e5ead2426b19b96ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/469621
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2026-01-06 02:30:12 -08:00
Johnni Winther 0a154753c6 [parser][InternalNodes] Add handlePositionalArgument and handlePositionalRecordField
This [handlePositionalArgument] and [handlePositionalRecordField] methods to the parser listener, allowing listeners to normals arguments and record fields

Change-Id: I3947e196dafffea2ab383f797904c857db8327ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/469620
Reviewed-by: Jens Johansen <jensj@google.com>
2026-01-06 02:30:12 -08:00
Ömer Ağacan 9da59f310a [dart2wasm] Minor refactoring in ClassInfo
- Remove unused `masquerade` member.
- Make `upperBound` private.
- Fix spelling of `Dart` and `Wasm` in comments.

Also use `ClassInfo.typeWithNullability` in one more place in
`translator.dart`.

Change-Id: I08ef9a0599c9c3ecbe2b8d9e4a1d63124695813b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/470662
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2026-01-06 01:41:47 -08:00
Sam Rawlins 92bebe661b DAS plugins: Begin storing analytics data
This data is collected on shutdown, the same as the legacy analytics data.

This is implementation for some of the analytics we want to collect,
specified at go/dart-analyzer-plugin-analytics.

* How many plugins are enabled for each context?
* How many lint rules are registered for each plugin?
* How many warning rules are registered for each plugin?
* How many fixes are registered for each plugin?
* How many assists are registered for each plugin?

Change-Id: I36c176737c194550e1947985576ed461fd8a1bf3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/452482
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2026-01-05 21:28:18 -08:00
Ryan Macnak 0e9676ea1f [vm, compiler] Some shorter load immediate sequences for RISC-V.
TEST=ci
Change-Id: I34e72727b5560da88916f996f92b33ddc1ff6dff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/468980
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-01-05 16:31:30 -08:00
Ryan Macnak 3ebbaf08fb [vm] Use C++20 bit manipulation implementations.
TEST=ci
Change-Id: I0aee472e2074ff4f03f05df573aff7616418c72c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/468904
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-01-05 15:14:59 -08:00
DEPS Autoroller c22b021a5d Roll Fuchsia SDK from 30.20251226.7.1 to 30.20260102.4.1
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/fuchsia-sdk-dart-sdk
Please CC fuchsia-3p-engprod@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Fuchsia SDK: https://bugs.fuchsia.dev/p/fuchsia/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:vm-fuchsia-release-x64-try;luci.dart.try:vm-fuchsia-release-arm64-try
Change-Id: I962a21b08d04375d1217f9afe178adfff3853af6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/470360
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-01-05 14:19:29 -08:00
Paul Berry e2018b8f51 [messages] Clean up diagnosticRange using firstFragmentLocation.
The advantage of using `firstFragmentLocation` rather than
`firstFragment` is that `firstFragmentLocation` doesn't disable
fine-grained dependencies.

Change-Id: I6a6a696482ffef9fabc2688a14ea417b592c65fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/470801
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2026-01-05 14:12:42 -08:00