Commit graph

20416 commits

Author SHA1 Message Date
Ryan Macnak fc65f506a8 [vm, compiler] Always reserve x18 on RISC-V.
The extracted runtime offsets can handle architecture differences but not OS differences. Compare handling of x18 on ARM64.

TEST=gen_snapshot_fuchsia
Change-Id: Ide7557fa9f0cb5ed3d65f05a68310b88883957fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290704
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-03-23 23:17:50 +00:00
Sam Rawlins d8613bba50 [analyzer] Move 3 more HintCodes to be WarningCodes, UNNECESSARY_*
Bug: https://github.com/dart-lang/sdk/issues/50796
Change-Id: I71291bfa959d7553c64d4a9e1f2918892ae012eb
TEST=trybots
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290403
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-03-23 22:52:36 +00:00
Natsu 7c6f6d6232 Update dartfuzz code to remove generation of old super-mixins
Closes https://github.com/dart-lang/sdk/pull/51682

GitOrigin-RevId: 1bd06789a88d381d817c45b8cc74de34f8753a8b
Change-Id: I32c409e1b277fad98db6b4450adc22fa60973c04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287780
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2023-03-23 22:44:33 +00:00
Ben Konyi 15de818977 [ Service ] Add new InstanceKind "UserTag"
Also adds a new "label" property to @Instance

TEST=pkg/vm_service/test/get_object_rpc_test.dart

Change-Id: I746d56909a55e0158896e1034665147c469109bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290920
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-03-23 17:51:03 +00:00
Liam Appelbe 929fec660b Reland "[vm] Refactor StubCodeCompiler to be a real class."
This is a reland of commit afdf640866

Original change's description:
> [vm] Refactor StubCodeCompiler to be a real class.
>
> Previously, StubCodeCompiler was just a set of static methods, all of
> which take an assembler as their first arg. This makes it hard to pass
> additional state to the ~160 stub macro defined stub generators.
>
> This refactor makes StubCodeCompiler a real class, with assembler as a
> field. So we can easily add new fields to the class later, to pass new
> state without having to update every stub generator.
>
> assembler is declared as a public field for a few reasons:
> - There's one place where it needs to be accessed by a non-member
>   function (in the ia32 file).
> - If it's private, it has to be named assembler_, which would mean a lot
>   more insignificant diffs.
> - Non-member functions that take assembler would have to take assembler_,
>   for consistency with the __ macro, which would be weird.
>
> Change-Id: I142f0803a07c7839753188065c69c334d4d1798a
> TEST=CI
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289924
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Liam Appelbe <liama@google.com>

Change-Id: Ib5be28c46a0a80b84e31aea60893ab5bbc02e2ea
TEST=CI, including all sanitizers and architectures
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290681
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2023-03-22 23:48:56 +00:00
Emmanuel Pellereau 7acb6f2c5c Revert "[vm] Refactor StubCodeCompiler to be a real class."
This reverts commit afdf640866.

Reason for revert: breaks google3. See b/274712076.

Original change's description:
> [vm] Refactor StubCodeCompiler to be a real class.
>
> Previously, StubCodeCompiler was just a set of static methods, all of
> which take an assembler as their first arg. This makes it hard to pass
> additional state to the ~160 stub macro defined stub generators.
>
> This refactor makes StubCodeCompiler a real class, with assembler as a
> field. So we can easily add new fields to the class later, to pass new
> state without having to update every stub generator.
>
> assembler is declared as a public field for a few reasons:
> - There's one place where it needs to be accessed by a non-member
>   function (in the ia32 file).
> - If it's private, it has to be named assembler_, which would mean a lot
>   more insignificant diffs.
> - Non-member functions that take assembler would have to take assembler_,
>   for consistency with the __ macro, which would be weird.
>
> Change-Id: I142f0803a07c7839753188065c69c334d4d1798a
> TEST=CI
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289924
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Liam Appelbe <liama@google.com>

Change-Id: If36a9122e1a55d86673d05afbbd21dfb27d7acd5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290522
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Emmanuel Pellereau <emmanuelp@google.com>
2023-03-22 15:11:10 +00:00
Martin Kustermann f20e6d3fa0 [vm] Remove complex logic in kernel loader for dealing with annotations
Instead of peeking into constant table and then delaying scanning of
constants by putting it in an array, which is walked again in some
future point, we simply read the annotation constants entirely without
requiring const evaluation. This works fine for pragma annotations the
VM is interested in - as there's no user-defined classes involved.

-> Loading kernel will no longer require constant evaluation to work.

Motivation for this is that [0] wants to make this delayed annotation
scanning logic even more complicated, so I prefer to remove it entirely.

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

TEST=ci

Change-Id: Ib859480107b6cf119d66035e66ec161ed11ddb32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290502
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2023-03-22 12:25:47 +00:00
Liam Appelbe afdf640866 [vm] Refactor StubCodeCompiler to be a real class.
Previously, StubCodeCompiler was just a set of static methods, all of
which take an assembler as their first arg. This makes it hard to pass
additional state to the ~160 stub macro defined stub generators.

This refactor makes StubCodeCompiler a real class, with assembler as a
field. So we can easily add new fields to the class later, to pass new
state without having to update every stub generator.

assembler is declared as a public field for a few reasons:
- There's one place where it needs to be accessed by a non-member
  function (in the ia32 file).
- If it's private, it has to be named assembler_, which would mean a lot
  more insignificant diffs.
- Non-member functions that take assembler would have to take assembler_,
  for consistency with the __ macro, which would be weird.

Change-Id: I142f0803a07c7839753188065c69c334d4d1798a
TEST=CI
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289924
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2023-03-22 03:58:09 +00:00
Jia Hao Goh 5921f835b6 [Runtime/VM] Enable SUPPORT_TIMELINE in product mode on iOS
This is useful to systrace release mode applications on iOS. With this change and with systrace disabled, the `TimelineEventNopRecorder` is used so there should not be any performance impact.

See also the following bug where this was done for Android.

TEST=ci

Bug: https://github.com/dart-lang/sdk/issues/47264
Change-Id: If3d127054d6345213fe0ade827dd60f7904a99a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289925
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Auto-Submit: Jia Hao Goh <jiahaog@google.com>
2023-03-21 23:39:40 +00:00
Daco Harkes 92e5746494 Reland "[vm/ffi] Add class modifiers"
This is a reland of commit 1755f89092

Can land after (or with) the Flutter PR:
https://github.com/flutter/engine/pull/40434

Original change's description:
> [vm/ffi] Add class modifiers
>
> Adds class modifiers to `dart:ffi`.
>
> Migrates all user-defined subclasses of `Struct`, `Union`, `Opaque`,
> and `AbiSpecificInteger` to be `final class`es.
>
> Does not remove the manual error checking, so some errors will show up
> twice now in language version 3.0. In language version <3.0, only the
> FFI-specific error will show up.
>
> In a follow-up CL, we will try to make the language-errors to show up
> also <3.0 so that we can remove the FFI-specific errors.
>
> Examples of duplicated errors:
> pkg/analyzer/test/src/diagnostics/subtype_of_ffi_class_test.dart
>
> TEST=pkg/analyzer/test/ (for the analyzer)
> TEST=pkg/front_end/testcases/ (for the CFE)
> TEST=test/ffi/ (for the VM)
>
> CoreLibraryReviewExempt: No need for dart2js to review.
> Bug: https://github.com/dart-lang/sdk/issues/51683
> Change-Id: I2964ceccb7db59fbdaf6be5319f5e4ec2dabe0f3
> Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-win-release-try,pkg-mac-release-try,vm-precomp-ffi-qemu-linux-release-riscv64-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-ffi-android-debug-arm64c-try,vm-ffi-android-debug-arm-try,vm-reload-rollback-linux-debug-x64-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289223
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Devon Carew <devoncarew@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Reviewed-by: Jackson Gardner <jacksongardner@google.com>
> Reviewed-by: Lasse Nielsen <lrn@google.com>
> Commit-Queue: Daco Harkes <dacoharkes@google.com>

TEST=pkg/analyzer/test/ (for the analyzer)
TEST=pkg/front_end/testcases/ (for the CFE)
TEST=test/ffi/ (for the VM)
CoreLibraryReviewExempt: No need for dart2js to review.
Bug: https://github.com/dart-lang/sdk/issues/51683
Change-Id: I2ee3f0ac31d4162068a2346a06320029b2263ee2
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-win-release-try,pkg-mac-release-try,vm-precomp-ffi-qemu-linux-release-riscv64-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-ffi-android-debug-arm64c-try,vm-ffi-android-debug-arm-try,vm-reload-rollback-linux-debug-x64-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289781
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-03-21 15:25:10 +00:00
Ryan Macnak 2cc96bfa0b [vm] Add an ABI for Fuchsia RISC-V.
https://fuchsia.dev/fuchsia-src/contribute/governance/rfcs/0211_fuchsia_on_risc-v

TEST=./tools/build.py -mrelease -asimriscv64 gen_snapshot_fuchsia gen_snapshot_product_fuchsia
CoreLibraryReviewExempt: VM-only
Change-Id: Ie62addda6c15a5b44e814c49b543319aef4fc5e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/281869
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-03-20 20:46:27 +00:00
Jake Macdonald 2fc9ea5ad7 copy language/mixin tests to language/mixin_legacy with 2.19 opt out
Change-Id: Ice509ea1f0efec8153fb2380ab0e980fed552b0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289580
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2023-03-20 17:29:31 +00:00
Ben Konyi a62bfec074 [ Service ] Allow for case insensitive URI mappings on Windows and MacOS
The Windows and MacOS file system can be case insensitive, so the following
two URIs can be equivalent:

 - file:///c:/foo/bar
 - file:///C:/Foo/Bar

Since it's possible for tooling to request a mapping for a URI that
isn't an exact case-sensitive match to that found in the URI mappings
cache, requesting a mapping for the inexact match will fail even though
the paths are potentially equivalent.

This change allows for lookupPackageUris and lookupResolvedPackageUris
to correctly handle paths that are not case-sensitive matches to entries
in the URI mappings cache on Windows and MacOS.

TEST=uri_mappings_lookup_test.dart

Change-Id: I35134c47bf3bd04bc452373b31b4eb5893ba1435
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288821
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Helin Shiah <helinx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-03-20 17:21:27 +00:00
Zach Anderson 7471994270 Revert "[vm/ffi] Add class modifiers"
This reverts commit 1755f89092.

Reason for revert: This is a breaking change and is blocking the Dart -> Flutter roll. See https://ci.chromium.org/ui/p/flutter/builders/try/Mac%20Unopt/26896/overview.

Original change's description:
> [vm/ffi] Add class modifiers
>
> Adds class modifiers to `dart:ffi`.
>
> Migrates all user-defined subclasses of `Struct`, `Union`, `Opaque`,
> and `AbiSpecificInteger` to be `final class`es.
>
> Does not remove the manual error checking, so some errors will show up
> twice now in language version 3.0. In language version <3.0, only the
> FFI-specific error will show up.
>
> In a follow-up CL, we will try to make the language-errors to show up
> also <3.0 so that we can remove the FFI-specific errors.
>
> Examples of duplicated errors:
> pkg/analyzer/test/src/diagnostics/subtype_of_ffi_class_test.dart
>
> TEST=pkg/analyzer/test/ (for the analyzer)
> TEST=pkg/front_end/testcases/ (for the CFE)
> TEST=test/ffi/ (for the VM)
>
> CoreLibraryReviewExempt: No need for dart2js to review.
> Bug: https://github.com/dart-lang/sdk/issues/51683
> Change-Id: I2964ceccb7db59fbdaf6be5319f5e4ec2dabe0f3
> Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-win-release-try,pkg-mac-release-try,vm-precomp-ffi-qemu-linux-release-riscv64-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-ffi-android-debug-arm64c-try,vm-ffi-android-debug-arm-try,vm-reload-rollback-linux-debug-x64-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289223
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Devon Carew <devoncarew@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Reviewed-by: Jackson Gardner <jacksongardner@google.com>
> Reviewed-by: Lasse Nielsen <lrn@google.com>
> Commit-Queue: Daco Harkes <dacoharkes@google.com>

Bug: https://github.com/dart-lang/sdk/issues/51683
Change-Id: Ie5b8a08aea6d64b1991ace4814322b21ffb670c7
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-win-release-try,pkg-mac-release-try,vm-precomp-ffi-qemu-linux-release-riscv64-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-ffi-android-debug-arm64c-try,vm-ffi-android-debug-arm-try,vm-reload-rollback-linux-debug-x64-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289640
Commit-Queue: Slava Egorov <vegorov@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2023-03-20 11:15:59 +00:00
Alexander Markov 2d5c46c871 [vm/compiler] Do not assume that LoadField is performed from a record of a compatible shape
Compiler can see an unreachable code like this:

v1 <- Constant(Record (C, C))
if v1 is (C, C, C) {
  v2 <- LoadField (v1.$3)
}

So it should check that record type of the receiver has enough fields
before querying field type in LoadField.

TEST=co19/LanguageFeatures/Patterns/matching_record_*

Fixes https://github.com/dart-lang/sdk/issues/51767
Issue https://github.com/dart-lang/sdk/issues/49755

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-nnbd-linux-release-x64-try
Change-Id: Iac42c8edf3d22dce0061b6d75e8bdf51b7bf88e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289540
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2023-03-20 08:30:36 +00:00
Daco Harkes 1755f89092 [vm/ffi] Add class modifiers
Adds class modifiers to `dart:ffi`.

Migrates all user-defined subclasses of `Struct`, `Union`, `Opaque`,
and `AbiSpecificInteger` to be `final class`es.

Does not remove the manual error checking, so some errors will show up
twice now in language version 3.0. In language version <3.0, only the
FFI-specific error will show up.

In a follow-up CL, we will try to make the language-errors to show up
also <3.0 so that we can remove the FFI-specific errors.

Examples of duplicated errors:
pkg/analyzer/test/src/diagnostics/subtype_of_ffi_class_test.dart

TEST=pkg/analyzer/test/ (for the analyzer)
TEST=pkg/front_end/testcases/ (for the CFE)
TEST=test/ffi/ (for the VM)

CoreLibraryReviewExempt: No need for dart2js to review.
Bug: https://github.com/dart-lang/sdk/issues/51683
Change-Id: I2964ceccb7db59fbdaf6be5319f5e4ec2dabe0f3
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-win-release-try,pkg-mac-release-try,vm-precomp-ffi-qemu-linux-release-riscv64-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-ffi-android-debug-arm64c-try,vm-ffi-android-debug-arm-try,vm-reload-rollback-linux-debug-x64-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289223
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jackson Gardner <jacksongardner@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2023-03-17 19:29:41 +00:00
Sam Rawlins c761de6e3e [analyzer] Move 3 more HintCodes to be WarningCodes, UNNECESSARY_N*
Bug: https://github.com/dart-lang/sdk/issues/50796
Change-Id: I04e8428a45428c02a05e8370a6cb1e9c4cf8030c
TEST=trybots
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289029
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-03-16 18:52:18 +00:00
Derek Xu ec39319bf7 [VM/Timeline] Add a synchronization monitor to TimelineTrackMetadataRace test
The test is still timing out on many configurations. Hopefully changing
the spin lock to a monitor fixes this.

TEST=TSAN, CI

Issue: https://github.com/dart-lang/sdk/issues/51654
Change-Id: I03d1199c18a225bbd621613211ef6a4ceee93ac7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289000
Commit-Queue: Derek Xu <derekx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-03-16 17:46:28 +00:00
Alexander Markov c2d664a5e9 [vm/compiler] Take cid into account when deciding if CheckClass is needed during inlining
The recent change [1] improved availability of static types.
While that change improved performance on a lot of benchmarks,
it also caused a regression of SkeletalAnimationSIMD
benchmark in JIT mode.

The benchmark regressed because:
* When inlining a recognized method in call specializer,
  compiler checks if an extra CheckClass instruction should be
  inserted using FlowGraph::CheckForInstanceCall.
* CheckForInstanceCall has been looking only at the static type of
  the receiver. When static type is absent, it is calculated from cid.
  For a method lookup, cid is more precise compared to a static type.
  So, when static type becomes available since [1], cid was no longer
  used and extra CheckClass instructions were inserted to the IL.
* During inlining, extra CheckClass instructions increased callee size
  and a useful inlining didn't happen, prohibiting other optimizations
  and causing the regression.

This change fixes CheckForInstanceCall to look at the cid
first before looking at the static type.

[1] https://dart-review.googlesource.com/c/sdk/+/287222

TEST=SkeletalAnimationSIMD benchmark

Change-Id: I8cb496dee443eab9db828f1e28ba1efe7ea3f8ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289020
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2023-03-16 14:35:58 +00:00
Johnni Winther c62534fc03 [cfe] Clean up properties on Pattern classes
This removes the "unset" values and uses nullable types instead.
The names and uses of the pattern fields are normalized, using
`matchedValueType`, `requiredType` and `lookupType` consistently
between [Pattern] subclasses.

TEST=existing

Change-Id: Ic79ce17075aa8ce252e1c223b59bef660f32bb7c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288704
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2023-03-16 11:43:58 +00:00
Alexander Markov e716e5a35c [vm/tests] Split vm/dart/optimized_switch_test to pre- and post-Dart 3.0 versions
TEST=ci
Closes https://github.com/dart-lang/sdk/issues/51684

Change-Id: Iea9c42ed5940ff02d2774b6c938f887b1365fd34
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288580
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2023-03-15 20:05:38 +00:00
Alexander Markov 295e210975 [vm/aot] Unbox records using inferred record shapes
Unboxing of records in return values is switched to use inferred record
shape instead of a static type. This is more accurate, as
static return type 'Object', 'dynamic' or a type parameter would
not prevent record unboxing.

