-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[vm/aot] Disable graph intrinsics for implicit getters with unboxed r…
…ecord return values Unboxing of records involves a more complex code, and such intrinsics would be similar to the normal code of the implicit getters. TEST=runtime/tests/vm/dart/regress_52449_test.dart Fixes #52449 Change-Id: I24867a7e0a3d081c53860f7f44c3be3d90b0b743 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304282 Commit-Queue: Alexander Markov <alexmarkov@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com>
- Loading branch information
1 parent
862c22d
commit 86c1825
Showing
2 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file | ||
// for details. All rights reserved. Use of this source code is governed by a | ||
// BSD-style license that can be found in the LICENSE file. | ||
|
||
// Verifies that compiler doesn't crash when compiling | ||
// implicit getter with unboxed return value. | ||
// Regression test for https://github.com/dart-lang/sdk/issues/52449. | ||
|
||
abstract class A { | ||
(int, int) get foo; | ||
} | ||
|
||
class B implements A { | ||
(int, int) get foo => (1, 2); | ||
} | ||
|
||
class C implements A { | ||
final (int, int) foo; | ||
C(this.foo); | ||
} | ||
|
||
void main() { | ||
final list = [B(), C((3, 4))]; | ||
for (var e in list) { | ||
print(e.foo); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters