Commit graph

43837 commits

Author SHA1 Message Date
Kallen Tu c7187d3150 [analyzer] Consolidate more helpers in evaluation_test.
Added helpers `_field` and `_localVar` to allow tests to test their final fields and local const variables in the const tests.

The rest of the CL moves away from `_evaluateConstant` helpers (to avoid recomputing constants), to `_topLevelVar` or equivalent helpers which grabs the existing evaluation result.

This CL adds to the goal making all constant tests consistent and to avoid unnecessary const computations in the tests.

Change-Id: I508483714a51e5d060286256657ae460b65787c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312889
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-07-12 20:02:11 +00:00
Ryan Macnak 3daa47b54e [test_runner] Don't assign all vm/cc tests to the first shard.
Before:
./tools/test.py --shards=10 --shard=1 --list | wc -l  # 3664
./tools/test.py --shards=10 --shard=2 --list | wc -l  # 1047
./tools/test.py --shards=10 --shard=3 --list | wc -l  # 1146

After:
./tools/test.py --shards=10 --shard=1 --list | wc -l  # 1408
./tools/test.py --shards=10 --shard=2 --list | wc -l  # 1306
./tools/test.py --shards=10 --shard=3 --list | wc -l  # 1381

Change-Id: I2107779e79d85976c04db7c01c11581a8d9895b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/313280
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-07-12 17:56:59 +00:00
Daco Harkes 70c186dc37 [gardening][pkg] Fix test expects
The Memory column is right aligned, and we can have large memory values.

`'|  Memory |    CPU | Elapsed time | ...`

Closes: https://github.com/dart-lang/sdk/issues/52915
Change-Id: I47c836ca85109bfa99e293c5c955c416c0f4067d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/313382
Reviewed-by: Martin Kustermann <kustermann@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2023-07-12 16:04:38 +00:00
Nate Biggs 64fe77f8db [dart2js] Revert invalid refinement change.
A user found another case where this fails (b/290868787).

In this case a ForwardingTypeMask is delegating the subtyping checks to its `forwardTo` mask which ends up saying the masks are equal even though the wrapper around the forwarded masks means they are not equal.

Change-Id: I015f2faf57557ff4189acb6c7144d09cf1ae6bb6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/313341
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-07-12 15:56:09 +00:00
Danny Tuppeny d718ab5f08 [analysis_server] Extract LSP request helpers to allow reuse in LSP-over-Legacy tests
The mixin `LspAnalysisServerTestMixin` contains a lot of helpers for interacting with the LSP server in tests and is used by both the in-process tests and the out-of-process integration tests.

We now have a third category of LSP tests that would benefit from many of these helpers (such as "getHover()") but are not talking to a native LSP server.

This change splits those helpers out into `LspRequestHelpersMixin` which contains only the request helpers without any code assuming a native LSP server, so they can be used by LSP-over-Legacy tests.

All code in `request_helpers_mixin.dart` was lifted directly from `server_abstract.dart` with no changes.

It also adds a test that error responses in LSP-over-Legacy are handled appropriately.

Change-Id: I847855a5314b5b04d700c6400b67e76e5f0d3402
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/313362
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-07-12 15:30:15 +00:00
Danny Tuppeny c4105d35db [dds/dap] Support translating VM Instance IDs -> DAP variablesReferences and back for DAP-over-DDS
This adds two custom requests to the DAP-over-DDS handler to translate between VM/DAP instance IDs:

- $/createVariableForInstance (String isolateId, String instanceId)
- $/getVariablesInstanceId (int variablesReference)

Because DAP's variables request only fetches _child_ variables (eg. fields) but we'd likely want to align the top-level string display of a variable, the wrapped variable will first be returned as a single variable named "value", which contains both the string display value and also a variablesReference to then get the child variables (usually invoked when expanded).

These methods currently live directly in the DDS DAP adapter since I figure they're only useful for clients using the VM Service, but we can move them to the base adapter if in future this turns out to not be the case.

