Commit Graph

109300 Commits

Author SHA1 Message Date
Ryan Macnak bf6edc78c0 [build] Fix Windows ARM64.
There is no kernel service snapshot in the Windows ARM64 SDK.

Change-Id: I735524efb95b4951a9d668d096ba97e41c469426
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449603
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-09-15 17:10:42 -07:00
Sam Rawlins 03d0629a69 DAS plugins: provide a WorkspacePackage to RuleContext
Fixes https://github.com/dart-lang/sdk/issues/61489

Change-Id: I50dc5a0649ef9f77e37efb27430cbb3736814313
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449360
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-09-15 16:07:55 -07:00
FMorschel 0a47e565b0 [analyzer] Verifies we don't fail analysis on malformed analysis_options.yaml
Fixes: https://github.com/dart-lang/sdk/issues/56811
Change-Id: Iae92e6e3b7366f860d0c0cba7fec6314d85d099a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449561
Auto-Submit: Felipe Morschel <git@fmorschel.dev>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-09-15 15:58:36 -07:00
Tess Strickland a90f39098c [vm,dyn_modules] Add bytecode closures to the ClosureFunctionCache.
This allows Debugger::FindNextFit to locate source positions within
inner closures.

TEST=pkg/vm_service/test

Cq-Include-Trybots: luci.dart.try:vm-dyn-linux-debug-x64-try,vm-aot-dyn-linux-debug-x64-try,vm-aot-dyn-linux-product-x64-try,vm-dyn-mac-debug-arm64-try
Change-Id: I57cf3073e2013c1e395f3897fd73d1f3073922ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449541
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2025-09-15 15:31:33 -07:00
FMorschel 9bee01762d [analyzer] Fixes empty linter rules incompatible_lint false negative
Also fixes the message that contained extra quotes around the incompatible lint list even though the parameter itself was "quoted with and", so wrongly `''lint_pos' and 'lint_neg''` instead of `'lint_pos and lint_neg'`.

Fixes: https://github.com/dart-lang/sdk/issues/61500
Change-Id: I60b730aee84eb8d4f229e594aa582aaf00a9c3c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449560
Auto-Submit: Felipe Morschel <git@fmorschel.dev>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2025-09-15 15:30:03 -07:00
Alexander Aprelev 4c431039bb [vm/tags] Ensure current tag is set to default only if it was not previously set.
The isolate creation callback might have set up current tag, so we dont' want to override it.

Fixes https://github.com/dart-lang/sdk/issues/61505
TEST=flutter ci

Change-Id: I18e7f60a9c41e96c9754476db17ad97d3d668949
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449604
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2025-09-15 15:17:01 -07:00
Alexander Markov 0d75724ebc [vm,dyn_modules] Support compound pointers in FFI call arguments
TEST=ci (ffi/address_of_test)

Change-Id: If87231c5c9dabb49a904dedd0cc8ef034c16dfe3
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,vm-dyn-mac-debug-arm64-try,vm-ffi-dyn-mac-debug-simarm64_arm64-try,vm-ffi-dyn-mac-release-simarm64_arm64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449069
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2025-09-15 14:45:12 -07:00
Ryan Macnak dbab989a29 [build] And missing DFE input.
Change-Id: I126e115555430b6fe6928f2f32966e772b1fd9df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449584
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-09-15 13:45:42 -07:00
Sam Rawlins a9feb25e30 DAS plugins: Make the fix offset a range over the diagnostic
Fixes https://github.com/dart-lang/sdk/issues/61491

Change-Id: I2616006b7ac1ba645e4bed3caeb0781f04864feb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449362
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-09-15 13:26:39 -07:00
Konstantin Shcheglov 131ee3ed7a Element. Use LibraryElement.exportNamespace directly, do not copy.
Change-Id: Ic436b05ca8b154b1745bbd8c1025c11725ed5add
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449580
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2025-09-15 11:55:57 -07:00
Konstantin Shcheglov 6aff59a610 Fine. Add tracking for LibraryElementImpl.entryPoint
Change-Id: I5ef4ede6d936db14d5ada758bc94bd3109b70167
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449501
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2025-09-15 11:54:44 -07:00
Sam Rawlins b1944f9529 Improve mismatch exception, wrapping field names in quotes
When hitting a protocol error, I saw some errors that were confusing
for a moment because of the lack of quotes, for example:

