Commit graph

91780 commits

Author SHA1 Message Date
Konstantin Shcheglov
c207dafe77 Instrument WorkspaceSymbolHandler.
Change-Id: Ia822b253124b53e5ee283f7b3cce15db050eedb5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304280
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-05-18 15:43:17 +00:00
Konstantin Shcheglov
2223d8b324 Issue 52388. Report 'await super', without selector.
Bug: https://github.com/dart-lang/sdk/issues/52388
Change-Id: I19fe6d3e638e75ff36739949b9ea9e24cb043b73
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304220
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-05-18 15:39:26 +00:00
Alexander Markov
35307d406a Revert "[vm/compiler] Remove unnecessary type check from optimized switches"
This reverts commit 43ce5487c1.

Reason for revert: test failures on vm-aot-*-product-* bots.

Original change's description:
> [vm/compiler] Remove unnecessary type check from optimized switches
>
> Switch optimization now relies on static type of the tested value,
> so it is safe to omit the type check (with sound null safety) or
> reduce it to a null check (without sound null safety).
>
> TEST=co19/LanguageFeatures/Patterns/Exhaustiveness/exhaustiveness_enum_A01_t01
> Fixes https://github.com/dart-lang/sdk/issues/52422
>
> Change-Id: Ic93f4f212bee9ed3bfe5035f3c8d7535274c2f63
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304102
> Commit-Queue: Alexander Markov <alexmarkov@google.com>
> Reviewed-by: Alexander Aprelev <aam@google.com>

Change-Id: Ifa6ee75be49f7264fa4dfc08183d5ccb731c60d1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304321
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
2023-05-18 15:12:18 +00:00
Konstantin Shcheglov
64fcb8de1b Prepare for removing deprecated methods from NamedType.
The actual removal will happen in (to be rebased on top of this):
https://dart-review.googlesource.com/c/sdk/+/303280

Fixing direct uses of the deprecated `Identifier get name` is apparently
only about a half of the work. I should have followed my own advice to
the clients and prepared better.

These changes are necessary because we will stop creating and
visiting `Identifier`, and so `NamedType` should be handled directly.

Change-Id: Ie07b75b15eab277ed6c9b29a838561a7eb71f588
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303425
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-05-18 01:54:21 +00:00
Parker Lougheed
deddb64ff7 [pkg/analyzer] Fix meta annotation links in diagnostic messages
Bug: https://github.com/dart-lang/site-www/issues/4901
Change-Id: I238d9508984846c4bbe2bb1b23eb2b12fd262ed8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304260
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-05-18 00:55:53 +00:00
Eric Seidel
dfca8d333e Add an explicit Visual Studio Code workspace
This allows users of Visual Studio Code to open the sdk/ directory.

Without this, attempting to open the root of the repository results
in over 200k analyzer errors eventually hanging/crashing VSCode.

This matches what Fuschia and other large projects do to be able
to open large monorepo checkouts in VSCode. e.g.
https://fuchsia.googlesource.com/fuchsia/+/main/fuchsia.code-workspace

Bug: https://github.com/dart-lang/sdk/issues/52380
Change-Id: I1a69627bb6ca25e8f7f036a50534eaf0804e893e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303841
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Auto-Submit: Eric Seidel <eric@shorebird.dev>
2023-05-17 23:08:19 +00:00
Liam Appelbe
4f98a2dc9f [vm] Add VirtualMemory::DuplicateRX function.
Change-Id: I1f56687bf140faae113b2a4d2f34192cb87b68f7
TEST=DuplicateRXVirtualMemory
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303960
Auto-Submit: Liam Appelbe <liama@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2023-05-17 22:46:37 +00:00
Liam Appelbe
e730b171ea [vm] Fix asan errors in Disassembler_InvalidInput
The bug is that the disassembler doesn't do any bounds checking, other
than the outer while loop in Disassembler::Disassemble. For multi byte
instructions it relies on having well-formed input to avoid OOB errors.