Change-Id: I60f28edd86c3468cc592175cb665557a1fc85056
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312987
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-07-12 15:04:20 +00:00
Paul Berry 3ae6793469 Flow analysis: remove redundant assertion from constructor.
The assertion in the `_FlowAnalysisImpl` constructor was unnecessary
because it was checking that all variables that are reported to
`AssignedVariables` as read or written must also be reported as
declared. This is already checked by assertions in
`AssignedVariables.finish`, which is called by the `_FlowAnalysisImpl`
constructor.

I've added tests to `assigned_variables_test.dart` to confirm that
these assertions work, and I've also cleaned up the assertions a bit,
eliminating some redundancy and ensuring that in the event of a
failure the assertion failure message will be comprehensible.

Change-Id: Ife827c91d944707f093f4cb8421385f5355d11fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/313140
Auto-Submit: Paul Berry <paulberry@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-07-11 21:03:29 +00:00
Daco Harkes b64ef27dec [pkg/ffi] Roll dart-lang/native
Rolling https://github.com/dart-lang/native/pull/87 manually because
of the c_compiler -> native_toolchain_c rename.

Change-Id: I2592882a7137a40703f96a487a66d31eac7c990d
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/+/313200
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2023-07-11 19:14:48 +00:00
Konstantin Shcheglov c54b4bc5d3 Push class modifiers up to ClassOrAugmentationElement.
Change-Id: If99d9e29ec8ca87677a58cd90a68a5dda5c5af9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/313183
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-07-11 18:45:20 +00:00
Derek Xu f5080bedb3 [VM/Debugger] Fix behaviour of ActivationFrame::EvaluateCompiledExpression when paused inside a closure
TEST=pkg/vm_service/test/evaluate_inside_closures_test.dart, pkg tryjob

Fixes: https://github.com/dart-lang/sdk/issues/52430
Change-Id: I72b755d31614c7c56c504130656c3668d8b7e72b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/313001
Commit-Queue: Derek Xu <derekx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-07-11 18:41:04 +00:00
Konstantin Shcheglov 3e80d29fd6 Use AugmentationExecutableElement, AugmentationMethodElement.
These become a single property of ExecutableElement, MethodElement.
No new visitors, no new nodes and elements.

