Commit graph

99031 commits

Author SHA1 Message Date
Chloe Stefantsova 969de20633 [cfe] Restore NominalTypeVariable.bound and defaultType from Kernel
Previously the fields `bound` and `defaultType` of
`NominalTypeVariable` weren't computed from dill for the restored type
variables. That approach required to manually restore them in several
placses, making the process error prone. This CL contains changes that
compute `bound` and `defaultType` every time a `NominalTypeVariable`
is restored from dill.

Change-Id: Id25b405296769b2eb67dba8e7b41bf9e624d7365
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342841
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2023-12-21 09:38:20 +00:00
Daco Harkes 562f66b313 [gardening][vm] Adjust timeouts inside test
Also removes the status file entry. This test is not slow, it hangs.
So don't give it more time to hang.

Bug: https://github.com/dart-lang/sdk/issues/53878
Change-Id: Ifa5112f25edb16cffd8f26fb71917d1672eed34d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/343140
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2023-12-21 09:37:03 +00:00
Simon Binder 6ce0504924 [vm/ffi] Support native array fields
This lifts the restriction preventing `@Native` fields from having
`Array` types.

Closes https://github.com/dart-lang/sdk/issues/54337

TEST=tests/ffi/vmspecific_static_checks_native_test.dart
TEST=pkg/analyzer/test/src/diagnostics/ffi_native_test.dart
Cq-Include-Trybots: luci.dart.try:analyzer-mac-release-try
Change-Id: Ic485c86bac9a42ab06097a84a01aba3c481b98e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341860
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Marya Belanger <mbelanger@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2023-12-21 08:47:58 +00:00
Simon Binder a967ead7e9 [vm/ffi] Fix dylib_open_test on macOS
Different versions of macOS seem to be using a different error message,
which the test didn't reflect.

Closes https://github.com/dart-lang/sdk/issues/54424

TEST=tests/ffi/dylib_open_test.dart
Cq-Include-Trybots: luci.dart.try:vm-mac-release-arm64-try,vm-mac-release-x64-try,vm-linux-release-x64-try,vm-win-release-x64-try
Change-Id: I6e7a20bce9defd1550abbd0e8eb7487b5f833257
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342901
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2023-12-21 07:38:49 +00:00
Dan Chevalier 64aa1a9da3 Implement initial File Service api through DTD
Change-Id: I0aab4eb1b20c190924d36184145d37bdac7b68b3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342980
Commit-Queue: Dan Chevalier <danchevalier@google.com>
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
2023-12-21 00:24:37 +00:00
Mayank Patke de871364c3 [dart2js, rti] Add missing cases for record types.
Fixes: #54373
Change-Id: I8acd7363d1b712bb702f044dbd7836f58dcbacaf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/343041
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2023-12-20 23:21:33 +00:00
Konstantin Shcheglov 49a84a4fcf Macro. Rebuild export and library scopes after adding new declarations.
Change-Id: I7a01c96ba43f6c4204cca7e3cd622e4642bf2b5f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/343003
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-12-20 23:21:01 +00:00
Kenzie Schmoll f8cf1a734c Bump DevTools rev.
Change-Id: I6bd2060b77bf2b6313e6b863cef5cc9b15188978
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/343040
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>
2023-12-20 21:50:25 +00:00
Jake Macdonald 260835992c support ParameterElement in resolveIdentifier for augmentation libraries
Change-Id: I3001d6a521c6168e74a1e5727a03a1650d9f1839
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/343020
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
2023-12-20 21:26:46 +00:00
Kenzie Schmoll c680feedaf Improve error handling for serving static DevTools assets.
Change-Id: I2b62461a64ef6aa8b544b4ace894d7b5ded0912e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/343000
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>
2023-12-20 21:07:39 +00:00
Mayank Patke 3618845695 [dart2js] Use emittedValueType for sync* and async* functions.
Change-Id: I4e191d1e6b6b3a26af2013d564973f2d4fe8e457
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341397
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2023-12-20 19:24:09 +00:00
Daco Harkes ece281d7fa [vm/ffi] Clean up static errors test
The migration to the new test format ended up duplicating
`EmptyStruct` leading to many unrelated errors.

