Commit Graph

105538 Commits

Author SHA1 Message Date
Ryan Macnak d9503428fa [vm, reload] Restore assertion that the reload context is gone before shutdown.
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/32796
Change-Id: Idae5f2240af6069bf5bb4f1bb5868b2f39cead3d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408202
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2025-02-10 14:36:31 -08:00
pq 4d1b785239 [productivity] add “current file” launch configs
Bug: https://github.com/dart-lang/sdk/issues/60070
Change-Id: I003a492e6004d2dcaf6c2c52688c733d7f43e53c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408900
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-02-10 14:31:52 -08:00
Konstantin Shcheglov 3672b4e5ac Elements. Migrate NamedTypeResolver.
Change-Id: I310115b805f97bfdb384cb14b2bf9ab7ef0c898f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408920
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-02-10 12:58:04 -08:00
Jake Macdonald e6df5493c9 support renamed parameters when adding super calls
Bug: https://github.com/dart-lang/sdk/issues/59745
Change-Id: I177e4f748954ddfea1b300085800c8c9a87bed3f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408840
Auto-Submit: Jake Macdonald <jakemac@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-02-10 12:48:10 -08:00
Devon Carew ddfd4604dc Bump protobuf to d00f905450c562493d918884e02048b7aacc00a3
Changes:
```
> git log --format="%C(auto) %h %s" b7dd58c..d00f905
 https://dart.googlesource.com/protobuf.git/+/d00f905 Fix slow handling of protobuf comments (955)
 https://dart.googlesource.com/protobuf.git/+/12f0f4a Fix formatting of benchmarks/lib/readfile.dart (956)
 https://dart.googlesource.com/protobuf.git/+/da083a3 Fix Wasm benchmarks (954)
 https://dart.googlesource.com/protobuf.git/+/06accdd Bump SDK dependency to 3.3.0, replace removed `dart:typed_data` type in test code (953)

```

Diff: https://dart.googlesource.com/protobuf.git/+/b7dd58cdbd879beee4c3fbf8ee80fce8e97bad26..d00f905450c562493d918884e02048b7aacc00a3/
Change-Id: Id627d405a531822fcecb602f455b142db55395c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408862
Auto-Submit: Devon Carew <devoncarew@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
2025-02-10 12:28:12 -08:00
Matthew Nitschke 64e60fedac Fixed 'order' node typo in split_constraints documentation
Closes https://github.com/dart-lang/sdk/pull/60091

GitOrigin-RevId: 3e4a62f56820c02997ea78cfb95ef5b632cc12af
Change-Id: Ie5b0adfdf4bc05435e0d5f07dc6ae36b1d413f76
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408881
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2025-02-10 12:04:07 -08:00
DEPS Autoroller 5aab9adb21 Roll BoringSSL from 6b1c6f324d49 to 0147d7f28324 (1 revision)
https://boringssl.googlesource.com/boringssl.git/+log/6b1c6f324d49..0147d7f28324

2025-02-08 felobato@google.com HPKE DHKEM-P256 BoringSSL Rust

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: I55b09084d3efe7c8b30f80d09b4c40fb3d0cdbe9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408583
Commit-Queue: Derek Xu <derekx@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
2025-02-10 11:00:49 -08:00
Devon Carew e4be14bc28 [deps] rev core, http, test
Revisions updated by `dart tools/rev_sdk_deps.dart`.

core (https://github.com/dart-lang/core/compare/2458e1a..a896913):
  a8969137  2025-02-06  Devon Carew  normalize the workflow files (dart-lang/core#857)

http (https://github.com/dart-lang/http/compare/c7cc4f8..b7cdf61):
  b7cdf61  2025-02-07  Vladislav  Fix Default Encoding for application/json Content-Type in HTTP Responses (dart-lang/http#1422)
  aadf836  2025-02-05  Brian Quinlan  Use the same Java/Kotlin versions as the flutter android template (dart-lang/http#1708)
  2e1a9a6  2025-02-05  Brian Quinlan  Upgrade to `jni`/`jnigen` 0.14.0 (dart-lang/http#1707)

test (https://github.com/dart-lang/test/compare/2ccfc5c..17609bf):
  17609bf9  2025-02-07  Kevin Moore  [test] allow the latest version of pkg:shelf_web_socket (dart-lang/test#2457)
  73d629d2  2025-02-06  Kevin Moore  Enable and fix unnecessary_ignore lint (dart-lang/test#2456)

Change-Id: Ie9f773289e94f04caeab10fb4902f78443292705
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408861
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
2025-02-10 10:40:50 -08:00
Danny Tuppeny 3ded147e2e [analysis_server] Make format of LSP completion tests more consistent
No functional changes here, only formatting/code style:

- Remove additional intending from embedded code in some tests (which didn't match others in this file or the style of other tests in the server)
- Change expression-bodied-tests to block bodies where they're not on a single line

Change-Id: I2c15bbcf7b7accff85f34a4e9ad5afa3e0a0a221
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408820
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2025-02-10 10:27:40 -08:00
Konstantin Shcheglov a0bc103d64 Elements. Migrate TypePropertyResolver.
Change-Id: Id7d76e4318c429fe8aab2661fa33e618e501200e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408720
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-02-10 09:47:44 -08:00
Ryan Macnak 2a08770912 [vm] If waiting for an active mutator slot for too long, steal a slot from a thread at a native safepoint.
The thread whose slot was stolen will take the slow path attempting to exit its safepoint and wait to reacquire an active mutator slot.

TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/54687
Change-Id: I49c4c12b38d38d7afa4df6b346c2a464f75ef6e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/406404
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2025-02-10 09:38:42 -08:00
Johnni Winther a78235cf01 [cfe] Create constructors through fragments
Change-Id: If2a7095c09dcf2d73d326b6ba6d796acfa882c55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408780
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2025-02-10 07:09:07 -08:00
Martin Kustermann 3b750c5545 [dart2wasm] Generate *.support.js feature detection files
The file will contain a JS expression that evaluates to a boolean.
If it (at runtime) evalutes to

  * `true` it means that all required features are supported by the JS
    environment and the dart2wasm-compiled app can be used

  * `false` it means some features were not present in the JS
    environment and the dart2wasm-compiled app shouldn't be used,
    instead a dart2js fallback may be used

We introduce this mechanism to allow users, at compilation time, to tell
dart2wasm to take advantage of new spec features and allow the runtime
to self-detect whether they are available and fallback to dart2js if
not.

The first feature we introduce (already in this PR) is
`--require-js-string-builtin` that will tell dart2wasm it can assume the
`js-string` builtin is available (and emit corresponding `*.support.js`
code to detect it).

If the flag was passed, we take advantage of the `js-string` import
mechanism for string constants that doesn't require emitting them in the
mjs file (which significantly reduces code size and improves startup
time - compared with emitting JS strings in the mjs file).

We enable `--require-js-string-builtin` on one CI configuration for
testing that if we don't use any polyfill, the imports of the builtin
functions as well as magical utf8-encoded wasm imports work.

We also use a template mechanism to generate `*.mjs` as the code
becomes more readable (e.g. to conditionally include the js string
polyfill)

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

Change-Id: Ic7e7818a2d5269095935022941352beeb9fed731
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408781
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2025-02-10 06:17:49 -08:00
Keerti Parthasarathy 0246cc613f [Completion] Show enum constants when completion is in the declaration.
Fixes https://github.com/dart-lang/sdk/issues/56971

Change-Id: Ib33a58e774f5540c426f5d5ffb7a387414dcf9f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408600
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2025-02-09 22:41:31 -08:00
Sam Rawlins 093ab49d6f DAS: Correct several broken comment references
Change-Id: Id0e80d5566a5c05296a5941746888a48284c4ae0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/407861
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-02-09 08:40:07 -08:00
Sam Rawlins 03c0855f9d DAS: Tidy snippet_producer.dart
While fixing the doc comments for DartSnippetProducer.addImports, I
saw that it references two methods only found in the subclass,
FlutterSnippetProducer ("Adds public imports for any elements fetched
by [getClass] and [getMixin]").

It turns out that the `addImports` method and the `requiredElementImports` are only needed in the subclass,
FlutterSnippetProducer, so I just moved them over. Now the doc
comment references resolve correctly.


Change-Id: Id90e8257b4096308b8cd3ce19b14708ca1b5e365
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/407960
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-02-09 08:30:03 -08:00
Kevin Moore 143dc05381 [pkg:js] Clarify and improve discontinue message
Add library-level docs duplicating the discontinue message

Related to https://github.com/dart-lang/sdk/issues/59716

Change-Id: Ib414a56c4412db0d9701c3d11f75354295775f9b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408642
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
2025-02-08 18:34:27 -08:00
Paul Berry 274f5639f7 [Flow analysis] Remove PropertyNotPromoted.staticType.
This field was only used to populate expectation strings in "id"
tests; it did not affect any user-visible behavior of the analyzer or
CFE.

Including information in "id" tests that doesn't affect any
user-visible behavior isn't helpful. Removing this field will enable
some upcoming flow analysis refactoring work (I intend to remove the
`ExpressionInfo._type` field, replacing its remaining usages with a
more reliable mechanism).

Change-Id: Id4c6593fae4ef25b8c21f0625e6c1f9eaa766e17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/406403
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2025-02-08 16:51:15 -08:00
Paul Berry eb5983869c [analyzer] Fix PartElementImpl.enclosingUnit.
`PartElementImpl.enclosingElement3` has static type `Element?`, but in
practice it is always of type `CompilationUnitElementImpl`, due to
this code from `CompilationUnitElementImpl.parts=`:

    set parts(List<PartElementImpl> parts) {
      for (var part in parts) {
        part.enclosingElement3 = this;
        var uri = part.uri;
        if (uri is DirectiveUriWithUnitImpl) {
          uri.unit.enclosingElement3 = this;
        }
      }
      _parts = parts;
    }

Therefore, `PartElementImpl.enclosingUnit` can just cast
`enclosingElement3` to the proper type and return it.

This behavior was untested, so I've added a test in
`part_test.dart`. Without the fix, the test throws a `TypeError`.

Change-Id: I3e6f186826aa92cda9c3887c85c5eddc1fea7f31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408641
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-02-08 08:15:19 -08:00
DEPS Autoroller 4227821323 Roll BoringSSL from 8ec37a156c8a to 6b1c6f324d49 (7 revisions)
https://boringssl.googlesource.com/boringssl.git/+log/8ec37a156c8a..6b1c6f324d49

2025-02-07 agl@chromium.org FIPS.md: update wording to align with FRR7.
2025-02-07 agl@chromium.org FIPS.md: add build instructions for the update stream.
2025-02-07 daniel@binaryparadox.net util/fipstools: KDA OneStepNoCounter mode support
2025-02-07 daniel@binaryparadox.net util/fipstools: generalize hkdf KDA subprocess
2025-02-06 davidben@google.com Add a missing word to documentation on the upstream stream
2025-02-06 agl@chromium.org Add a section on the latest FedRAMP policy to FIPS.md.
2025-02-05 dhuan@google.com Add CBS APIs for fetching an implicitly tagged int64/uint64 fields.

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: I96e8c5ec31f054af94558d213aa59eabd0306f7b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408582
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2025-02-07 20:08:50 -08:00
DEPS Autoroller 77e2e9461a Roll Fuchsia Test Scripts from 2fowg5AX8Ry8Vf_Ku... to C6yhaOWh41d1qQqUX...
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/fuchsia-test-scripts-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 Test Scripts: 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: I781409d71b766b888eb531d0ca558c54787b1374
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/407883
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
2025-02-07 15:37:40 -08:00
Konstantin Shcheglov c3a4f56e69 Fine. Return from LibraryContext without logging if the cycle is already loaded.
It writes too much, and with fine grained dependencies this is especially
prominent, we don't do analysis for most of files afterwards.

Change-Id: Idccef82f3b46980b6942c403871f588e21e128c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408680
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2025-02-07 15:24:49 -08:00
Nicholas Shahan c040cd66e5 [ddc] Pass an empty array when running main
Match the behavior of the ddc module system when running the
applications main method when using the new library bundle format.

This passes an empty JavaScript array to the main method which is
good enough to get the benchmarks that use main method args to run.

The API should be updated in a way that allows you to actually pass
a JavaScript array of Strings when starting the program.

Issue: https://github.com/dart-lang/sdk/issues/35113
Change-Id: I1a9aeb1df7afa5948d7f23517b3ac913aaabb62c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408640
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2025-02-07 14:53:14 -08:00
Konstantin Shcheglov e3d809f1c2 Elements. Migrate PrefixedIdentifierResolver.
Change-Id: Ia9104be728f7ddd08e1eb8591d5fa7ef9027e7ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408501
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2025-02-07 14:09:30 -08:00
DEPS Autoroller 7a22fea4bc Roll Fuchsia SDK from 27.20250203.4.1 to 27.20250204.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: Ib9075c5125e8cdb7ff44fa587e437612d79f8432
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/407900
Commit-Queue: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Zijie He <zijiehe@google.com>
2025-02-07 13:53:00 -08:00
Jake Macdonald da2ffedc50 add test for adding super calls with multiple parameters
Bug:https://github.com/dart-lang/sdk/issues/59745
Change-Id: Ibaf6321f0ea6cf3046f360e91cf58faba7a16cb3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408460
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
2025-02-07 13:30:01 -08:00
DEPS Autoroller 9a478621da Roll BoringSSL from ea42fe287758 to 8ec37a156c8a (3 revisions)
https://boringssl.googlesource.com/boringssl.git/+log/ea42fe287758..8ec37a156c8a

2025-02-04 davidben@google.com Delete some unnecessary implicit conversions in pkcs12_test.cc
2025-02-04 davidben@google.com Remove now unnecessary ia32cap_P customizations
2025-02-04 davidben@google.com Restore the __SHA__ compile-time check for Intel SHA Extensions

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: I8e8a7b7faa83a564125a11018ce8da6b4caf24c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408100
Commit-Queue: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2025-02-07 13:29:19 -08:00
pq c87b18581a [CQ] rationalize/unify test lint registration
Eliminates duplication and promotes hermetic tests (some were registering and failing to unregister test lints).

Bug: https://github.com/dart-lang/sdk/issues/60036
Change-Id: I9d0fe5fd610b51ce9000decbf75da2338ed87737
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408320
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2025-02-07 13:09:28 -08:00
Danny Tuppeny a78fb5e47a [analysis_server] Fix semantic tokens for method tear-offs in object patterns
Fixes https://github.com/dart-lang/sdk/issues/59976

Change-Id: I75127a59670522ddfc6526d10bfe9844638fdd99
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408001
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-02-07 12:24:25 -08:00
Kenzie Davisson 46a739ce20 Add quick assist for Wrap with ValueListenableBuilder
Change-Id: If4941d867fbdea687a12a043da240ceb981c758f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408401
Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-02-07 10:47:31 -08:00
Konstantin Shcheglov 85724ebdaf Elements. Migrate lib/src/summary2/extension_type.dart
Change-Id: I331f0c1db4129deb224cd31f22e97dc028dfdb06
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408500
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2025-02-07 10:45:30 -08:00
Nate Biggs 89af2425f2 [ddc] Append hot restart instruction to hot reload rejection reasons.
By adding this message here, any entrypoint that makes use of this for hot reload (e.g. DartPad, Flutter tools/FE server) will all surface this same message. This probably easier than having each one try to detect errors and append its own message.

Change-Id: I5980d530b66da818e29403cc13407095d8b203dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408380
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2025-02-07 10:20:53 -08:00
Kallen Tu 89e545c5cc [dot-shorthands][co19] Rename enum-shorthands flag to dot-shorthands (and roll co19 to b14b080)
We've decided to rename enum shorthands to dot shorthands. It describes the entire feature better. It's not only for enum values. We'll update the experiment name before the implementation goes in, that way our users can use a flag that matches the actual feature name.

Additionally, roll co19 to b14b0802e696a60c79b00d0f052e26fb986f0faf so we can avoid an infra failure with co19 using what's now an unknown feature flag (enum-shorthands).

2025-02-06 sgrekhov22@gmail.com Fixes dart-lang/co19#3067. Rename the static access shorthand feature experiment flag (dart-lang/co19#3068)

Cq-Include-Trybots: luci.dart.try:analyzer-linux-release-try
Bug: https://github.com/dart-lang/sdk/issues/57037
Change-Id: I031e3bce8166145b24dbb77acf259d78e6e00f0a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/407603
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2025-02-07 07:38:32 -08:00
Chloe Stefantsova e0b0c33937 [cfe] Remove nullaiblity requirement from shape sufficiency checks
Closes https://github.com/dart-lang/sdk/issues/60076

Change-Id: I294056317cb4d6102d53efc95cadd4992f017339
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408520
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2025-02-07 04:52:02 -08:00
Johnni Winther 2c81261f94 [cfe] Use last token for missing constructor error
Change-Id: I1ae241eac162b9b0048a7e8ecbd9a9ddfe268d12
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408560
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2025-02-07 04:40:01 -08:00
Johnni Winther 4c0121f2d3 [cfe] Run ErrorCommentCheck last
This allows seeing the generated AST before failing on error comment discrepancies.

Change-Id: I9d43c37a9b5922818c58928056c194867d378056
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408521
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2025-02-07 03:22:31 -08:00
Devon Carew 19622c5238 Update issue-triage.yml
Closes https://github.com/dart-lang/sdk/pull/60073

GitOrigin-RevId: 66e5046a8bb4df6bafebcc4cf2cea86bc18371c2
Change-Id: Ib86d43840cb7fbbe46abcf12966af4d92fde9ad3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408420
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2025-02-06 22:52:42 -08:00
Konstantin Shcheglov 26b3e61ffe Prepare to publish analyzer 7.3.0 and _fe_analyzer_shared 80.0.0
Change-Id: I5d35f23752d8dadfc118ae92a3f8fcf3928cc60e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408422
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2025-02-06 18:57:40 -08:00
Sigmund Cherem dd22a358a6 [dart2js] Adding some documentation on split constraints.
We haven't worked on this feature in a couple years, but we have
some documentation that may be useful to existing developers.

This was initially written by Joshua a long time ago, but we never added
it to our repo.

Change-Id: Icf0dbc40978ed8529c2918304b712d0f9d84811d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408342
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
2025-02-06 17:42:12 -08:00
Stephen Adams e962350dd6 [dart2js] Simply is-test when type parameters not needed
Sometimes the type expression of a is-test can be widened to one that
does not use type variables:

```dart
void addAll(Iterable<E> items) {
  if (items is List<E>) {
    ... items[i] ...  // code specialized to lists
  }
  ...
}
```

Changing `is List<E>` to `is List` is more efficient, but not possible
at the source level since the explicit type parameter is needed for
type promotion.

This change uses a predicate provided by the Kernel package to widen
an interface type when generating the CFG instructions for the
is-test. This can lead to knock-on optimizations like compiling `is X`
to `instanceof`.



Bug: #54998
Change-Id: I956b9d9b8a31ae40aee86e31def475baa9ab5cfe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408124
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2025-02-06 16:54:50 -08:00
Jaime Wren 7349ef5e11 [analyzer] Fix message for ENUM_WITHOUT_CONSTANTS
This will resolves https://github.com/dart-lang/sdk/issues/60053

Bug: https://github.com/dart-lang/sdk/issues/60053
Change-Id: I245814c60668f045b3fdb01358637bb142989640
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408440
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-02-06 14:40:18 -08:00
Jake Macdonald f4cfbf9cdc Update create function fix to create an async function for await expressions
Bug: https://github.com/dart-lang/sdk/issues/59990
Change-Id: I9e89089ca5c60bea190060bc0c8e869c7e78e32e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408361
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-02-06 14:25:39 -08:00
Phil Quitslund 50f96d6e5b Revert "[diagnostics] fix removed_lint reporting"
This reverts commit a9f288a810.

Reason for revert: Flutter roll blocking

Original change's description:
> [diagnostics] fix `removed_lint` reporting
>
> Bug: https://github.com/dart-lang/sdk/issues/59869
> Change-Id: I0b69f4380e0b556f6612294a3c6485cebd5e56fd
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/407621
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Phil Quitslund <pquitslund@google.com>

Bug: https://github.com/dart-lang/sdk/issues/59869
Change-Id: I70063e64bd5c5792c57e8194416a4a0d2e6df8ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408400
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2025-02-06 13:42:40 -08:00
FMorschel 7559108945 [DAS] Tests for parameter highlights
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/60046
Change-Id: I5b57109e9459a8583fd543031f239174a71472cf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408040
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Auto-Submit: Felipe Morschel <git@fmorschel.dev>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2025-02-06 13:08:59 -08:00
Danny Tuppeny 8dab178912 [dds/dap] Remove macro tests
This removes the macro tests but leaves the URI support until it's clearer we won't use this (or that it won't become a fully documented feature of DAP, in which case it would be better to use URIs instead of Paths anyway).

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

Change-Id: I4df448c98eb4cc352558234c8365a5e849deed7c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408280
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
2025-02-06 12:13:15 -08:00
pq 93847ce649 [productivity] server test launch config and generate task
Bug: https://github.com/dart-lang/sdk/issues/60070
Change-Id: Ia7dea87b6b2ac3c74745bb81807fe7347f1a552a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408340
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2025-02-06 11:47:14 -08:00
Alexander Markov dd4f341e15 [dart2bytecode] Add API to invoke dart2bytecode programmatically
TEST=ci
Bug: b/394206952
Change-Id: Icd606c83bfed335e45498fceed6add784c465826
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/407820
Reviewed-by: Jia Hao Goh <jiahaog@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2025-02-06 08:44:12 -08:00
Sergey G. Grekhov c19f913d50 [co19] Roll co19 to dd7fa9c980a47c5196c192046f5d4a43dbce70ef
2025-02-05 sgrekhov22@gmail.com dart-lang/co19#2559. Add tests for enum with empty list of values (dart-lang/co19#3066)
2025-02-04 sgrekhov22@gmail.com dart-lang/co19#3054. Add more method clozurization tests (dart-lang/co19#3060)
2025-02-04 sgrekhov22@gmail.com Fixes dart-lang/co19#3063. Add additional "correct member overrides" test (dart-lang/co19#3065)
2025-02-04 sgrekhov22@gmail.com dart-lang/co19#3054. Add more test cases to closurization tests. Part 1. (dart-lang/co19#3061)
2025-02-04 sgrekhov22@gmail.com dart-lang/co19#3054. Add generic method instantiation tests (dart-lang/co19#3062)
2025-02-01 49699333+dependabot[bot]@users.noreply.github.com Bump actions/setup-java from 4.6.0 to 4.7.0 in the github-actions group (dart-lang/co19#3064)

Cq-Include-Trybots: luci.dart.try:analyzer-linux-release-try
Change-Id: I5d1b9a2d7231b2b8f20e97e3f9da940f4632957f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408260
Reviewed-by: Alexander Thomas <athom@google.com>
Auto-Submit: Sergey Grekhov <sgrekhov22@gmail.com>
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2025-02-06 05:28:12 -08:00
Daco Harkes 440593fe9d [gardening] Mark test slow
(Apparently the other test doesn't exist anymore, and normalize
automatically removed it.)

Bug: https://github.com/dart-lang/sdk/issues/56979
Bug: https://github.com/dart-lang/sdk/issues/60067
Change-Id: I934c6dc4041925631de31d1832e4946002b411b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408300
Reviewed-by: Tess Strickland <sstrickl@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2025-02-06 05:19:25 -08:00
Lasse R.H. Nielsen 9200023b49 Use AsyncError more in future error handling.
Avoids some cases of calling `Zone.errorCallback` and getting
an `AsyncError`, then unpacking it again to separate
errors and stack trace objects.

CoreLibraryReviewExempt: No API changes, no platform-specific code change.
Change-Id: I903dbfa6da74cfdf8f00e765e48311cc0cb40cac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405022
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2025-02-06 05:06:56 -08:00