Change-Id: Ic523e9d51356e5a8d2a6cd62cd508344f561ffb0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312960
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-07-11 16:19:09 +00:00
Danny Tuppeny 80a6670d5d [dds/dap] Add some basic global evaluation support
This provides support for basic global evaluation matching the legacy DAPs. The first available thread is used (because there's currently no way for the user to select a thread) and we look up a library from a file URI provided in the `context` field.

In future I hope there's a standard DAP way of getting a file from the client (see https://github.com/microsoft/vscode/issues/134452).

See https://github.com/dart-lang/sdk/issues/52574
See https://github.com/Dart-Code/Dart-Code/issues/4636

Change-Id: I7bfa466001142e7e39ebb270ce65f4746a9affcd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312980
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-07-11 15:12:41 +00:00
Johnni Winther 0d47ba6890 [_fe_analyzer_shared] Remove RecordStaticType.isSubtypeOfInternal
This method caused invalid exhaustiveness checking by seeing
record types as related based solely on the structure.

The original purpose of the methods has been removed in the mean time
by the change to restrict the created spaces by the matched value
type.

Closes #52800

Change-Id: I8fb581374a4813dc63261d9e1354c4eea94f212c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312982
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2023-07-11 12:19:39 +00:00
Martin Kustermann 81df36216f Make utf8.encode() have Uint8List return type
Right now `utf8.encode()` has a static return type of `List<int>`
due to extending `Encoding` (which extends `Codec<String, List<int>>`).

We cannot easily change `Encoding` to extend `Codec<String, Uint8List>`
because that would also change `utf8.decode()` to require `Uint8List`
which would be a breaking change.

So instead we override `utf8.encode()` to have more precise return type.

Some parts of our SDK are run using the checked-in SDK, so it cannot
rely on the changed return type yet (until checked-in SDK is rolled).

So we use `const Utf8Encoder().convert()` as a temporary change, as
that already has `Uint8List` return type.

Issue https://github.com/dart-lang/sdk/issues/52801

TEST=ci

CoreLibraryReviewExempt: More precise return type for existing API
Change-Id: I2861d1f0eb3d292d8e3ec8437c0d441a2d2bd193
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254903
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2023-07-11 08:54:33 +00:00
Daco Harkes e1c12b3ab2 [cfe/ffi] Fix Finalizable non-nullable variables
TEST=pkg/vm/test/transformations/ffi_test.dart
TEST=pkg/vm/testcases/transformations/ffi/regress_52596.dart
Contains
`throw "Attempt to execute code removed by Dart AOT compiler (TFA)";`
without the fix.

Closes:https://github.com/dart-lang/sdk/issues/52596
Change-Id: I5de819afcf6f70be037b60432ea016bc281b742e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312909
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
2023-07-11 07:53:47 +00:00
Konstantin Shcheglov 2c97bd7801 Remove duplicate getters from ClassDeclaration and MixinDeclaration.
Change-Id: I69440dd7b1911db6616dc500d82b7b9c3e996529
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/313083
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-07-11 05:47:30 +00:00
Konstantin Shcheglov 7a258fa43b Add NotAugmentedXyzElementImpl implements AugmentedXyzElement.
So, that we don't have to copy all class members for 99% cases when
there are no augmentaitons.

Change-Id: I5c225905a0460ce5162543553e207a2d4412ecb9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/313082
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-07-11 02:22:35 +00:00
Kallen Tu 8be3439ce3 [analyzer] Make InstanceCreationEvaluatorTest consistent with other const tests.
Print type in `dart_object_printer.dart`.
Use `assertDartObjectText` instead of whatever was being used before.

Change-Id: Ifdfb6343013bb5fe654bcff870a9ff83b155402f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312885
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-07-10 22:20:22 +00:00
Helin Shiah 2094a733aa Add URI converter method that can be overridden
This is for an internal debug adapter to extend the test debug adapter and provide a custom URI converter to provide internal local paths during breakpoints.

Change-Id: I3b61b70fe07e14f08ff37443ef87facc523bf7fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/313000
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Helin Shiah <helinx@google.com>
2023-07-10 21:30:51 +00:00
Konstantin Shcheglov 3bb4d7d0d4 Parse mixin augmentations, build element model.
Change-Id: Ie1bdb6d47b31c527546f62abf65d19a4a4e50ee7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312924
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-07-10 20:48:32 +00:00
Danny Tuppeny 95e6f1e110 [dds/dap] Use Isolate numbers as DAP thread IDs
We used to generate our own thread ID starting at 1 and counting up. There was always a 1:1 mapping from a DAP thread to a VM Isolate. With this change, we always use the Isolate number as the thread ID which makes it easier for tools using both VM Service and DAP at the same time.

Change-Id: Id8d82f6fd5134987f2ecfeaa761765d55999405d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312906
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-07-10 20:14:58 +00:00
Brian Wilkerson edb8d33c8e Start converting portions of the KeywordContributor
Change-Id: I9423ae6e50eec95ba3e5212529f4f3635d2f76d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312940
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-07-10 19:51:33 +00:00
Joshua Litt 50c810e12c [js|dart2wasm] Add JS backed subtypes of Dart typed array classes.
Change-Id: I19a6d47bf857969abe2205e6b505b3a1dead5e3a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310480
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
2023-07-10 18:11:02 +00:00
Ryan Macnak 99ef36064f [infra] Make the sanitizer a first-class status variable.
Makes the TSAN skips apply to
 `test.py -mrelease --sanitizer=tsan`
and not just
 `test.py -n vm-tsan-linux-release-x64`.

Also makes the timeouts agree.

Change-Id: I10315e754a4ebb3020f3c2f6cecfac6b77e77a9b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311828
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-07-10 17:46:31 +00:00
Sam Rawlins fab30a7a73 Bump linter to e8c878360595c1d268d93f54c09bc843815a42d7
Change-Id: I8ab5b3de76d2e498185135660aae1875326f8a8c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312961
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-07-10 16:20:18 +00:00
Kyle Turney e826300560 add fix for removing the leading underscore from local function names
Closes https://github.com/dart-lang/sdk/pull/52822

GitOrigin-RevId: 1e97f3fde70079ea47a4bb8f8f58db341ae26fdc
Change-Id: Iec46cca3532789b4fb338d73cdbb946a0d383845
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312061
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-07-10 14:18:08 +00:00
Martin Kustermann daa35fd4fd [gardening] Restore timout multiplier in test runner for linux-arm64
The timeout multipiler for linux-arm64 was originally 4, then lowered to
1 (see [0]), then increased again to 2 (see [1]).

Though it seems that service tests are still flakily timing out, so
let's try restoring the original multilier.

[0] https://dart-review.googlesource.com/c/sdk/+/306662
[1] https://dart-review.googlesource.com/c/sdk/+/307972

Also special case `ia32` in timeout calculations due to not using
an AppJIT trained `kernel-isolate` snapshot and therefore being
very slow, especially in ia32-debug mode.

Issue https://github.com/dart-lang/sdk/issues/52589
TEST=ci

Change-Id: Iab8c768866aec9e77bb83c7a3242cc5de8fb4e2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312905
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2023-07-10 12:02:16 +00:00
Jake Macdonald 1a13ea6c05 Add a disposeMacro api, with TODOs in the implementations to call it.
Change-Id: I38049ca8b851c2203ddaaa729ef651e7802a1d2b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312860
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-07-10 12:01:49 +00:00
Johnni Winther 911b376f7e [cfe] Handle inline class representation field in object pattern
Closes #52667

Change-Id: I9c6d51597ff27ae3a7cdeed29d75755c18a2d530
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311742
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2023-07-10 11:02:50 +00:00
Chloe Stefantsova b36fbaef2c [cfe] Update both sides of intersection types in GUB
In computation of GUB both the left-hand and the right-hand sides of
the intersection should be updated as nullable when the other operator
to GUB is Null.

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

Change-Id: I4b616a94a3e7bf149205ba1b90732453c19ace47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311845
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2023-07-10 09:51:56 +00:00
Konstantin Shcheglov 4d4eefa956 Compute 'mixins' and 'interfaces' for ClassElement.augmented
Change-Id: I7514576ada4a5dcd048a2c399d5bfe11169f3394
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312887
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-07-07 21:39:41 +00:00
Konstantin Shcheglov 884116a83b Move 'constructors' getter into NamedInstanceOrAugmentationElementMixin.
Remove extra looping detection.

Change-Id: Ifdd7f4729930b3022a8b04f8143d714298acf8dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312884
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-07-07 20:34:39 +00:00
Konstantin Shcheglov aad361b31e Link augmentations and targets during building.
We walk augmentations in the right order, so can update update
necessary data structures as we go.

Change-Id: Ibf3409658009b82a960caaacd538fcd6c779b007
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312883
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-07-07 19:14:25 +00:00
Konstantin Shcheglov 553c804eb5 Don't use LinkedData type parameter.
Change-Id: I2afa126856f05072cb5e796b4f47d64e61284b96
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312882
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-07-07 18:29:37 +00:00
Konstantin Shcheglov ac0fc3c11c Print augmentation libraries after the defining unit.
So, we can read it more naturally, first the declaration, then its
augmentations.

Change-Id: I21805969bff6874660500d4477b39ce5aba7484a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312880
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-07-07 17:08:54 +00:00
pq ff8963d1be fix make_final to properly update for loop patterns
Fixes: https://github.com/dart-lang/sdk/issues/52820

Change-Id: If94b56f034bc8c28087251aada59433578ed7a2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312702
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-07-07 16:23:59 +00:00
Danny Tuppeny 201fb68e64 [analysis_server] Update remaining CodeActions tests to use new expectation format
This is a continuation of a previous change that stops tests from verifying only individual files modified via a `WorkspaceEdit`. All verifications of these edits are done via a single string that includes all changes, with annotations for creates/deletes/renames.

Additionally, it migrates some additional tests to use TestCode instead of the old markers, and removes some extra indenting these tests had.

It also starts changing how capabilities are set for tests from having to nest function calls in `initialize()` calls to instead calling simple helpers prior to initialization.

Change-Id: I35d16a296c2125ab830685437e14eb3b29ea4704
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312841
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-07-07 16:15:24 +00:00
pq b05282a1e9 @useResult support for pattern variable declarations
Fixes: https://github.com/dart-lang/sdk/issues/52841

Change-Id: I0ce4e8bc7771808fcaacfbfc2b591ab805c74ff4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312711
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-07-07 15:56:28 +00:00
Konstantin Shcheglov fc0e656868 Build ClassAugmentationElementImpl, basic linking.
Change-Id: I18bd3d97ad9fe661d14e3d3d006219ffceedcfc4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312349
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-07-07 14:55:38 +00:00
Tess Strickland 1bdbafff49 [pkg/vm_snapshot_analysis] Allow old 'patched_class_' field.
While in more recent SDK versions the 'patched_class_' field has
been replaced with 'wrapped_class_', this package can still be
used with the earlier SDK versions if we fall back to checking it.

Issue: https://github.com/flutter/flutter/issues/130009
Change-Id: Ifb1250393b72e58bbdc0764c7e2ce96269e659ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312802
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2023-07-07 11:36:59 +00:00
Tess Strickland 1133598168 [pkg/vm_snapshot_analysis] Don't assume Code objects have an owner.
For regular stubs, the owner will be null.

Issue: https://github.com/flutter/flutter/issues/130009
Change-Id: I8c85e3130128af79c596f381869d61631221cf9e
Cq-Include-Trybots: luci.dart.try:pkg-mac-release-try,pkg-mac-release-arm64-try,pkg-linux-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312660
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2023-07-07 09:52:50 +00:00
Nicholas Shahan 5ca83258ef [ddc] Fix default type args signature on native classes
- They should match the calling convention and use the "dartx" symbol.
- Skip adding signatures for static methods since they can't be
  called dynamically anyway.

Issue: https://github.com/dart-lang/sdk/issues/48585
Issue: https://github.com/dart-lang/sdk/issues/52867
Change-Id: If5a76f52163b2267129880dbfe8d145a3fd93408
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312204
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-07-06 23:34:20 +00:00
Alexander Aprelev e62748f3e1 [gardening] Make info_macos_test resilient to snapshots running.
Align info_macos_test with info_linux_test in this regard: fix is similar to how https://github.com/dart-lang/sdk/issues/50583 was addressed.

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

TEST=ci

Change-Id: If7ab54990069c86eb5c0348e20086254818da839
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312705
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2023-07-06 22:57:13 +00:00
Kallen Tu a2cdf8e96d [analyzer] Refactor const evaluator visitBinaryExpression and tests.
Made more of the tests consistent in `evaluation_test` (slowly, but surely).

Change-Id: I515c4d6d81cedcc1d8d20080e231ac1e0afb5ec7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312200
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2023-07-06 21:48:07 +00:00
Konstantin Shcheglov 98e6322086 Fix another TODO in elements printer, use 'name'.
Change-Id: I6696a4b559072b064ee16d22b8aad528b52eb6a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312704
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-07-06 21:47:21 +00:00
Jake Macdonald 658de58b4f move the majority of the client bootstrap code into a real library to make it more maintainable
Change-Id: Id84981b236176c7831cece61692ec895ba2ac1e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312723
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
2023-07-06 21:12:58 +00:00
Brian Wilkerson a510e60dbf Simplify the keyword contributor to make it easier to port to the new framework
Change-Id: I29d0bdc2d798adc3b39718fabba893456495dce9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312703
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-07-06 21:03:37 +00:00
Nicholas Shahan 420b551d54 [ddc] Fix missing type tags in new type system
The types implemented transitively through mixins were missing from
the tags we manually attach. 

Issue: https://github.com/dart-lang/sdk/issues/48585
Change-Id: I7fa00fd79963914cd25c2f87f52d8acc76c9c359
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312202
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-07-06 20:27:24 +00:00
Nicholas Shahan 1199dc09b7 [ddc] Support extractTypeArguments in new types
Inline calls to the extract function directly with the type arguments
inserted as extractions from the instance.

Issue: https://github.com/dart-lang/sdk/issues/48585
Change-Id: I6b791c59478c2e609df30163835e3fd0863a2d94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307514
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-07-06 19:24:54 +00:00
Konstantin Shcheglov 4169196834 Use NodeTextExpectationsCollector to collect and update element expectations.
This code was older, and was a prototype of NodeTextExpectationsCollector,
but we have it now, it is better, and we can de-duplicate.

Change-Id: I428abb04687f2e3ff5142907a71fcf80e460b830
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312700
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-07-06 17:50:59 +00:00