Files
sdk/pkg/dynamic_modules/test/data/extend_class4/shared/shared.dart
T
Alexander Markov cf2bf95829 [dyn_modules,aot] Do not unbox instance methods in classes which can have dynamically loaded subtypes
Instance method dispatch uses boxed calling conventions if receiver
has a dynamically loaded class, even if method is not exported through
dynamic interface. So we need to disable unboxing and register calling
conventions for instance methods of classes with potential
dynamically loaded subtypes (implicitly or explicitly extendable).

Bug: b/454825012
TEST=pkg/dynamic_modules/test/data/extend_class4

Change-Id: I8256d72fa6fab82cdbe6f018094cbe20f429c220
Cq-Include-Trybots: luci.dart.try:vm-aot-dyn-linux-debug-x64-try,vm-aot-dyn-linux-product-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/457441
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2025-10-27 09:28:34 -07:00

19 lines
509 B
Dart

// Copyright (c) 2025, 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.
abstract class Base {
String get _privateGetter => 'Base._privateGetter';
String publicMethod(Object other) {
return other is Base ? other._privateGetter : "";
}
}
class C1 extends Base {}
class C2 extends Base {
@override
String get _privateGetter => 'C2._privateGetter';
}