This CL removes all the duplicates. And accepts the current analyzer
and frontend semantics as is.

TEST=tests/ffi/vmspecific_static_checks_test.dart

Change-Id: I4f8ad08a892804d6a6a4335807fde324578e900a
Cq-Include-Trybots: luci.dart.try:analyzer-linux-release-try,analyzer-mac-release-try,analyzer-win-release-try,front-end-linux-release-x64-try,front-end-nnbd-linux-release-x64-try,front-end-nnbd-mac-release-x64-try,front-end-nnbd-win-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342900
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2023-12-20 19:04:58 +00:00
Simon Binder 1d9a34ce6e [analyzer] Fix docs for FFI diagnostics
This fixes snippets in the documentation for error codes related to
native fields by adding the `Int` type to the mock SDK and adding
missing `external` or `final` modifiers.

Closes https://github.com/dart-lang/sdk/issues/54416

TEST=pkg/analyzer/test/verify_diagnostics_test.dart
Cq-Include-Trybots: luci.dart.try:analyzer-mac-release-try
Change-Id: Ia07ae8d200c22742797596ff1f4f78c75649f28c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342941
Reviewed-by: Marya Belanger <mbelanger@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-12-20 18:06:01 +00:00
Konstantin Shcheglov 7a4d85ecd1 Don't consider type names used with import prefixes as shadowed by local.
Change-Id: I9e1fad5effa5bb598c01a3acce49b84b1176bea6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342727
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-12-20 18:04:09 +00:00
Konstantin Shcheglov a1006f4ef4 Extension type. Extension type is always exhaustive if the erasure is always exhaustive.
Bug: https://github.com/dart-lang/sdk/issues/54370
Bug: https://github.com/dart-lang/sdk/issues/54421
Change-Id: Iebd64c413f489ac12b1a8d56a987ad44df00534e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342729
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-12-20 17:36:37 +00:00
Nate Biggs 93c25ff2f8 [dart2js] Remove unnecessary CodegenWorldBuilder interface.
Change-Id: Ia530eb37924ec92a6f0740c022116ea51f17098e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342681
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2023-12-20 17:36:16 +00:00
Ömer Sinan Ağacan 1d0a7b28e3 [dart2wasm] Fix while statement context allocation in async functions
When compiling a `while` in an `async` function, we need to allocate the
context for the `while` *before* compiling the `while` condition,
because any variables introduced in `while` condition will be stored in
the `while` context, rather than the parent context.

Instead of fixing where we allocate `while` context, we could update
`CaptureFinder` to add variables in the condition to the parent context,
and update `for` code generator, as it currently allocates `for` context
before the conditions.

I don't know if that has any advantages, for now it should be OK to
update `while` code generator.

`for` code generator allocates the context before the conditions and
does not have this issue.

Fixes #54406.

Change-Id: I3c6bb7558a352d78c8f8a46a56d9bd3af68841a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342760
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2023-12-20 16:39:59 +00:00
Chingjun Lau 846b23f3ca Use the provided UriConverter to resolve uri in DAP isolate manager.
Change-Id: I1a708417bdb923823a581a9cdc158b0c35b02cd1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342484
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Helin Shiah <helinx@google.com>
Auto-Submit: Chingjun Lau <chingjun@google.com>
Reviewed-by: Helin Shiah <helinx@google.com>
2023-12-20 16:32:38 +00:00
Johnni Winther 130db45c40 Revert "[cfe] Run suite in together in update_expectations.dart"
This reverts commit 1f109d10ec.

Reason for revert: This interferes (weirdly) with which expectation files are being generated.

Original change's description:
> [cfe] Run suite in together in update_expectations.dart
>
> This speeds up update_expectations.dart by avoid to restart
> the expectation testing for each suite.
>
> Change-Id: Idaeb1cff3ac861b6d4781a4166442a102c754c71
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342586
> Commit-Queue: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Jens Johansen <jensj@google.com>

