Commit graph

93083 commits

Author SHA1 Message Date
Johnni Winther 4243547391 [cfe] Check and add non-extension types in implements clause
Closes #51564

Change-Id: I555c367f3650ddb435908a72b78069ceb6d07814
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317881
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2023-08-03 13:16:48 +00:00
Johnni Winther ca3cd5e0f1 [cfe] Avoid resolving through this variable in formals
Change-Id: Ia03bea53d09350dc55780636116aa8c5fe713df2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317882
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2023-08-03 12:19:48 +00:00
Paul Berry 191752dc00 Front end: add unchecked "as" nodes for promoted getter accesses.
These nodes are necessary to inform the back ends that the static type
of the getter access is different from the static type of the
field. Without them, some back ends may make unsound assumptions about
the generated code, leading to runtime failures.

Fixes https://github.com/dart-lang/sdk/issues/50499.

Change-Id: Iad32c9b660d6e3e3106c3143c5139c8a6bd0b67b
Bug: https://github.com/dart-lang/sdk/issues/50499
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317260
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2023-08-03 12:07:45 +00:00
William Hesse 3024bfdde2 [test] Skip two dartdevc tests that are timing out
Issue is currently open to fix these tests.

Bug: https://github.com/dart-lang/sdk/issues/49622
Change-Id: I22c21437461f7b9bf757e6ed5935b4eeba4f52d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317761
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2023-08-03 11:31:35 +00:00
Jens Johansen efec227591 [CFE] Fix weekly tester not finishing
Change-Id: I6b62f25d4c62c1adf641e6bd1b85377a3a54476f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317740
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-08-03 09:22:58 +00:00
Johnni Winther 9987c437de [dart2js] Enable verification of compilation with errors
Change-Id: I02ea869b1ef07df910820edbf87da6e3b10d02e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310100
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-08-03 08:14:19 +00:00
Konstantin Shcheglov 3a8e74cdcb Extension types. Fix a logical merge conflict.
Change-Id: I1e2f3a3daf942aa558c5816edcd3b7e95be3b4c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317860
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-08-03 03:48:09 +00:00
Ludi Zhan 0b28bc704c [analyzer] Apply @visibleOutsideTemplate to enclosed elements of annotated element
Currently if a class method is annotated with @visibleOutsideTemplate,
only the method declaration can be referred outside template files, but
not the enclosed method parameters.
Meanwhile, a method parameter is not a valid target for
@visibleOutsideTemplate, because it's not a member of Class, Enum or
Mixin.
Update the logic so that enclosed elements of a @visibleOutsideTemplate
element will also be @visibleOutsideTemplate.

Change-Id: Ifcfaa47a154fe6e2b15fae07f3a30e8a543916a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317846
Commit-Queue: Ludi Zhan <ludizhan@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-08-03 03:39:47 +00:00
Konstantin Shcheglov 7323c8af51 Extension types. Tests for using in object pattern.
Change-Id: I3a6bd166cde3dfd6ea664310fdb524b379448e87
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317842
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-08-03 02:44:59 +00:00
Konstantin Shcheglov b035af2fdf Extension types. Build type erasures.
Change-Id: Ief3090ddef317468d66daf4cf8b245bdb0fb896d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317840
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-08-03 02:44:18 +00:00
Kenzie Schmoll 168ebd9ba9 Bump tools_rev in DEPS so that we can depend on the new package:extension_discovery from devtools_shared, which is a dependency of DDS.
Change-Id: Ifba7a2efa92e57738cdc752945e6fd9d0b72b424
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317804
Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2023-08-02 21:46:51 +00:00
Konstantin Shcheglov 64e8d044fa Extension types. Report WRONG_NUMBER_OF_TYPE_ARGUMENTS and TYPE_ARGUMENT_NOT_MATCHING_BOUNDS.
Change-Id: I63528eb793c87094bd3eb41363d6516fb4997475
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317801
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-08-02 20:33:02 +00:00
Sam Rawlins 734ba443a7 Prepare analyzer_plugin 0.11.3
My plan is to checkout the SDK when analyzer 6.0.0 was published,
then cherry-pick this commit, and publish analyzer_plugin.

