Commit graph

43884 commits

Author SHA1 Message Date
Jens Johansen b2756f3aae [CFE] Tool for benchmarking adjacent revisions
E.g. if asking the tool to figure out any performance changes to
revision 5222bfd90c it will checkout 5222bfd90c and 2037563b94
(the previous commit), make aot-snapshots for both and run both on
the same (specified) target.

Change-Id: Ief56843326343ebaa681df596162d1d08457a8f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311602
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2023-06-27 14:58:03 +00:00
Danny Tuppeny 4d1b418230 [dds/dap] Fix breakpoint resolution races when there are multiple isolates
When there are multiple isolates, we may get breakpoint responses/events like this:

- Request/Response to add breakpoint to Isolate 1
- Request/Response to add breakpoint to Isolate 2
- BreakpointAdded for Isolate 1
- BreakpointResolved for Isolate 1
- BreakpointAdded for Isolate 2

Because Isolate 2 did not load the script, the last breakpoint was never resolved. However because the breakpoint ID matched, we would forward this event to the client and un-resolve the previously resolved breakpoint. This would result in odd behaviour in VS Code.

Additionally, the VM may return the same BM breakpoint ID for what the client thinks are two breakpoints (they are on different lines, but resolve to the same location) so when we get a resolved breakpoint, we need to handle both:

- Client breakpoints that have already been transmitted
- Future client breakpoints that may resolve to this same VM breakpoint

The previous code assumed that a BreakpointResolved event could be handled just once. Either for an existing breakpoint, or a future one.

This change swaps from storing queued events to storing the resolution information for each breakpoint, and it does this even if there was an existing breakpoint (in case the breakpoint is reused in future).

Fixes at least some of https://github.com/Dart-Code/Dart-Code/issues/4598

Change-Id: I53b92debfaa0c8f538dc8d67966854bb89634708
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311480
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-06-27 14:54:10 +00:00
Ömer Sinan Ağacan f041dd4af4 [dart2wasm] Simplify a list intrinsic
Change-Id: I769d33ac838a09350427dcdc14e3c2a6daf37cc0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311381
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2023-06-27 14:50:00 +00:00
Danny Tuppeny 06ade88478 [dds/dap] Update test to not set breakpoints on invalid lines
Fixes https://github.com/dart-lang/sdk/issues/51928.

Change-Id: Ifdffd1a90fa8d9a07f34742874064b2192d0005c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310880
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-06-27 14:46:05 +00:00
Brian Wilkerson 45572cf7dd Pull in a new version of unified_analytics and update server
Change-Id: I7f63b55fc6a74f2adfc97f00950ca0516bae68ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310965
Reviewed-by: Elias Yishak <eliasyishak@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-06-27 13:35:08 +00:00
Slava Egorov 758727dd12 [vm] Rename tests causal_stacks -> awaiter_stacks and improve harness.
The main difference from the previous harness is that it
allows auto updating the expectations instead of
maintaining them manually.

This relands 0c1b2722ed with
changes to harness which fix issues on Windows.

Note: some amount of AOT failures are expected and should just
be approved. They will be fixed with the last CL in the series.

TEST=ci

Cq-Include-Trybots: luci.dart.try:vm-win-release-x64-try
Change-Id: I7ae84769ed54bc447ebf71acc68ba9d0b6717bac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311604
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
Auto-Submit: Slava Egorov <vegorov@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2023-06-27 11:50:32 +00:00
Tess Strickland 516f238aa6 Revert "[vm] Rename tests causal_stacks -> awaiter_stacks and improve harness."
This reverts commit 0c1b2722ed.

Reason for revert: Failures on AOT (stack expectations unmet) and Windows (parse errors due to Windows paths) trybots.

Original change's description:
> [vm] Rename tests causal_stacks -> awaiter_stacks and improve harness.
>
> The main difference from the previous harness is that it
> allows auto updating the expectations instead of
> maintaining them manually.
>
> TEST=ci
>
> Change-Id: I80e303d3ecbcc834ac94fa089cabe4f8834cc661
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311400
> Reviewed-by: Alexander Markov <alexmarkov@google.com>
> Commit-Queue: Slava Egorov <vegorov@google.com>

Change-Id: I7311bf08403f4167f88f6204fde1a6fdee353f7d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311600
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2023-06-27 09:02:28 +00:00
Vyacheslav Egorov 0c1b2722ed [vm] Rename tests causal_stacks -> awaiter_stacks and improve harness.
The main difference from the previous harness is that it
allows auto updating the expectations instead of
maintaining them manually.

TEST=ci

Change-Id: I80e303d3ecbcc834ac94fa089cabe4f8834cc661
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311400
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2023-06-27 07:47:39 +00:00
Vyacheslav Egorov 8d5dbbdf69 [vm/debugger] Rename "causal" to "awaiter" internally
The name is more accurately reflects what this stack trace
contains: despite what causal implies it does *not* actually
reflect the stack which initiated the async operation. Instead
it contains the chain of listeners which will run when
the async operation completes - its awaiters.

TEST=ci

Change-Id: Ie7309c9b1c39246e0fd4c14f7b9c515bcdfbbe10
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311384
Reviewed-by: Derek Xu <derekx@google.com>
2023-06-27 07:47:39 +00:00
Ludi Zhan cdd1163b27 [analyzer] Address coding style comments for visibleOutsideTemplate change
Addressing additional comments got from:
https://dart-review.googlesource.com/c/sdk/+/304825?tab=comments

Change-Id: I973c2c33a9a850122542389fc65d66c6fb810deb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311300
Auto-Submit: Ludi Zhan <ludizhan@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-27 03:53:37 +00:00
Anna Gringauze d2f5b3bfab [ddc] Add --canary flag to expression compiler worker
Closes: https://github.com/dart-lang/sdk/issues/52776
Change-Id: I639fe7fbadf3e938cc686aa8dbd2320a4cc7af7d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311151
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Anna Gringauze <annagrin@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2023-06-26 22:55:07 +00:00
Vyacheslav Egorov 4a6f9328a2 [vm/debugger] Simplify async breakpoints implementation
We no longer rewrite suspendable function into closures nested
inside the original function, so the whole synthetic async breakpoint
machinery is not needed.

Refactor `Breakpoint` class to make one-shot and per-closure
separate properties of breakpoint, which allows creating
one-shot-per-closure breakpoints.

TEST=existing service tests

Change-Id: I208afe13f36efa40f5746e44867bd24684cf5f03
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310601
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2023-06-26 22:45:10 +00:00
Jake Macdonald d1ecf01f71 Cache remote objects by ID, only send IDs for already sent objects
This is done through a synchronized cache between the server and client. When serializing a remote instance, if the server has already serialized that object then it will only send the ID in the future.

These caches currently only live as long as a single macro application in a given phase, but could live longer in the future. They do need to get reliably cleared out to avoid memory leaks though, and the shorter lifetime is easier to manage consistently.

This also allowed me to remove the specialized server/client modes (clients would always only send back IDs previously).

Change-Id: I4e8a102403153829d66b0ac379636f5a95a70cea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311420
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2023-06-26 22:36:37 +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
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
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
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
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
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
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
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
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
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
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
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
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
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
Srujan Gaddam 6fec16d482 [dart:js_interop] Require top-level externals to have @JS
To refuse confusion between dart:ffi and dart:js_interop,
top-level externals will need to be annotated when using
dart:js_interop.

Change-Id: I1e4887eb32f135df94426e43fc885346f1b9f1b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310485
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2023-06-22 18:45:21 +00:00
Keerti Parthasarathy ab884b7d7f Refactors to allow for parse only mode for lints and fixes.
- Make CorrectionProducer as base class for {Parsed/Resolved}CorrectionProducer.
- Use ParsedCorrectionProducer for ConvertDocumentationIntoLine
- Move sort imports test to used ParsedUnitResult
- Add getter to LintRule to indicate that rule can be run using just parsed AST


Change-Id: Id11466c445e6e505ea752d097b57143f18c47060
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310484
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2023-06-22 18:20:15 +00:00
Konstantin Shcheglov fe35362602 [CMSR] Support for removing formal parameters.
Change-Id: Id04f6c7854dec3d5059009a0a579110690d3eb62
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310963
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-06-22 18:09:23 +00:00
Danny Tuppeny 194767e452 [dds/dap] Add 'showGettersInDebugViews' which includes getters but lazily
The existing 'evaluateGettersInDebugViews' evaluates getters eagerly which can have side-effects. This adds a setting that allows showing getters in a way that can be shown lazily instead.

I added a new setting (instead of just making evaluateGettersInDebugViews=false be lazy) to preserve the ability to have getters not shown at all (since some users are using that today and might prefer this over lots of lazy getters showing up).

Fixes https://github.com/Dart-Code/Dart-Code/issues/4234

Change-Id: I56c2a7c8f85aa8c4cc85cfb3120a8cfec6b54c70
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310164
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-06-22 16:42:52 +00:00
Danny Tuppeny c2a4f8e7eb [dds/dap] Ensure breakpoint modifications do not drop resolution events
When adding new breakpoints, DAP clients send a full new set of breakpoints which results in us removing and re-adding all breakpoints (for a file).

When we re-add a breakpoint that already existed, we would sometimes get the BreakpointAdded event _before_ the addBreakpointWithScriptUri request completed. We couldn't process the event because without the original request completing we could not map the VM breakpoint back to the clients breakpoint to generate the event.