TEST=runtime/tests/vm/dart/records_return_value_unboxing_il_test.dart
TEST=pkg/vm/testcases/transformations/type_flow/transformer/unboxed_records.dart

Issue: https://github.com/dart-lang/sdk/issues/49719
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try
Change-Id: I56528e114bc2de94c4a1ec09c48eb5b9ed3c3d3f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288824
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2023-03-15 17:34:37 +00:00
Ryan Macnak e2be06335a [vm] Assert only that intptr_t is big enough for ThreadId, not exactly the same.
On Fuchsia, ThreadId is a zx_handle_t/int32_t.

TEST=ci
Change-Id: I457064e51f14aba7faff5ab62bfebeb644f0b0eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288547
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2023-03-15 00:24:51 +00:00
Derek Xu dba7192da8 [VM/Timeline] Fix infinite loop in TimelineTrackMetadataRace test
I believe that the compiler can optimize the while loop on line 422 to
be an infinite loop when report_metadata_1_arguments and
report_metadata_2_arguments are declared as const. I tested something
similar in Compiler Explorer and saw the optimization happening.

TEST=CI

Issue: https://github.com/dart-lang/sdk/issues/51654
Change-Id: I23df07fdb01609a4b9fb83320ed541c6cdc7df83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288826
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2023-03-14 20:53:10 +00:00
Derek Xu e90a368138 Revert "[VM/Timeline] Print a warning when conflicting timeline CLI options are set"
This reverts commit 62077ddb4d.

Reason for revert: We should first replace all usages of the flags that
will be deprecated.

Original change's description:
> [VM/Timeline] Print a warning when conflicting timeline CLI options are set
>
> TEST=CI, manual testing
>
> Change-Id: Ibae86d60e16997dce0adb9a1973066ef1890500a
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287922
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Commit-Queue: Derek Xu <derekx@google.com>

Change-Id: Ieae22753e8488974ea11595b896573ff9a0a5a7a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288822
Commit-Queue: Derek Xu <derekx@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2023-03-14 18:20:39 +00:00
Derek Xu 50dd8edb7a [CLI] Add help message about --timeline-recorder to dart run --help
TEST=manual testing, CI

Change-Id: I11746e106c44bcef202f6002e10aa6e29381addb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288582
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2023-03-14 18:00:43 +00:00
Derek Xu d76ae6dbcb [CLI] Fix handling of --timeline-streams when it is supplied after dart run
--timeline-streams has been listed in the "options implied by --observe"
section of the dart run help messages, but it has been getting ignored.
This CL fixes that problem.

TEST=manual testing, CI

Change-Id: Ib6c2425a2681b61375df186673e0f195e3fae580
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288581
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-03-14 18:00:43 +00:00
Alexander Aprelev cfa22fc7ab [gardening] Adjust language/switch_test presence in iso-stress-linux test suite.
TEST=ci

Change-Id: I486f39eca3a9a65fbeb2f3d34f9233c42b2fe524
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288800
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2023-03-14 17:47:35 +00:00
Ryan Macnak bad074cc49 [vm, reload] Account for enums now having the possibility of shape changes.
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/50396
Change-Id: Ifd9d5b1572cbdec38506ce433114b0cb99a5bcda
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288302
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-03-14 17:39:31 +00:00
Siva Annamalai 5a8ddc0756 Revert "[ Observatory ] Disable serving Observatory by default"
This reverts commit edead9cfd1.

Reason for revert: We have some flutter framework tests that are breaking, "flutter test should respect --serve-observatory". This will apparently be fixed when https://github.com/flutter/flutter/pull/122419 lands.

Original change's description:
> [ Observatory ] Disable serving Observatory by default
>
> Observatory can still be enabled by providing `--serve-observatory` or
> invoking the `_serveObservatory` private service RPC via web socket or
> HTTP.
>
> Related to https://github.com/dart-lang/sdk/issues/50233
>
> TEST=pkg/dartdev/test/commands/run_test
>
> Change-Id: I89b000e69bb31c91a9a5386fed1ee590cdafa58c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287821
> Reviewed-by: Michael Thomsen <mit@google.com>
> Commit-Queue: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>

Change-Id: I994c86cbca9d0eb25e1f9adddeede94c227acad9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288601
Commit-Queue: Siva Annamalai <asiva@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Zach Anderson <zra@google.com>
2023-03-14 00:46:59 +00:00
Derek Xu 62077ddb4d [VM/Timeline] Print a warning when conflicting timeline CLI options are set
TEST=CI, manual testing