In a test run, the package analyzes cleanly and all tests pass.

Bug: https://github.com/dart-lang/sdk/issues/52769
Change-Id: I10661dd665c612eeb82977bdf2f8432e022044b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317802
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-08-02 19:37:58 +00:00
Kallen Tu 3bc25b6d01 [analyzer] Add tests for issue 31835 for imported static const methods.
Behaviour seems to be as expected. In the examples, `new B(A.instance);` can be made const and don't produce any errors, meaning that the `prefer_const_constructors` lint can trigger.

The regression doesn't exist anymore.
Added some tests to prevent future regression.

Fixes https://github.com/dart-lang/sdk/issues/31835

Bug: https://github.com/dart-lang/sdk/issues/31835
Change-Id: I0e192709a17d12eb6395f4585b65fce4628f7d12
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316844
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-08-02 19:15:20 +00:00
Danny Tuppeny 02c99b40ab [analysis_server] Handle "Extract Method" in static field declarations
Fixes https://github.com/Dart-Code/Dart-Code/issues/4564

Change-Id: I9119941232cf17af7115fe5476ac1c4faa95cddb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317780
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-08-02 18:17:38 +00:00
Slava Egorov 83000c689f Revert "[vm/service] Use getline to read /proc/self/smaps"
This reverts commit 95474f44f1.

Reason for revert: getline seems to be missing on some platforms we target (e.g. Android).

Original change's description:
> [vm/service] Use getline to read /proc/self/smaps
>
> Previously the code was using `fgets` with a fixed
> size buffer. This lead to a confusing behavior where
> lines longer than 255 characters would be read
> in multiple chunks and cause crashes in the parsing code.
>
> Additionally make extraction of the path component slightly
> more robust by searching for path field forward rather than
> backwards. Path might contain white space and searching
> backwards might stumble on that.
>
> TEST=manually
>
> Change-Id: I1d23df4a79b04721d3a812e19eae9b8ad0e955fa
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317683
> Commit-Queue: Slava Egorov <vegorov@google.com>
> Reviewed-by: Ben Konyi <bkonyi@google.com>

Change-Id: Iaa6886f318884f9ac17487b2ab59621bb44fcb3b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317781
Auto-Submit: Slava Egorov <vegorov@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2023-08-02 18:02:24 +00:00
Vyacheslav Egorov 95474f44f1 [vm/service] Use getline to read /proc/self/smaps
Previously the code was using `fgets` with a fixed
size buffer. This lead to a confusing behavior where
lines longer than 255 characters would be read
in multiple chunks and cause crashes in the parsing code.

Additionally make extraction of the path component slightly
more robust by searching for path field forward rather than
backwards. Path might contain white space and searching
backwards might stumble on that.

TEST=manually

Change-Id: I1d23df4a79b04721d3a812e19eae9b8ad0e955fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317683
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-08-02 17:13:30 +00:00
Nate Bosch de85b75eb7 Bump test to 92eb0f7c3df8f3f089eb3962b46d55b00cf0e51c
Changes:
```
> git log --format="%C(auto) %h %s" 7f81dee..92eb0f7
 https://dart.googlesource.com/test.git/+/92eb0f7c Allow frame to send the message port (2068)

```

Diff: https://dart.googlesource.com/test.git/+/7f81deeac294a1120917aeaa35d5b670146c4529..92eb0f7c3df8f3f089eb3962b46d55b00cf0e51c/
Change-Id: I0ae921dc653abbac7329a09973aa6e78d5440f9d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317280
Auto-Submit: Nate Bosch <nbosch@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2023-08-02 16:22:03 +00:00
Sam Rawlins cabe213d91 Fix constructor initializer with invalid assignment expression
Fixes https://github.com/dart-lang/sdk/issues/52670

