Skip to content

Commit 315009e

Browse files
alexmarkovCommit Queue
authored andcommitted
[vm,dyn_modules] Make sure interpreted NoSuchMethod dispatchers receive arguments descriptor
Fix Function::PrologueNeedsArgumentsDescriptor() to return true for the interpreted NoSuchMethodDispatchers (although they have saved arguments descriptor) as entering interpreter through InterpretCall stub needs it. This is needed to avoid switching instance calls to monomorphic state if target is an interpreted NoSuchMethodDispatcher as monomorphic call does not pass arguments descriptor and it is incompatible with InterpretCall stub. TEST=ci (co19/LibTest/convert/JsonCodec/encode_A02_t01) Change-Id: I4675b27b827d36e3887d748412f5d582c5b43629 Cq-Include-Trybots: luci.dart.try:vm-aot-dyn-linux-debug-x64-try,vm-aot-dyn-linux-product-x64-try,vm-dyn-linux-debug-x64-try Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/445363 Commit-Queue: Alexander Markov <[email protected]> Reviewed-by: Tess Strickland <[email protected]>
1 parent 41a610e commit 315009e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

runtime/vm/object.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11997,17 +11997,17 @@ bool Function::HasDynamicCallers(Zone* zone) const {
1199711997
}
1199811998

1199911999
bool Function::PrologueNeedsArgumentsDescriptor() const {
12000-
// These functions have a saved compile-time arguments descriptor that is
12001-
// used in lieu of the runtime arguments descriptor in generated IL.
12002-
if (HasSavedArgumentsDescriptor()) {
12003-
return false;
12004-
}
1200512000
#if defined(DART_DYNAMIC_MODULES)
1200612001
// Entering interpreter needs arguments descriptor.
1200712002
if (is_declared_in_bytecode()) {
1200812003
return true;
1200912004
}
1201012005
#endif
12006+
// These functions have a saved compile-time arguments descriptor that is
12007+
// used in lieu of the runtime arguments descriptor in generated IL.
12008+
if (HasSavedArgumentsDescriptor()) {
12009+
return false;
12010+
}
1201112011
// The prologue of those functions need to examine the arg descriptor for
1201212012
// various purposes.
1201312013
return IsGeneric() || HasOptionalParameters();

0 commit comments

Comments
 (0)