Change-Id: I807ab0dab9e7349bb09350a788f59d2ae7156804
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342840
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-12-20 13:52:18 +00:00
Simon Binder ada6b81761 [vm/ffi] Improve error messages on Windows
Use `FormatMessageA` to allocate an English description of an error code.
Previously, only the error code itself was shown.

Closes https://github.com/dart-lang/sdk/issues/52790

TEST=tests/ffi/dylib_open_test.dart
Cq-Include-Trybots: luci.dart.try:vm-win-debug-x64-try,vm-win-debug-x64c-try,vm-aot-win-debug-x64c-try,vm-aot-asan-linux-release-x64-try,vm-asan-linux-release-x64-try
Change-Id: Iccae6c763fb16d4bb999b9c260fcfea9c5de276b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/328420
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2023-12-20 13:24:16 +00:00
Jonas Termansen 669060f8c7 [build] Omit SDK and Git hashes on RBE.
Bug: b/296994239
Change-Id: I70c10fddc3bd01fef5ed5182e1d28d0797c431e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342421
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2023-12-20 12:23:56 +00:00
Jens Johansen c152cce35c [frontend server] Add test for expression compilation on/in extension types
This is done via the new json communication channel, which initially
also added support for sending "scriptUri" and "offset".

The js version of expression compilation still needs updating.
Flutter etc will also still have to be updated.

Change-Id: I428bda68aaa13aa947b57e87f7a5bfb28802cf95
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341921
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2023-12-20 11:14:57 +00:00
Jens Johansen 69a8834d15 [frontend_server] Take json when wanting to compile expressions
This adds an option to compile expressions (vm ones and javascript ones)
by communicating via json. This allows for future expansion without
destroying the communication channel.

For now the old versions will continue to exist, again to not destroy
alreadyy used communication channels.

Flutter etc. should be updated to use this new json communication,
but it can wait until plumbing in passing offset and scriptUri anyway.

Change-Id: Ifbff752527fea35e09a73e0bb210072d8ab81cdc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342340
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2023-12-20 10:39:01 +00:00
Johnni Winther 1f109d10ec [cfe] Run suite in together in update_expectations.dart
This speeds up update_expectations.dart by avoid to restart
the expectation testing for each suite.

Change-Id: Idaeb1cff3ac861b6d4781a4166442a102c754c71
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342586
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2023-12-20 09:53:48 +00:00
David Morgan 0c4db1ea87 [macros] Deduplicate RemoteException.
It's not clear that we need two; I kept the one with the better
`toString`.

R=jakemac@google.com

Change-Id: I80934c0f1b05b0c486105654b03b628e7acf439b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341920
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Morgan :) <davidmorgan@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Auto-Submit: Morgan :) <davidmorgan@google.com>
2023-12-20 09:49:38 +00:00
David Morgan 0a00546277 [macros] Add language tests for macro class augmentation.
R=jakemac@google.com

Change-Id: Ifa13747e2e05bcdc9dcb82a11acf0a043c9e9545
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341483
Reviewed-by: Jake Macdonald <jakemac@google.com>
Auto-Submit: Morgan :) <davidmorgan@google.com>
Commit-Queue: Morgan :) <davidmorgan@google.com>
2023-12-20 09:27:18 +00:00
Johnni Winther 41d2d8d5a4 [analyzer,cfe] Support contained types in as-pattern
This adds a new rule to exhaustiveness handling of the as-pattern. The
new rule checks whether the cast type is fully contained in the space
of the subpattern. If so, we can assume that the whole context type has
been matched because there is no value that passes the as-test that
would be rejected by the subpattern.

Closes #51986
Closes #54125

Change-Id: I0dc7fb072395aa3bc9f0b143afb320966f9d64c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/338760
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-12-20 09:05:26 +00:00
Ömer Sinan Ağacan 72fd1e01d2 [dart2wasm] Simplify and fix async* element type computation
Fixes tests:

- co19/Language/Functions/element_type_A02_t03
- co19/Language/Functions/element_type_A02_t04

Change-Id: Ifc186cb463fee26c59f81012c6da8925d902d9d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342561
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2023-12-20 08:31:25 +00:00
Konstantin Shcheglov 6bca7060de Extension type. Exclude extension types from sealed hierarchies.
Bug: https://github.com/dart-lang/sdk/issues/54405
Change-Id: I7b52816735a2ae28bb048d33ba5663bb0299fa63
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342728
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-12-20 01:55:58 +00:00
Nicholas Shahan e339deff3a [ddc] Cleanup use of Nullability.legacy
These uses all flow to code that ignores the nullability so `.nonNullable`
works just as well.

Issue: https://github.com/dart-lang/sdk/issues/49996
Change-Id: I5363b8f7f757d421866b60c9a9308bf2370f4e50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342723
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-12-19 23:28:27 +00:00
Parker Lougheed aabc9badd0 [linter] Add some not-bad examples to avoid_empty_else
Fixes https://github.com/dart-lang/site-www/issues/5341

Also migrates its tests to reflective tests.

Change-Id: I3171aedc304347bd24aa757b3f9d77351bb75cb4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342280
Auto-Submit: Parker Lougheed <parlough@gmail.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Marya Belanger <mbelanger@google.com>
Commit-Queue: Marya Belanger <mbelanger@google.com>
2023-12-19 23:18:53 +00:00
Sam Rawlins b87217f564 linter: Inline UnrelatedTypesVisitor into collection_methods_unrelated_type rule
After the previous two rules were removed, this is the only rule that
uses this logic, and there is no need to overcomplicate the rule.

Change-Id: I49f5b989da02e1be404ee76809b3d0a0602b5f36
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342200
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2023-12-19 23:17:29 +00:00
Keerti Parthasarathy 1a11cfd12a Remove just the declaration for unused variable for method invocations.
fixes https://github.com/dart-lang/sdk/issues/53820

Change-Id: I38d99c6f3afcbba609d150291f1dc0ad79f8c6b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342725
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-12-19 23:03:27 +00:00
Brian Wilkerson 1fabc670d2 Disable verification for three diagnostics
I have opened https://github.com/dart-lang/sdk/issues/54416 to track
fixing the docs.

