Commit Graph

109885 Commits

Author SHA1 Message Date
Konstantin Shcheglov ff30536788 Prepare to publish analyzer 9.0.0, _fe_analyzer_shared 92.0.0, analysis_server_plugin 0.3.4, analyzer_plugin 0.13.11, analyzer_testing 0.1.6
Change-Id: Id5681e1cd01493d65e733c7d2fc7ece78d7193cf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/457162
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2025-10-23 13:48:19 -07:00
Paul Berry 0ff12d3741 [analyzer] Fix handling of annotated vars/fields in api.txt.
Changes the tool that generates `api.txt` files for the analyzer (and
related packages) so that when examining a synthetic element, it looks
for annotations on the corresponding non-synthetic element.

This fixes detection of `@deprecated` and `@experimental` on getters
and setters induced by top level variables and fields.

Addresses
https://dart-review.googlesource.com/c/sdk/+/455820/comment/f2a39140_563a86de/.

Change-Id: I6a6a6964c06905fc94b27a48a150cb2430afad99
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456320
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2025-10-23 12:25:50 -07:00
Keerti Parthasarathy a46b4bb4c6 Collect analytics on type of workpace and number of packages for contexts.
Change-Id: I2274536383f92f21912bd39dc5a6796dd2177fd5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456800
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-10-23 12:21:55 -07:00
Danny Tuppeny 6482495f01 [dds/dap] Don't handle isolate startup until isolate is in PauseStart state
While investigating the flaky test at https://github.com/dart-lang/sdk/issues/60187#issuecomment-3431336127 I found that we had two paths into `handleThreadStartup` - one which explicitly sent a "pause-on-entry" event, and one that did not. The method sets a flag so it only ever runs once.

This means depending on which instance of `handleThreadStartup` occurs, the client may or may not get the pause-on-entry event.

The case where it would is where the isolate already had a pause-start event when we found it. The case where it would not, is if the isolate did not have a pause event (for example it was None because the isolate was just being created).

I can't come up with a good explanation for why we would try to pre-emptively run startup for an isolate we just discovered with no pauseEvent, so I have removed this branch on the assumption that we would always then see a `PauseStart` event for the isolate and then handled it through the same code path (and therefore, always sent the `pause-on-entry` event prior to calling readyToResume).

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

Change-Id: I213e9865480942b074d4d8470703377ea7ddb519
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/457040
Reviewed-by: Helin Shiah <helinx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2025-10-23 11:21:58 -07:00
Stephen Adams 456efb510d Make wasm/uri_base_test run on browsers
Change-Id: I6bc542bc6b2f68e7043d4c840da26dda30faad2d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456141
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2025-10-23 11:21:40 -07:00
Konstantin Shcheglov b45cdff83a CQ. Remove more deprecated non-APIs.
Change-Id: I546a30eaa6b18f68349d9941ffc36d8a5368592d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456861
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-10-23 11:04:21 -07:00
Sam Rawlins 53d7d855b2 DAS: Tidy the main integration benchmark script
* Use lowerCamelCase for constant names
* Use cascades to allow instantiating and returning an ArgParser
  without a self-executing closure.
* Use new args APIs: `option`, `flag`, `multiOption`.

Change-Id: I84eb3a1653ef78631911704b41ff0a1e8b979a48
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/455860
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-10-23 11:03:50 -07:00
Danny Tuppeny a83bd56355 [dds/dap] Enable verbose logging for debug_exceptions_test
I saw an odd failure while reviewing the test results for flakes and seeing the VM Service traffic will help track down what happened.

Change-Id: I530e3ec6ee8a2c9ed5f08d6891f1c4dbf65211e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/457021
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Helin Shiah <helinx@google.com>
Commit-Queue: Helin Shiah <helinx@google.com>
2025-10-23 09:30:19 -07:00
Alexander Markov 6094ba367a [dart2wasm] Fix --dump-kernel-after-cfe and --dump-kernel-before-tfa flags
These debugging flags were not doing anything as 'writeFile' was never
passed to '_runCfePhase' and '_runTfaPhase'.