Change-Id: Ibae86d60e16997dce0adb9a1973066ef1890500a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287922
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2023-03-13 20:55:08 +00:00
Alexander Markov 9703692a85 [vm] Hide local variables synthesized in the front-end from debugger
TEST=pkg/vm_service/test/patterns_local_vars_test.dart

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

Change-Id: I5a59d454b005740427610fab46892d63df1310dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288262
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2023-03-13 20:37:03 +00:00
Ilya Yanok 936cdeeb2f Revert "Reland "Add more interface and final modifiers to dart:core.""
This reverts commit e293eb809d.

Reason for revert: Breaks G3.

Original change's description:
> Reland "Add more `interface` and `final` modifiers to `dart:core`."
>
> This is a reland of commit 4f8333e80e
>
> Blocked on Flutter patch: https://github.com/flutter/engine/pull/40175
>
> Original change's description:
> > Add more `interface` and `final` modifiers to `dart:core`.
> >
> > Make intent explicit for classes which are intended as interfaces,
> > or which are not intended to be subclassed.
> >
> > Mainly classes which are pure interfaces are marked as such,
> > and platform-specific classes not intended for subclassing
> > are made `final`.
> >
> > The `final` classes includes `BigInt`, which is written to assume
> > that arguments inherit its private members
> > (it runs `_ensureSystemBigInt` on arguments).
> >
> > It also includes the `Expando`, `WeakReference` and `Finalizer` classes,
> > which are just intended as stand-alone implementation classes for accessing
> > platform-specific functionality.
> >
> > Change-Id: Ib770c265edff127a289a67fe72d15b9ff0499407
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287180
> > Reviewed-by: Stephen Adams <sra@google.com>
> > Commit-Queue: Lasse Nielsen <lrn@google.com>
> > Reviewed-by: Aske Simon Christensen <askesc@google.com>
> > Reviewed-by: Nate Bosch <nbosch@google.com>
> > Reviewed-by: Martin Kustermann <kustermann@google.com>
>
> CoreLibraryReviewExempt: Accepted in original CL.
> Change-Id: Id713edede4228801bb097a64734be4f2187f51a9
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288206
> Reviewed-by: Aske Simon Christensen <askesc@google.com>
> Commit-Queue: Lasse Nielsen <lrn@google.com>
> Reviewed-by: Nate Bosch <nbosch@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

Change-Id: I05ff2fe44e5a13f20725eb122963d20243062c7a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288503
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ilya Yanok <yanok@google.com>
2023-03-13 16:08:31 +00:00
Lasse R.H. Nielsen e293eb809d Reland "Add more interface and final modifiers to dart:core."
This is a reland of commit 4f8333e80e

Blocked on Flutter patch: https://github.com/flutter/engine/pull/40175

Original change's description:
> Add more `interface` and `final` modifiers to `dart:core`.
>
> Make intent explicit for classes which are intended as interfaces,
> or which are not intended to be subclassed.
>
> Mainly classes which are pure interfaces are marked as such,
> and platform-specific classes not intended for subclassing
> are made `final`.
>
> The `final` classes includes `BigInt`, which is written to assume
> that arguments inherit its private members
> (it runs `_ensureSystemBigInt` on arguments).
>
> It also includes the `Expando`, `WeakReference` and `Finalizer` classes,
> which are just intended as stand-alone implementation classes for accessing
> platform-specific functionality.
>
> Change-Id: Ib770c265edff127a289a67fe72d15b9ff0499407
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287180
> Reviewed-by: Stephen Adams <sra@google.com>
> Commit-Queue: Lasse Nielsen <lrn@google.com>
> Reviewed-by: Aske Simon Christensen <askesc@google.com>
> Reviewed-by: Nate Bosch <nbosch@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

CoreLibraryReviewExempt: Accepted in original CL.
Change-Id: Id713edede4228801bb097a64734be4f2187f51a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288206
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2023-03-13 15:21:30 +00:00
Johnni Winther f17cf33c6d [kernel] Move Pattern nodes to package:kernel
These AST nodes were so far internal to the CFE, but since we need to
move the pattern lowering to the constant evaluator we need to support them in the AST defined in package:kernel.

TEST=existing

Change-Id: Ie6c5f0f8ad75a866c5d965fdf506bc869ffaf654
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288241
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2023-03-13 08:43:07 +00:00
Robert Nystrom 56eaffb392 [flip-patterns] Enable "records" and "patterns" experiment flags.
This turns on the flags for these two language features and makes
them generally accessible.

