Commit graph

101738 commits

Author SHA1 Message Date
Kallen Tu 07d2288908 [wildcard-variables] Add a test on unnamed optional parameters with no default value.
Bug: https://github.com/dart-lang/language/issues/3807
Change-Id: Ibeb29d3702b74379b64e8965c3ef9709c7bf2f41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369780
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2024-06-07 22:02:17 +00:00
Devon Carew cb64e64ccc [third_party/pkg] put package:dap and package:language_server_protocol under analysis
Change-Id: Ie1a48956055fa0f4ebcd85e5d2b762021fc074d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370101
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Sam Rawlins <srawlins@google.com>
2024-06-07 19:33:13 +00:00
Sam Rawlins d5333825f7 analyzer/frontend: fix broken doc links
Work towards https://github.com/dart-lang/sdk/issues/49042

Change-Id: I05203f65b8e47871ddf7a651d590db9512d1724a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370142
Reviewed-by: Paul Berry <paulberry@google.com>
Auto-Submit: Sam Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2024-06-07 19:12:49 +00:00
Stephen Adams b42bd24b78 Clean up DateTime tests
Followup to fb057ea4e0

Now that the web implementation of DateTime supports microseconds, the test special cases for not supporting microseconds can be removed.

Change-Id: I10991b25e42d643ae58850d7190621c9d11877b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367680
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2024-06-07 17:58:32 +00:00
Devon Carew 8a65c5056a [triage] contribute an issue triage github workflow
Change-Id: I9b4122bed37b2e4ef3b7c0dcc3c840ebfb2d5fc9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370160
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2024-06-07 16:07:30 +00:00
Danny Tuppeny 216a14b599 [analysis_server] Avoid using stale LineInfos immediately after overlay updates
This fixes a bug where a semantic tokens request could use an incorrect LineInfo for mappings if sent immediately after an overlay update because:

a) we computed a LineInfo from the source instead of using one consistent with the resolved unit
b) we read the file state in a way that did not take into account the latest overlay updates if the analysis driver hadn't handled the changed file

The second issue could affect other requests too because server.getLineInfo() is used in a number of places (to support plugins). This change reverts reading the file state directly, but also updates semantic tokens to prefer using the LineInfo from the resolved unit when we have one (only falling back to computing one from current sources for non-Dart files, which can be handled by plugins).

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