Change-Id: I9fee04ca8404f83366fdef8985de900989092a61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342724
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-12-19 22:55:17 +00:00
Sigmund Cherem 29d0a7296e [ddc] Properly locate d8 in ddb script.
A recent change added an architecture subfolder to the distribution
of d8 binaries (see
https://dart-review.googlesource.com/c/sdk/+/336200). In the process
a lookup for the 'arch' was added in most uses of d8 in the repo,
but the changed missed the one in ddb (probably because this has no
test coverage).

Change-Id: I2a7639fb19f8fa0131fc636f31b233aef701e8c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342660
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2023-12-19 22:03:59 +00:00
Brian Wilkerson bf22c59509 [code complpletion] Convert argument list suggestion generation
Change-Id: I88fb8e3ce89b4ce0b5698e4436814ac4524767ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342701
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-12-19 21:54:18 +00:00
Kenzie Schmoll a86eb8bd11 Bump devtools_shared dependency to ^6.0.3
Change-Id: I611457fec4032e06cb5456020e884530e42f0b78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342720
Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
2023-12-19 21:27:33 +00:00
Derek Xu cd5d399e2b Reland "[ DDS ] Fix DDS AOT snapshot build rules"
This is a reland of commit 0a393f1b69

The problem was that the checks for whether or not dartaotruntime
existed were always returning false on Windows because the ".exe" suffix
wasn't being taken into account. Patchset 2 addresses this.

Original change's description:
> [ DDS ] Fix DDS AOT snapshot build rules
>
> dds_aot.dart.snapshot was not being generated for runtime build targets,
> and dds.dart.snapshot was being built regardless of whether or not we
> were building for an IA32 target.
>
> This change also adds a check for IA32 in 'dart run' so the "Could not
> find dds_aot.dart.snapshot. Have you built the full Dart SDK?" message
> isn't printed when we fall back to using dds.dart.snapshot.
>
> This change also reverts 2cc08595a6, which
> failed to fix the issue it was attempting to fix.
>
> TEST=pkg/vm_service tests
>
> Change-Id: Ic990082c25b0d022093ad66600332dfb2878709f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341760
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Commit-Queue: Ben Konyi <bkonyi@google.com>

TEST=pkg-win-release-try, pkg-win-release-arm64-try, and pkg/vm_service
tests

Change-Id: Ieab41edcb6bffca3be6bf628e357871f28949323
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342640
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2023-12-19 21:17:15 +00:00
Johnni Winther 8791b441a7 [cfe] Report errors on primary constructors
This adds reporting of errors on initializing formals and
function formal parameters in primary constructors of
extension types. These are not supported by the current grammar.

Change-Id: I9e09ea599b9a455398a20c34b79c375fd884423d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342583
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2023-12-19 21:13:49 +00:00
Konstantin Shcheglov 291e82a51e Macro. Use covariant LibraryImplFromElement.
Change-Id: I46af080fcd2434da7c85059909361bbfea1884bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342722
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-12-19 21:07:23 +00:00
Konstantin Shcheglov 4676cb07ef Macro. Implement DefinitionPhaseIntrospector.topLevelDeclarationsOf()
Change-Id: I461154725867dccbb1ab8d6f1d80ac05ac0ae01d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342721
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-12-19 20:26:28 +00:00
Jake Macdonald fe8a13d0b3 clarify the behavior of resolveIdentifier
Change-Id: I159db1f89cc1cd2976c8999480d7b85aa554c1f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342680
Auto-Submit: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-12-19 18:08:54 +00:00
Konstantin Shcheglov 051f276b3f Augment. Use the namespace of the enclosing library or augmentation during AST resolution.
Change-Id: I1e371f89577fdbe51d5d9abde36edc53c0f48ba2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342482
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-12-19 17:43:49 +00:00
Jake Macdonald 298988c972 clarify a few macro docs
Change-Id: I160c3695bbe0e489170b9c2206b6bb7a67792a9e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342140
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
2023-12-19 17:31:04 +00:00
Danny Tuppeny 63772f10fe [analyzer] Ensure watchers can be subscribed to more than once
The stream created by memory resources was a single-subscriber stream. The stream from the physical file system watchers was a broadcast stream, but the code to translate FileSystemException to the abstractions was written in a way that made it single-subscriber.

This fixes both to ensure that a `ResourceWatcher` can support multiple subscribers that can subscribe and cancel at different times.

We don't currently use this, so this change should effectively be a no-op right now, but it will allow us to reuse the temporary catchers we create when set up analysis roots instead of creating new ones.

There's an issue at https://github.com/dart-lang/sdk/issues/54274 discussing changing how we watch here, but it may still be worth picking the low-hanging fruit in the short-term.

Change-Id: I3bda77ddaee676c573021aa671cb01bae48bd56f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341740
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-12-19 16:53:59 +00:00
Sergey G. Grekhov 8f6be08cbb [co19] Roll co19 to b80c9a4cb6fb22b5c8a7395d532c8e461fe33ab9
2023-12-19 sgrekhov22@gmail.com Fixes dart-lang/co19#2441. Fix roll failures (dart-lang/co19#2443)
2023-12-18 sgrekhov22@gmail.com Fixes dart-lang/co19#2435. Fix roll failures (dart-lang/co19#2437)
2023-12-18 sgrekhov22@gmail.com dart-lang/co19#2420. Add extension types exhaustiveness tests. Variables (dart-lang/co19#2431)
2023-12-15 sgrekhov22@gmail.com Fixes dart-lang/co19#2430. Update expected errors positions for CFE (dart-lang/co19#2433)
2023-12-15 sgrekhov22@gmail.com Fixes dart-lang/co19#2432. Remove excessive expected error for CFE (dart-lang/co19#2434)
2023-12-14 sgrekhov22@gmail.com dart-lang/co19#2420. Add extension types exhaustiveness tests. Maps (dart-lang/co19#2426)
2023-12-14 sgrekhov22@gmail.com dart-lang/co19#2420. Add extension types exhaustiveness tests. Lists (dart-lang/co19#2424)
2023-12-14 sgrekhov22@gmail.com dart-lang/co19#2139. Fix wrong failure of Language/Functions/element_type_A02_t06 (dart-lang/co19#2429)
2023-12-13 sgrekhov22@gmail.com dart-lang/co19#2350. Add more factory constructors tests (dart-lang/co19#2427)
2023-12-13 sgrekhov22@gmail.com Fixes dart-lang/co19#2415. Update `StreamController.broadcast()` test according to the changed documentation (dart-lang/co19#2425)
2023-12-13 sgrekhov22@gmail.com dart-lang/co19#2350. Add/update factory constructor tests. Part 4 (dart-lang/co19#2367)
2023-12-12 sgrekhov22@gmail.com dart-lang/co19#2420. Add extension types exhaustiveness tests. Enums, trivial cases (dart-lang/co19#2423)
2023-12-11 sgrekhov22@gmail.com dart-lang/co19#2420. Add extension types exhaustiveness tests. Enums (dart-lang/co19#2422)
2023-12-11 sgrekhov22@gmail.com dart-lang/co19#2386. Rename well-bounded tests. Update descriptions (dart-lang/co19#2405)
2023-12-08 sgrekhov22@gmail.com dart-lang/co19#2415. Change expectations for Stream.asyncMap() according to the current behavior (dart-lang/co19#2421)

Change-Id: I777eba4f1615c8477a5d2044f295696dfc210b1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342582
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2023-12-19 16:20:14 +00:00
Alexander Markov 6b12473f75 [vm] Adjust return value of async/async*/sync* after the language spec change
Calculation of element type for the value returned from
async/async*/sync* functions was recently adjusted
in the spec to address soundness issue
(https://github.com/dart-lang/language/pull/3218).

This change adjusts Dart VM to conform to the new spec.

TEST=language/async/regression_54311_test
TEST=co19/Language/Functions/element_type_*

Fixes https://github.com/dart-lang/sdk/issues/54316
Issue https://github.com/dart-lang/sdk/issues/54311
Issue https://github.com/dart-lang/sdk/issues/54159

Change-Id: I4c51e7cba704d034350519375210bdb2086c5432
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342082
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2023-12-19 16:14:39 +00:00
Dan Chevalier e58efcb049 Connecting DTD and DTD_impl together.
This change adds the happy path for DTD_impl and DTD being able to:
- register streams
- register serviceMethods
- postEvents to streams
- call serviceMethods

Change-Id: I73865071745ef19a4493f86714e0855930243dd5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341700
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Commit-Queue: Dan Chevalier <danchevalier@google.com>
2023-12-19 15:36:22 +00:00
dependabot[bot] 08e3d3ee5a Bump actions/stale from 8.0.0 to 9.0.0
Closes https://github.com/dart-lang/sdk/pull/54303

GitOrigin-RevId: 5d98a35bd98e6fea52e28efff3e550c1e24ed275
Change-Id: I9e59c3da9b431a9c4d215311f5c65e2631811815
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/340840
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2023-12-19 15:34:36 +00:00
dependabot[bot] 7e13d4c2dd Bump actions/upload-artifact from 3.1.3 to 4.0.0
Closes https://github.com/dart-lang/sdk/pull/54393

GitOrigin-RevId: a80d7e70716f0dffc082984f62191cd23d42330e
Change-Id: I8c5b2ccd5b5b4b7c58ca51a59a4a0b7b7bce4beb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342320
Reviewed-by: Alexander Thomas <athom@google.com>
2023-12-19 15:34:19 +00:00