Doing so causes a number of tests to fail, but the failures are
approved and there are filed issues for them. Most of the
failures are minor or only affect code using the new language
features.

This CL:

- Enables the features in experimental_features.yaml.
- Re-generates all of the various files generated from that.
- Makes some analyzer and front end changes that this CL
  inherited from Paul's original CL flipping all of the 3.0
  feature flags. I don't know what these changes are about, but
  I assume they are necessary.
- Pins a couple of tests to 2.19 since they deliberately test
  behavior that is specific to 2.19. (For most test changes, I've
  landed them separately, but there are a couple of stragglers
  in this CL.)

This doesn't enable "class-modifiers" or "sealed-types" and doesn't
include the core lib changes related to those.

TEST=On bots

Change-Id: Id387753772286a958e20a3589a6e983995f2e4a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286344
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-03-10 20:02:23 +00:00
Ben Konyi fadbd51c83 [ Service ] Remove unused variable in GetIsolateMetricList
TEST=N/A

Change-Id: I7e9eb8db64952a9f40d82514935beaced4bffdb8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288102
Reviewed-by: Dan Chevalier <danchevalier@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Brian Quinlan <bquinlan@google.com>
2023-03-10 18:35:43 +00:00
Ben Konyi f51fedce26 [ dart:developer ] Remove Metrics related classes
Fixes https://github.com/dart-lang/sdk/issues/51668

TEST=CI

CoreLibraryReviewExempt:VM only functionality
Change-Id: I5d41863fca05e50d9c20266402c516b92f8de153
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287820
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-03-10 16:50:10 +00:00
Ben Konyi edead9cfd1 [ Observatory ] Disable serving Observatory by default
Observatory can still be enabled by providing `--serve-observatory` or
invoking the `_serveObservatory` private service RPC via web socket or
HTTP.

Related to https://github.com/dart-lang/sdk/issues/50233

TEST=pkg/dartdev/test/commands/run_test

Change-Id: I89b000e69bb31c91a9a5386fed1ee590cdafa58c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287821
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2023-03-10 16:01:41 +00:00
Johnni Winther 04e6f4c282 [kernel] Add VariableDeclaration.isSynthesized
This adds an [isSynthesized] flag to the [VariableDeclaration] the
signal when the variable doesn't correspond to a variable in the
source code.

The name of a variable can only be `null` if it is synthesized.

Partially in response to
https://github.com/dart-lang/sdk/issues/51554

TEST=existing

Change-Id: I94591971f11da09d210c8b25a2d05e22ca05dc62
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286961
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2023-03-10 11:13:36 +00:00
Jake Macdonald 737b6f7356 [flip-modifiers]: flip the flags for sealed classes and class modifiers
Includes several updates to tests that needed to land with this flip, as well as some other tests that needed to be updated and could land separately, but are being included here to expedite things.

Removes some unnecessary experimental release versions, as well as bringing up to date the generated files, which were previously out of sync with the yaml file.

TEST=bots

Change-Id: I71a86d7a86190069b504bd27d687f62b97a7251e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/285080
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-03-10 05:27:57 +00:00
Alexander Markov 8c7d47cd19 [vm/compiler] Keep and propagate static types during local type propagation
Types of record field accesses are based on static record types,
so it is useful to keep and propagate static types even when
concrete class id is known.

TEST=runtime/tests/vm/dart/records_field_operations_il_test.dart

Issue: https://github.com/dart-lang/sdk/issues/49719
Issue: https://github.com/dart-lang/sdk/issues/51637
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-nnbd-linux-release-x64-try,vm-kernel-precomp-linux-release-x64-try
Change-Id: I268e3d519b07e12d1e2f8929cbd704a6995e2053
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287222
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2023-03-09 21:18:49 +00:00
Konstantin Shcheglov 895540889e Update SDK constraints for SDK packages.
https://dart-review.googlesource.com/c/sdk/+/287660 implements it.
I want to fix pre-existing violations before enabling.

Bug: https://github.com/dart-lang/sdk/issues/34978
Change-Id: Ie7731162c643018a2312b265f444bc00534c0a51
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287664
Reviewed-by: Leon Senft <leonsenft@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-03-09 19:52:47 +00:00
Robert Nystrom bb3fc88eb0 [flip-patterns] Pin to tests/vm/dart/regress_flutter51298_test.dart to 2.19.
In Dart 3.0, bool is treated as an "always-exhaustive" type which means
it's a compile error to not exhaustively switch on it.