Change-Id: Ia8861a003a26b232e57c2d0c1b1e224275c8d9c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/457080
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
2025-10-23 09:25:31 -07:00
FMorschel bbc2fa4598 [DAS] Fixes occurrences for error and stacktrace in try catch
Fixes: https://github.com/dart-lang/sdk/issues/61769
Change-Id: Icd7cc87bb9789f6ec697653be1b76e1cf52b52a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456360
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Felipe Morschel <git@fmorschel.dev>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2025-10-23 08:48:46 -07:00
Tess Strickland 00922a0c11 [vm,dyn_modules] Fix adding breakpoints on variable assignment.
Instead of only adding source information if the initializer is null or
one of a few possibilities, instead add a source position if emitting a
store and the variable is not synthesized.  This matches an earlier
change which added source information when setting the value of a
non-synthesized variable.

Remove _variableSetNeedsDebugCheck and also remove the only other use of
it as a guard for emitting source positions (static field sets).

TEST=pkg/vm_service/test/breakpoint_on_record_assignment_test

Cq-Include-Trybots: luci.dart.try:vm-dyn-linux-debug-x64-try,vm-dyn-mac-debug-arm64-try
Change-Id: I02b3e118f36714f1e6e29bf9cced7dcd5da8e532
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456980
Auto-Submit: Tess Strickland <sstrickl@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2025-10-23 06:59:30 -07:00
Tess Strickland 3a85708697 [vm,dyn_modules] Fix adding breakpoints on conditions in bytecode.
TEST=pkg/vm_service/test/breakpoint_on_simple_conditions_test

Cq-Include-Trybots: luci.dart.try:vm-dyn-linux-debug-x64-try,vm-dyn-mac-debug-arm64-try
Change-Id: Id8872f3a1ad5d418392effacf56dfc46fb2b5976
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456941
Auto-Submit: Tess Strickland <sstrickl@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2025-10-23 06:56:55 -07:00
Slava Egorov b24698b9b5 Revert "[vm] Add NativeRuntime.streamTimelineTo"
This reverts commit 553887bc56.

Reason for revert: Broken android builds

Original change's description:
> [vm] Add NativeRuntime.streamTimelineTo
>
> This API allows to programmatically generate timeline information 
> including profiling samples if timeline format supports it.
>
> This change also includes Perfetto timeline writer and profiler 
> into non-mobile PRODUCT builds. The size of Mac OS X dartaotruntime
> has increased by 34352 bytes (0.7%).
>
> TEST=vm/dart/stream_timeline_to_test
>
> CoreLibraryReviewExempt: VM specific dart:developer API.
> Change-Id: I326f5fd29ee82a503160f5f5a2a857a7c55330ec
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/426220
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Slava Egorov <vegorov@google.com>

No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I583ad74b850514fb47054149da464a07874fc2f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/457000
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2025-10-23 04:58:29 -07:00
Vyacheslav Egorov 553887bc56 [vm] Add NativeRuntime.streamTimelineTo
This API allows to programmatically generate timeline information 
including profiling samples if timeline format supports it.

This change also includes Perfetto timeline writer and profiler 
into non-mobile PRODUCT builds. The size of Mac OS X dartaotruntime
has increased by 34352 bytes (0.7%).

TEST=vm/dart/stream_timeline_to_test

CoreLibraryReviewExempt: VM specific dart:developer API.
Change-Id: I326f5fd29ee82a503160f5f5a2a857a7c55330ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/426220
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2025-10-23 04:47:13 -07:00
Tess Strickland 3685c2add5 [vm,dyn_modules] Add source positions when setting non-synthesized vars.
In particular, this ensures that the bytecode that initializes pattern
variables has appropriate source information, as those variables have
hoisted definitions with the initialization later happening via a set.

TEST=pkg/vm_service/test/step_through_patterns_test

Cq-Include-Trybots: luci.dart.try:vm-dyn-linux-debug-x64-try,vm-dyn-mac-debug-arm64-try
Change-Id: I9622f88d7205c1efcfa3ca2e761d1b4eb5b5d2b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456660
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2025-10-23 04:14:49 -07:00
Tess Strickland bfb0815b07 [vm,dyn_modules] Fix source position for null-initialized variables.
Only use the file offset of the assignment operator if the variable has
an initializer, otherwise fall back onto the file offset of the
variable declaration.

TEST=pkg/vm_service/test/issue_25465_test
     pkg/vm_service/test/step_through_assign_call_test
     pkg/vm_service/test/step_through_assign_int_test