Change-Id: I77ab6ad63a78ebd062b264d901a9ae8568b9096e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370021
Reviewed-by: Sam Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-06-07 14:34:00 +00:00
Sergey G. Grekhov 3355365187 [co19] Roll co19 to 8738630ac89dd2433b5be27157ae607ce46a7e9a
2024-06-07 sgrekhov22@gmail.com Fixes dart-lang/co19#2704. Fix typo in LanguageFeatures/Wildcards/initializing_formals_A01_t01 (dart-lang/co19#2705)
2024-06-07 sgrekhov22@gmail.com Fixes dart-lang/co19#2702. Fix parameter name in co19/Language/Functions/Formal_Parameters/Optional_Formals/name_t01 (dart-lang/co19#2703)
2024-06-06 sgrekhov22@gmail.com Fixed dart-lang/co19#2698. Update tests to check a setter (dart-lang/co19#2699)
2024-06-01 49699333+dependabot[bot]@users.noreply.github.com Bump actions/checkout from 4.1.4 to 4.1.6 in the github-actions group (dart-lang/co19#2695)
2024-05-31 sgrekhov22@gmail.com dart-lang/co19#2641. Add initializing formals tests (dart-lang/co19#2686)

Change-Id: I3f2ca2583ac8d4bf1d4f4c5055895c48fe4824e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370241
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2024-06-07 13:05:49 +00:00
Sam Rawlins 6c6b1040b4 linter: Allow each LintRule multiple categories
Spelled out at https://github.com/dart-lang/linter/issues/1020

Fixes https://github.com/dart-lang/linter/issues/1020

This CL does not change the categories/groups that any rule has. We
can add/change categories in later CLs.

Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: Ief2856a6c472492bbad19fc95df172ef8d19fe7b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369861
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Sam Rawlins <srawlins@google.com>
2024-06-07 06:18:00 +00:00
pq 63d6e6f607 quick fix for NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR_USING_NEW
See: https://github.com/dart-lang/sdk/issues/55917

Change-Id: I9576105618d0201b4fdc339361b6c164870267b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370140
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Auto-Submit: Phil Quitslund <pquitslund@google.com>
2024-06-07 00:59:39 +00:00
pq a1b42e1dae quick fix for STATIC_CONSTRUCTOR
See: https://github.com/dart-lang/sdk/issues/55917

Change-Id: I3bfea0a3a300a478c80d64b0813c8cb5e9024227
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370141
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-06-06 23:21:35 +00:00
pq e8939b0ff0 quick fix for SETTER_CONSTRUCTOR
See: https://github.com/dart-lang/sdk/issues/55917

Change-Id: I0984ef126107974a611c2582402e4498514377d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370061
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-06-06 22:15:33 +00:00
Kallen Tu 76c0e85789 [cfe][wildcard-variables] Remove local _ from scope.
Local variables named `_` are no longer in scope and can't be used when the wildcard variables experiment is enabled.

Bug: https://github.com/dart-lang/sdk/issues/55655
Change-Id: I13a7a9fcfb92e4b64bd51b5ccfe657f5a0633233
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369507
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2024-06-06 21:39:03 +00:00
pq 5575aa0823 RemoveLexeme producer + quick fix for GETTER_CONSTRUCTOR
* Generalizes `RemoveExtraModifier` to a new `RemoveLexeme` producer that works for keywords and modifiers.

* Adds a new (keyword) quick-fix for the `GETTER_CONSTRUCTOR`


See: https://github.com/dart-lang/sdk/issues/55917


Change-Id: I0e7fbc33aa970f0754c9533b3ecbd4e9dd9ddb30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370100
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-06-06 19:51:40 +00:00
Konstantin Shcheglov dc1130663f Macro. Issue 55910. Use 'exportNamespace' for resolveIdentifier().
Bug: https://github.com/dart-lang/sdk/issues/55910
Change-Id: Id1bf92ca2b95a33cd4feaf79e6c0a31f6d811c8d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370102
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-06-06 19:27:09 +00:00
Devon Carew 20996acdc5 [deps] rev crypto, dartdoc, http, logging, test, tools, web_socket_channel, webdev, yaml_edit
Revisions updated by `dart tools/rev_sdk_deps.dart`.

crypto (0a10171..7a9428a):
  7a9428a  2024-06-04  Kevin Moore  Bump lints dep (dart-lang/crypto#172)

dartdoc (45627f9..ddb8fb4):
  ddb8fb44  2024-06-03  Konstantin Scheglov  Use package:analyzer/source/source.dart (dart-lang/dartdoc#3780)

http (7bfbeea..a3567f8):
  a3567f8  2024-06-05  Brian Quinlan  Prepare to release cronet_http 1.3.1 (dart-lang/http#1228)
  7addc61  2024-06-05  Hossein Yousefi  [cronet_http] Upgrade jnigen to 0.9.2 to close `#1213` (dart-lang/http#1225)
  eb87a60  2024-06-04  Anikate De  pkgs/ok_http: Close the client (override `close()` from `BaseClient`) (dart-lang/http#1224)
  9f022d2  2024-06-04  Anikate De  pkgs/http_client_conformance_tests: add boolean flag `supportsFoldedHeaders` (dart-lang/http#1222)
  90837df  2024-06-03  Anikate De  pkgs/ok_http: Condense JNI Bindings to `single_file` structure, and add missing server errors test (dart-lang/http#1221)

logging (73f043a..dbd6829):
  dbd6829  2024-06-04  Sarah Zakarias  Update `topics` in `pubspec.yaml` (dart-lang/logging#165)

test (2464ad5..83c597e):
  83c597e5  2024-06-05  Jacob MacDonald  enable asserts in dart2wasm tests (dart-lang/test#2241)
  60353804  2024-06-04  Nate Bosch  Remove an unnecessary `dynamic` (dart-lang/test#2239)
  43ad4cd8  2024-06-03  Kevin Moore  random cleanup (dart-lang/test#2232)
  18db77c3  2024-06-02  Kevin Moore  prepare to publish test_api (dart-lang/test#2238)
  cd72e8d8  2024-06-02  Kevin Moore  Prepare to publish (dart-lang/test#2237)
  9c6adaa7  2024-06-01  Kevin Moore  fixes (dart-lang/test#2235)
  0110a80b  2024-06-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/test#2236)
  b1b2c029  2024-06-01  Martin Kustermann  Fix `dart run test -p chrome -c dart2wasm` (dart-lang/test#2233)

tools (86b3661..4321aec):
  4321aec  2024-06-05  Andrew Kolos  [unified_analytics] Suppress any `FileSystemException` thrown during `Analytics.send` (dart-lang/tools#274)
  e5d4c8b  2024-06-03  dependabot[bot]  Bump actions/checkout from 4.1.5 to 4.1.6 in the github-actions group (dart-lang/tools#271)

web_socket_channel (45b8ce9..bf69990):
  bf69990  2024-06-03  Thibault Chatillon  bump web_socket dependency 0.1.3 -> 0.1.5 (dart-lang/web_socket_channel#370)
  5b428dd  2024-06-02  dependabot[bot]  Bump actions/checkout from 4.1.5 to 4.1.6 in the github-actions group (dart-lang/web_socket_channel#371)
  afd1e3c  2024-05-23  Brian Quinlan  Remove `--fatal-infos` from `dart pub downgrade` analysis (dart-lang/web_socket_channel#367)
  cb20b71  2024-05-23  Sarah Zakarias  Add `topics` to `pubspec.yaml` (dart-lang/web_socket_channel#362)
  8514229  2024-05-22  Kevin Moore  Bump and fix lints (dart-lang/web_socket_channel#366)

webdev (a97c2a1..9ada46f):
  9ada46fc  2024-06-05  Nicholas Shahan  Hide more temporary variables when debugging (dart-lang/webdev#2445)

yaml_edit (963e7a3..08a146e):
  08a146e  2024-06-06  Kavisi  Fix splice list insertion (dart-lang/yaml_edit#84)
  561309e  2024-06-01  dependabot[bot]  Bump actions/checkout from 4.1.5 to 4.1.6 in the github-actions group (dart-lang/yaml_edit#85)
  b582fd5  2024-05-31  Kavisi  Fix error thrown when inserting keys (dart-lang/yaml_edit#80)

Change-Id: I36acbc26fe97d8a1e3fdfa5f4855cc4be7d84dd7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370080
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-06-06 19:18:22 +00:00
Paul Berry c007d3bc0c Front end: type infer all record literal fields before hoisting.
Previously, if a record literal had named fields, type inference of
the literal fields would happen as part of the process of
hoisting. This was a problem because the hoisting process requires
visiting the fields in reverse order, so as a result, the order in
which subexpressions were type inferred was the reverse of the order
in which they would be executed, leading to unsound type promotion
behavior.

Fixes #55914.

Bug: https://github.com/dart-lang/sdk/issues/55914
Change-Id: I2d8930e0e1d7579d065bfb850aa7472d28a8012c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369761
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2024-06-06 19:15:57 +00:00
Ben Konyi 8e00ebc689 [ CLI ] Fix snapshot detection logic for google3
google3 makes heavy use of symlinks, with no guarantee that the relative
location of files with respect to each other will be maintained after
the symlinks are resolved. This causes issues when trying to locate the
DartDev snapshot using the VM executables resolved path as a base.

This change updates the DartDev snapshot detection logic to first try to
find the snapshot using the resolved executable path before falling back
to using the unresolved path used to launch the VM (e.g., the path
specified by argv[0]).

TEST=pkg/dartdev/test/

Change-Id: I19a41c440ac82cbc671dafb3bda23a31fb4cdc0c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370000
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2024-06-06 19:10:19 +00:00
Keerti Parthasarathy cf0646d4c3 Update completions for pubspec with workspace related keywords.
BUG: https://github.com/dart-lang/sdk/issues/55915

Change-Id: Ic9b0e9f1d4b4e588778137b5affd593550bf678c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369768
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-06-06 18:25:53 +00:00
pq 741e1e2036 quick fix for INVALID_USE_OF_COVARIANT_IN_EXTENSION
See: https://github.com/dart-lang/sdk/issues/55917

Change-Id: I1fac6f8f1bcdb0e2ede3f7766c24ada1ee037f45
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370060
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-06-06 17:09:30 +00:00
Konstantin Shcheglov 31a9236cfb Macro. Serialization for MacroExecutionResult(s).
Bug: https://github.com/dart-lang/language/issues/3877
Change-Id: I7897bdf27a17d004b810409ad9c2ac76bb8677b3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369842
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-06-06 16:12:31 +00:00
Sam Rawlins e04c53d5ac meta: add TargetKind to @factory
Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: I5c0608637f2feb9986e890f3c83cf02884bef7f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369789
Commit-Queue: Sam Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-06-06 15:39:56 +00:00
pq 3f47c93b8c quick fix for EXTERNAL_TYPEDEF
See: https://github.com/dart-lang/sdk/issues/55917

Change-Id: I3826969b5f20b2140fb522ab1882e5f2330cab5e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369881
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Phil Quitslund <pquitslund@google.com>
2024-06-06 14:45:58 +00:00
Chloe Stefantsova d31d0f9618 [cfe] Account for compilation stage in invocations post-processing
Closes https://github.com/dart-lang/sdk/issues/55849
Closes https://github.com/dart-lang/sdk/issues/55755

Change-Id: I471830cafed76ec5c503fe726ade857c007ed712
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369063
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2024-06-06 11:58:30 +00:00
Johnni Winther c5cd8ff349 [cfe] Remove agnostic mode
The agnostic mode was added to allow the platform dill embedded in
the VM to support both weak and strong mode. Since weak mode is no
longer supported in the VM, the agnostic mode can new be deleted.

All uses of the agnostic in Dart and Flutter have been removed prior
to this change.

Change-Id: Iff0f69d9cd64e887e01cd7e7d336a97761bd6d4b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/366801
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2024-06-06 11:02:37 +00:00
Tess Strickland d06d627c79 [vm] Remove --[no-]lazy-dispatchers flag.
No client of the VM uses this flag, only tests, and this flag was always
set to false in AOT mode. Thus, remove uses of this flag and instead
always lazily create dispatchers as needed when resolving method names
in JIT mode.

Remove the implicit value of `allow_add` for some Resolver
static methods. For callers that previously depended on the implicit
`true` value (which includes the AOT precompilier), pass `true` for
uses in the compiler and pass `!FLAG_precompiled_mode` for uses in the
runtime. Assert that `allow_add` is false when these methods are invoked
from the precompiled runtime.

Remove Resolver static methods that are no longer used.

TEST=ci

Change-Id: Ib6a7354f7a859e86743c381513a4129c14895753
Cq-Include-Trybots: luci.dart.try:vm-linux-debug-x64-try,vm-linux-release-x64-try,vm-aot-linux-debug-x64-try,vm-aot-linux-release-x64-try,vm-aot-mac-release-arm64-try,vm-mac-debug-arm64-try,vm-mac-release-arm64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/366668
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2024-06-06 10:56:12 +00:00
Tess Strickland d7e6e0e8c3 [vm/compiler] Fix dart fuzzer CalculateElementAddress crash on X64C.
In the backend, handle the following cases that were assumed not to
happen before:
* If the index and offset are both 0, then the operation is a no-op
  and so the output register should be the same as the first input.
  (Should only happen if the instruction is used in a non-optimizing
  context, as otherwise it is removed by canonicalization.)
* If the scaled index can be used as an instruction immediate and the
  offset is 0, then emit the appropriate instruction(s).
* If the scaled index and offset can both be used as immediates to
  instructions, but their sum (the total offset in bytes) cannot, then
  allocate a register for the index and fall back to the non-constant
  index case.

CalculateElementAddress::Canonicalize now only performs removal of
no-op instructions.

This CL also fixes a switch on the instruction tag in
FlowGraph::RenameRecursive to appropriately convert UnboxedConstant
instructions to initial definitions of the FlowGraph as it already does
for Constant instructions.

TEST=vm/dart/regress_55877

Issue: https://github.com/dart-lang/sdk/issues/55877
Cq-Include-Trybots: luci.dart.try:vm-aot-linux-debug-simarm_x64-try,vm-aot-linux-debug-simriscv64-try,vm-aot-linux-debug-x64-try,vm-aot-linux-debug-x64c-try,vm-linux-debug-ia32-try,vm-linux-debug-x64-try,vm-linux-debug-x64c-try,vm-linux-debug-simriscv64-try,vm-mac-debug-arm64-try,vm-aot-mac-release-arm64-try
Change-Id: I613d6c8770fe02facf6bbdb3d2b11f842b51540d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369642
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2024-06-06 09:14:18 +00:00
pq d91f05c1c7 quick fix for EXTERNAL_ENUM
See: https://github.com/dart-lang/sdk/issues/55917

Change-Id: I0f60078bfcb3ae5ab6d559a9e2314abe209726bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369880
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Auto-Submit: Phil Quitslund <pquitslund@google.com>
2024-06-06 03:42:03 +00:00
Konstantin Shcheglov 46ea7ade07 Extract TypeAnnotationLocationWriter / Reader into separate library.
I plan using it to implement serialization of MacroExecutionResult(s).

Bug: https://github.com/dart-lang/language/issues/3877
Change-Id: I34d95ab6fd2c335ceb2a957c9222947b85e986a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369841
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-06-06 00:20:27 +00:00
Ryan Macnak 42270748b5 [vm, io] Remove dead Windows 7 code.
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/54509
Change-Id: I488f01e43faccf6f9f2dd58fcd55ca33a7f1f55d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369860
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-06-05 23:08:15 +00:00
Parker Lougheed 83135245b2 [linter] Publish new linter diagnostic messages
This CL doesn't set up the analyzer to surface links to these destinations, just includes the new format in the diagnostic messages file.

Change-Id: I6c227448b42a5abac53d5c6a863e599c7e8809da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368081
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Marya Belanger <mbelanger@google.com>
2024-06-05 22:07:03 +00:00
Keerti Parthasarathy d9ff61bd87 [Refactor]: Move relevance computation out of SuggestionBuilder.
- use the new RelevanceComputer to compute relevance for CandidateSuggestion's before calling into the SuggestionBuilder, as
part of the new flow for completions.
- reuse the RelevanceComputer where possible in SuggestionBuilder.

Change-Id: I8fdfaee81e68bc66f726c40a76ab6c81099a2cc6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369840
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2024-06-05 21:37:03 +00:00
Nicholas Shahan e7b1bca707 [ddc] Rename variable used to store late value
Late local variables are lowered by the CFE into a local:
* backing store variable
* get method
* set method
* isSet local variable (optionally when the type is nullable)

This change updates the name in JavaScript used for the backing store
variable to match the name for the late variable from the original
source. It also updates the scope information passed for expression
evaluation to remove the lowered name and replace it with the original
so evaluations will work as well.

The name change avoids the hiding performed by the debugger on
recognized temporary names so it appears in the list of local variables.

b/343405209
Issue: See https://github.com/dart-lang/sdk/issues/55918

Change-Id: I6b65a62baf6f26f6e9cfee9f14667d021e16645e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369506
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2024-06-05 20:50:49 +00:00
Sam Rawlins 8029fdf79a meta: Add a TargetKind for _Sealed
Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: Ibac1f71f6cbb9432150b49b8565bf740efa1be32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369765
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Sam Rawlins <srawlins@google.com>
2024-06-05 20:28:57 +00:00
Konstantin Shcheglov 6c480c548d Move writeMap() / readMap() to lower level.
Change-Id: I072040358238361fd9babd92ba55ba8538eeb105
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369786
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-06-05 19:08:46 +00:00
Srujan Gaddam 4707d77226 Update package:web dep to latest
Change-Id: I76da2d0caf8e357d139e504f4dd865e9e92e2b65
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369523
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2024-06-05 18:51:42 +00:00
pq 4ecea4b40a quick fix for EXTERNAL_CLASS
See: https://github.com/dart-lang/sdk/issues/55917

Change-Id: I330f1c571de0ecc4b2cef390ee98dd008dec9afc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369785
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Auto-Submit: Phil Quitslund <pquitslund@google.com>
2024-06-05 18:45:32 +00:00
Parker Lougheed 8716461eaf [docs] Misc minor cleanup to migrated wiki docs
Fixes a few minor issues relating to outdated links, spelling, Markdown formatting, word choice, etc.

Bug: https://github.com/dart-lang/sdk/issues/54066
Change-Id: Ic7b9b33b27d2ce2c30f9b1fe17b0bc91873ecfb7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369764
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2024-06-05 18:43:39 +00:00
Sam Rawlins 82a3006220 macros: replace unsupported [this] comment references with this.
Work towards https://github.com/dart-lang/dartdoc/issues/3761

Sibling CL to https://dart-review.googlesource.com/c/sdk/+/365204

The analyzer has never recognized `[this]` as a valid doc comment
reference (and the `comment_references` lint rule has similarly
reported such reference attempts). dartdoc has its own algorithms
for resolving comment references, which we are dismantling in favor
of a single resolution, provided by the analyzer.

We've also decided against adding support in the analyzer (see
https://github.com/dart-lang/linter/issues/2079), so these
reference attempts should be re-written.

Change-Id: I872c215a574dc3d04f0708387408d22fdfd14c14
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/366882
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2024-06-05 18:37:46 +00:00
Danny Tuppeny adabc902ca [dap] Update the repo URL in pkg:dap pubspec
This package was moved to third_party but the URL here was not updated so the link on Pub is a 404.

This will need a new Pub release before it updates, but I'm not sure it's worth doing until there are some changes.

Change-Id: Ibd1e4ba0208f13f27e1e04ba141e8a78155bd2bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369700
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Helin Shiah <helinx@google.com>
Commit-Queue: Elliott Brooks <elliottbrooks@google.com>
2024-06-05 18:19:19 +00:00
pq ad759d306c quick fix for COVARIANT_MEMBER
See: https://github.com/dart-lang/sdk/issues/55917

Change-Id: Id6f749fe0f7cb51403b0952abb2e2ba8a24d3120
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369767
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Phil Quitslund <pquitslund@google.com>
2024-06-05 18:04:19 +00:00
Martin Kustermann 290d7406ae [dart2wasm] Avoid WasmArray<_Type> allocations in interface subtype checking
Issue https://github.com/dart-lang/sdk/issues/55516

Change-Id: I2cddd95211f3d831965a1bba45774ad8d72847a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369621
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-06-05 17:57:49 +00:00
Ryan Macnak b11c932a29 [vm, gc] Work-steal the store buffer during scavenging.
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/55713
Change-Id: Ie198a94c43f6ba8048695204eb716049bf8b23e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369740
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-06-05 17:45:19 +00:00
Sam Rawlins a75691fe7d linter: Remove unused fields in Group
Well, to be honest, remove all instances of Group. Instead, "groups"
are Strings. Because there was only one field left, a Group is just
a... name of a group.

Also, LintRule is no longer Comparable because that does not seem to
have served a purpose...

Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: I6e058139631dc1b06a4072a2549f156d1622c673
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369782
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-06-05 17:43:19 +00:00
Kenzie Schmoll 0b6aff760b Add headers to the DevTools server to enable serving DevTools with wasm.
Bug: https://github.com/flutter/devtools/issues/7856
Change-Id: I854fbaad9c1e477c3218bd159cd1a6db1aae8e74
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369100
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-06-05 17:26:23 +00:00
Konstantin Shcheglov a4aac1781b Move writeEnum() / readEnum() to lower level.
Change-Id: If20f6421845a427adbace262ee674fcaec7a3721
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369783
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2024-06-05 16:57:03 +00:00
Sam Rawlins 8e1ea1f114 linter: move always_put_required_named_parameters_first tests
Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: I5cdd56f3da7a70fdea2701f9a15f8dcd545f2462
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369766
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-06-05 16:28:20 +00:00
Vyacheslav Egorov e0710a5cc6 [vm/compiler] Support SIMD arrays in TypedDataSpecializer
TEST=vm/cc/IRTest_TypedDataAOT_FunctionalGetSet

Cq-Include-Trybots: luci.dart.try:vm-aot-linux-debug-x64-try,vm-aot-linux-release-arm64-try,vm-aot-linux-release-simarm_x64-try
Change-Id: I64a050acffaec5228828876b6da998687b5e432b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369762
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2024-06-05 15:08:10 +00:00
Sam Rawlins 149fc77208 linter: Remove a number of unused classes
* Remove unused LinterException, Reporter, PrintingReporter.
* Mark Hyperlink as visible-for-testing, and make 3 fields private.
* Make the LinterConstantEvaluationResult constructor private.
* Make LinterContextParsedImpl.package a getter

Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: Ib403fb7744e9454742d6555c8cdb8764ab4377be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369781
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-06-05 14:56:48 +00:00
pq 1e6bc6697a quick fix for FACTORY_TOP_LEVEL_DECLARATION
Change-Id: I77fad91ead543c7be5d532d0c2f5240ec5146635
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369763
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-06-05 14:32:19 +00:00
dependabot[bot] 1c692c7b71 Bump github/codeql-action from 3.25.6 to 3.25.7
Closes https://github.com/dart-lang/sdk/pull/55909

GitOrigin-RevId: e021d00ac125e88d381255d2a413a333c7804cde
Change-Id: I151ab4f05eaa6334207e7ca72aed1884c2ec994b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369440
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2024-06-05 05:44:37 +00:00