This test is testing something that doesn't happen in real disassembly,
because usually the invalid machine code is embedded in valid machine
code, so there would be plenty of buffer between the invalid section
and the end of the input. The ideal fix would be to rewrite the
disassembler to do bounds checks, but short of that we can just add
some buffer to the end of bad_input.

Bug: https://github.com/dart-lang/sdk/issues/52421
Change-Id: If68d5485a130523ddf2a4d37f1c8e2ddf1cf485a
Fixes: https://github.com/dart-lang/sdk/issues/52421
TEST=Disassembler_InvalidInput
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304240
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Auto-Submit: Liam Appelbe <liama@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2023-05-17 22:36:03 +00:00
Ilya Yanok
0c5e1e8e48 Revert "Add auto-snapshotting and usage reporting."
This reverts commit 5fa6c5ed2a.

Reason for revert: breaks G3, we need to update //third_party/dart/leak_tracker first

Original change's description:
> Add auto-snapshotting and usage reporting.
>
> First attempt merged without passing bots and was rolled back: https://dart-review.googlesource.com/c/sdk/+/300862
>
> Change-Id: I782bf4d92394055e1f60a4275b5045e3622e239f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304101
> Reviewed-by: Samuel Rawlins <srawlins@google.com>
> Commit-Queue: Polina Cherkasova <polinach@google.com>

Change-Id: I8f1643e20f8d134cbf917dc43731798a1234cc2b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304181
Commit-Queue: Ilya Yanok <yanok@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2023-05-17 22:03:17 +00:00
Konstantin Shcheglov
92faa11311 When resolve a priority library, cache all ResolvedUnitResultImpl(s).
...not just the result for the immediately requested file.

Change-Id: I85f74708fb32ff79b3c8a8b68c9cea5db8093000
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-05-17 20:46:38 +00:00
Alexander Markov
08d00454ab [vm/compiler] Add assertions for non-empty flow graph fragments without an entry
TEST=ci

Change-Id: If30c745857ab033697d7ac3e7225847dbe9cb7e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304121
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
2023-05-17 19:36:03 +00:00
Eric Seidel
40946d2527 Roll protobuf-gn deps to include fix for mac builds
BUG=https://github.com/dart-lang/sdk/issues/52407

Change-Id: I3486b94d5a53ddbd708c8f853854853de9f98af7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304146
Commit-Queue: Derek Xu <derekx@google.com>
Auto-Submit: Eric Seidel <eric@shorebird.dev>
Reviewed-by: Derek Xu <derekx@google.com>
2023-05-17 19:32:49 +00:00
Devon Carew
45aba19ae7 [deps] rev convert, dartdoc, http, mockito, native, protobuf, test, test_process, tools, webdev
Revisions updated by `dart tools/rev_sdk_deps.dart`.