Change-Id: Ic28600c1b6c8cf309462ed28ed73ab0249c08844
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317143
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-08-02 14:43:58 +00:00
Johnni Winther 042229c514 [cfe] Add test for super-extension-types in the hierarchy nodes
Change-Id: I16a95c1b162e5ad8c72422721db008576a95a0df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317720
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-08-02 14:14:48 +00:00
Sergey G. Grekhov 7bc0663cfc [co19] Roll co19_2 to 3756b19f79b85b7640a6805dd2c819792a13041c
2023-08-02 sgrekhov22@gmail.com Fixes dart-lang/co19#2158. Fix flaky co19_2/LibTest/isolate/Isolate/pause_A01_t01, _02 tests (dart-lang/co19#2159)

Change-Id: I3aa4ad9e2e42a4c552329c0ff511309c672895f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317682
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-08-02 13:05:21 +00:00
Paul Berry 2ccade258c Front end: remove getFunctionTypeForImplicitCall (and unnecessary invocations).
The method `InferenceVisitorBase.getFunctionTypeForImplicitCall` was
only being in one circumstance: when a method invocation resolves to a
field or getter which needs a runtime covariance check, it was being
used to determine what type should be used for the covariance
check. Its effect was to either return the type unchanged (in the case
where it was already a function type) or, in the case where the type
was an interface, to look up the type of the interface's `.call`
method.

But this is not the behavior we want. For a covariance check, the
right thing to do is simply to verify that the result of the getter
invocation satisfies the getter's static type (with appropriate
substitutions). It doesn't matter whether the type in question is an
interface type, a function type, or some other type.

Fixes https://github.com/dart-lang/sdk/issues/53089.

Change-Id: I064bea0fdf0ba3695f6ce51e9b84cc1421061a2e
Bug: https://github.com/dart-lang/sdk/issues/53089
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317360
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2023-08-02 12:03:27 +00:00
Paul Berry 1e0e12052c Add language test to reproduce #53089.
Change-Id: Ia77a7336a9f5abd73a7575d7833ce0e3ee3453a8
Bug: https://github.com/dart-lang/sdk/issues/53089
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317441
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2023-08-02 12:02:38 +00:00
Ömer Sinan Ağacan a1d7f7284b [dart2wasm] Give descriptive names to tear-off and trampoline functions
Currently a function, its tear-off generator, and the trampolines of the
tear-offs have the same Wasm name. This makes it difficult to
distinguish them in .wat outputs.

This CL gives them separate names:

- Function names are same as before: "f".

- Tear-off generators have the suffix "tear-off": "f tear-off".

- Trampolines have the suffix "tear-off trampoline":
  "f tear-off trampoline".

Change-Id: I2459f7d2fd359e72ace7cc4e7790a3e6e64d1f31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317640
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2023-08-02 11:24:06 +00:00
Chloe Stefantsova bd951bb5ad [cfe] Treat promitions from T? to non-nullable as two-step
This CL introduces handling of promotions of the form `x is T` where
`x` has static type `X?`, `X` is a type variable, and `T` is
non-nullable. They are treated as an equivalent of `x == null || x is
T`, effectively resulting in the static type of `x` being `X & T` in
the promoted code.

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

Change-Id: Ibfa6e32e14202651db09cfb4fbbdec864552b96a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316381
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2023-08-02 09:51:31 +00:00
Kallen Tu 291f6d803a [analyzer] Make sure the error check avoidance on InvalidTypes use hasInvalidType()
Avoid throwing `CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH` for any type of `InvalidType`s since we don't want to do any type checking if we don't actually know the types.

This is another fix for breakages in g3.

b/294003447

Change-Id: Id38de02cfd0317dc6771944bec0f54efb2614494
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317500
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-08-02 00:38:10 +00:00
Konstantin Shcheglov 9bf4af0049 Extension types. Report FINAL_NOT_INITIALIZED_CONSTRUCTOR and FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER.
Change-Id: Ifd18b5014b984a91a1f2a7ab662f937f9f6591ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317447
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-08-02 00:24:12 +00:00
Ben Konyi 5ef423d55c [ DDS ] Prepare for 2.9.4 release
Change-Id: I393ce964bce316592f78c0ea1de45ac1b34ddefd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317620
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
2023-08-01 22:59:17 +00:00
Kenzie Schmoll c96ea516f7 Serve devtools extension assets from devtools_server.
This change cannot be landed until a new version of devtools_shared is published and rolled into the SDK so that it can be depended upon here.

Change-Id: Ia7196fb8c12e980220ee2c2749a979f6359452a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/305043
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>
2023-08-01 22:30:34 +00:00
Konstantin Shcheglov ddb4c28b40 Extension types. Tests for resolving method invocations.
Change-Id: Idbe4d172ec40152a5725dfc53acaeb6bb2980240
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317520
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-08-01 22:26:55 +00:00
Ryan Macnak 1f87e88a97 [build] Fix MSVC build.
Change-Id: I0336a501e81392ce8e416958242e61d6b3226a9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317560
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-08-01 22:09:08 +00:00
Konstantin Shcheglov 08f2bc1e60 Extension type. Tests for resolving property access.
Change-Id: I536394862c1f92ca33fa368de9466d96b02d4d1b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317580
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-08-01 21:59:48 +00:00
Sam Rawlins 5c9b4ed2cb [analyzer] Remove support for pre-const-update-2018 code
Dart 3's minimum language version is 2.12. google3's is 2.9.

Change-Id: Icd892b0fcec7f2ce9fa813a108519c0bbbd29a52
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317040
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-08-01 21:31:52 +00:00
Kenzie Schmoll d792438829 Roll DevTools 2.26.1 into the SDK
Change-Id: I5206ced2deab27841f49c4f1272b0266ed14487b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317445
Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-08-01 21:03:16 +00:00
Konstantin Shcheglov eb705b8636 Extension types. Resolve secondary constructors.
Change-Id: Ie0fd1ce1c368afe4d5c29f07b2674b208870daf9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317523
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-08-01 20:45:39 +00:00
Ryan Macnak 5e49ea5ad8 [vm, service] Fix discrepancy between VM generating kind _TypeParameters and service.md claiming the existence of kind TypeParameters.
Fix the service type `TypeParameters` to recognize it is a heap object.

Exhaustively test that the service client libraries can handle inflating all types produced by the VM. Compare vm/cc/PrintJSON, which exhaustively tests the VM can generate any type.

TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/52893
Change-Id: Id1f080656ef6e999e69f2ebb5b9961fa3b461e4a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316862
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-08-01 20:34:21 +00:00
Konstantin Shcheglov c346b78f62 Extension types. Use 'Interface.redeclared' instead of 'overridden'.
Change-Id: Ibabd36e339d3f5258697985853c3d8d8fa3541a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317442
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-08-01 20:02:21 +00:00
Nate Biggs 2ec35b5761 [dart2js] Fix issue with non-async try/catch nested in catch block of async try/catch.
Fixes: 53082
Change-Id: Iadb11da5d6e71109682fc941f10e7373f70a1430
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317340
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2023-08-01 19:39:32 +00:00
Ryan Macnak 79f1e70a32 [vm, reload] Fuse class/library forwarding with enum forwarding when there are no shape changes.
When there is a shape change, class/library forwarding remains fused with the instance forwarding, and enum forwarding happens in a separate become operation.

TEST=ci
Bug: https://github.com/flutter/flutter/issues/131446
Change-Id: Iff2aacc664fbfcbc39c6aabd3698b413d18671cf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317521
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-08-01 19:36:50 +00:00
Paul Berry 89738cff69 Flow analysis: remove reachable arg of _clone.
No functional change. By default, `_clone` re-uses the reachability of
`this`. The `reachable` argument allowed the caller to override that
default. However, the only call site that used it passed in
`this.reachable`, so there was no effect.

Change-Id: I2b08e29a724b35efc531f4bcfbc6ec4a2a2519d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317443
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2023-08-01 19:31:29 +00:00
Nicholas Shahan b9f7513c70 [ddc] Add optimizations to records
- Make Shape class final and more fields final.
- Add minor optimizations to `==`, `.hashCode` and `.toString`.

Cleans up or avoids a few issues I noticed while debugging some performance
regressions when calling Dart Core Object members on record values.

Change-Id: Ida7fdb5c562d03c03330e245e94c80321dc433c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317320
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-08-01 18:03:42 +00:00
Ryan Macnak ff4ef0548c [vm, compiler] Refactor the A3/A4/A5 trick so it applies to EmitParamMoves.
This allows FfiCallInstr to accept constant inputs.

TEST=ci
Change-Id: I0436d4a54a5c95d4c6f6abb5215438fe72cf1042
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316721
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-08-01 17:01:41 +00:00
Ryan Macnak 3f41c1a3f0 [vm] Enable the background compiler under TSAN.
TEST=tsan
Bug: https://github.com/dart-lang/sdk/issues/39611
Change-Id: Ib90eefc3fb55026002ba5f122ea6d62623eac419
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316491
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2023-08-01 16:11:40 +00:00
Jake Macdonald 597444b54e add hasBody getter to FunctionDeclaration
Bug: https://github.com/dart-lang/language/issues/3078
Change-Id: I3b14d050062d0c2e90e6e0f5614dcc25e87a23fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316060
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2023-08-01 16:00:29 +00:00
Ben Konyi 1f7384beb8 [ VM ] Ensure randomly generated IDs are valid JS integers
Fixes https://github.com/dart-lang/sdk/issues/53081

TEST=Service tests

Change-Id: I0aaf3843c3a186336f5b2a8ee1e9356dd19251b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317460
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-08-01 15:50:11 +00:00
Alexander Markov dc2abf0a80 [kernel] Add missing visitors for RecordNameGet.receiverType and RecordIndexGet.receiverType
Fixes https://github.com/dart-lang/sdk/issues/53070

Change-Id: If3a687626af6671b657eb034cf24685ba587f08f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317142
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2023-08-01 14:50:39 +00:00
Johnni Winther 5ea3b88932 [_js_interop] Use #type for interop message
The uses the #type handle to pass the DartType in the message rather
than using the toString() method which doesn't give the desired result.

Change-Id: Iac17507643a9932570d5975a106a3ededc03f58c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316585
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2023-08-01 11:12:19 +00:00
Johnni Winther de20ac1447 [cfe] Fix ExtensionType.==
DartType.== was declared abstract, expecting subtypes to call
the `equals` method, but this was accidentally omitted for
ExtensionType.

This CL moves the implementation to DartType.== since it was called
with the same arguments in all subtypes, thus ensuring that new
DartType classes will get the correct equals by default.

Closes #53046

Change-Id: Ieaaf33ecb569ea7361ac338066a3a5760391e424
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316583
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2023-08-01 11:04:22 +00:00
Ömer Sinan Ağacan 39fe8f458a [dart2wasm] Remove unnecessary initializer list collectContexts call
The `collectContexts(member)` already visits initializer lists when
visiting constructors, so no need to call it separately for
initializers.

Change-Id: Ida51a0e8c4003f19cd7b533a2847946926237bc0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317101
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2023-08-01 10:53:09 +00:00
Johnni Winther a76f4d5c34 [cfe] Rename InlineClass to ExtensionTypeDeclaration
This renames InlineClass to ExtensionTypeDeclaration, and InlineType
to ExtensionType. Members of extension type declarations are called
extension type members instead of extension type declaration members
for "brevity".

TEST=existing

Change-Id: I91ed62533ddd345644492f04dc3310d007460288
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316780
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2023-08-01 09:04:38 +00:00