> Invalid parameter 'params'. Expected to be files; found \"...

This CL doesn't actually improve the situation _much_, but it at least
puts quotes around `files`, to indicate it is a property or something
similar.

Change-Id: Ic12d063b427661025cd4418951c58abf3394df3f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449220
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-09-15 11:47:54 -07:00
Konstantin Shcheglov 6e779877ac Fine. Add tracking annotations for loadLibraryFunction and loadLibraryProvider.
Change-Id: I57104694025632a547010d9e3047e96d8f9bf00c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449500
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-09-15 11:46:40 -07:00
Konstantin Shcheglov a387b8b9b1 Fine. Tracking for LibraryElementImpl.featureSet and languageVersion.
Change-Id: If5d0e4e4060af91a3e5f315c98bf5c8ce17e0acc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449387
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2025-09-15 11:39:50 -07:00
Danny Tuppeny 6ac7afdeed [analysis_server] Fix missing selection in override completions
When completing an override, the `throw UnimplementedError()` code should be selected automatically. I think this regressed recently because it broke Dart-Code's integration tests (but apparently we didn't have a test for it here). This fixes the issue and adds a test.

Fixes https://github.com/Dart-Code/Dart-Code/issues/5652

Change-Id: I9576f2494249c70968566d13fdf95854f0285944
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/448180
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2025-09-15 11:38:36 -07:00
Ryan Macnak a9e1a9211a Roll reclient.
Change-Id: I3766316c4023e73a36813bb872a5f03c3d12af8f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449583
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2025-09-15 11:31:46 -07:00
DEPS Autoroller 0d9c124a85 Roll Fuchsia SDK from 29.20250830.2.1 to 29.20250912.7.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: I428b5215b74e6a1e07d04d41fa07160aa34903f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449441
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2025-09-15 11:30:32 -07:00
Konstantin Shcheglov c959e9178c Fine. Tracking for LibraryElementImpl.typeProvider and typeSystem.
Change-Id: I69a224990780a8a6ce244b7ffdd84092db64738e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449386
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-09-15 11:23:42 -07:00
Konstantin Shcheglov dd2a347f14 Fine. Avoid recording opaque API usages in a few places.
Change-Id: I14bf34c6c008d2aa05c78cd66400c69c7b1aae5f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449480
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-09-15 11:22:29 -07:00
Ben Konyi e39a98ec5c [ DDS ] Ensure existing DevTools server URIs are reported correctly
Due to variable shadowing and lazy initialization of the DevTools URI
within DDS, the DevTools URI reported by DDS did not include the `uri`
query parameter used to automatically establish connection to the
current DDS instance.

This change updates variable names to avoid shadowing and also fixes
issues where the DevTools URI would be reported even if DevTools was not
enabled in the DDS configuration.

Change-Id: I1ab0f5c58ee7e583e6eb4f4fb7381cddc29629b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/448480
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
2025-09-15 11:15:23 -07:00
Konstantin Shcheglov ca5c636acd Fine. Add tracking annotations for LibraryElementImpl.context and related.
Change-Id: Id903a6d832a4af86fc9fc4e4e3c6db90393ef8fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449385
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-09-15 11:14:24 -07:00
Konstantin Shcheglov b1321b88db Fine. Add a few tracking annotations for LibraryElementImpl, firstFragment, fragments.
Change-Id: I50378fad69b151204a432e4bf524100c764ce980
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449384
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-09-15 11:07:19 -07:00
Fedor Shcheglov e43e28a48c Update tests for Enum to work with augment.
Fix bugs that resulted in multiple `values` arrays being displayed for
an augmentation chain.

This is done by making `ListLiteralImpl.elements` mutable by setting
`isNodeListFinal: false` in the AST generator, and adding a
new`addElements` method.

Made sure Enum's `TypeParameterFragment`s were linked.

Rename `LibraryDirective.name2` to `name`.

Change-Id: If80668d011cec6df5e22bee37a310de980a4205f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449381
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-09-15 11:06:20 -07:00
Devon Carew 3d30d3bd6c [deps] rev tools, web
Revisions updated by `dart tools/rev_sdk_deps.dart`.

