Commit graph

92414 commits

Author SHA1 Message Date
Vyacheslav Egorov 401a11d309 [vm] Remove obsolete code from inliner.
Described case no longer happens: either function
is marked as not-inlinable from the very beginning
or graph construction bails out entirely.

TEST=ci

Change-Id: I7e345dc948370050bd6e03a327f1fd1054fc8240
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311401
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2023-06-26 21:55:40 +00:00
Stephen Adams eb2b7c6642 [js_runtime] Avoid reparsing in Uri.base
Repeated calls to Uri.base result in repeated calls to Uri.parse.
Reparsing is necessary only when the location changes.

Bug: b/281079996
Change-Id: I091a6f1ac2f454643e95bbfddf59b24172ef7da5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311155
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2023-06-26 21:32:48 +00:00
Nate Biggs fe73f0cf5d [dart2js] Reduce size of Dart2JS deferred loading event logs.
- Only include the script tag src if it differs from the previous log entry.
- Use single letters for each event field's key.
- Fix some typos.
- Remove 'uri' from download event as it can be inferred from script tag src and part file name.

Change-Id: Ib7916ea5e92720a10c7e1e1cab2e535fae2bbf49
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311180
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2023-06-26 20:43:32 +00:00
Vyacheslav Egorov 1a582a6714 [infra] Fix update_line_numbers.dart script
TEST=manually tested

Change-Id: If2132e5610e8965f291b776bcc5cf5bc87a5001f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311341
Auto-Submit: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2023-06-26 20:01:31 +00:00
Parker Lougheed 5200d086d1 [pkg/analyzer] Add class to diagnostic messages for special highlighting
Will be used on dart.dev for customizing the highlight syntax in code blocks to be red underlines rather than yellow highlighting.

Related: https://github.com/dart-lang/site-www/pull/5006
Change-Id: Ib33ee8f6f7307efb649b627dfd9a5d90187cca1a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311500
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-06-26 19:58:56 +00:00
Devon Carew 51ebea24ee [deps] rev dartdoc, ecosystem, leak_tracker, webdev
Revisions updated by `dart tools/rev_sdk_deps.dart`.