Cq-Include-Trybots: luci.dart.try:vm-dyn-linux-debug-x64-try,vm-dyn-mac-debug-arm64-try
Change-Id: I76284041d941254a10e050a4bebffdec619f2e05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456600
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2025-10-23 04:14:49 -07:00
Martin Kustermann 92f500b7b7 [dart2wasm] Make IR test framework more flexible, add deferred loading baseline test
Changes to IR printing implementation:

* Emit omitted `<...>` marker to make difference between function
  without body and function with omitted body clear.
* Extend omtting capability to globals, types and tables
* Extend filtering capability to globals, types, tables
* Better table names: Try to use import or export names if available.
* Option to print globals & types always multiline
* Option to scrub absolute file uris (which aren't stable across machines)

Changes to IR binary / text:

* Extend binary parsing of element section to support imported tables
* Add printing of those (which shows how imported tables are patched)

(The patching of importing tables is used in deferred modules)

Changes to IR test framework:

* Allow more filters (see above) in the test files.
* Allow tests to use helper libraries (containing `.h.` in their name)
  without them being considered tests themselves.
* Allow using deferred loading in tests and write expectation files for
  main & deferred modules as wat files.

Other things:

* Share more code between `pkg/dart2wasm/bin/wasm2dart.dart` and
  `pkg/dart2wasm/test/ir_test.dart`
* Add baseline test for deferred loading using tear off constants

Change-Id: Ica6666f23f5aa6fb2174f414c9082039940f8dc5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456460
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
2025-10-23 01:11:22 -07:00
Martin Kustermann 3cb8ec842a [dart2wasm] Assign field names to closure & vtable struct types
This makes it much easier to read code that accesses those fields.

Change-Id: Ibbebf5c85e9e127adf6487704671f2973d61bda0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456641
Reviewed-by: Ömer Ağacan <omersa@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2025-10-23 00:58:18 -07:00
Jens Johansen 820a1ec5a5 [analysis server] Don't allocate on each compare when sorting in semanticTokens/full
Upon a `textDocument/semanticTokens/full` request the analysis server
sorts the "tokens" via `sort` on List giving it a compare method.
The method, though, created a map literal for each comparison.
This CL "inlines" the map (it only had one entry anyway) and adds a
benchmark, where I note these changes:

```
1000:
Difference at 95.0% confidence
        -0.0274151 +/- 0.0135978
        -33.1981% +/- 16.4662%
        (Student's t, pooled s = 0.0181832)

2000:
Difference at 95.0% confidence
        -0.027344 +/- 0.0096196
        -20.9529% +/- 7.3712%
        (Student's t, pooled s = 0.0128635)

4000:
Difference at 95.0% confidence
        -0.108847 +/- 0.0196627
        -35.3172% +/- 6.37987%
        (Student's t, pooled s = 0.0262932)

8000:
Difference at 95.0% confidence
        -0.20647 +/- 0.0272577
        -34.4932% +/- 4.55371%
        (Student's t, pooled s = 0.0364494)

16000:
Difference at 95.0% confidence
        -0.384931 +/- 0.0401393
        -31.4809% +/- 3.28272%
        (Student's t, pooled s = 0.0536748)
```
Change-Id: Ibacce056cd3f154afc9377805bbccfd8c5ca9ea9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456341
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2025-10-22 23:42:19 -07:00
Chloe Stefantsova 06e54c8c24 [cfe] Make VariableDeclaration an abstract interface
The concrete implementation is named `VariableStatement`. The change
is needed as a transition step to the new encoding for variables in
Kernel.

Part of https://github.com/dart-lang/sdk/issues/61572

Change-Id: Ib333f28e9998f2e758a18e4ad4b0a3cf4d642013
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456620
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2025-10-22 23:11:39 -07:00
Nicholas Shahan 1c0c66f680 [ddc] Remove lib/ directories from source maps
Given the existing assumptions that original source files will be
served in a directory structure similar to layout defined by the
package_config.json but without `lib/` directories this change
attempts to detect when a source map contains sources from multiple
lib directories and clean them up from the relative paths.

The strategy used relies on passing a package_config.json as a signal
to detect when sources come from different packages.

Fixes: https://github.com/dart-lang/webdev/issues/1692
Issue: https://github.com/dart-lang/sdk/issues/40251

Change-Id: I6b82b33bae485d74fc61ef118dbe9ffddafab9a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456500
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2025-10-22 17:04:33 -07:00
Sam Rawlins a2e9153029 DAS: Tidy map literals and constant names in protocol.dart
We rename constant names to use lowerCamelCase, and append
"AttributeName" in most cases, as most constants refer to a (as it is
documented) "JSON attribute."

Additionally the `toJson` methods can be simplified by returning
Map literals, instead of setting key/value pairs in individual
statements.

Change-Id: I5f0adabfa3c4d274407ae8a5b5684dce22f9b5fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/455880
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-10-22 14:32:11 -07:00
DEPS Autoroller 445955e01a Roll Clang from 8b93f27cf7e6 to 62adc83c918b
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/clang-dart-sdk
Please CC dart-engprod@google.com,dart-vm-gardener@grotations.appspotmail.com,dart-vm-team@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Clang: https://bugs.fuchsia.dev/p/fuchsia/issues/list?q=component%3AToolchain
To file a bug in Dart SDK: https://github.com/dart-lang/sdk/issues

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

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

Cq-Include-Trybots: luci.dart.try:dart-sdk-linux-try;luci.dart.try:dart-sdk-linux-arm64-try;luci.dart.try:dart-sdk-mac-try;luci.dart.try:dart-sdk-mac-arm64-try;luci.dart.try:dart-sdk-win-try
Change-Id: I9d1e4c5b567c0fe50dcbf8016f91fed824f0a9db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456440
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2025-10-22 14:18:54 -07:00
DEPS Autoroller bd2c1fb9e9 Roll BoringSSL from 2067eac9e253 to db1a84561672 (2 revisions)
https://boringssl.googlesource.com/boringssl.git/+log/2067eac9e253..db1a84561672

2025-10-15 chlily@google.com Add a PRESUBMIT.py script to check pregenerated files
2025-10-13 davidben@google.com Fix a bug when BN_mod_sqrt is called on very annoying primes

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/boringssl-dart-sdk
Please CC dart-engprod@google.com,dart-vm-gardener@grotations.appspotmail.com,dart-vm-team@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in BoringSSL: https://crbug.com/boringssl/new
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

Tbr: dart-vm-gardener@grotations.appspotmail.com
Change-Id: I6452a47adcd3f8ed632469515059835de72026bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/455463
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2025-10-22 14:14:57 -07:00
Sam Rawlins 2c1debf5c7 DAS plugins: fix broken link in writing_rules.md
Change-Id: Ic63fbc3b4c8ae9c1bff866ed32d0cd02eec55bfb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456721
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-10-22 14:10:58 -07:00
Alexander Markov d16ce70617 [vm] Improve inline 'is' tests against Function and Record
Testing for kClosureCid/kRecordCid is exhaustive in those cases,
so we do not need a subsequent STC type test.

Follow-up to https://dart-review.googlesource.com/c/sdk/+/456406.

TEST=ci

Change-Id: I7cb4487408b3b181f1f5384966340cc4c9a9a86f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456720
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2025-10-22 14:10:49 -07:00
Sam Rawlins 0e456eb9c1 analyzer: deprecated_member_use_from_same_package: handle super-constructors
This is the sibling CL to https://dart-review.googlesource.com/c/sdk/+/455040. In that CL, I made changes to
BestPracticesVerifier, which handles `deprecated_member_use`, but
neglected to handle this lint rule.

When a generative, non-redirecting constructor does not feature a
super-initiailizer, then the supertype's unnamed constructor is called
implicitly. If that super-constructor is deprecated, then we should
report any implicit call as usage.

Change-Id: I990e7f53da5f5ba98612193941e9607f1d3cbca4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456180
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-10-22 14:06:53 -07:00
Konstantin Shcheglov cba0ec6ec5 Fine. Handle duplicate top-level declarations in manifests.
Introduce first-class support for duplicate or cross-kind top-level name
conflicts in the fine-grained analyzer pipeline.

- Add `declaredConflicts` to `LibraryManifest` to record names that are
  declared more than once (e.g., two classes) or across kinds (e.g., a
  class and a top-level function). Conflicts are assigned a generated
  `ManifestItemId` that is exported and used consistently.
- Ensure conflict handling covers related lookup names (e.g., getter/
  setter pairs `foo` and `foo=`), removing them from per-kind declared
  maps and placing a single entry in `declaredConflicts`.
- Update manifest building to detect conflicts deterministically:
  - Stage variables, then getters/setters, then non-property members.
  - Track `conflictingTopLevelElements` to skip invalid incremental
    updates.
- Include `declaredConflicts` in serialization/deserialization and in
  `exportMap` / `exportedIds`. Make `getDeclaredId` prefer conflicts.
- In `manifest_context`, resolve top-level IDs via `declaredConflicts`
  before per-kind maps for stable identity.
- In requirements computation, skip conflicted names when producing
  instances/interfaces, preventing inconsistent shapes and crashes.
- Make exported extensions resolution null-safe when duplicates exist.
- Extend result printing to display `declaredConflicts`.
- Bump `DATA_VERSION` to 580.

Why: Previously the analyzer assumed unique top-level names, which led
to crashes and inconsistent IDs when a library contained duplicates
(e.g., duplicate extension types, multiple classes named the same, or a
class/function collision). Representing conflicts explicitly yields
stable IDs, predictable exports, and reliable incremental linking and
diagnostics.

Bug: https://github.com/dart-lang/sdk/issues/61741
Change-Id: If153ce467f45156ee3918b5211b8e5e7b7f164ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456485
Reviewed-by: Paul Berry <paulberry@google.com>
2025-10-22 12:42:47 -07:00
Sam Rawlins d8700b6735 analyzer_plugin: Add missing CHANGELOG entries
Change-Id: I7b47baf483e727db84b6177c2f2bea364dcf2fa1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456761
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2025-10-22 11:50:14 -07:00
FMorschel b15fb0ee61 [DAS] Fixes FunctionType.call completion
Bug: https://github.com/dart-lang/sdk/issues/61319
Change-Id: Id757b79f46bacb071ccf60f08080c621229313e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/451544
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Auto-Submit: Felipe Morschel <git@fmorschel.dev>
2025-10-22 11:09:39 -07:00
Ryan Macnak 4fe0461368 [test] Further weaken many_interfaces_flat_test to avoid timeouts.
Change-Id: Iec6987c816b07b4402b82579af32265e49054be1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456484
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2025-10-22 09:36:20 -07:00
Alexander Markov 2626836f36 [aot,dyn_modules] Fix inlined 'is' tests for classes which can be extended in dynamic modules
Bug: b/453914353
Change-Id: I5739913010b9331f6e060150680a0051ed580a2d
TEST=pkg/dynamic_modules/test/data/extend_class3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456406
Reviewed-by: Tess Strickland <sstrickl@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2025-10-22 08:51:48 -07:00
Kallen Tu 9dc6c6219f [tests] Declaring constructors - Follow up for CL 456164
Unfortunately, I misclicked the submit button, forgetting that I didn't
have my changes uploaded.
These were the changes to Erik's comments in
https://dart-review.googlesource.com/c/sdk/+/456164.

Bug: https://github.com/dart-lang/sdk/issues/61687
Change-Id: I407728ae7aa00d569a6537ed21a7c345384bea7e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456481
Reviewed-by: Erik Ernst <eernst@google.com>
2025-10-22 08:38:02 -07:00
Alexander Markov 849998846b [dyn_modules] Remove ability to specify library wildcards in dynamic_interface.yaml files
In future this would allow us to automatically include libraries
specified in dynamic_interface.yaml into the compilation set as if
they were imported from Dart code.

Bug: b/452833638
TEST=ci

CoreLibraryReviewExempt: no API changes, only pragmas
Change-Id: If5705159148cd48f49f21485550747db1365767c
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/+/456401
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2025-10-22 07:48:30 -07:00
Johnni Winther 02c3d9c3f0 [parser] Support declaring parameters
This allows `var int a` in primary constructors when the declaring constructors feature is enabled.

Part of https://github.com/dart-lang/sdk/issues/61699

Change-Id: I486ad8aa3ddbe09451455b024b3aa9cfbaa9a5e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456340
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2025-10-22 01:46:47 -07:00
Ryan Macnak a4a5bc4fc9 [vm] Fix TSAN crashes due to TSAN's own overflow.
TEST=vm/cc/DartAPI_StackOverflow
Change-Id: If5456f4f0a194332b38901f9bd677f3cd9af561c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456421
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2025-10-21 15:57:35 -07:00
Greg Spencer b2fa3313c5 Bump dart-lang/ai rev
Closes https://github.com/dart-lang/sdk/pull/61776

GitOrigin-RevId: d5147d897ac8856a6e3da3f10f1490ef41dae16f
Change-Id: I3336c3e19e8e5689726c523b2fb10c28e6be5925
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456480
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Greg Spencer <gspencer@google.com>
2025-10-21 15:55:18 -07:00
Kallen Tu 12e318df0e [tests] Declaring constructors - Tests for initializers, const, and more basic syntax.
This CL tests the following:
- A declaring body constructor can have a body and an initializer list
as well as initializing formals and super parameters, just like other
constructors in the body.
- A declaring header constructor can have a body and an initializer
list. These elements are placed in the class body in a declaration that provides "the rest" of the constructor declaration which is given in the header.
- Declaring constructors with optional parameters can have default values, but they must be constant.
- Declaring constructors can have initializing formals.
- Declaring constructors can have super parameters.
- Declaring constructors can have named parameters, required or not.
- Declaring constructors can be constant.
- Declaring constructors can have assertions.
- Declaring constructors can have optional parameters. These optional parameters can have default values (which must be constant).

Bug: https://github.com/dart-lang/sdk/issues/61687
Change-Id: Id1c53a99a7c7748ac92ca8c4a411f762eea21a37
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456164
Reviewed-by: Erik Ernst <eernst@google.com>
2025-10-21 15:29:33 -07:00
Ryan Macnak 18db50f66a [build] Get source positions in sanitizer backtraces for Mac.
Change-Id: Ied8dc6900fd5e3a37f2a301b8a9e2e2360270fc0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456407
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2025-10-21 14:51:54 -07:00
Konstantin Shcheglov 6c5631ed88 Fine. Enable in analyzer_cli/.
Not for performance, because it is one shot, but all language/ and co19/
code will go through manifests builder, and give us better coverage.

Change-Id: Iae83ec685084847358d960deff81d18fb9904f4f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456404
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2025-10-21 14:38:58 -07:00
Ryan Macnak 8b260b7cc9 [test_runner] Better name ELF and Mach-O files directly produced by gen_snapshot.
Change-Id: I2afac0207c40daccf9eb236a278cd1fb39c42876
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456422
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2025-10-21 13:01:59 -07:00
Konstantin Shcheglov 5b1be80bf9 CQ. Fix for not-implemented exception in ExitDetector for NullAwareElement.
Saw a crash in logs:

StateError: Bad state: Missing a visit method for a node of type NullAwareElementImpl
at ExitDetector.visitNode	(exit_detector.dart:457)
at GeneralizingAstVisitor.visitCatchClause	(visitor.g.dart:89)
at GeneralizingAstVisitor.visitExpression	(visitor.g.dart:216)
at NullAwareElementImpl.accept	(ast.dart:17535)
at _extension#1.terminatesControl	(use_build_context_synchronously.dart:1377)
at AsyncStateVisitor._visitIfLike	(use_build_context_synchronously.dart:857)
at AsyncStateVisitor.visitIfStatement	(use_build_context_synchronously.dart:426)
at IfElementImpl.accept	(ast.dart:12479)
at AsyncStateVisitor._asynchronousIfAnyIsAsync.<fn>	(use_build_context_synchronously.dart:682)
Change-Id: Idf79a71b33411eba63b2a01b22d1f18b89fbeac4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456111
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-10-21 11:58:55 -07:00
Ryan Macnak fca41fa22f [vm, compiler] Refactor IA32 leaf runtime calls to be more like the other architectures.
TEST=ci
Change-Id: I2e5902649df3a09c83240ecda26d0f514755e56d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456101
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-10-21 10:22:01 -07:00
Danny Tuppeny 3d601ce7d6 [dds/dap] Extract error messages from ErrorRefs for Watch window evaluation
A recent change somewhere caused some Dart-Code tests to fail. The expression "DateTime.now().ye" used to fail to compile and resulted in a failed RCP call to the VM service ("Expression compilation error") but now it returns a valid result that is a `vm.ErrorRef`.

This applies the same regex to the error message in this path to extract the most useful part of the error text when in the "watch" context so that the visible part of the message is not just "Unhandled exception".

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

Change-Id: I2933f9d811ec28446f4d2a857c1fd5bd18c94816
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456241
Reviewed-by: Helin Shiah <helinx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2025-10-21 10:10:46 -07:00
Danny Tuppeny 23ca6f8183 [deps] rev tools, webdev
Revisions updated by `dart tools/rev_sdk_deps.dart`.

tools (https://github.com/dart-lang/tools/compare/d0941a3..ce12670):
  ce126700  Mon Oct 20 21:50:45 2025 +0100  Danny Tuppeny  Fix @failingTest not working correctly for out-of-band exceptions (dart-lang/tools#2216)
  8bb94d88  Mon Oct 20 16:14:33 2025 +0200  Sebastian Stallenberger  [oauth2] Add isClosed and exception handling for closed state to oaut… (dart-lang/tools#2089)

webdev (https://github.com/dart-lang/webdev/compare/82b3855..b9c39c0):
  b9c39c00  Mon Oct 20 15:52:13 2025 -0400  Ben Konyi  [ DWDS ] Refactor `AppInspector` to support both Chrome and Web Socket connections (dart-lang/webdev#2700)

Change-Id: I1e989df7dbfcbc99afe7dfcd0920a8fb0be5e4db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456260
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Danny Tuppeny <danny@tuppeny.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2025-10-21 09:37:37 -07:00
Ryan Macnak 16dac1c61d Roll Clang from 9d7449a82b83 to 8b93f27cf7e6
TEST=build
Change-Id: I4c7ad19d9b5d9a7f329516296c1cd01dd64053b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456160
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Brian Quinlan <bquinlan@google.com>
2025-10-21 09:22:50 -07:00
Ryan Macnak 90cb9e4c31 [dartfuzz] Fix flag fuzzer after dart2wasm change that requires output have the wasm extension.
Change-Id: I9e89e6e91b5b279e5310e3fd3f51f5e3b6c6c1b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456108
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2025-10-21 08:00:00 -07:00
Konstantin Shcheglov a6601163ae CQ. Fix NPE in OverrideVerifier, when missing name.
Saw a crash in logs:

_TypeError: Null check operator used on a null value
at OverrideVerifier._isOverride	(override_verifier.dart:91)
at OverrideVerifier.visitFieldDeclaration	(override_verifier.dart:43)
at FieldDeclarationImpl.accept	(ast.dart:8995)
at NodeListImpl.accept	(ast.dart:17222)
at ClassDeclarationImpl.visitChildren	(ast.dart:3207)
at RecursiveAstVisitor.visitClassDeclaration	(visitor.g.dart:833)
at OverrideVerifier.visitClassDeclaration	(override_verifier.dart:26)
Change-Id: Ia61c0659b299795b1054840377ed066373cfe1ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456110
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2025-10-21 07:34:33 -07:00
Konstantin Shcheglov 49f524debc CQ. Fix for NPE in RequiredParametersVerifier.
Saw a crash in logs:

_TypeError: Null check operator used on a null value at
RequiredParametersVerifier._check
(required_parameters_verifier.dart:147) at
RequiredParametersVerifier.visitInstanceCreationExpression
(required_parameters_verifier.dart:83) at
ErrorVerifier.visitInstanceCreationExpression (error_verifier.dart:1153)
at InstanceCreationExpressionImpl.accept (ast.dart:13711) at
NamedExpressionImpl.visitChildren (ast.dart:16661) at
RecursiveAstVisitor.visitNamedExpression (visitor.g.dart:1345)

Change-Id: Ia78df6ee7179f511d869ebb4706da5cda6a0ea29
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456109
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2025-10-21 07:20:21 -07:00
Konstantin Shcheglov d9f2f8085d Fine. Check for class type alias from external library, skip.
Track in requirements declared and inherited constructors separately.

Change-Id: Ibd0d4561effd89e522b95dcc601e2354a43b9a8d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456107
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2025-10-21 07:19:01 -07:00