tools (https://github.com/dart-lang/tools/compare/319be98..4254267):
  4254267d  2025-09-11  Devon Carew  Update gemini config.yaml (dart-lang/tools#2162)
  6cb8f0f7  2025-09-11  Devon Carew  Update README.md (dart-lang/tools#2161)

web (https://github.com/dart-lang/web/compare/e2daa3a..25a0b5b):
  25a0b5b  2025-09-14  Nikechukwu  [interop] Add support for Conditional and Predicate Types (dart-lang/web#468)

Change-Id: I067ce2b7b48b2f57c145d49e2dad2dd2653ffb82
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449581
Auto-Submit: Devon Carew <devoncarew@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2025-09-15 10:47:38 -07:00
Danny Tuppeny 8aa63bb86f [dartdev] Fix expected EOLs in some tests to prevent Windows failures
Not sure why these tests seemed to have only recently started failing, because `print` is documented as using `\r\n` on Windows so it seems like these should have always failed.

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

Change-Id: Ib5018394186583ae37fc17b51ec5ce4d25617494
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/443300
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Auto-Submit: Danny Tuppeny <danny@tuppeny.com>
2025-09-15 10:24:41 -07:00
Alexander Aprelev 1b6700115d [vm/tags] Reset default/current tags as thread is released.
Fixes https://github.com/dart-lang/sdk/issues/61473
TEST=ci

Change-Id: I36606a38bf282ff1cae58d6c3184cc3212df29f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449070
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2025-09-15 10:24:03 -07:00
Ryan Macnak 285b11070f [vm, compiler] Reduce spilling needed to call __tsan_read/write for array access.
TEST=tsan
Bug: https://github.com/dart-lang/sdk/issues/61352
Change-Id: Ia3dc1a057f96e2c9e695a28824882a76e4893c69
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449143
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-09-15 10:16:37 -07:00
Konstantin Shcheglov 0e08c8e25f Fine. Tracking for 'LibraryElementImpl.exportedReferences' and 'isFromDeprecatedExport'.
Change-Id: I66c304832c2eb1a05402b2eb2630b7dca1a790c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449382
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-09-15 10:08:33 -07:00
Ryan Macnak 6f4a9bd481 [vm] Work around missing TSAN support for thread_suspend.
TEST=tsan
Bug: https://github.com/dart-lang/sdk/issues/61478
Change-Id: I700f36eb07c998993682f046d82bbc9d04847f9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449074
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-09-15 10:00:44 -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
DEPS Autoroller afb6af2be9 Roll Fuchsia GN SDK from VxtQCjai433XU3lkk... to NAEC5tfgSl8g94nwp...
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/fuchsia-gn-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 GN 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: I067448f5646f1b1c1cee2a03e055eb349b03d8a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449520
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2025-09-15 09:41:52 -07:00
Konstantin Shcheglov aea81bd2a6 Fine. Fix re-re-export TODO in LibraryManifestBuilder.
Change-Id: I37437ca9a652a5deb946403e2806ddffe7b5d47d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449369
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2025-09-15 09:23:30 -07:00
Konstantin Shcheglov b43a5014cb Elements. Remove LibraryElement.topLevelElements and units.
Change-Id: Idf7375b646f26d89cdc82620aa3ab4274aac1351
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449368
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2025-09-15 08:50:13 -07:00
Konstantin Shcheglov ce9aae4469 Fine. Flags for TypeAliasItem.
Change-Id: Ife13f8c266e55d3a149ac511ad753affd3a59344
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449366
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-09-15 08:43:19 -07:00
Konstantin Shcheglov df983da1c2 Fine. Record default values of formal parameters.
Fine-grained manifests now capture more information about function and
constructor parameters so the analyzer can detect semantically relevant
changes.

What’s changed
- Record the default value of optional named and positional parameters as
  a `ManifestNode`, and include it in matching/serialization logic.
- Track whether a parameter is an initializing formal (`this`) or a super
  formal (`super`) and persist these flags in manifests.
- Add a `never_` entry to `ManifestAstElementKind` and collect
  `NeverElementImpl` so const initializers that reference `Never` are
  represented correctly.
- Enhance result printing to display `this`/`super` markers, default
  values, and decode `Never` in element indices.
- Bump `AnalysisDriver.DATA_VERSION` to 552 to invalidate stale caches.

Why Previously, default parameter values and formal origin
(`this`/`super`) were not part of the manifest. Changing them could
leave linked data unchanged, producing stale analysis results. By
encoding these details (and handling `Never`), we ensure manifest
matching reflects the true API surface and triggers re-linking when
defaults or formal kinds change.

Change-Id: Icae8281f923879574fdc6143fd2c9d6018f4d48f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449363
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2025-09-15 08:28:25 -07:00
Tess Strickland 827551f8e0 [vm,dyn_modules] Fix ActivationFrame::ContextLevel for bytecode frames.
Instead of using the computed LocalVarDescriptors when the
frame is interpreted, use the LocalVariableInfo in the serialized
bytecode to find which Scope is currently active.

Add printing of local variable information to the bytecode
disassembler.

TEST=pkg/vm_service/test

Change-Id: I7bd15056e4e2a947ad16ffb83a50447c2ba59994
Cq-Include-Trybots: luci.dart.try:vm-dyn-linux-debug-x64-try,vm-aot-dyn-linux-debug-x64-try,vm-aot-dyn-linux-product-x64-try,vm-dyn-mac-debug-arm64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449340
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2025-09-15 08:14:47 -07:00
Paul Berry 0a8129447a [messages] Remove hacks that allowed for non-existent file.
Removes the following hacks:

- The `allowNonExistent` parameter from `_loadCfeStyleMessages`.

- The `!file.existsSync()` check from `messages_suite.dart`.

These were temporary hacks to allow code generation (and presubmits,
respectively) to succeed during the transition period before
`pkg/_fe_analyzer_shared/messages.yaml` was introduced.

Now that `pkg/_fe_analyzer_shared/messages.yaml` is present, the hacks
are no longer needed.

Change-Id: I6a6a69642565a8278a94b61912308bfdcbd04d50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/448661
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2025-09-15 07:37:07 -07:00
Paul Berry e188a3152c [messages] Remove move_shared_diagnostics.dart.
This was a single-use script. Now that it's been run, it is no longer
needed.

Change-Id: I6a6a69640c3301a16b487073b2d5f3b60943c8a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/448662
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2025-09-15 07:35:10 -07:00
Paul Berry 6d6a629592 [messages] Move shared diagnostics to pkg/_fe_analyzer_shared.
Moves all the diagnostics that are shared between the analyzer and the
CFE from `pkg/front_end/messages.yaml` to
`pkg/_fe_analyzer_shared/messages.yaml`.

This CL was generated by the following steps:

- Run the `move_shared_diagnostics.dart` script introduced in
  https://dart-review.googlesource.com/c/sdk/+/448606.

- Manually modify `pkg/front_end/messages.status` to reflect the
  diagnostics that have been moved.

Change-Id: I6a6a6964d618089f8fe8d447b4344800bad5d532
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/448660
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2025-09-15 07:21:42 -07:00
Paul Berry 44207f801b [messages] Make a script to move shared diagnostics.
Adds a new file, `move_shared_diagnostics.dart`, which moves entries
from `pkg/front_end/messages.yaml` to a new
`pkg/_fe_analyzer_shared/messages.yaml` files.

Only messages that are actually shared (those with an `index` parameter) are
moved.

This script is in its own CL for easier code review. In a follow-up CL
I will run the script, which will produce several thousand lines of
diffs.

Change-Id: I6a6a6964793135f54e7e2921643e7b8e4451e801
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/448606
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2025-09-15 06:20:22 -07:00
Paul Berry b32ef34b9a [messages] Prepare to add shared messages.yaml file.
Updates the code in `pkg/analyzer_utilities/lib/messages.dart` to
attempt to read CFE messages from both
`pkg/_fe_analyzer_shared/messages.yaml` and
`pkg/front_end/messages.yaml`, and updates clients accordingly.

Also updates the `messages_suite.dart` test and the presubmit rules to
ensure that the contents of `pkg/_fe_analyzer_shared/messages.yaml`
will be appropriately tested.

Since the file `pkg/_fe_analyzer_shared/messages.yaml` doesn't exist
yet, temporaryhacks have been added to pretend the file is empty if it
can't be found.

In a follow-up CL, I will move messages that are shared between the
analyzer and the CFE to `pkg/_fe_analyzer_shared/messages.yaml`.

Change-Id: I6a6a6964c1c02f20df9ae8e34f23e734bbe88c22
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/448605
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2025-09-15 06:17:03 -07:00
Tess Strickland 2871699e89 [vm,dyn_modules] Fix stepping over when debugging the interpreter.
Since any instruction is a possible pause point when single stepping in
the interpreter, the debugger may pause too early when stepping over an
expression; for example, if the value returned from an expression is
ignored, stepping over the expression should also step over the
following Drop1 instruction (which will have the same source location),
but currently does not.

To avoid this, set last_stepping_fp_ and last_stepping_pos_ when
stepping over either a sync or async expression so that the debugger
won't pause until a new source position is reached.

TEST=pkg/vm_service/test

Cq-Include-Trybots: luci.dart.try:vm-dyn-linux-debug-x64-try,vm-dyn-mac-debug-arm64-try
Change-Id: I0934f6bda3fc075a225a85b66eccf46b94cb4020
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449420
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2025-09-15 04:29:39 -07:00
Sergey G. Grekhov 68516556da [co19] Roll co19 to 27e053860f3539cd750786a327ebb69637ffc054
2025-09-12 sgrekhov22@gmail.com Fixes dart-lang/co19#3310. Expect strict mode for DDC in toJSCaptureThis_A01_t09.dart (dart-lang/co19#3311)
2025-09-11 sgrekhov22@gmail.com dart-lang/co19#3180. Add more tests for `toJSCaptureThis` (dart-lang/co19#3308)
2025-09-09 sgrekhov22@gmail.com dart-lang/co19#3180. Add tests for `callAsFunction` (dart-lang/co19#3306)
2025-09-05 sgrekhov22@gmail.com dart-lang/co19#3180. Add tests for `FutureOfVoidToJSPromise` (dart-lang/co19#3303)

Cq-Include-Trybots: luci.dart.try:analyzer-linux-release-try,dart2js-minified-linux-d8-try
Change-Id: Ic170ba35520fef3d00d6092eeb906d2ca44c9f0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449261
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2025-09-15 01:54:12 -07:00
なつき b426c03838 [vm] Update dartvm usage text
Closes https://github.com/dart-lang/sdk/pull/61482

GitOrigin-RevId: a14e1c028a3ee1d1e7e675df071e537bc4e19297
Change-Id: I98dbae218495e04695c815da67b825d078b8e37c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449073
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2025-09-15 01:41:38 -07:00
Johnni Winther 03c4a24745 [cfe] Remove InferenceHelper
This removes the InferenceHelper interface which was implemented by the BodyBuilder and moves functions to the CheckHelper extension.

This is a step towards separating BodyBuilder from inference.

Change-Id: I98f441c5cfb510e39618d2023d724be6bb26ca87
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449320
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2025-09-15 00:51:15 -07:00
Jens Johansen a1e4696ab3 [analyzer plugin] Dependency overrides can be relative
The "plugins" can specify "dependency_overrides", e.g. with a path to
make it work in the sdk.
Currently (before this CL) a relative path is just copied verbatim
though (into something like $HOME/.dartServer/.plugin_manager/...) and
thus doesn't work.
This CL parses it the same way as the plugin are otherwise parsed and
makes the path absolute (again like the plugins are otherwise done).

Change-Id: Ia3e450126ef5bfa3bd0a8b1b31aded954252da46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449281
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2025-09-14 23:56:42 -07:00
Stephen Adams cf01e0743c [dart2js] Choose between while- and for- loops
Change-Id: I6b564775e42649a974b72331528e02803a41616e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/447880
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2025-09-14 18:30:04 -07:00
FMorschel 5e7cebe7f1 [analyzer] Fixes incompatible_lint diagnostics for package includes
Fixes: https://github.com/dart-lang/sdk/issues/61497
Change-Id: I55cb128f4e671750f46151c9469871082eb0a755
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449370
Auto-Submit: Felipe Morschel <git@fmorschel.dev>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-09-14 17:54:21 -07:00
Kairat 46eae16f41 Update future.dart
Closes https://github.com/dart-lang/sdk/pull/61498

GitOrigin-RevId: 21aa5840b32a4d331a84b91d3741aba16d9e61f3
Change-Id: If1d3f6eefd2619eb7a9e13b00ff041011924c4b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449371
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2025-09-13 08:15:53 -07:00
Nicholas Shahan 9ed1efe74a [ddc] Use typed ArgResults helper methods
Change-Id: I906c3cc5d9b80b5d6818cf0af779cc2de56d4db7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449364
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2025-09-12 16:30:39 -07:00