This could result in resolution events being lost, and breakpoints becoming unresolved when you modified them (depending on timing).

This change collects queues and replays any BreakpointAdded/BreakpointResolved events that arrived when the breakpoint ID is unknown, and when `addBreakpointWithScriptUri` completes, it immediately processes any items in this queue.

Fixes https://github.com/Dart-Code/Dart-Code/issues/4599

Change-Id: I11daaf99b786ab94f1cc93f9fd38a4f1e241320f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310620
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-06-22 16:36:55 +00:00
Danny Tuppeny 0a691e3647 [dds/dap] Fix a bug that could result in test failures
This logic was inverted and could result in duplicate terminate requests being sent. Depending on timing, this request might be sent but not responded to (because the DA was already shutting down), causing a "Application terminated with pending terminate request" error.

Change-Id: If89f002792878f8a5ce12341536be70ee01cde11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310380
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-06-22 15:26:39 +00:00
Konstantin Shcheglov a8a3f3f77e [CMSR] Improve 'get invocation' implementation.
Change-Id: I871eddc1727ea6a51e169f4031d55ba3bc93527d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310860
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-22 14:38:38 +00:00
Brian Wilkerson 1c3011cbf0 Capture a failing case in code completion
Change-Id: I6a21172628462d0f3b569360849f8417e48cad1c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310321
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-06-22 05:19:58 +00:00
Brian Wilkerson 5c84db453d Initial framework for completion refactoring
This is some prepration for starting the refactoring of the completion
support. The plan is for `InScopeCompletionPass` to implement the first
pass of the proposed algorithm. My intention is to convert one
contributor at a time (as much as possible), starting with the
`KeywordContributor`.

Change-Id: I206c704f5c2370f4c37b674be01ab7fb55afa65e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310200
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-06-22 05:18:07 +00:00
Konstantin Shcheglov dc01c56e94 [CMSR] Test when the agnostic refactoring updates multiple files.
Change-Id: Ia80d9e31db9d7ad17472aff0e5f5595bf43bc9ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310778
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-06-22 05:11:55 +00:00
Srujan Gaddam e985d991b1 [dart:js_interop] Fix JSNumber conversions/semantics and JSBoxedDartObject
- Adds toDartInt and toDartDouble to JSNumber
- Changes semantics of int on external functions from truncate to
assert integer value
- Adds tests for number semantics
- Renames JSExportedDartObject -> JSBoxedDartObject to avoid confusion
with @JSExport
- Adds Object.toJSBox

JSNumber.toDart and Object.toJS will be removed in a future CL once
migrations are complete.

CoreLibraryReviewExempt: Backend-specific library.
Change-Id: I8ff26ee5624c52703e49dd8483f62e829cb6fff0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/309081
Reviewed-by: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2023-06-22 02:51:13 +00:00
Konstantin Shcheglov 7ecc57ac9e [CMSR] Split into separate files.
Change-Id: I45f1b13a2a025887ee7eb05179934f219097f67c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310776
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-06-22 01:19:08 +00:00
Marcin Wojnarowski 330106212a Retain surrounding comments in remove comparison quickfix for if-statement
Closes https://github.com/dart-lang/sdk/pull/52544

GitOrigin-RevId: 267e6378cc9a3f64a1a177ec69279ed1baa61b4a
Change-Id: Idb51e14b46708d8b44bc703a4681deea7ec8b42e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/306220
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-06-22 00:26:27 +00:00
Konstantin Shcheglov 6a65dd0efe [CMSR] Check the second file for ConvertFormalParametersToNamed.
Change-Id: I07a477701939cf2f40c8eeb77faf5a2d38290a5e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310700
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-06-21 23:03:42 +00:00
Konstantin Shcheglov 1d9846b16f Remove ADD_NOT_NULL_ASSERT
We believe that it is not necessary anymore, with sound null safety.

Change-Id: I18741eafea1bd969139cdae3b94a294dde1b5abd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310769
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-06-21 22:54:12 +00:00
Danny Tuppeny eafa748a4b [dds/dap] Make hot reload test not flaky on Windows
On my Windows PC, this test often fails because the new content is never hot reloaded because the modification is made too soon after the app starts.

This change does what some Flutter tests do, which is to write a future modified stamp to ensure the file is considered updated when the reload is issued.

Change-Id: If52086fb279897d3e572162dc3a32436fbdb27c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310400
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-06-21 22:46:24 +00:00
Konstantin Shcheglov 55e7119183 [CMSR] Add new command to LSP, to convert selected formal parameter(s) to required named.
Change-Id: I7d86ccfe94cc960ea3a8204daf27f339c4ca767f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310764
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-06-21 22:06:44 +00:00
Konstantin Shcheglov 6a4f127831 [CMSR] Not available if external executable element.
Change-Id: Icf209c8cd844918a62195f8a024f0c0b8922f0d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310705
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-21 19:51:58 +00:00
Kallen Tu b8d8da0183 [analyzer] Refactor visitListLiteral to handle Constants.
Add CONST_FOR_LOOP error message to be clearer that for loops are not
allowed in const contexts.

visitListLiteral handles Constants.

Change-Id: I84465ecf4e1f044c256db45c723fac081b50a40c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/306917
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-06-21 18:20:51 +00:00
Helin Shiah 02b10e1321 Revert "Send DAP events through DDS"
This reverts commit 5292ee8839.

Reason for revert: Causes failure on `sse_smoke_test` because it needs to set up an event handler.

Original change's description:
> Send DAP events through DDS
>
> Change-Id: Ib40306b8e47d74b02b6cbf348c2b5833cfb31a9d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/309080
> Commit-Queue: Helin Shiah <helinx@google.com>
> Reviewed-by: Ben Konyi <bkonyi@google.com>

Change-Id: I62b12de8e2478441d9a7a4177ed1090aa845467f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310740
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Helin Shiah <helinx@google.com>
2023-06-21 18:17:16 +00:00
Konstantin Shcheglov c3f3a00465 [CMSR] More checks for not allowed order of formal parameters.
Change-Id: Ida0380afb141873e75c27460b0804a8457c876e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310703
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-21 18:12:48 +00:00
Konstantin Shcheglov 67970cc613 Add failing tests for enum and 'if'.
Change-Id: I23187e0699df36c8a24d066a733382fe090e3b44
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310701
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-21 17:57:29 +00:00
Brian Wilkerson bf62bc27bc Adjust the definition of coveringNode to favor identifiers
I would like to use `Selection` for code completion, but the current
definition of `coveringNode` too often favors the parent node over the
child node. This will effectively cause the cursor to bind more closely
to an identifier token than to other tokens, making it more useful for
code completion.

If we don't like this change for the general case, I can make these changes in a specialized `coveringNodeForCompletion`, but I'd rather not have two approaches.

Change-Id: I39e70f83ad44d50cec55a8bee1f7061dd83746fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310060
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-06-21 17:55:36 +00:00
Helin Shiah 5292ee8839 Send DAP events through DDS
Change-Id: Ib40306b8e47d74b02b6cbf348c2b5833cfb31a9d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/309080
Commit-Queue: Helin Shiah <helinx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-06-21 15:51:24 +00:00
Paul Berry 2ca7380ab0 Flow analysis: fix first phase handling of pattern assignments.
Prior to this change, the first phase of flow analysis, in which flow
analysis "looks ahead" to see which variables are potentially assigned
in each code block, was failing to properly account for variables that
are assigned by pattern assignment expressions. This "look ahead"
information is used by flow analysis to determine the effects of
nonlinear control flow (e.g. to figure out which variables to demote
at the top of a loop, or to figure out which variables are potentially
assigned inside a closure). As a result, it was possible to construct
correct code that would be rejected by the analyzer and compiler, as
well as incorrect code that would (unsoundly) be accepted.

The fix is to call `AssignedVariables.write` from the analyzer's
`FlowAnalysisVisitor`, and from the CFE's `BodyBuilder`, to let flow
analysis know about variable assignments that occur inside pattern
assignment expressions.

Fixes #52745.

Change-Id: I0e6f426a5c5c36f214d5a206aaf5a2de0bfdaac1
Bug: https://github.com/dart-lang/sdk/issues/52745
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310502
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-21 14:33:42 +00:00
Kallen Tu 3deaeb84dd [analyzer] Refactor visitFunctionReference for the const evaluator.
Simple functions can be printed in dart_object_printer.dart.
Moving function reference tests around so they can be easily found together.


Change-Id: If022721f7dca4881d51cbebd65ed968cd89c33c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308261
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2023-06-21 14:29:48 +00:00
Aske Simon Christensen 5838562040 [dart2wasm] Add option and target for stringref.
This adds basic infrastructure for a stringref implementation in
dart2wasm:

- A `--[no-]stringref` option to the compiler
- An option in the `WasmTarget`, controlling the name of the target
- Separate sets of patch files for the two targets
- Separate platform dill files for the two targets

For now, the patch file contents are the same, and the compiler flag
is not used by the backend (only by the `dart2wasm` script to select
the appropriate platform dill file). Both of these will change as the
implementation progresses.