dartdoc (4757339..e04a6b3):
  e04a6b30  2023-06-23  Sam Rawlins  Remove grind_test; not important (#3453)

ecosystem (a2dac18..b1056e6):
  b1056e6  2023-06-13  Nate Bosch  Allow prerelease suffix in CHANGELOG versions (#112)

leak_tracker (2149e5c..c75b0a7):
  c75b0a7  2023-06-23  Yii Chen  make LeakTrackingConfiguration to const (#83)

webdev (6fe17fe..8360d50):
  8360d50f  2023-06-22  Elliott Brooks  Shard MV2 and MV3 extension tests (#2153)
  12e8aa2d  2023-06-22  Elliott Brooks  Reset Webdev to 3.0.6-wip (#2154)
  8ca3a891  2023-06-22  Elliott Brooks  Fix the Puppeteer tests for the Debug Extension (#2152)

Change-Id: I8f9ec79d99f375898b3ecd3330512fd39579f37b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311462
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-26 19:06:24 +00:00
Alexander Aprelev 238ce4685a [vm/debugger] Update service_2/* tests with debugger() expectations.
Follow-up to bbdf87d277
TEST=ci

Bug: https://github.com/dart-lang/sdk/issues/52785
Change-Id: Ia5c83743efe6222396f63d5df77ebb4e39cbd768
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311440
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2023-06-26 18:46:46 +00:00
Joshua Litt 64290e1052 [js] Add JSStringImpl box for JSString.
Change-Id: I63a2ecdf3fd2331f91632ae5b2cc51813cd44c66
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307961
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
2023-06-26 17:15:24 +00:00
Konstantin Shcheglov 76eb70963c Use 'UnitResult' type parameter instead of 'T' in CorrectionProducerContext.
Change-Id: I24c7f9450f6ad84de6e67a2fb2f70d6dea7983e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311158
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2023-06-26 16:05:14 +00:00
Tess Strickland 4aebac3d28 [vm] Verify STC input count matches stub expected input count in DEBUG.
If these checks fail, then a `SubtypeNTestCache` stub has been called
with a `SubtypeTestCache` that uses a different number of inputs
than the stub expects, which could lead to unexpected false negatives
or false positives, so catch it early.

TEST=vm/cc/TTS, ci

Change-Id: Ia9c48aad4c35872cad32b7b6f3eead3ee9e59680
Cq-Include-Trybots: luci.dart.try:vm-mac-debug-arm64-try,vm-linux-debug-x64c-try,vm-linux-debug-x64-try,vm-linux-debug-simriscv64-try,vm-linux-debug-ia32-try,vm-aot-linux-debug-simriscv64-try,vm-aot-linux-debug-simarm_x64-try,vm-aot-linux-debug-x64-try,vm-aot-linux-debug-x64c-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311380
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2023-06-26 11:54:00 +00:00
Vyacheslav Egorov f1cd87e58e [infra] Tool for updating LINE_* in service tests.
Some of the service tests contain LINE_*
constants which match line numbers of `// LINE_*`
comments in the body of the test. Previously
we would manually maintain these constants,
which is rather tedious.

This CL adds a scripts for updating the
constants automatically.

TEST=manually tested the tool

Change-Id: I3a5cdbd4cae2ab6eaec51c9bb5f48b351bfbbd7a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310602
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-06-26 10:48:30 +00:00
Tess Strickland 719c0a91dc [vm] Remove UntaggedField::type_test_cache_.
This field is now only used when reloading to check assignability
during `ProgramReloadContext::ReloadPhase4CommitFinish()` (via
`PostCommit()` -> `InvalidateWorld()` -> `InvalidateFields`).

However, the method `DeoptimizeDependentCode()` is called near the
start of the actual reloading process in `Reload` prior to the
commit/rollback phases. This calls `DeoptimizeTypeTestingStubs()`, which
walks the heap and resets the contents of all `SubtypeTestCaches`
(`STC`s).

That means that the `STC` information isn't actually kept between
different reloads, so all this does is cause a number of `STC` objects
to be allocated during reload whose backing arrays are not used
post-reload for anything and so are unnecessary garbage.

That, and the creation of the `STC`s during `InvalidateFields` creates
all-input `STC`s, as they don't just check assignability to a given field type but also for checking elements of `RecordTypes`. That means
the per-field `STC`s contain way more information needed to check for
valid assignments to the corresponding field type, even if the `STC`
was used between reloads.

This CL removes the unnecessary field and changes `InvalidateFields`
so that the `STC`s used during reload are instead lazily allocated once
per `FieldInvalidator` object and now both the `STC` and its backing
array are now garbage post-field invalidation.

TEST=reload ci

Change-Id: I3ffa199551ba69f0afd4eba6303c6ff73d7473a3
Cq-Include-Trybots: luci.dart.try:vm-reload-linux-debug-x64-try,vm-reload-linux-release-x64-try,vm-reload-rollback-linux-debug-x64-try,vm-reload-rollback-linux-release-x64-try,vm-aot-linux-debug-x64-try,vm-aot-linux-product-x64-try,vm-aot-linux-release-x64-try,vm-linux-release-x64-try,vm-linux-debug-x64-try,vm-aot-dwarf-linux-product-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311220
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2023-06-26 09:27:59 +00:00
Tess Strickland 06e099884b [vm] Adjust default value of FLAG_max_subtype_cache_entries flag.
The round default value used in f7e26c50 means that we allocate
a new backing array shortly before hitting the cap, and once we
hit the cap the max load factor for the new backing array is only ~49%.

Instead, given a desired maximum, calculate an appropriate default
value that ensures the cap is only hit shortly before the array reaches
the max load factor that causes reallocation.

TEST=ci

Change-Id: I4c4fc3f5726aea3b260cf288cd00f886c2a1bd96
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311280
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2023-06-26 09:24:57 +00:00
Tess Strickland cefda02d24 [vm] Specify default capture mode for closures used in stub generation.
Without this, when building on Windows using MSVC, we get `error C3493:
'kCacheArrayReg' cannot be implicitly captured because no default
capture mode has been specified`.

TEST=vm-msvc-windows builds

Change-Id: Iebc443ce887dd32b186d51695cbc0bfd95d09f35
Cq-Include-Trybots: luci.dart.try:vm-msvc-windows-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311320
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2023-06-26 08:40:50 +00:00
Martin Kustermann bee46896d8 [cfe] Use Uint8List instead of List<int> for representing bytes
Seems to reduce instruction count by 4% (when using AOT-compiled
pkg/vm/bin/gen_kernel.dart to compile pkg/compiler/lib/src/dart2js.)

Change-Id: Ica88716bd9c06ea446258cd3eb4f26ca1890805b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311121
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2023-06-26 08:07:13 +00:00
Sergey G. Grekhov 6dd135aacc [co19] Roll co19 to 3fdaddfde59604e21dcf66ab353fe867c7931133
2023-06-23 sgrekhov22@gmail.com Fixes dart-lang/co19#2080. Fix typo in correct_member_overrides_A03_t14.dart (dart-lang/co19#2097)
2023-06-22 sgrekhov22@gmail.com dart-lang/co19#2080. Move `Correct member overrides` to Superinterfaces folder (dart-lang/co19#2096)
2023-06-22 sgrekhov22@gmail.com Fixes dart-lang/co19#2083. Expect `unspecified` error in const_collections_A08_t01.dart (dart-lang/co19#2084)
2023-06-22 sgrekhov22@gmail.com dart-lang/co19#2080. Update assertion texts, add mixin syntax test (dart-lang/co19#2095)
2023-06-22 sgrekhov22@gmail.com dart-lang/co19#2080. Add correct member overrides tests. Part 2. Setters (dart-lang/co19#2093)
2023-06-21 sgrekhov22@gmail.com Fixes dart-lang/co19#2090. Add required final instance variable to a inline class (dart-lang/co19#2091)
2023-06-20 sgrekhov22@gmail.com dart-lang/co19#2080. Add correct member overrides tests. Part 1. (dart-lang/co19#2088)
2023-06-20 sgrekhov22@gmail.com dart-lang/co19#2080. Update assertion texts of overriding tests (dart-lang/co19#2089)
2023-06-15 sgrekhov22@gmail.com dart-lang/co19#1400. Add inline classes members override test (dart-lang/co19#2085)

Change-Id: I4a5a112cb11590b0c15032a65f5b80193a42b27b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311160
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-06-26 07:39:09 +00:00
Konstantin Shcheglov eeecd53fe2 De-duplicate refactoringContext in RefactoringProducer.
Change-Id: Ia1dcbaf301d37d977b22742bf8198c64f7d34159
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311159
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-24 17:00:20 +00:00
Konstantin Shcheglov 69c62b1a31 Remove shipped features, and deprecated experiments from tests.
Change-Id: I428906a1d75a0dacedc8a5d5fd805f84ca8e3ce0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311156
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-24 16:23:28 +00:00
Tess Strickland f7e26c508d [vm] Add support for hash-based caches in SubtypeNTestCache stubs.
This also lowers the threshold for converting from a linear cache
to a hash-based cache from 100 to 30 on non-IA32 architectures.
(IA32 still goes to runtime if there's a hash-based cache.)

For SubtypeTestCache benchmarks above this threshold, we see an
improvement varying from ~50-100% to ~700-800% on all architectures,
from lowest number of checks (50) to highest (1000).

For SubtypeTestCache benchmarks below this threshold, no major
changes are seen: generally <5% improvement or <5% regression per
check at most.

TEST=vm/cc/TTS

Change-Id: I83aa7c085ab5a411e944ec660d6b8eba7a788ee0
Cq-Include-Trybots: luci.dart.try:vm-aot-linux-debug-simriscv64-try,vm-aot-linux-debug-x64-try,vm-aot-linux-release-x64-try,vm-aot-linux-product-x64-try,vm-aot-linux-release-simarm64-try,vm-aot-linux-release-simarm_x64-try,vm-aot-linux-debug-x64c-try,vm-aot-tsan-linux-release-x64-try,vm-aot-mac-release-arm64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-aot-dwarf-linux-product-x64-try,vm-linux-release-ia32-try,vm-linux-debug-x64c-try,vm-linux-debug-x64-try,vm-linux-debug-simriscv64-try,vm-linux-release-simarm64-try,vm-linux-release-simarm-try,vm-mac-release-arm64-try,vm-mac-release-x64-try,vm-tsan-linux-release-x64-try,vm-reload-rollback-linux-release-x64-try,vm-reload-linux-release-x64-try,vm-ffi-qemu-linux-release-arm-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308941
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2023-06-24 12:56:12 +00:00
Nate Bosch a92a1e5064 Use main branch for flutter engine clones
The master branch was renamed to main.

Change-Id: Ib38f3976b497c17e0bda904cb99864e127016272
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311153
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2023-06-23 23:31:36 +00:00
Konstantin Shcheglov b013a40f39 Add isInline to ClassElement.
Change-Id: I80dafc9ef0dc03b8090032a7b7168302a8d6ad66
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311150
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-23 22:49:09 +00:00
Ryan Macnak ce6634e041 [build] Collapse now-identical application_snapshot and kernel_application_snapshot.
Change-Id: I6aabe13b9e4adcfcfb073197e9b6b5605e16e30c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310968
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-06-23 21:58:30 +00:00
Ryan Macnak 1f953c3fe1 [vm, gc] Remove some dead code.
TEST=ci
Change-Id: Ia0d0f181b8d54c3ec0e1cc8f2076bea7854379ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311142
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2023-06-23 20:35:00 +00:00
Alexander Markov 57863dc64b [vm/aot/tfa] Tree-shake unused libraries
On a large app (which apparently has too many unused dependencies),
size of the AOT kernel file:
before: 464 MB
after: 108 MB

TEST=pkg/vm/testcases/transformations/type_flow/transformer/libraries.dart
Bug: b/287638965
Change-Id: I79a26305c00741babb6a69a18919983b398109e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310772
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2023-06-23 20:14:08 +00:00
Konstantin Shcheglov 98d7e25027 [CMSR] Test that it works with FunctionTypedFormalParameter(s).
Change-Id: I86d483d379e7fe0be2dccf1659d2c6377dcc8eb1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311140
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-23 19:30:12 +00:00
Konstantin Shcheglov ecc18c9600 [CMSR] Tests for TrailingComma, support for required positional formal parameters.
Change-Id: I1e477782895a053ff2060dada8fe834bd2c2c8db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310977
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-06-23 17:53:30 +00:00
Alexander Aprelev b892ccdb19 [gardening] Fix 'debugger()' line expectations in tests.
Follow-up to bbdf87d277.
TEST=ci

Change-Id: I3198698cd6df8a917fa676b6ff42b72cb645949e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311141
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2023-06-23 17:46:57 +00:00
Ryan Macnak b9843b876d [vm] Prevent nested handling of SIGPROF.
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/52765
Change-Id: I14301d67ad245d3df96624155b383cb5f4c7f981
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310975
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-06-23 17:01:58 +00:00
Alexander Aprelev bbdf87d277 [vm/debugger] Have debug step check point after debugger() call.
Fixes https://github.com/dart-lang/sdk/issues/46006
TEST=ci

Change-Id: I89a7ad248b75204d1754668cfb23c8d98f554b28
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310779
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2023-06-23 16:53:48 +00:00
Nate Biggs 43df18a0d2 [dart2js] Use existing J-model entities where possible when converting from kernel to JS entity maps.
Change-Id: I1bcfecb313fab1e7dc03bf1d8c14b8410226f431
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/309140
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-06-23 16:02:50 +00:00
Nate Biggs dbd34a452e [dart2js] Remove nullability on type declaration for IR type variables.
The only nullable call to the JTypeVariable constructor was if the K-model had a Local as the typeDeclaration.

However, the K-model creates LocalTypeVariable entities for these instead of TypeVariable entities. The former is never added to the K- element map so they aren't copied over to the J-model up front:
https://github.com/dart-lang/sdk/blob/main/pkg/compiler/lib/src/kernel/element_map_impl.dart#L1531

Instead the corresponding JTypeVariable entities are added later when the closures are created:
https://github.com/dart-lang/sdk/blob/main/pkg/compiler/lib/src/js_model/element_map_impl.dart#L1871

Change-Id: If018fe8ca666695989b0f2075d837f8e6994f0fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311060
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-06-23 16:02:50 +00:00
Samuel Rawlins 30b9595c2b Revert "Bump linter to 3632a3d83488af2ba8eb60e674b7e3b8de82816b"
This reverts commit f264102869.

Reason for revert: new failures in flutter: https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8777535850571080129/+/u/Analyze/analyze/test_stdout

Original change's description:
> Bump linter to 3632a3d83488af2ba8eb60e674b7e3b8de82816b
>
> Change-Id: Ifd4937c81db36073ee2ec7f20b8fdfdc3f557cfe
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310766
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Commit-Queue: Samuel Rawlins <srawlins@google.com>

Change-Id: I3b2b44be9452266e6a6e63a0b01c0526ad1c0600
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311042
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2023-06-23 05:30:12 +00:00
Konstantin Shcheglov 9b3e36bbdc Refactorings run with multiple AnalysisContext(s) and sessions.
If we use just the session that produced the resolved unit, we will
not update other packages for example.

I tried to apply a refactoring to `LanguageVersionImpl` from `_fe_analyzer_shared`, and it did not update `analyzer`. With this change it does update :-)

Change-Id: I47fc28b4adba59c8e025e1bfe17490e4038d28ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310973
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-23 00:22:38 +00:00
Nate Bosch 34d9241a71 Add a notice about HashMap keys changing hashCode
Closes #33384

Similar to a notice in the doc for `HashSet` where it is also unsafe to
change `hashCode` while an object is in the collection.

R=lrn@google.com

Change-Id: I0e609656fccd563ecf71d4be5ecadafc1a6da891
CoreLibraryReviewExempt: Doc changes only.
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310774
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2023-06-23 00:10:19 +00:00
Konstantin Shcheglov c50958a019 [CMSR] Add LSP command 'Move selected formal parameter(s) left'.
Change-Id: Ia30e9bad9643d80c183d8b17a0d3aae065c30dc7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310969
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-06-22 23:13:27 +00:00
Nate Bosch d3f79404ac Expand StreamTransform.fromHandlers docs
Closes #27740

Mention the convenience constructors `fromhandlers` and `fromBind` in
the class level doc.

Describe the default behavior of each handlers.

R=lrn@google.com

Change-Id: Ica55d5a2f531e11106085122aa32173cc436991a
CoreLibraryReviewExempt: Doc changes only.
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310765
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2023-06-22 23:10:28 +00:00
Helin Shiah 5b3f7990e8 Revert "Revert "Send DAP events through DDS"" - only check for event handler when DDS URI is also set.
Original change reverted due to test failure: https://github.com/dart-lang/sdk/issues/43743#issuecomment-1601278402

This reverts commit 02b10e1321.

Change-Id: Idb2cbffe18342c76d0cc062e5855c10a6df0e8f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310780
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Helin Shiah <helinx@google.com>
2023-06-22 21:43:22 +00:00
Marcin Wojnarowski e56ef707eb Fix grammar docs for type aliases in AST
Closes https://github.com/dart-lang/sdk/pull/52515

GitOrigin-RevId: aa7b3ddee2a5b90bbb671e15b9a777ae441f83b4
Change-Id: Ib201d5ef9193b50305138efc23e97b8c5be8336f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/305840
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-06-22 21:17:52 +00:00
Kallen Tu 951d589c20 [analyzer] Refactor visitPrefixExpression, visitNamedExpression, and visitParenthesizedExpression.
Change-Id: I5a5fa0897d25aab3092fc526342c5af12a67e0a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310770
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2023-06-22 20:48:48 +00:00
Nate Bosch 1837435273 Mention iteration depth for some Iterable methods
Closes #7797

Most of the other suggestions have already been added, add an explicit
mention of shorcutting for `contains`, `firstWhere`, and `single`,

R=lrn@google.com

Change-Id: I53c254839f198a368fcb8734c3f7983b9b3ccad4
CoreLibraryReviewExempt: Doc changes only.
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310767
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2023-06-22 20:44:09 +00:00
Jake Macdonald b9bcfa7004 add Library and LanguageVersion classes, all declarations now have a library
Bug: https://github.com/dart-lang/language/issues/2839
Change-Id: Id09b2da070302b67f7c9921f1ad8a6d91a129f77
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311000
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2023-06-22 20:37:14 +00:00
Kallen Tu 9ec1a84f29 [analyzer] Produce CONST_EVAL_EXTENSION_METHOD diagnostic when using extension methods in const contexts.
More specific error code.

Semi-related to work in https://dart-review.googlesource.com/c/sdk/+/301505.

Change-Id: I1233e9e31389d387a9c777fe83cdd30a224bd00e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310760
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2023-06-22 20:35:29 +00:00
Konstantin Shcheglov 09f6d8bb58 Use select() instead of NodeLocator in CorrectionProducerContext.
Includes https://dart-review.googlesource.com/c/sdk/+/310060,
as it is 2023-06-20 @ 1243

Change-Id: I8f9788bb3a7b669191e34a8ec42b81d2ebcd31b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310325
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-22 20:29:07 +00:00
Konstantin Shcheglov c2ffa07d7e [CMSR] Tests for removing first / last named / positional formal parameter.
Change-Id: I4028f17b9244835beb60d955f12763ff9184afc4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310967
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-22 20:27:24 +00:00
Nicholas Shahan cc5b77a710 [ddc] Handle undefined as null in switch
Add a case for `undefined` whenever a case expression is a null
constant.

Issue: https://github.com/dart-lang/sdk/issues/51527
Change-Id: I6e9946b588e293bcf0b953d568495c8be95f3749
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310775
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2023-06-22 20:12:28 +00:00
Devon Carew f5131f9304 [deps] rev dartdoc, lints, test, vector_math, web_socket_channel, webdev
Revisions updated by `dart tools/rev_sdk_deps.dart`.

dartdoc (793d575..4757339):
  47573391  2023-06-21  Sam Rawlins  Remove dependency on code_builder (#3451)
  370cb2c4  2023-06-21  Sam Rawlins  Remove all use of package:build (#3448)
  70c2897b  2023-06-20  Sam Rawlins  Simplify some code in PackageBuilder (#3447)
  1a8403ec  2023-06-20  Sam Rawlins  Rank libraries lower than classes and class members (#3446)

lints (4b79906..79581ff):
  79581ff  2023-06-20  Devon Carew  update core and recommended from the recent review (#136)

test (3d5afed..cdc8178):
  cdc8178b  2023-06-21  Nate Bosch  Ignore a false positive for unreachable_from_main (#2041)

vector_math (a3aca09..c147038):
  c147038  2023-06-20  Lukas Klingsbo  `Vector2` constructor benchmark (#297)

web_socket_channel (af72652..7fb82f2):
  7fb82f2  2023-06-21  Brian Quinlan  Add a note explaining why the onerror doesn't generate a more detailed exception (#273)

webdev (b58edb7..6fe17fe):
  6fe17fe8  2023-06-21  Elliott Brooks  Prepare Webdev `3.0.5` release (#2151)
  3b7f266c  2023-06-21  Elliott Brooks  Small fixes for the `release` script (#2150)
  45446ec9  2023-06-20  Elliott Brooks  Reset DWDS to `19.0.2-wip` (#2149)
  91cbd183  2023-06-20  Elliott Brooks  Prepare DWDS for release to version 19.0.1 (#2145)
  a7b81589  2023-06-20  Elliott Brooks  Don't run proper_release_test with the rest of the test common tests (#2146)
  aa586d29  2023-06-20  Elliott Brooks  Fix DCM errors in `chrome_proxy_service.dart` (#2148)

Change-Id: I27850a0b8b1241b03f07a5832555d4da6dfbff44
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310962
Auto-Submit: Devon Carew <devoncarew@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-06-22 20:02:16 +00:00
Stephen Adams 5a595124b4 [dart2js] Handle null as a switch statement case value.
Bug: 51527
Change-Id: I6203c9aa668689bb44800082864174b9fb215289
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310500
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2023-06-22 19:55:22 +00:00
Nate Bosch a282120406 Expand docs for Stream.lastWhere and singleWhere
Closes #30071

Add a template in the `firstWhere` doc for the paragraph about `orElse`
handling. Expand the discussion around error handling in the `lastWhere`
and `singleWhere` docs without relying on reading the `firstWhere` doc
first.

R=lrn@google.com

Change-Id: I302381bb5f4f7daa392ee22bbf667db7d7259ef5
CoreLibraryReviewExempt: Doc changes only.
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310761
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2023-06-22 19:07:40 +00:00
Konstantin Shcheglov 5940badbd3 Prepare to publish analyzer 6.0.0 and _fe_analyzer_shared 62.0.0
Change-Id: Ic816540e8b052fdd1fd59f030c334c3bf56e79f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310961
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-22 19:00:56 +00:00
Keerti Parthasarathy a023c3f00e Fix bug with change parameter type when there are no parameters in argument list
Change-Id: I5cabd16091cb66be45f107a3701128776e8129ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310820
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-06-22 18:45:27 +00:00