convert (b652c00..9a387f0):
  9a387f0  2023-05-16  Devon Carew  blast_repo fixes (#83)

dartdoc (2952f6b..702f3ff):
  702f3ff7  2023-05-16  Devon Carew  Update dependabot.yaml (#3415)

http (981b63b..fb3b4be):
  fb3b4be  2023-05-16  Brian Quinlan  Revert "Support the NSURLSession WebSocket API (#921)" (#931)

mockito (51a7728..3fadd2d):
  3fadd2d  2023-05-17  Ilya Yanok  Let users provide dummy values for types
  b14d571  2023-05-15  Googler  Fix for InvalidType

native (e01aa63..3d89166):
  3d89166  2023-05-16  Daco Harkes  Add iOS x64 back (#41)

protobuf (05058a7..038872b):
  038872b  2023-05-16  Oleh Prypin  Remove implementation of `hashCode` because it makes enum values non-const in Dart 3 (#831)

test (8e444df..cdedf40):
  cdedf40c  2023-05-16  Nate Bosch  Prepare to publish (#2016)

test_process (b6a6cd5..d7a1711):
  d7a1711  2023-05-16  Nate Bosch  Prepare to publish (#44)

tools (62c9604..49da4ca):
  49da4ca  2023-05-12  Polina Cherkasova  Add memory events. (#92)

webdev (60616ba..2b2ae0e):
  2b2ae0e8  2023-05-15  Elliott Brooks  Try to fix dependabot PRs (#2112)
  d19dafe0  2023-05-15  Elliott Brooks  Manual update deps (#2113)
  c0eb1069  2023-05-15  Elliott Brooks  Disable tests using webdriver (#2115)
  a16bc9f2  2023-05-15  Elliott Brooks  Dart Debug Extension builder fix (#2117)

Change-Id: Icd714c5d54cd3aee999e4ae3cc3a97928dc1a821
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304120
Commit-Queue: Devon Carew <devoncarew@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-05-17 19:28:01 +00:00
Jake Macdonald
8b826b8a92 Reland "Bump file to f05f5db0733274bed584e9915c39d34bb812fbb8"
This reverts commit ce22951112.

Reason for revert: Underlying internal issue fixed in cl/532838245

Original change's description:
> Revert "Bump file to f05f5db0733274bed584e9915c39d34bb812fbb8"
>
> This reverts commit b9ad3d21c2.
>
> Reason for revert: b/282823291, breaks Flutter on Android (at least) tests
>
> Original change's description:
> > Bump file to f05f5db0733274bed584e9915c39d34bb812fbb8
> >
> > Changes:
> > ```
> > > git log --format="%C(auto) %h %s" e90e5ed..f05f5db
> >  https://dart.googlesource.com/external/github.com/google/file.dart/+/f05f5db Make MemoryFile.openRead and _ChrootFile.openRead return Stream<List<int>> again (217)
> >  https://dart.googlesource.com/external/github.com/google/file.dart/+/f2f3076 MemoryFileSystem addStream onError (220)
> >  https://dart.googlesource.com/external/github.com/google/file.dart/+/5e76f74 Fix MemoryFileSystem to treat an empty path as non-existent (213)
> >  https://dart.googlesource.com/external/github.com/google/file.dart/+/7941466 Make `FileSystem.isLink` actually work (214)
> >
> > ```
> >
> > Diff: e90e5ed8e9..f05f5db073/
> > Change-Id: I526c98d80a809511f928d19b44fb89eb9a77a5e3
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303784
> > Auto-Submit: Devon Carew <devoncarew@google.com>
> > Reviewed-by: Jake Macdonald <jakemac@google.com>
> > Commit-Queue: Jake Macdonald <jakemac@google.com>
>
> Change-Id: I70aabfce6343746a093b41b1f490c7a723e116f4
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304003
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Ilya Yanok <yanok@google.com>

Change-Id: I446fd73621ff169c631341a85f4e944f097c354b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304143
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2023-05-17 19:12:59 +00:00
Konstantin Shcheglov
44de52b412 Issue 52427. Fix AddEnumConstant when the target enum has no constants.
Bug: https://github.com/dart-lang/sdk/issues/52427
Change-Id: Ia86928155dd63d81bf90cbae8cac669e8c02b79b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304144
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-05-17 18:54:32 +00:00
Brian Wilkerson
5bf2e8c782 Convert closure completion tests
This also removes the tests converted in the previous CL because I
forgot to delete the file.

Change-Id: I306d64d227e2b5f632a9da9b547ce649e5d33767
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304142
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-05-17 18:48:58 +00:00
Konstantin Shcheglov
464235a29e Issue 52426. Handle InvalidType in CorrectionUtils.getTypeSource()
Bug: https://github.com/dart-lang/sdk/issues/52426
Change-Id: I34fde1bf0836990ecb41a75c1684795d75d286fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304103
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-05-17 18:32:26 +00:00
Christian Findlay
e43939dd5d Some work on the issue #40614 now that we have soundness
Closes https://github.com/dart-lang/sdk/pull/52383

GitOrigin-RevId: 70014d0575d1623c1f777fab479cfa93088efa2a
Change-Id: Ibf4ad3d862b07873317785389799ee8dfc80290f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303161
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2023-05-17 18:25:11 +00:00
Konstantin Shcheglov
b54783f2f3 Issue 52425. Ignore SwitchCase when it (erroneously) happens in 3.0 library.
Bug: https://github.com/dart-lang/sdk/issues/52425
Change-Id: Ifa621eb10af698664cb9461cb3db8839eb73d3e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304141
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-05-17 18:15:48 +00:00
Polina Cherkasova
5fa6c5ed2a Add auto-snapshotting and usage reporting.
First attempt merged without passing bots and was rolled back: https://dart-review.googlesource.com/c/sdk/+/300862

Change-Id: I782bf4d92394055e1f60a4275b5045e3622e239f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304101
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Polina Cherkasova <polinach@google.com>
2023-05-17 17:56:47 +00:00
Lasse R.H. Nielsen
066106d19a Make Uri.base see IOOverrides changes to current directory.
Fixes #39796.

Tested: Case added to `io_overrides_test.dart`.
Bug: https://dartbug.com/39796
Change-Id: Id72f75f972f59f4f9b7d17e79b4bcffd6d79f2c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304006
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2023-05-17 17:27:13 +00:00
Alexander Markov
43ce5487c1 [vm/compiler] Remove unnecessary type check from optimized switches
Switch optimization now relies on static type of the tested value,
so it is safe to omit the type check (with sound null safety) or
reduce it to a null check (without sound null safety).

TEST=co19/LanguageFeatures/Patterns/Exhaustiveness/exhaustiveness_enum_A01_t01
Fixes https://github.com/dart-lang/sdk/issues/52422

Change-Id: Ic93f4f212bee9ed3bfe5035f3c8d7535274c2f63
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304102
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2023-05-17 17:11:28 +00:00
Nicholas Shahan
027d0738d0 Revert "[ddc] Avoid .__proto__ in super constructor call"
This reverts commit 8ed4c94893.

Reason for revert: Breaks tests during roll into internal.
b/283081451

Original change's description:
> [ddc] Avoid `.__proto__` in super constructor call
>
> Issue: https://github.com/dart-lang/sdk/issues/52372
> Change-Id: I0ee52ea11eeaea8b444ca2deaafb5ee1fe734fdc
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303089
> Commit-Queue: Nicholas Shahan <nshahan@google.com>
> Reviewed-by: Sigmund Cherem <sigmund@google.com>

Issue: https://github.com/dart-lang/sdk/issues/52372
Change-Id: I2fac7da10c35e61d85e7085fa90cd2207341048c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304140
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2023-05-17 16:23:39 +00:00
pq
1178e96bc1 add quick fix for cast_nullable_to_non_nullable
See: https://github.com/dart-lang/lints/issues/28

Change-Id: Ic0dac81467a3a3fbe7f7bf805ee59e3844edb6a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303681
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-05-17 16:18:54 +00:00
Zach Anderson
1b9198c679 Revert "[dart:js_interop] Disallow ffi and JS interop in the same library"
This reverts commit 1c5d23e8a2.

Reason for revert: https://github.com/flutter/flutter/issues/127027

Original change's description:
> [dart:js_interop] Disallow ffi and JS interop in the same library
>
> dart2wasm can use both dart:ffi and JS interop libraries. To avoid
> confusion around external members, this disallows JS interop from
> being used in the same library as dart:ffi.
>
> Change-Id: I53e0426306be99c43b2bbfc14d65075128f0d5c5
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301200
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Joshua Litt <joshualitt@google.com>
> Commit-Queue: Srujan Gaddam <srujzs@google.com>

Change-Id: I1fd872e6d0cd679ec9c1842557745647385ec3af
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304100
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-05-17 16:15:36 +00:00
Ryan Macnak
e04d826d1a [vm, reload] Defensively check against identity mapping for Enum.values.
Print additional information upon detecting an invalid become mapping.

TEST=ci
Bug: https://github.com/flutter/flutter/issues/126884 (speculative)
Change-Id: If15713e1f25561da4a12a6f1954bd57864df18db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303860
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-05-17 16:10:49 +00:00
Ilya Yanok
ce22951112 Revert "Bump file to f05f5db0733274bed584e9915c39d34bb812fbb8"
This reverts commit b9ad3d21c2.

Reason for revert: b/282823291, breaks Flutter on Android (at least) tests

Original change's description:
> Bump file to f05f5db0733274bed584e9915c39d34bb812fbb8
>
> Changes:
> ```
> > git log --format="%C(auto) %h %s" e90e5ed..f05f5db
>  https://dart.googlesource.com/external/github.com/google/file.dart/+/f05f5db Make MemoryFile.openRead and _ChrootFile.openRead return Stream<List<int>> again (217)
>  https://dart.googlesource.com/external/github.com/google/file.dart/+/f2f3076 MemoryFileSystem addStream onError (220)
>  https://dart.googlesource.com/external/github.com/google/file.dart/+/5e76f74 Fix MemoryFileSystem to treat an empty path as non-existent (213)
>  https://dart.googlesource.com/external/github.com/google/file.dart/+/7941466 Make `FileSystem.isLink` actually work (214)
>
> ```
>
> Diff: e90e5ed8e9..f05f5db073/
> Change-Id: I526c98d80a809511f928d19b44fb89eb9a77a5e3
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303784
> Auto-Submit: Devon Carew <devoncarew@google.com>
> Reviewed-by: Jake Macdonald <jakemac@google.com>
> Commit-Queue: Jake Macdonald <jakemac@google.com>

Change-Id: I70aabfce6343746a093b41b1f490c7a723e116f4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304003
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Ilya Yanok <yanok@google.com>
2023-05-17 15:24:41 +00:00
Devon Carew
b9ad3d21c2 Bump file to f05f5db0733274bed584e9915c39d34bb812fbb8
Changes:
```
> git log --format="%C(auto) %h %s" e90e5ed..f05f5db
 https://dart.googlesource.com/external/github.com/google/file.dart/+/f05f5db Make MemoryFile.openRead and _ChrootFile.openRead return Stream<List<int>> again (217)
 https://dart.googlesource.com/external/github.com/google/file.dart/+/f2f3076 MemoryFileSystem addStream onError (220)
 https://dart.googlesource.com/external/github.com/google/file.dart/+/5e76f74 Fix MemoryFileSystem to treat an empty path as non-existent (213)
 https://dart.googlesource.com/external/github.com/google/file.dart/+/7941466 Make `FileSystem.isLink` actually work (214)

```

Diff: e90e5ed8e9..f05f5db073/
Change-Id: I526c98d80a809511f928d19b44fb89eb9a77a5e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303784
Auto-Submit: Devon Carew <devoncarew@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2023-05-17 15:02:35 +00:00
Johnni Winther
4d37cc40ff [cfe] Support redirecting initializers in inline classes
Closes #52119

Change-Id: Id9322ba7c4571786c8c07b6a36c3b1e3ef94aec9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303740
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-05-17 12:35:07 +00:00
Jens Johansen
4fd173a43e [CFE] Various small optimizations
Looking at instructions this seems to speedup compilation of
`compile.dart` with about 1.00% in AOT mode.

Occasionally there's also a measurable time improvement, e.g.

```
msec task-clock:u: -1.3447% +/- 1.1644%
seconds time elapsed: -1.3438% +/- 1.1638%
seconds user: -1.8838% +/- 1.4478%
```

Change-Id: I98866740b00bc01c70dd82d7591864bcb278394d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303701
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-05-17 12:20:08 +00:00
Martin Kustermann
2d230aa0b5 [vm/ffi] Move ffi-callback related state from Thread to ObjectStore, move jit trampolines from Isolate to IsolateGroup
The ffi-callback related information on the [Thread] object is metadata
corresponding to ffi-callback-trampoline [Function] objects. There is
nothing thread or isolate specific about it.

Moving it away from [Thread] is needed because an [Isolate] can
have different [Thread] objects across its lifetime (see [0]): When
the stack of an isolate is empty, we reserve now the right to
re-cycle the [Thread]. If the isolate later runs again, it may
get a new [Thread] object.

This CL moves this information from [Thread] to the [ObjectStore]. In
addition we make the compiler be responsible for populating this
metadata - instead of doing this per-call site of
`Pointer.fromFunction()`. It will be preserved across snapshot writing
& snapshot reading (for AppJIT as well as AppAOT).

Similarly the JIT trampolines that are on Isolate aren't isolate
specific and can go to [IsolateGroup]. This simplifies doing the above
as the compiler can allocate those as well.

The effect is that [Thread] object gets smaller, GC doesn't have to
visit the 2 slots per-thread. It comes at expense of 2 more loads
when invoking the callback.

[0] https://dart-review.googlesource.com/c/sdk/+/297920

TEST=Regression test is vm/ffi{,_2}/invoke_callback_after_suspension_test

Change-Id: Ifde46a9f6e79819b5c0e359c3d3998d1d93b9b1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303700
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2023-05-17 11:23:28 +00:00
Eric Seidel
4c20cedd30 Fix analysis issues in benchmarks/ directory
Now that I'm able to open the entire SDK in VSC, I'm fixing some
of the analysis issues in various files (carefully) without changing
their meaning.

In this case, I removed unnecessary imports from benchmarks.
In regexp_benchmark I ignored one warning which likely would
have changed the behavior of the code.

BUG=https://github.com/dart-lang/sdk/issues/52419

Change-Id: I9a195a4e45121313bd9f065f2579a165c3fec05b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303901
Auto-Submit: Eric Seidel <eric@shorebird.dev>
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2023-05-17 09:14:50 +00:00
Daco Harkes
987c7a7c35 Revert "Use dap package in dds, dds_service_extensions"
This reverts commit 59bb1fce82.

Reason for revert: Breaks arm64 bot with
`Couldn't resolve the package 'dap' in 'package:dap/dap.dart'.`


Original change's description:
> Use dap package in dds, dds_service_extensions
>
> Change-Id: I678c810e02a5989ee1b4edebaf9d741e2fc7d026
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302849
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Commit-Queue: Helin Shiah <helinx@google.com>

Change-Id: Ie5895dc958ee6bad798007d380bc7e75a67b8926
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304000
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
2023-05-17 07:50:07 +00:00
Daco Harkes
dba0758120 Revert "Add auto-snapshotting and analytics for memory usage."
This reverts commit 5f1e7ade45.

Reason for revert: bots are failing

Original change's description:
> Add auto-snapshotting and analytics for memory usage.
>
> See video linked to issue: https://github.com/flutter/devtools/issues/5606
>
> Change-Id: I9f22031871e30bc7160e2c49b0423fb64df62223
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/300862
> Reviewed-by: Samuel Rawlins <srawlins@google.com>
> Reviewed-by: Jacob Richman <jacobr@google.com>

Change-Id: I54cb3943230ab1229cc8b2c9df40e9c71765df19
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303881
Auto-Submit: Polina Cherkasova <polinach@google.com>
Reviewed-by: Polina Cherkasova <polinach@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2023-05-17 07:43:26 +00:00
Konstantin Shcheglov
bd0e77c4fc Issue 52409. Reading a Never typed getter makes the flow unreachable.
Bug: https://github.com/dart-lang/sdk/issues/52409
Change-Id: I675ed8f8cfa0d2e5327c2c6bc0fb1bda7bde038c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303840
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-05-17 03:28:07 +00:00
Helin Shiah
59bb1fce82 Use dap package in dds, dds_service_extensions
Change-Id: I678c810e02a5989ee1b4edebaf9d741e2fc7d026
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302849
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Helin Shiah <helinx@google.com>
2023-05-17 03:26:57 +00:00
Brian Wilkerson
614de8dddf Convert the named constructor completion tests
Change-Id: I095571f486feead2ee4dad0a700bac46901e16a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303903
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-05-17 00:31:43 +00:00
Paul Berry
280c9c70c2 Make "mini ast" data structures public.
Changes all the node structures used by the "mini ast" representation
of Dart (which is used in flow analysis unit testing) to be public.

This prepares for some follow-up work in which I plan to make use of
these data structures from multiple test files.

Change-Id: I07483ad7778e16a45c664c4229c98d75ad6686ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303802
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2023-05-16 23:23:40 +00:00
Srujan Gaddam
1c5d23e8a2 [dart:js_interop] Disallow ffi and JS interop in the same library
dart2wasm can use both dart:ffi and JS interop libraries. To avoid
confusion around external members, this disallows JS interop from
being used in the same library as dart:ffi.

Change-Id: I53e0426306be99c43b2bbfc14d65075128f0d5c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301200
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2023-05-16 22:50:46 +00:00
Alexander Markov
db89fe08f8 [vm/compiler] Decide to optimize switch statements using static type of the tested value
TEST=runtime/tests/vm/dart/regress_52214_test.dart
Fixes https://github.com/dart-lang/sdk/issues/52214

Change-Id: Iaddd00e79ee814feda998f14750ec8980309ae74
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301480
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2023-05-16 22:36:22 +00:00
Polina Cherkasova
630cec473e Update AUTOSNAPSHOTTING.md
Change-Id: I363993bd54ddc01c1224f2ec53ce7c383aac2a68
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303801
Commit-Queue: Polina Cherkasova <polinach@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-05-16 22:08:47 +00:00
Ryan Macnak
5ad110fc4c [infra] Remove unused legacy configs and builders.
Change-Id: Id1c942eeb4c09b25a1349a98d5e783507a3b342b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303010
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-05-16 21:06:43 +00:00
Polina Cherkasova
5f1e7ade45 Add auto-snapshotting and analytics for memory usage.
See video linked to issue: https://github.com/flutter/devtools/issues/5606

Change-Id: I9f22031871e30bc7160e2c49b0423fb64df62223
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/300862
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Jacob Richman <jacobr@google.com>
2023-05-16 20:15:12 +00:00
Alexander Markov
91091f39a5 [vm] Avoid finalizing type parameter types of unregistered classes
Classes which do not belong to a class table can be printed as json
when creating responses to rejected hot reloads via vm-service API.
Printing such classes (even references) also prints their type
parameters, and changing that would be breaking for the tools.

However, type parameters of the classes which are not registered in
the class table cannot be finalized because they reference back to
the declaring class via class id / class table.
This change avoids finalization of such type parameters.

TEST=pkg/vm/test/incremental_compiler_test
Fixes https://github.com/dart-lang/sdk/issues/52350

Change-Id: I58b5dbe23ebff0671b0bd094747fb5074c49c285
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303781
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2023-05-16 20:13:19 +00:00
Nate Bosch
a98184d9ac Bump test to 8e444dfa269c42a76fd96dbf9547bd01013154f6
Changes:
```
> git log --format="%C(auto) %h %s" 931410c..8e444df
 https://dart.googlesource.com/test.git/+/8e444dfa Remove the matcher export from test_api (2004)

```

Diff: https://dart.googlesource.com/test.git/+/931410c860340456847f0f33aaa0777f93dc23d5..8e444dfa269c42a76fd96dbf9547bd01013154f6/
Change-Id: I5ec5c5af96812ffe480e2c63888d536f615e4aea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303682
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2023-05-16 20:01:36 +00:00
Konstantin Shcheglov
2ed244a575 Issue 52385. Use actual record value type, not the static one.
Bug: https://github.com/dart-lang/sdk/issues/52385
Change-Id: Ieb04e32e50a6ff3c3dc839676c7e3224f228971a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303445
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-05-16 18:55:38 +00:00
Marcin Wojnarowski
0f88ed05ef Replace 'explicit_reopen' mention with 'implicit_reopen'
Closes https://github.com/dart-lang/sdk/pull/52318

GitOrigin-RevId: 162234b0174615ee749a53acc62dc0eaff4850c2
Change-Id: I70ec74cee7f9ed9d6b4ec18ee485df509bd83712
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302222
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2023-05-16 18:41:24 +00:00
pq
8d6bc8dd60 quick fix for unnecessary_to_list_in_spreads
See: https://github.com/dart-lang/lints/issues/80

Change-Id: I4c77c69e8449a4db1f267143d3dcad19b89d3bed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303785
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-05-16 18:08:28 +00:00
Devon Carew
94c2f6528c [deps] rev args, async, bazel_worker, benchmark_harness, boolean_selector, browser_launcher, characters, cli_util, clock, collection, crypto, dartdoc, leak_tracker, lints
Revisions updated by `dart tools/rev_sdk_deps.dart`.

args (1864048..f0f6cd2):
  f0f6cd2  2023-05-12  Devon Carew  blast_repo fixes (#243)

async (0f368d3..d744058):
  d744058  2023-05-12  Devon Carew  blast_repo fixes (#242)

bazel_worker (1b86d3c..d9b389f):
  d9b389f  2023-05-12  Devon Carew  blast_repo fixes (#73)

benchmark_harness (f81b042..e717ad4):
  e717ad4  2023-05-12  Devon Carew  blast_repo fixes (#90)

boolean_selector (7eed402..3a1c982):
  3a1c982  2023-05-15  Devon Carew  Update README.md (#48)
  23e08e0  2023-05-12  Devon Carew  blast_repo fixes (#47)

browser_launcher (551e101..40e4315):
  40e4315  2023-05-12  Devon Carew  blast_repo fixes (#45)

characters (2af6783..3ef8883):
  3ef8883  2023-05-15  Devon Carew  blast_repo fixes (#82)

cli_util (7234f17..5a49947):
  5a49947  2023-05-15  Devon Carew  blast_repo fixes (#83)

clock (6b9df3e..fe85908):
  fe85908  2023-05-15  Devon Carew  blast_repo fixes (#51)

collection (6abff47..db2da48):
  db2da48  2023-05-15  Devon Carew  blast_repo fixes (#288)

crypto (4e9dde1..216931a):
  216931a  2023-05-15  Devon Carew  blast_repo fixes (#149)

dartdoc (d01ddc5..2952f6b):
  2952f6bf  2023-05-16  Sam Rawlins  Simplify ToolConfiguration and other options code (#3414)
  0cf21c15  2023-05-12  Janice Collins  Extract fileName / fileType from ModelElement, LibraryContainer into FileStructure (#3413)
  2ae78bcc  2023-05-12  Sam Rawlins  Split sidebars out into separate HTML files (#3384)
  f00d0443  2023-05-11  Janice Collins  Housekeeping:  language version 3.0, analyzer deprecations, pubspec update (#3412)
  370477d2  2023-05-10  dependabot[bot]  Bump github/codeql-action from 2.3.2 to 2.3.3 (#3410)
  e8c5de44  2023-05-08  Janice Collins  Begin extracting file structure information from ModelElement (#3408)
  24af8a11  2023-05-04  Janice Collins  Add a hideConstantImplementations dartdoc directive (#3398)
  078d42fd  2023-05-03  Janice Collins  Change language feature wording based on review in #3401 (#3405)
  31088c1b  2023-05-03  dependabot[bot]  Bump github/codeql-action from 2.2.12 to 2.3.2 (#3403)
  60055b4e  2023-05-03  Sam Rawlins  Update validate-sdk-docs task to allow 20 libs (#3404)

leak_tracker (bc7f604..8ae200a):
  8ae200a  2023-05-15  Polina Cherkasova  - (#62)

lints (17276ec..72f107a):
  72f107a  2023-05-15  Devon Carew  blast_repo fixes (#120)
  6732fbc  2023-05-15  Devon Carew  blast_repo fixes (#119)

Change-Id: Ibbb1fcc530da01653fe325bdcf77f1c764887a81
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303783
Auto-Submit: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-05-16 17:51:42 +00:00
Konstantin Shcheglov
39f240e751 Reset _classMembersLengthsIndex in LibraryReader.
This change might help with analyzing the bug.

Bug: https://github.com/dart-lang/sdk/issues/51855
Change-Id: I214a6238e696ffa2ba16df11946e65da18e81945
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303782
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-05-16 17:47:48 +00:00