Since this is a regression test, I don't want to tweak the test and
risk not covering the regressed behavior, so pinning to 2.19 where this
wasn't a compile error.

Change-Id: I51c63730f6db55ecc52daf20888db8778051d98f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287668
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
2023-03-09 19:22:47 +00:00
Oleh Prypin 732d1cc0a4 Revert "Add more interface and final modifiers to dart:core."
This reverts commit 4f8333e80e.

Reason for revert: causes breakages in google3

Original change's description:
> Add more `interface` and `final` modifiers to `dart:core`.
>
> Make intent explicit for classes which are intended as interfaces,
> or which are not intended to be subclassed.
>
> Mainly classes which are pure interfaces are marked as such,
> and platform-specific classes not intended for subclassing
> are made `final`.
>
> The `final` classes includes `BigInt`, which is written to assume
> that arguments inherit its private members
> (it runs `_ensureSystemBigInt` on arguments).
>
> It also includes the `Expando`, `WeakReference` and `Finalizer` classes,
> which are just intended as stand-alone implementation classes for accessing
> platform-specific functionality.
>
> Change-Id: Ib770c265edff127a289a67fe72d15b9ff0499407
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287180
> Reviewed-by: Stephen Adams <sra@google.com>
> Commit-Queue: Lasse Nielsen <lrn@google.com>
> Reviewed-by: Aske Simon Christensen <askesc@google.com>
> Reviewed-by: Nate Bosch <nbosch@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

Change-Id: I94ff95f72410a4e1ae80744971c4c920fecc1493
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287760
Reviewed-by: Martin Kustermann <kustermann@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Oleh Prypin <oprypin@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2023-03-09 13:09:57 +00:00
Lasse R.H. Nielsen 4f8333e80e Add more interface and final modifiers to dart:core.
Make intent explicit for classes which are intended as interfaces,
or which are not intended to be subclassed.

Mainly classes which are pure interfaces are marked as such,
and platform-specific classes not intended for subclassing
are made `final`.

The `final` classes includes `BigInt`, which is written to assume
that arguments inherit its private members
(it runs `_ensureSystemBigInt` on arguments).

It also includes the `Expando`, `WeakReference` and `Finalizer` classes,
which are just intended as stand-alone implementation classes for accessing
platform-specific functionality.

Change-Id: Ib770c265edff127a289a67fe72d15b9ff0499407
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287180
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2023-03-09 12:31:08 +00:00
Alexander Aprelev 63bea106d6 [vm/regexp] Name generated Regexp function with actual expression.
Currently all generated Regexp functions share the same name making profile information with RegExp functions harder to use.

BUG=https://github.com/dart-lang/sdk/issues/51624
TEST=ci

Change-Id: I67acf73df4be301dbcb17a60b8be1793002897b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287247
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2023-03-09 03:49:58 +00:00
Ryan Macnak 5c76d099a6 [build] Use relative paths.
go/remotely-cacheable

TEST=ci
Change-Id: Idee4ab56de2df15e90c5e4106b6200bf82e76155
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287320
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-03-08 22:10:42 +00:00
Alexander Markov 8ff777e61f [vm] Fix equality of uninstantiated generic closures
Equality of uninstantiated generic closures should match equality
of corresponding instantiated generic closures.

We cannot use identity for equality of instantiated generic closures
as distinct instantiations of the same generic closure should be equal.
So, identity shouldn't be used for uninstantiated generic closures
neither.

This change fixes equality for uninstantiated generic closures
and also updates closure hashCode correspondingly.

TEST=language/closure/instantiation_closure_equality_test
TEST=co19/LanguageFeatures/Constructor-tear-offs/equality_*

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

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-nnbd-linux-release-x64-try
Change-Id: Ieafc052de4a4f5f9ffcd2d9d26cb36a209c0e127
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287581
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2023-03-08 21:44:56 +00:00
Vyacheslav Egorov 56ad16f4de [vm] Make VM strict about min required Mac OS X version.
Refuse to initialize VM if current Mac OS X version is below
MAC_OS_X_VERSION_MIN_REQUIRED, which was configured in build
time through mac_sdk_min GN argument.

TEST=tested manually by changing return value of MacOSXVersion

Cq-Include-Trybots: luci.dart.try:dart-sdk-mac-arm64-try
Bug: https://github.com/flutter/flutter/issues/121739
Change-Id: I9d913516077dbb196e8d6ebd7fe9f3914de7c748
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286932
Reviewed-by: Michael Thomsen <mit@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2023-03-08 09:08:39 +00:00