Tested: ci + manual check that the option selects the correct dill
Change-Id: I2c9bb95ba06fd3de3f7007703ef545e3f0c728ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310621
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
2023-06-21 14:25:38 +00:00
Vyacheslav Egorov 8f6eaeb883 [infra] Pass TEST_COMPILATION_DIR to Android tests
The whole directory is already copied to the device. This makes
it consistent with tests running on the host and allows us to
access various artefacts (e.g. SO files containing DWARF
information).

Change-Id: I9fe20fdbb48ad5a3742286a84c87f87f580f2c09
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310600
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2023-06-21 14:17:34 +00:00
Stephen Adams b64fc318e7 [dart2js] Update JavaScript global names list
The following would fail unminified because the variable shadowed the
global JavaScript constructor. The fix is to add more global names to
the avoid-list. This is not a problem for js-interop since those are
accessed via `self` or `globalThis`.

```
import 'dart:typed_data';

foo(int Float32Array) => Float32List(Float32Array);

main() => print((foo)(10));
```

Change-Id: I887ece4a888fdab5df437822f9f1f34b384ec24f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310482
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
2023-06-21 01:49:57 +00:00
Robert Nystrom ce9e38fff1 Update package:dart_internal to work with SDK 3.2.0.
Fixes #52742.

Change-Id: I11cebf22f48788632e45cacc1e43c3be069a03dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310323
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2023-06-21 01:14:38 +00:00
Stephen Adams 5cbba84b91 [dart2js] Better const Maps and Sets
Constant Sets now have their own classes rather than being constructed as a wrapper over a const Map. The new scheme is similar to Maps - using a ConstantStringSet backed by a JavaScript Object 'dictionary' when the elements are all suitable String values, otherwise using a GeneralConstantSet backed by a list of elements that is converted to a lookup map on demand.

Constant Sets and Maps with suitable String keys are backed by a JavaScript Object literal 'dictionary'. The use of the Object literal has been changed so that the property values are no longer the values of the Dart Map, but the position of the key in the order of the entries. The values are provided as a List (Array), so there is an additional indexing operation to access the value on lookup. This does not seem to affect performance.

The advantage of the two-level lookup using the 'dictionary' is that Maps with the same keys (in the same order) can share a 'dictionary'. In order to achieve the advantage, the JavaScript Object is modeled as a first class ConstantValue - JavaScriptObjectConstantValue.

These changes achieve a code size benefit of -0.90% (~130K) on the main unit of a certain large app, and -0.35% for flute/benchmarks/lib/complex.dart

Change-Id: Icad2e6136218486a439e3c5ed0296462e3c3c4e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310020
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2023-06-20 23:44:08 +00:00
Elliott Brooks 70af4a9db0 Add constructor to RPCErrorKind enum
Follow up to https://dart-review.googlesource.com/c/sdk/+/307970

Learned from Kenzie this was possible :) https://github.com/flutter/devtools/pull/5917#discussion_r1231368050

Bug: https://github.com/dart-lang/sdk/issues/52636
Change-Id: Ic244765a6258c000c4171ece35273609c7ee5929
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/309831
Commit-Queue: Elliott Brooks <elliottbrooks@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-06-20 18:33:50 +00:00
Danny Tuppeny 421ac46702 [dds/dap] Implement missing "pause" request
Fixes https://github.com/Dart-Code/Dart-Code/issues/4597

Change-Id: Id21baa8428f80f5c9e80840caf836dc05c4f7209
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310343
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-06-20 18:29:26 +00:00
Devon Carew 78da16c5ae [dartdev] fix an issue with the macos process listing
Bug: https://github.com/dart-lang/sdk/issues/52402
Change-Id: I71a9d1112475347beae5a634d0275847a5c7685e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308962
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-06-20 18:08:44 +00:00
Danny Tuppeny 2d197e4c60 [dap] Regenerate DAP classes based on latest published version of spec
A lot of this change is just documentation comments, but it includes some minor updates such as supporting "lazy" on variables.

All changes are backwards compatible and this should not affect any tests or functionality of Dart's DAP implementation (but provides the ability for us to use the new features).

Change-Id: Ief81927f2f370b4bfb6b5a9acc8659c45c33ea18
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310161
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-06-20 17:29:24 +00:00
Danny Tuppeny 01c02d6afd [dds/dap] Clear stored thread data on resume
When an isolate is paused, we store some data for things like variables, stack frames, etc. to round-trip an identifier to the client that it can ask about later.

Previously we never cleared these, so over time in a long debug session they could build up. The DAP spec says these references become invalid when execution is resumed:

> To simplify the management of object references in debug adapters, their lifetime is limited to the current suspended state. Once execution resumes, object references become invalid and DAP clients must not use them.

Because it's possible to resume one thread without another, I'm clearing up only the specific thread (isolate)s data when it resumes, rather than all of it.

Fixes https://github.com/Dart-Code/Dart-Code/issues/4420

Change-Id: I2ba7d9cd3f23b5a628d9e279e49edf2bee5afd29
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310342
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-06-20 16:41:49 +00:00
William Hesse 98009cf7a7 [test] Report android infra failures correctly when running tests
Any adb failures when test_runner runs tests on android devices,
except an failure of the actual precompiled test when it is run,
should be reported as an infra failure and should shut down the
test runner.

After change https://dart-review.googlesource.com/c/sdk/+/291304
these types of failure were reported as test failures instead.

Fixes: b/281492587
Change-Id: Iea47ccffac81b0b92f3a3fb3780d2181d08fc1d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310260
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2023-06-20 15:49:38 +00:00
William Hesse 6a37857855 [test] Mark analyzer/test/verify_docs_test as slow
Fixes: https://github.com/dart-lang/sdk/issues/52738
Change-Id: Iaba3f3cab566073c8739f274e16d24e181e7209b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310280
Auto-Submit: William Hesse <whesse@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2023-06-20 12:06:50 +00:00
Johnni Winther 9059949ce9 [cfe] Initial check of macro annotations
This adds a check that all annotations of macro classes correspond
to applied macro applications. This should be improved in the future
to detect what the problem with the annotation was. For now it helps
avoid inadvertently using invalid/unrecognized annotations in the
macro feature development.

Change-Id: I9574e2e24150d2febfc5489ab4ebf0ae2627e3fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310101
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-06-20 07:36:21 +00:00
Jens Johansen a0f71d4f6b [analyzer] Make benchmark report memory usage in bytes to make golem happy
Initial commit at https://dart-review.googlesource.com/c/sdk/+/276100
used kb because that's what was reported by the system.
I wasn't allowed to add that to golem though, and then I forgot about
it.
This CL changes it to bytes so it can hopefully by allowed into golem.

Change-Id: Ia7fae9ed47e6d237648e266c26f4a644f13571d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310160
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2023-06-20 06:07:48 +00:00
Konstantin Shcheglov 62f66ecef4 [CMSR] Initial support for constructors.
Change-Id: I2349eaf5dd59596bab1137e297fdf08873d79c1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310201
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-06-20 00:33:28 +00:00
Ömer Sinan Ağacan 87a3de41b1 [dart2wasm] Implement micro-task scheduling
Use JS `setTimeout` for events and `queueMicrotask` for micro-tasks.

dart2js event loop implementation is copied in `run_wasm.js` to be able
to use `clearTimeout`, `setInterval`, `clearInterval`, and
`scheduleMicrotask`, which are not not available in d8, and `setTimeout`
in d8 does not wait before calling a callback.

New passing d8 tests:

- co19/LibTest/async/Future/Future.delayed_A01_t02
- co19/LibTest/async/Stream/Stream.periodic_A01_t01
- co19/LibTest/async/Stream/Stream.periodic_all_t01
- co19/LibTest/async/Stream/Stream.periodic_all_t02
- co19/LibTest/async/Stream/timeout_A04_t01
- co19/LibTest/async/StreamController/stream_all_A01_t01
- co19/LibTest/async/StreamController/stream_all_A01_t02
- co19/LibTest/async/StreamController/stream_all_A02_t01
- co19/LibTest/async/StreamController/stream_all_A02_t02
- co19/LibTest/async/StreamController/StreamController.broadcast_Stream_all_A01_t01
- co19/LibTest/async/StreamController/StreamController.broadcast_Stream_all_A01_t02
- co19/LibTest/async/StreamController/StreamController.broadcast_Stream_all_A02_t01
- co19/LibTest/async/StreamController/StreamController.broadcast_Stream_all_A02_t02
- co19/LibTest/async/Timer/Timer.periodic_A01_t01
- co19/LibTest/async/Timer/Timer_A01_t01
- co19/LibTest/core/Stopwatch/elapsedTicks_A01_t01
- language/async/call_test
- language/regress/regress21795_test
- lib/async/multiple_timer_test
- lib/async/periodic_timer2_test
- lib/async/periodic_timer3_test
- lib/async/periodic_timer4_test
- lib/async/schedule_microtask3_test
- lib/async/schedule_microtask_test
- lib/async/stream_timeout_test
- lib/async/timer_isActive_test
- lib/async/timer_repeat_test
- lib/async/timer_test

New passing Chrome tests:

- co19/LibTest/async/Stream/timeout_A04_t01
- language/async/call_test
- lib/async/schedule_microtask3_test

Tests below fail because of async* desugaring issues and will be fixed
separately:

- language/async_star/no_cancel2_test
- language/async_star/no_cancel_test

Tests below fail because of an existing issue (#29615):

- co19/LibTest/async/StreamController/StreamController.broadcast_Stream_all_A01_t03
- co19/LibTest/async/StreamController/StreamController.broadcast_Stream_all_A02_t03
- co19/LibTest/async/StreamController/stream_all_A02_t03

Fixes #51599.

Change-Id: Ib313e99bf3b3cb3bebeddc9e47dc77425ef94481
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/305201
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2023-06-19 10:21:35 +00:00
Paul Berry 6dff4755e6 Rename Ir to IR, per dart style conventions
"IR" is a two-letter acronym (short for "intermediate
representation"), not a two-letter abbreviation, so both the "I" and
the "R" should be capitalized.

See
https://dart.dev/effective-dart/style#do-capitalize-acronyms-and-abbreviations-longer-than-two-letters-like-words.

Change-Id: I641b6d4ffc656ba9cd527e05df6e865527ec56d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310080
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-06-19 08:47:00 +00:00
Liam Appelbe 583da435e9 [analyzer] Support for RawVoidCallbacks
Pointer.fromFunction returns a native function pointer to a Dart
function, but has the restriction that the native code must invoke it
on the same thread as the isolate that created it. RawVoidCallbacks is
a new API that is similar to Pointer.fromFunction. It returns a native
function pointer that can be invoked on any thread, with the
restriction that the Dart function must return void. Under the hood we
forward the function args over a port to the target isolate.

We're not 100% settled on the name of the class, but the overall API
design won't change. I'll make sure to get the naming finalized before
submitting this CL. Doc with discussion of naming:
https://docs.google.com/document/d/1z9Rgahoid2AhC9JXwsDAEODvlJS6dvBHCbcGkOxv_ws/edit?resourcekey=0-TbdNiSL-fdwskla02QaPwg#heading=h.te70ikwelbw8

Bug: https://github.com/dart-lang/sdk/issues/37022
Change-Id: Iba98f6f803c52919b942fa054df1060991574c8c
TEST=ffi_async_callback_test.dart
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308860
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Marya Belanger <mbelanger@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2023-06-18 23:28:52 +00:00
Konstantin Shcheglov c24c41eeac Extract availability analysis from selection analysis.
Danny gave a good idea that checking for availability of a refactoring
should be cheap. Change method signature refactoring mostly satisfied
this, with one exception - we cannot compute formal parameters for
an ExecutableElement, because we need resolved AST to do this, and
the invoked method can be declared in a different file. We cannot
afford resolving other files while checking.

So, this CL separates availability checking, and preparing formal
parameters, postponing expensive opertions until the time when the
action is invoked.

Change-Id: Ic703d70717e41de304c9dbcef66cadb22c139ad8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310041
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-06-18 20:51:16 +00:00
Paul Berry 80bc65bb0b Flow analysis: add field promotion support for cascades.
This change updates the flow analysis support for field promotion
(which is not yet switched on by default) so that it supports field
accesses inside cascade expressions. The key moving parts are:

- The type hierarchy `PropertyTarget` (which is used by the client to
  tell flow analysis whether the target of a property access is
  `this`, `super`, or an ordinary expression) now has a new class,
  `CascadePropertyTarget`, to represent the situation where the target
  of the property access is an implicit reference to the target of the
  innermost enclosing cascade expression.

- Flow analysis has two new methods on its API:
  `cascadeExpression_afterTarget` and `cascadeExpression_end`, so that
  the client can inform flow analysis when a cascade expression is
  being analyzed.

- Flow analysis uses its `_makeTemporaryReference` method to track the
  implicit temporary variable that stores the target of cascade
  expressions. (This method was developed as part of flow analysis
  support for patterns, where it creates the data structures necessary
  to track the implicit variables that are created as part of pattern
  desugaring).

- The "mini-AST" pseudo-language used by flow analysis unit tests now
  has a way to represent cascade expressions and method invocations.

- In addition to unit tests for `_fe_analyzer_shared`, `analyzer`, and
  `front_end`, there are new language tests in
  `tests/language/inference_update_2` to test cascaded field
  promotions in end-to-end fashion.

Bug: https://github.com/dart-lang/language/issues/2020
Change-Id: I21353bbc884ed599cb1739cecfb68ad1d975d18b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/309220
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2023-06-17 08:13:20 +00:00
Konstantin Shcheglov fda8556438 [CMSR] Write existing extra named formal parameters and arguments.
Change-Id: Ibbd69140c7e46bca95dd72f99739eccd1984b2d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/309828
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-06-17 05:20:27 +00:00
Nicholas Shahan b5c42b8cc6 [ddc] Fix missing type rules
Type rules for classes appearing in the type hierarchy above types
in the current module were missing. Specifically types that appear
in instantiations of supertypes.

Issue: https://github.com/dart-lang/sdk/issues/48585
Change-Id: I11f2af1435f18ab7567766c865d9898d60b9272b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/309827
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-06-16 23:24:52 +00:00
Nicholas Shahan 0ead4ff72b [ddc] Fix type environment in forwarding stubs
When mixin applications introduce forwarding stubs with covariant
checks they can contain uses of type parameters that belong to the
synthetic mixin application class. The type environment needs to
be updated to contain those type parameters.

Also cleanup some comments, variable names, and the code to avoid
an assertion failure. Methods can contain covariant checks on the
arguments, not just setters.

Issue: https://github.com/dart-lang/sdk/issues/52688
Change-Id: Ifd91f76de85cb2092b0a3a0c4a808f2660eb5c17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308460
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-06-16 22:31:26 +00:00
Nate Biggs d87219bd30 [dart2js] Add test that loads multiple Dart2JS apps with different runtimes.
I confirmed that this test would've failed before the fix was submitted: https://dart-review.googlesource.com/c/sdk/+/309761.

Change-Id: I9c823c3acfb094a58143140069d55e01e2631581
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/309840
Auto-Submit: Nate Biggs <natebiggs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2023-06-16 17:12:38 +00:00
Jake Macdonald 96dcb2a5ab add support for type annotations and code arguments
Change-Id: I14ad05e810494de94f7935b7ca11b1922f90ecda
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/309021
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2023-06-16 16:59:06 +00:00
Konstantin Shcheglov 21cfe2ce61 Breaking changes for analyzer version 6.0.0
Change-Id: I792c3d66fb10ab779e2a5011b2909efa5738aba7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265183
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-06-16 16:31:27 +00:00
Keerti Parthasarathy fd4af5f0ff Wire up changeParameterType when running dart fix cli
Change-Id: I41e96ca4722faf746e18b193319d84ade0e08138
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/309800
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-06-16 15:58:38 +00:00
Jake Macdonald 4590fc83e7 Reland "Add wrappers for macro arguments to help with serialization."
The type arguments have to be explicitly given for collection types,
but this should be doable given they are all constants and only certain
types are allowed.

Change-Id: I2721f37d194d73de1df81302298101adeb87534c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/309460
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2023-06-16 14:02:05 +00:00
Johnni Winther 9c68598133 [cfe] Assert verification errors
This adds assertions that no verification errors are found.
This enables the distinction between compile-time errors and
verification during trybot testing, leaving the latter as crashes
rather than (unexpected) compile-time errors, while retaining the
good diagnostics.

Change-Id: I097d875a75e8343c67cb96190b53320d4799663c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/309662
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2023-06-16 12:41:14 +00:00
Johnni Winther dd4a95793d [cfe] Ensure abstract methods have sync marker
This ensures that abstract methods have sync markers even when they
are erroneously marked with a sync*, async or async* marker. This
ensures that these are verifiable.


Change-Id: I6d5bed9305129c47306ad9fd0e248683a6577800
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307804
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2023-06-16 12:31:22 +00:00
Martin Kustermann ddc236ba64 [vm] Add @pragma('vm:keep-name') annotation
This allows us to keep symbol names for classes/methods/fields - even if
obfuscation is enabled, but has no other effect on tree shaker / ...

For go/dart-ama

TEST=vm/dart/keep_name_pragma_test

Change-Id: I66c0fc32217d9180f821658bae463f2c1d7fb1af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/309740
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Auto-Submit: Martin Kustermann <kustermann@google.com>
2023-06-16 10:22:23 +00:00
Paul Berry 788a3a95c2 Flow analysis: clean up public method call to functionExpression_begin.
In a future CL, I plan to refactor some of the flow analysis API so
that the CFE can supply subexpressions to flow analysis before they
are lowered, rather than after. This should help reduce the risk of
bugs where lowering leads to type promotion being lost
(e.g. https://github.com/dart-lang/sdk/issues/52183).

The refactor I'm planning will be easier if there are no calls to the
flow analysis API within flow analysis itself, so to prepare for it,
this CL moves the body of `FlowAnalysisImpl.functionExpression_begin`
to a private method, and updates both `functionExpression_begin` and
`lateInitializer_begin` (which use the same underlying logic) to call
that private method.

Bug: https://github.com/dart-lang/sdk/issues/52189
Change-Id: I1185418225b8a402670e6eece6599c326fdc234a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/309440
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-06-16 10:18:05 +00:00
Jens Johansen 5e08794bbf [analyzer] Plug "temporary leak" when starting new rebuilds before afterContextsCreated is called
If again and again editing, say, a `pubspec.yaml` with proper timing
there is a "temporary leak" that repairs itself once the analyzer
finishes (some time after the editing stops).

What happens is that old contexts are saved in the
`declarationsTracker` but eventually cleared in the
`afterContextsCreated` call.

In a test on Windows (on Linux I'd currently run into
https://dartbug.com/52703) I opened the entire "pkg" folder and edited
a `pubspec.yaml` file every 5 seconds.
The analyzer went from using something along the lines of 700MB of heap
to using around 2.5 GB of heap after 25 edits and 17GB (!) of heap
shortly before stopping at 250 `pubspec.yaml` edits.
After the editing stopped (and clicking the GC button in observatory)
the heap usage went down to ~650MB heap used.

This fixes the problem by clearing the `declarationsTracker` on the
`afterContextsDestroyed` call too. In the same test it stays at around
300-700MB of heap.

Possibly related to:
https://github.com/dart-lang/sdk/issues/48788
https://github.com/dart-lang/sdk/issues/52447

Change-Id: Ia38cc946a1f36fa8c5b6804f79cbc8dd96c21030
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/309722
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2023-06-16 06:42:41 +00:00
Konstantin Shcheglov a2c10f4fe7 Use latest linter.
Change-Id: I4701582dcc7e304295bb63768703a9513a3e6401
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/309821
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-06-16 04:54:47 +00:00
Brian Wilkerson 3a870a3056 Fix another place where the plugin id leaks the path
Change-Id: I6a399917ec0bdfab74bea027b04a6d416eec3999
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/309824
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-06-15 22:49:57 +00:00
Nate Biggs eb7dc8494a [dart2js] Fix event log init logic.
The bug can be occur when 2 Dart2JS apps load on the same page but 1 uses a version of the Dart2JS runtime prior to https://dart-review.googlesource.com/c/sdk/+/309361 and the other uses the runtime from after 309361. If the one from before 309361 loads onto the page first, the `$__dart_deferred_initializers__` will be initialized without `eventLog`. Then the second app will load and see that `$__dart_deferred_initializers__` is present and try to add to `eventLog`, but `eventLog` will not be present.

This would cause an exception in the Dart2JS runtime and probably prevent the page form loading correctly.

Change-Id: I05b17867e24ae80cb4d7cdc615c8b985321912f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/309761
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2023-06-15 21:58:34 +00:00
Derek Xu be125afc18 [VM/Service] Create package:vm_service_protos for distributing code for working with Perfetto protos
TEST=get_perfetto_vm_timeline_rpc_test and
get_perfetto_cpu_samples_rpc_test

Change-Id: I4a001ec634b939a258e337630633ce826e0f8b4d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303022
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2023-06-15 19:01:00 +00:00
Nate Biggs a54d2ec9b8 [dart2js] Use J- instead of K- entities everywhere.
The only entities specific to the K- model are `KLocalFunction` and `KLocalTypeVariable`. I've copied these both (as is) to the J- model.

The only thing we "lose" here is the calls to `checkFamily` in `kernel/element_map_impl.dart`. Given how interchangable the 2 models were, this wasn't adding much value anyway.

Since there is still a distinction between the K- environment and J- environment, we can now think of that conversion as being between a `J` and `J'` environment where the semantics are slightly different (e.g. `J'` has closure conversion applied).

Using the same model also makes it easier to have more intermediate states of the `J` model. For example, we might keep around the `JLocalFunction` nodes until SSA and do closure conversion at that point instead.


Change-Id: If149241725a03b8de6aba6d486506434529b998d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/306980
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-06-15 18:12:52 +00:00
Brian Wilkerson 022fd17a62 Only include ids of plugins hosted on pub.dev
For extra safety I want to ensure that the plugin is hosted on pub.dev.

Change-Id: I7f2a2f4b85ad6263a97a0927653fb0b688c79224
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/309400
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-06-15 17:54:57 +00:00
Brian Wilkerson 1b7837fb52 Reduce the number of data-points reported for percentiles
Change-Id: Icbdc4895d7cc862caf6a40ce1738540a4becee69
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/309540
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2023-06-15 17:04:17 +00:00
Johnni Winther 1864b7f4c8 [cfe] Add test for const redirecting factory in inline classes
Change-Id: I44fdd829271f7ca8ed223ce874883b93c9e23e0c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/309282
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Kallen Tu <kallentu@google.com>
2023-06-15 13:13:47 +00:00
Nate Biggs 9ecdfb68f3 [dart2js] Add test for deferred loading bundling.
Change-Id: I8720eed34551dbf06364c50ab01cef752a1aca58
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/309462
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2023-06-14 20:55:20 +00:00
Parker Lougheed 67ea3cafee [pkg/analyzer] Focus inference_failure_on_function_return_type target on function name
Closes https://github.com/dart-lang/sdk/issues/52700

Bug: https://github.com/dart-lang/sdk/issues/52700
Change-Id: I1a252c275da1a7702df568e97301fd180a662d52
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/309443
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-06-14 19:22:51 +00:00
Derek Xu ed943203b9 [VM/Service] Update package:vm_service's pubspec and CHANGELOG to v11.7.1
v11.7.0 has to be skipped because it was retracted.

Change-Id: Ia51a1b0ec261e671d2007a03c5089ff590e1313e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308723
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2023-06-14 18:42:36 +00:00
Nate Biggs a7d2477af7 [dart2js] Address small comments on compact_flags.
Change-Id: I33d00f58a6d8ef04a1ff48cf7312d99dbefa9f91
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/309360
Reviewed-by: Mayank Patke <fishythefish@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2023-06-14 18:32:49 +00:00
Nate Biggs df0382c900 Reland "[dart2js] Simplify event log initialization logic in each part file prologue."
This is a reland of commit 7b2d5baa48

Original change's description:
> [dart2js] Simplify event log initialization logic in each part file prologue.
>
> Change-Id: I0731b78f5b0437f5e5026ee6d9f2511698968804
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308201
> Commit-Queue: Nate Biggs <natebiggs@google.com>
> Reviewed-by: Sigmund Cherem <sigmund@google.com>

Change-Id: I0bc53c9d0745ea01af638f47e503c9570dec266b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/309361
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2023-06-14 18:26:55 +00:00
Daco Harkes 0dfe563696 [pkg/ffi] Add dryRun to native_assets_builder
Adding it to this package means that launchers (flutter_tools) doesn't
have to do the same package graph traversal.

Notable difference with a build: no meta-data is passed through.

Change-Id: I30d8531e08095742bc8b5952bff919b9f85402ea
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308881
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Hossein Yousefi <yousefi@google.com>
2023-06-14 18:10:15 +00:00
Ilya Yanok 042952ef9b Revert "[dart2js] Simplify event log initialization logic in each part file prologue."
This reverts commit 7b2d5baa48.

Reason for revert: breaks ~600 tests in G3 (though it looks to be just one JS file that got broken), b/287219647

Original change's description:
> [dart2js] Simplify event log initialization logic in each part file prologue.
>
> Change-Id: I0731b78f5b0437f5e5026ee6d9f2511698968804
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308201
> Commit-Queue: Nate Biggs <natebiggs@google.com>
> Reviewed-by: Sigmund Cherem <sigmund@google.com>

Change-Id: Iedd1b0a4909f490bc54eebde3462e6bd57c3c1a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/309283
Reviewed-by: Alexander Thomas <athom@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Ilya Yanok <yanok@google.com>
2023-06-14 15:53:07 +00:00
Ilya Yanok 396ed71267 Revert "Add wrappers for macro arguments to help with serialization."
This reverts commit ea7e014c3c.

Reason for revert: breaks Analyzer tests, CBuild regression.

Original change's description:
> Add wrappers for macro arguments to help with serialization.
>
> In particular this allows us to reproduce type arguments for collections in the
> macro expansion isolate.
>
> The type arguments have to be explicitly given for collection types,
> but this should be doable given they are all constants and only certain
> types are allowed.
>
> Bug: https://github.com/dart-lang/language/issues/2212
> Change-Id: I14a688ed294cf060c004849efa975b5bef053d5b
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308202
> Reviewed-by: Bob Nystrom <rnystrom@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Commit-Queue: Jake Macdonald <jakemac@google.com>
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>

Bug: https://github.com/dart-lang/language/issues/2212
Change-Id: I402802c7a1c27f9aee3f23baef8c0deb71ec06e9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/309284
Commit-Queue: Ilya Yanok <yanok@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2023-06-14 15:34:37 +00:00
Danny Tuppeny c1969260e8 [analysis_server] Validate server includes all used commands in ServerCapabilities
Change-Id: I03855b7528d8199ceb140b0f0c59dd21c025dc90
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/309260
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-06-14 14:54:56 +00:00
Jake Macdonald ea7e014c3c Add wrappers for macro arguments to help with serialization.
In particular this allows us to reproduce type arguments for collections in the
macro expansion isolate.

The type arguments have to be explicitly given for collection types,
but this should be doable given they are all constants and only certain
types are allowed.

Bug: https://github.com/dart-lang/language/issues/2212
Change-Id: I14a688ed294cf060c004849efa975b5bef053d5b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308202
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-06-14 14:54:30 +00:00
Kallen Tu 2700afa476 [analysis_server] Change mixin subtype diagnostic status to needsFix.
Bug: https://github.com/dart-lang/sdk/issues/52686
Change-Id: I2482c112ebe83733c084f99f30e75fff454f58f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308963
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2023-06-14 14:43:07 +00:00
Kallen Tu 0b03e711bf [cfe] Change error message for mixin subtype restriction.
Make better error message for mixins since they can't be final nor
sealed.

Bug: https://github.com/dart-lang/sdk/issues/52697
Change-Id: I56a9cb66131c0a47ea1c91b95dcf70d12835134e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308964
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-06-14 14:28:48 +00:00
Johnni Winther e5a68252e3 [parser] Use endInvalidYieldStatement for async methods
This changes the parser to call endInvalidYieldStatement for
yield statement both in sync and async methods. This ensures that
the CFE creates an invalid expression for yield in async methods,
making the generated AST verifiable.

Change-Id: I1bfe922878fcf3dc19c823cb89ee869af3dd2ce3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/309200
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2023-06-14 12:10:59 +00:00
Johnni Winther 545b7c02f7 [cfe] Support redirecting factories in inline classes
Closes #52525

TEST=inline_class/issue52525

Change-Id: Ia2f6e3aa92ddd053f5736150713d9267b89f401c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308621
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-06-14 10:31:42 +00:00
Johnni Winther 1758b73d08 [cfe] Handle extension tear offs in object pattern
The target was wrongfully the method instead of its corresponding
tear-off.

Change-Id: Id2777ed15c1944a123bd8d85ee812154e9c125cf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308880
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-06-14 08:04:18 +00:00
Johnni Winther 0a3811b77d [cfe] Initial support for inline class const constructors
This uses the const function experiment code to support evaluating
constant inline class constructor invocations.

Change-Id: Ic5bc50c590586bc2ac4508ca85c982fddfd9825d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308901
Reviewed-by: Kallen Tu <kallentu@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-06-14 07:04:56 +00:00
Johnni Winther 7226c7245e [kernel] Remove RedirectingFactory node
Closes #28421
Closes #29169

TEST=existing

Change-Id: Iee7d84fadc10981648cb327589fd7aa15b9b3e12
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308140
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-06-14 06:38:32 +00:00
Nate Biggs b8d4b98edd [dart2js] Move compact flag logic to shareable library.
Change-Id: I23fd110c3bed55f968e43eef138a3860d4fdb22e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308724
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2023-06-14 01:39:10 +00:00
Nate Biggs f60c7b2ad3 [dart2js] Remove unnecessary abstraction from env libraries.
Change-Id: Id9c4cc319a848ed7deebc6065d731886f737e280
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307722
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2023-06-14 00:02:39 +00:00
Srujan Gaddam 8f48ac3723 [dart:js_interop] Allow interop inline classes to elide @JS
Determines the ultimate representation type of an inline class to
determine if it can use external members. This allows users to
elide @JS if they don't need renaming. This CL adds some static
errors around inline interop members so its clearer that the
inline class should have an interop representation type.

There's a bit of cleanup in this CL too around interop members,
where extension members on @Native classes are now correctly
considered as interop members by the error checker.

Change-Id: I4d870d204933ea11b347ab5bb2e3de1b962f5ea3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308249
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-06-13 23:27:23 +00:00
Brian Wilkerson 802a139912 Stop using a file path as a plugin id
Change-Id: I14077207e3c7163aceeeaad7491aa4d7b8d852ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308965
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-06-13 21:33:17 +00:00
Konstantin Shcheglov 324cef773c [CMSR] Support for formal parameters selection.
Change-Id: I38beddf9eeb36615e11ae1375aac335c1a7a6d56
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308966
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-13 20:58:39 +00:00
Daco Harkes a0cf7286af [pkg/ffi] Roll native repo
https://github.com/dart-lang/native/pull/65 does a breaking change.

Change-Id: I1950d78a243d12eca47b4ecd427072dc9c86db85
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/309040
Reviewed-by: Devon Carew <devoncarew@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2023-06-13 19:33:04 +00:00
Konstantin Shcheglov e008654ba6 Add ConvertFormalParametersToNamed, a RefactoringProducer.
Bug: https://github.com/dart-lang/sdk/issues/45675
Change-Id: I611648a47bb59acd2db55e7cd77c2504ff83c4cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308841
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-06-13 19:29:08 +00:00
Kallen Tu 0f6e13a220 [analyzer] Refactor visitConstructorReference and tests in the const evaluator.
Change-Id: I24eb2a2daa3bd7437dfdc5ab2f4fed4899209fbb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308260
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-06-13 17:06:39 +00:00
Nicholas Shahan 2a39196705 [ddc] Fix record element gets with static types
Previously all record get operations were accidentally compiled
as dynamic accesses even when the record is statically known to 
have the getter.

Fixes: https://github.com/dart-lang/sdk/issues/52643
Change-Id: I58961df22c9efd02f0531045e959c08aaa369e89
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308246
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
2023-06-13 17:02:39 +00:00
Konstantin Shcheglov 4478f7c97c Fixes for Selection.nodesInRange(), more tests.
Change-Id: Ie839c0180d33b196e323dd4f892d8ca671d3cea2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308600
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-13 16:15:29 +00:00
Kallen Tu b80d5479c1 [analyzer] Change error message for mixin subtypes of final and base types.
Add new diagnostics for mixin subtypes since they can only be 'base'.

Bug: https://github.com/dart-lang/sdk/issues/52686
Change-Id: I8e4d6830c5c735c5b42d7fbe78d197c9506bbf4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308806
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-06-13 16:00:21 +00:00
Konstantin Shcheglov d9e2f515ea Check the id of the formal parameter in update, and formal parameters vs. target.
Change-Id: I5f6d1f65386d385d470a7b1d0de3727c0f7788e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308843
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-13 15:52:28 +00:00
Konstantin Shcheglov 0704d96e8f Fix DAS completion benchmarks, after Flutter change.
After 73e1f23426 (diff-20c19d254b0a82027625f1246ba51cb2264bfabf105fe91d532c19e6a6d77478)

Change-Id: Ibcb0327aa71c8d0d9bda3af71cbec582acbdbd9b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308960
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-13 15:52:18 +00:00
Konstantin Shcheglov a4ac770b44 Add List.stablePartition(), use in CreateConstructorForFinalFields.
See https://en.cppreference.com/w/cpp/algorithm/stable_partition

Change-Id: I1cf77ed7c057e4e42009ec4dd1d15ee2af7dd128
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308812
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-06-13 15:03:49 +00:00
Jens Johansen 5aee0f61b6 [analyzer] Clear watcher subscriptions to avoid leaking package:watcher data
Analyzer adds watchers to all root folders it has opened.
When editing, say, a pubspec.yaml file it ~starts over, cancels the
old subscriptions and creates new ones. It keeps references to the old
subscriptions too though.

This in turn leaks data.

On Linux internally in package:watcher it clears some stuff as it's
cancelled, but it doesn't on Windows, nor on Mac.

The means it can leak an infinite amount of `_Entry` classes,
and for instance in https://github.com/dart-lang/sdk/issues/52447 a
user has 40+ million of those classes.

Reproducing this I got to 40+ million too, at which point the
"Retained size" of all the `_Entry` objects was 7.39GB.

This fixes the leak by clearing the list.

Change-Id: I718e8edc81b763b66affa16c3b3f6d4b8a97fd1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308940
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2023-06-13 14:32:49 +00:00
Johnni Winther 90d5a99c15 [cfe] Remove redirecting factory field
TEST=existing

Change-Id: Ic9f51693d0cc75cbe745dcaa0f4feb26d7005a9e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307941
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-06-13 09:24:28 +00:00
Johnni Winther e831cb8510 [cfe] Check @patch annotations
This normalizes the checking of patches so that it matches the checking
of augmentations. This means that the @patch annotation must and can
only be used on patches.

The dart: libraries and patches have been updated accordingly.

TEST=ffi

Change-Id: I78767eebd1a8861859067ae5ff9c0339f0985bb4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/306041
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2023-06-13 07:27:08 +00:00
Konstantin Shcheglov 015912a3f4 [CMSR] Fix a TODO for converting optional formal parameter into required.
Change-Id: I40c8c9dc6369fec382e0e650ebe01bed384d86b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308844
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-06-13 06:58:14 +00:00
Keerti Parthasarathy 879a0041eb Remove null assets, is checks.
Change-Id: I9713a585860674b19b78633b70898dbcb37db6ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308808
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2023-06-13 06:04:09 +00:00
Brian Wilkerson a2dbcf7a56 Initial coding style documentation
Change-Id: I1f29d10a0eff99a98e8e79500288f9766fcc9a64
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308700
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2023-06-13 01:11:56 +00:00
Konstantin Shcheglov 1b1c133b61 Support for ArgumentsTrailingComma in 'Change Method Signature' refactoring.
Change-Id: Iadb60c3cd233044ab78ef8a36eba32616b1ca9c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308804
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-06-13 00:57:20 +00:00
Nate Biggs 7b2d5baa48 [dart2js] Simplify event log initialization logic in each part file prologue.
Change-Id: I0731b78f5b0437f5e5026ee6d9f2511698968804
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308201
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-06-13 00:50:49 +00:00
Brian Wilkerson 0b5e50a48f Convert the completion documentation tests
I think this removes the no longer used test support classes, but let me
know if you know of any code I missed.

Change-Id: I42105b75862631e9f86458ebb7f47a6f8d9935ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308809
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-06-13 00:32:57 +00:00
Konstantin Shcheglov cd0a7e43fd Fix failing tests in ChangeMethodSignatureTest.
We allow missing named formal parameters and arguments, because
reordering them will not change the semantics. But we fail when a
positional formal parameter or argument is missing.

Change-Id: If3b3315407d2cf717aeaf1db219e6f1f84469224
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308807
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-12 23:49:34 +00:00
Konstantin Shcheglov 379ab45f2c Support for private fields in CreateConstructorForFinalFields when using named formal parameters.
Change-Id: I246c8b9f9b5e26ad778648d2d5e12a952bc98395
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308801
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-06-12 21:59:28 +00:00
Konstantin Shcheglov 27e5ab180d Make all AST classes 'sealed', excluding 'AstNode'.
Change-Id: I340d2372ec15c59a64ea63bd267b2952a3adcd9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308520
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-06-12 21:43:34 +00:00
Konstantin Shcheglov cdad8a99d3 Small renames and reorders for writeArguments()
Change-Id: I40490deb21cd6999ab741e422a8207f5b9ed02cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308802
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-12 21:21:53 +00:00
Konstantin Shcheglov c6372d8f5c Move FormalParameterReference hierarchy to framework.
Change-Id: If3dc2f14ca0d1dec41f8ed89dae5a37a8e4c6f2b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308803
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-12 20:32:45 +00:00
Keerti Parthasarathy 131d999085 Copy of: Refactor AbstractCorrectionProducer to accept ParsedUnitResult
Change-Id: Ib845757cd638d223221be3494fb9085693333ac3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308800
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2023-06-12 19:51:39 +00:00
Derek Xu caab0835bc [VM/Service] Prepare to publish package:vm_service 11.7.0
Change-Id: Iad580b651371ae4f2ae8ef0e51ea12b093241dcf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308722
Commit-Queue: Derek Xu <derekx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-06-12 19:20:56 +00:00
Konstantin Shcheglov f75e26564e Issue 45675. 'Change Method Signature' refactoring.
Bug: https://github.com/dart-lang/sdk/issues/45675
Change-Id: I396228ec9306353b4bd269abedd3879d0c10a02f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/306160
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-06-12 18:39:04 +00:00
Konstantin Shcheglov 4c660a8f73 Seal DirectiveUri hierarchy.
Change-Id: I5287e73fa74f3d0d8c34b461a4124b639f469fdc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308582
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-06-12 16:13:18 +00:00
Konstantin Shcheglov ed85426591 Inline SingleCorrectionProducer into CorrectionProducer.
It does not look to be used for anything else.

Change-Id: Iba283b93a84c2d1fe81685c07c8e81350759a48b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308521
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-12 16:11:18 +00:00
Tess Strickland 69172b7eb5 [pkg/test_runner] Add QemuConfig entries for compressed architectures.
Change-Id: Ib40185f3e5dd291c6ba9724089a04e696306a7f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307801
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2023-06-12 14:31:04 +00:00
Johnni Winther 01b725e178 [dart2js] Enable kernel verification
This enables kernel verification of components loaded from source when
asserts are enabled.

Change-Id: Icf5d42e2c978428138733403f9af35824e97821c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/299641
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-06-12 08:43:21 +00:00
Konstantin Shcheglov 87cf921fec Use textual expectations for SelectionTest.
Currently the checks that we have are ironically both repetitive and
inconsistent. There are also tests that are not precise / demonstrative.

Change-Id: I1ad0de5b9fb982d8091e4f80a6e5c5ebbad0f418
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308580
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-06-12 00:30:04 +00:00
Konstantin Shcheglov fdd628b831 Use getResolvedUnit(File) in AbstractContextTest.
Change-Id: Ic6237185b8a8c8b62de470490873703672a203e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308581
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-11 23:59:39 +00:00
Konstantin Shcheglov ecec8e70cd Remove DeclaredSimpleIdentifier and AstFactoryImpl.
Change-Id: Ifaf4d2c134a4be075afe75c3b8c841644b14da3d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308500
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-11 23:51:37 +00:00
Konstantin Shcheglov 5698c12549 Use UriResolution in FileState(s) instead of Either2.
With sealed classes we don't need Either2 anymore.
Specific class hierarchies are better, support more than two variants,
don't require additional classes to nest more than one piece of data,
and being supoorted by the language itself, provide exhaustiveness
checking.

Change-Id: I47c7e770d37fb6246f54bcda3600c2fa04fc1d50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308540
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-06-11 23:51:27 +00:00
Konstantin Shcheglov 038fb2925f Include named super formal parameters into CREATE_CONSTRUCTOR_FOR_FINAL_FIELDS_REQUIRED_NAMED.
This is convenient feature when building hierarchies of data classes.

Change-Id: Id4c7040e0515150661165079ad01d9d05e0c1185
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308541
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-11 22:38:43 +00:00
Konstantin Shcheglov fa5d596d6d Enhance CreateConstructorForFinalFields to suggest also required named formal parameters.
Change-Id: I64db6eb4ced756e7b261abaa0c8b058c98fdd5d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308522
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-11 15:25:40 +00:00
Konstantin Shcheglov 70da08865b Make previosly abstract XyzImpl classes 'sealed', and non-abstract XyzImpl classes 'final'.
Change-Id: Iec06de844e070cff940ca2dc2ea704abda30089d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308501
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-10 22:20:19 +00:00
Danny Tuppeny e435063e09 [analysis_server] Listen for pub stdout/stderr before awaiting exitCode
On my Windows PC, the process never exits if we haven't subscribed to to the streams so this hands on awaiting exitCode (meaning the pub process never exits and the server never provides code completion for version numbers in pubspec.yaml).

Change-Id: I12a51d8fc50eee8c62d1ac1d4d51c9768a812ad8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308480
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-06-10 17:41:27 +00:00
Konstantin Shcheglov edd17a8638 Merge AST interfaces into implementation library, re-export.
Bug: https://github.com/dart-lang/language/issues/3135
Change-Id: Icbc2a4e506e9e58c830b53f7aecce92189bb2d1b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308402
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-06-10 16:57:59 +00:00
Konstantin Shcheglov 38546e90ab Pre-fix unreachable_from_main for instance members.
https://github.com/dart-lang/linter/pull/4441

Change-Id: I55afa6b7d78bc1114ce97c1b5bebcf7a8bca5b98
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307975
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-06-09 22:39:27 +00:00
Konstantin Shcheglov 82e5b86ef6 More stylistic improvements for CreateConstructorForFinalFields.
Change-Id: I3775334f3adb59ffff880cd6d743295cf51eaaa8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308247
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-06-09 21:50:17 +00:00
Elliott Brooks 66ded0cdd9 Copy rpc error codes from dds to vm_service
Bug: https://github.com/dart-lang/sdk/issues/52636
Change-Id: Icdf66a3499562a2aba50e7f27879497a7b34ab98
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307970
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Elliott Brooks <elliottbrooks@google.com>
2023-06-09 18:13:18 +00:00
Konstantin Shcheglov db143df804 Increment AnalysisDriver.DATA_VERSION
This should have been done in
https://dart-review.googlesource.com/c/sdk/+/267340

Change-Id: Ie1e6ea56bbfdd807c2e7097c6c06b898693b2850
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308401
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-09 18:05:15 +00:00
Derek Xu 63f9cd722a [VM/Service] Add isolateGroup property to Event
TEST=reload_sources_rpc_triggers_isolate_reload_event_test.dart
Change-Id: I0669d09461f147226f1dd2a598896e9a6b44d9b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308221
Commit-Queue: Derek Xu <derekx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-06-09 17:57:12 +00:00
Derek Xu b8b89ac0d8 [DDS] Stop IsolateManager from trying to access the isolate field of IsolateReload events
Fixes: https://github.com/dart-lang/sdk/issues/49491
Change-Id: I64b663dc1348aa02f46fae73e693e401567f5c2b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308220
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-06-09 17:57:12 +00:00
Nate Biggs ac6150c4c0 [dart2js] Improve deferred part file logging.
Adds an "eventLog" property to the global "$__dart_deferred_initializers__" object. The event log is just a JS Array that gets initialized alongside $__dart_deferred_initializers__.

Each event entry is a String->String JS object. I unified the format of these event objects for easier parsing.

Each printed event is now valid JSON (passed through JSON.stringify) so we can more easily post-process the logs if necessary.

Fully replacing the existing "_eventLog" field makes the logging logic simpler. Having a single array allows us to not include a timestamp because the array captures the event ordering (actual timing doesn't matter). It also makes it easier to stringify the logs when there's only 1 data source/format.

Sample output:
```

{"hunkName":"out.js_1.part.js","event":"loadHunk"}
{"uri":"path_to/out.js_1.part.js","hunkName":"out.js_1.part.js","event":"downloadHunk"}
{"file":"out.js_1","event":"beginLoadPart"}
{"file":"out.js_1","event":"endPartLoad","hash":"aCscY7yv4EHodRPmCqYn5BqMelA="}
{"uri":"path_to/out.js_1.part.js","hunkName":"out.js_1.part.js","event":"downloadHunkSuccess"}
{"hunkName":"out.js_1.part.js","hash":"aCscY7yv4EHodRPmCqYn5BqMelA=","event":"initialize"}

```

Change-Id: Ifee73be0bf7dc53a0e7710ff033dd2b0fae9fb0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307240
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2023-06-09 17:05:11 +00:00
Alexander Markov 4a222e0924 [vm/aot/tfa] Cache types
Hide constructors of types objects and avoid creating extra instances of
types, caching them as necessary.

TEST=existing

Change-Id: I2897888649dd1c4338d6e4000ab0c481d9da3c01
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308242
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2023-06-09 14:15:48 +00:00
Tess Strickland c4b6fd687b [pkg/vm] Update test/transformations/type_flow/transformer_test expects.
These changes are needed after the recent changes in c308c932
"[cfe] Ensure Member.isInlineClassMember is set".

TEST=pkg/vm/test/transformations/type_flow/transformer_test

Change-Id: Ibf2c3ee7198175c6cd46f5a423f35619476c8f85
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308321
Auto-Submit: Tess Strickland <sstrickl@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2023-06-09 10:19:28 +00:00
Paul Berry 9b3f2bc525 Fix comments in flow_analysis.dart.
This addresses code review feedback from
https://dart-review.googlesource.com/c/sdk/+/307140.

Change-Id: I3caa0230f249d22375565b004aafcf775e900fd5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308250
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2023-06-09 09:11:48 +00:00
Nicholas Shahan e5d220fff3 [ddc] Support static JS interop in new type system
Issue: https://github.com/dart-lang/sdk/issues/48585
Change-Id: Ie0a69406686512426e30fdc0b7334263d3e596d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/306135
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-06-09 00:16:39 +00:00
Nicholas Shahan ce9b44e604 [ddc] Add JSInterop support in the new type system
Encodes the necessary type rules and adds type identifier
tags to support the legacy JavaScript interop behavior.

Issue: https://github.com/dart-lang/sdk/issues/48585
Change-Id: I933db1c9899711898fb829821f3e051043f33be2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/305845
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2023-06-08 23:00:40 +00:00
Danny Tuppeny f1e3bfcef5 [analysis_server] Check for bulk-fixable errors to skip resolution during bulk fix operations
Change-Id: I21a9fa4ed71839e7e196240c0bda31403cfea96c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308080
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-06-08 21:56:01 +00:00
Nicholas Shahan 30a73a9990 [ddc] Fix search for ancestors with type arguments
Previous search was missing the type arguments that appear on mixins.

Issue: https://github.com/dart-lang/sdk/issues/48585
Change-Id: I52e017d3d68d423e5aeb5481e222f196ecf3c186
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307963
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
2023-06-08 20:53:09 +00:00
Konstantin Shcheglov 26801b7d7e More clean up in AbstractContextTest.
Change-Id: Id1f3bd7dbd22c6bc8ae63fd04ee0c7231af69e02
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308240
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-08 20:34:17 +00:00
Konstantin Shcheglov 1a98453d63 Issue 48474. Fix for renaming private methods, don't update other libraries.
Bug: https://github.com/dart-lang/sdk/issues/48474
Change-Id: I361c5d53826a2e8b97c5c5df9e14a0298b6fe424
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308165
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-08 20:27:08 +00:00
Konstantin Shcheglov 028ca9d02f Remove null assert in _contextFor()
Change-Id: Iea684f57eb356b676a620bb08e82a28d1df99022
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307971
Reviewed-by: Janice Collins <jcollins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-08 19:52:30 +00:00
Nate Bosch 1284d79dfe Handle errors from process output
Remove the `stderrCompleter` and `stdoutCompleter` variables in favor of
holding the `StreamSubscription` and using `asFuture()`. This ensures
that any errors from the stream (for instance UTF8 decodign errors) are
captured by the awaited `Future` instead of bubbling up as unhandled
async errors.

Use the `.wait` extension for records so error handlers are eagerly
added for the `exitCode` and output futures instead of not listening to
the other futures until after the exit code has completed, and errors
may have already bubbled up unhandled.

Also refactor the use of a map literal - don't use an extra `...{}`
literal, move the for-in element to the outer collection literal and use
`...?` over a conditional element with a null check. Skip the extra
intermediate variable `newEnvironment`.

Check `captureOutput` eagerly and avoid a closure in favor of a tear-off
when it is false. When the logger is null this allows an ignorable
`null` callback instead of always invoking a callback that does nothing.

Change-Id: Iebecd5e9c11526c67d6f0c181ee948118698360a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307721
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2023-06-08 19:50:36 +00:00
Konstantin Shcheglov 6055524426 Use File instead of String path in AbstractContextTest.
Change-Id: I30ea3f08f8954e4d642aaf070e0da313013ad153
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308162
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-08 19:21:31 +00:00
Danny Tuppeny fde2b15e35 [analysis_server] [dart fix] Use existing server ByteStore to speed up checking for errors
On my Windows PC using the Flutter repo (running `dartdev fix` from source) I see significant improvements:

flutter/packages/flutter/: 45s -> 15s
flutter/: 5m 23s -> 33s

These projects are clean so have no fixable errors, the improvements may be smaller where there are fixable errors and a larger proportion of time is spent resolving libraries.

Change-Id: Ie48baaa4ff8916112dab6639ae4e824e5b646ea8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308060
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-06-08 19:18:32 +00:00
Ludi Zhan 4079a47cc4 [analyzer] Introduce a new annotation @visibleOutsideTemplate
The new annotation is intended to be used on members of class, enum or mixin to opt out the @visibleForTemplate visibility restriction cascaded from class- / enum- / mixin- level.

1. Throw warning if the annotation is added to a invalid target.
2. Update @visibleForTemplate diagnostics logic to opt out members annotated with @visibleOutsideTemplate.

Change-Id: Iec546fc7785cd45f39a1b2a2cc8849ef1cf9d04a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304825
Reviewed-by: Marya Belanger <mbelanger@google.com>
Auto-Submit: Ludi Zhan <ludizhan@google.com>
Commit-Queue: Ludi Zhan <ludizhan@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-06-08 18:47:15 +00:00
Konstantin Shcheglov f569174ea0 Stop using elementMatcher() method, use textual expectaitons.
Change-Id: I11946d135a4e82e8fcdd382d3c4cc50e6ab1666f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308163
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-08 18:27:14 +00:00
Ömer Sinan Ağacan b123b29335 [dart2wasm] Fix continue compilation in switch in async code generator
`continue` in `switch` statements need to be compiled the same way as
normal `continue`/`break` to run finalizers between the jump target and
the `continue`.

New passing test: co19/Language/Statements/Continue/async_loops_t10

Change-Id: I0cdff74b8b296691c8a90404b424487b00343427
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307780
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2023-06-08 17:12:51 +00:00
Brian Wilkerson f197c63616 Convert argument list contributor tests
Change-Id: I998bc7a23e83541b10c38596f66a7496fb3d9682
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307974
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-06-08 16:33:47 +00:00
Konstantin Shcheglov 4ff67a7ccb Remove assertMember(), use textual expectations.
Change-Id: I009a17ba1ffecd7614577b73f191a954cb9d3680
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307976
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-06-08 15:59:07 +00:00
Ryan Macnak 27f5a8c175 [test] Increase timeout for ARM64 Linux (but not Windows).
Several tests seems to be just at the current timeout threshold and flaking between timeout and their normal outcome.

Cf. 87362c6f42

Bug: https://github.com/dart-lang/sdk/issues/52589
Change-Id: I4e89aa71618c51a9ca1d38e8d03fffbcd919a744
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307972
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-06-08 15:20:11 +00:00
Johnni Winther c308c9327d [cfe] Ensure Member.isInlineClassMember is set
TEST=existing

Change-Id: I16fbeb0bbe431e3f85ed11c21e0506e6aa4abf58
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302206
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2023-06-08 15:02:03 +00:00
Danny Tuppeny aa51ed6bca [dds/dap] Fix typos in DAP readme
Change-Id: Ib2d7b3ce14d3b337a7612eb1c1b1da4a76a7fef9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308100
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-06-08 14:54:14 +00:00
Daco Harkes 984ea72af5 [pkg] native_assets_builder build mode
Manual roll of: https://github.com/dart-lang/native/pull/62

Bug: https://github.com/dart-lang/sdk/issues/50565
Change-Id: Ie5b9ef9e9cdfbb9c19eac299f9f0294496b77520
Cq-Include-Trybots: luci.dart.try:pkg-win-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-linux-release-try,pkg-linux-debug-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308040
Reviewed-by: Hossein Yousefi <yousefi@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2023-06-08 13:35:23 +00:00
Tess Strickland 766a2be5a4 [pkg/vm_snapshot_analysis] Use program.stubs as owner for TTS stubs.
Also remove the '<anonymous signature>' check, since we stopped
generating function objects for function types before the current
minimum SDK version for the package.

Change-Id: I47c0522ae4ba778221ee98f93fdae8c22a57d688
Bug: https://github.com/flutter/flutter/issues/128402
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-win-release-try,pkg-mac-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307860
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2023-06-08 11:48:58 +00:00
Johnni Winther 7cfbb9ee96 [vm] Update test expectations
Expectation output changed by https://dart-review.googlesource.com/c/sdk/+/307121

TEST=existing

Change-Id: I7267d6c09a3a41d4a428cdf3b4507a57049459c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307862
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Auto-Submit: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2023-06-08 09:11:27 +00:00