[VM/runtime] Use signature instead of function in type test cache for closure.
The same signature (canonical function type) may be shared between different closure functions.
Clean up asserts verifying that members are canonical when updating type test cache.
TEST=existing ones
Change-Id: Ic206409e56d34dfd02d6705af93065fd3b83b8fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199561
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
diff --git a/runtime/vm/clustered_snapshot.h b/runtime/vm/clustered_snapshot.h
index a97d6bd..be649ed 100644
--- a/runtime/vm/clustered_snapshot.h
+++ b/runtime/vm/clustered_snapshot.h
@@ -182,7 +182,7 @@
// Returns true if these roots are the first snapshot loaded into a heap, and
// so can assume any canonical objects don't already exist. Returns false if
// some other snapshot may be loaded before these roots, and so written
- // canonical objects need to run canoncalization during load.
+ // canonical objects need to run canonicalization during load.
virtual bool AddBaseObjects(Deserializer* deserializer) = 0;
virtual void ReadRoots(Deserializer* deserializer) = 0;
virtual void PostLoad(Deserializer* deserializer, const Array& refs) = 0;
diff --git a/runtime/vm/compiler/backend/il.cc b/runtime/vm/compiler/backend/il.cc
index 512db83..1011d8c 100644
--- a/runtime/vm/compiler/backend/il.cc
+++ b/runtime/vm/compiler/backend/il.cc
@@ -1201,11 +1201,6 @@
// them here.
if (!value.IsNull() && !value.IsSmi() && value.IsInstance() &&
!value.IsCanonical() && (value.ptr() != Object::sentinel().ptr())) {
- // The only allowed type for which IsCanonical() never answers true is
- // TypeParameter. (They are treated as canonical due to how they are
- // created, but there is no way to canonicalize a new TypeParameter
- // instance containing the same information as an existing instance.)
- //
// Arrays in ConstantInstrs are usually immutable and canonicalized, but
// there are at least a couple of cases where one or both is not true:
//
@@ -1224,8 +1219,7 @@
//
// LibraryPrefixes are also never canonicalized since their equality is
// their identity.
- ASSERT(value.IsTypeParameter() || value.IsArray() || value.IsTypedData() ||
- value.IsLibraryPrefix());
+ ASSERT(value.IsArray() || value.IsTypedData() || value.IsLibraryPrefix());
}
#endif
}
diff --git a/runtime/vm/compiler/runtime_api.h b/runtime/vm/compiler/runtime_api.h
index 491e59f..32cbeee 100644
--- a/runtime/vm/compiler/runtime_api.h
+++ b/runtime/vm/compiler/runtime_api.h
@@ -1268,7 +1268,7 @@
static word cache_offset();
static const word kTestEntryLength;
- static const word kInstanceClassIdOrFunction;
+ static const word kInstanceCidOrSignature;
static const word kDestinationType;
static const word kInstanceTypeArguments;
static const word kInstantiatorTypeArguments;
diff --git a/runtime/vm/compiler/runtime_offsets_extracted.h b/runtime/vm/compiler/runtime_offsets_extracted.h
index 91374ad..95c2e89 100644
--- a/runtime/vm/compiler/runtime_offsets_extracted.h
+++ b/runtime/vm/compiler/runtime_offsets_extracted.h
@@ -77,7 +77,7 @@
static constexpr dart::compiler::target::word
SubtypeTestCache_kFunctionTypeArguments = 5;
static constexpr dart::compiler::target::word
- SubtypeTestCache_kInstanceClassIdOrFunction = 1;
+ SubtypeTestCache_kInstanceCidOrSignature = 1;
static constexpr dart::compiler::target::word
SubtypeTestCache_kDestinationType = 2;
static constexpr dart::compiler::target::word
@@ -616,7 +616,7 @@
static constexpr dart::compiler::target::word
SubtypeTestCache_kFunctionTypeArguments = 5;
static constexpr dart::compiler::target::word
- SubtypeTestCache_kInstanceClassIdOrFunction = 1;
+ SubtypeTestCache_kInstanceCidOrSignature = 1;
static constexpr dart::compiler::target::word
SubtypeTestCache_kDestinationType = 2;
static constexpr dart::compiler::target::word
@@ -1160,7 +1160,7 @@
static constexpr dart::compiler::target::word
SubtypeTestCache_kFunctionTypeArguments = 5;
static constexpr dart::compiler::target::word
- SubtypeTestCache_kInstanceClassIdOrFunction = 1;
+ SubtypeTestCache_kInstanceCidOrSignature = 1;
static constexpr dart::compiler::target::word
SubtypeTestCache_kDestinationType = 2;
static constexpr dart::compiler::target::word
@@ -1696,7 +1696,7 @@
static constexpr dart::compiler::target::word
SubtypeTestCache_kFunctionTypeArguments = 5;
static constexpr dart::compiler::target::word
- SubtypeTestCache_kInstanceClassIdOrFunction = 1;
+ SubtypeTestCache_kInstanceCidOrSignature = 1;
static constexpr dart::compiler::target::word
SubtypeTestCache_kDestinationType = 2;
static constexpr dart::compiler::target::word
@@ -2241,7 +2241,7 @@
static constexpr dart::compiler::target::word
SubtypeTestCache_kFunctionTypeArguments = 5;
static constexpr dart::compiler::target::word
- SubtypeTestCache_kInstanceClassIdOrFunction = 1;
+ SubtypeTestCache_kInstanceCidOrSignature = 1;
static constexpr dart::compiler::target::word
SubtypeTestCache_kDestinationType = 2;
static constexpr dart::compiler::target::word
@@ -2785,7 +2785,7 @@
static constexpr dart::compiler::target::word
SubtypeTestCache_kFunctionTypeArguments = 5;
static constexpr dart::compiler::target::word
- SubtypeTestCache_kInstanceClassIdOrFunction = 1;
+ SubtypeTestCache_kInstanceCidOrSignature = 1;
static constexpr dart::compiler::target::word
SubtypeTestCache_kDestinationType = 2;
static constexpr dart::compiler::target::word
@@ -3329,7 +3329,7 @@
static constexpr dart::compiler::target::word
SubtypeTestCache_kFunctionTypeArguments = 5;
static constexpr dart::compiler::target::word
- SubtypeTestCache_kInstanceClassIdOrFunction = 1;
+ SubtypeTestCache_kInstanceCidOrSignature = 1;
static constexpr dart::compiler::target::word
SubtypeTestCache_kDestinationType = 2;
static constexpr dart::compiler::target::word
@@ -3862,7 +3862,7 @@
static constexpr dart::compiler::target::word
SubtypeTestCache_kFunctionTypeArguments = 5;
static constexpr dart::compiler::target::word
- SubtypeTestCache_kInstanceClassIdOrFunction = 1;
+ SubtypeTestCache_kInstanceCidOrSignature = 1;
static constexpr dart::compiler::target::word
SubtypeTestCache_kDestinationType = 2;
static constexpr dart::compiler::target::word
@@ -4400,7 +4400,7 @@
static constexpr dart::compiler::target::word
SubtypeTestCache_kFunctionTypeArguments = 5;
static constexpr dart::compiler::target::word
- SubtypeTestCache_kInstanceClassIdOrFunction = 1;
+ SubtypeTestCache_kInstanceCidOrSignature = 1;
static constexpr dart::compiler::target::word
SubtypeTestCache_kDestinationType = 2;
static constexpr dart::compiler::target::word
@@ -4930,7 +4930,7 @@
static constexpr dart::compiler::target::word
SubtypeTestCache_kFunctionTypeArguments = 5;
static constexpr dart::compiler::target::word
- SubtypeTestCache_kInstanceClassIdOrFunction = 1;
+ SubtypeTestCache_kInstanceCidOrSignature = 1;
static constexpr dart::compiler::target::word
SubtypeTestCache_kDestinationType = 2;
static constexpr dart::compiler::target::word
@@ -5469,7 +5469,7 @@
static constexpr dart::compiler::target::word
SubtypeTestCache_kFunctionTypeArguments = 5;
static constexpr dart::compiler::target::word
- SubtypeTestCache_kInstanceClassIdOrFunction = 1;
+ SubtypeTestCache_kInstanceCidOrSignature = 1;
static constexpr dart::compiler::target::word
SubtypeTestCache_kDestinationType = 2;
static constexpr dart::compiler::target::word
@@ -6007,7 +6007,7 @@
static constexpr dart::compiler::target::word
SubtypeTestCache_kFunctionTypeArguments = 5;
static constexpr dart::compiler::target::word
- SubtypeTestCache_kInstanceClassIdOrFunction = 1;
+ SubtypeTestCache_kInstanceCidOrSignature = 1;
static constexpr dart::compiler::target::word
SubtypeTestCache_kDestinationType = 2;
static constexpr dart::compiler::target::word
@@ -6559,7 +6559,7 @@
static constexpr dart::compiler::target::word
AOT_SubtypeTestCache_kFunctionTypeArguments = 5;
static constexpr dart::compiler::target::word
- AOT_SubtypeTestCache_kInstanceClassIdOrFunction = 1;
+ AOT_SubtypeTestCache_kInstanceCidOrSignature = 1;
static constexpr dart::compiler::target::word
AOT_SubtypeTestCache_kDestinationType = 2;
static constexpr dart::compiler::target::word
@@ -7163,7 +7163,7 @@
static constexpr dart::compiler::target::word
AOT_SubtypeTestCache_kFunctionTypeArguments = 5;
static constexpr dart::compiler::target::word
- AOT_SubtypeTestCache_kInstanceClassIdOrFunction = 1;
+ AOT_SubtypeTestCache_kInstanceCidOrSignature = 1;
static constexpr dart::compiler::target::word
AOT_SubtypeTestCache_kDestinationType = 2;
static constexpr dart::compiler::target::word
@@ -7773,7 +7773,7 @@
static constexpr dart::compiler::target::word
AOT_SubtypeTestCache_kFunctionTypeArguments = 5;
static constexpr dart::compiler::target::word
- AOT_SubtypeTestCache_kInstanceClassIdOrFunction = 1;
+ AOT_SubtypeTestCache_kInstanceCidOrSignature = 1;
static constexpr dart::compiler::target::word
AOT_SubtypeTestCache_kDestinationType = 2;
static constexpr dart::compiler::target::word
@@ -8381,7 +8381,7 @@
static constexpr dart::compiler::target::word
AOT_SubtypeTestCache_kFunctionTypeArguments = 5;
static constexpr dart::compiler::target::word
- AOT_SubtypeTestCache_kInstanceClassIdOrFunction = 1;
+ AOT_SubtypeTestCache_kInstanceCidOrSignature = 1;
static constexpr dart::compiler::target::word
AOT_SubtypeTestCache_kDestinationType = 2;
static constexpr dart::compiler::target::word
@@ -8988,7 +8988,7 @@
static constexpr dart::compiler::target::word
AOT_SubtypeTestCache_kFunctionTypeArguments = 5;
static constexpr dart::compiler::target::word
- AOT_SubtypeTestCache_kInstanceClassIdOrFunction = 1;
+ AOT_SubtypeTestCache_kInstanceCidOrSignature = 1;
static constexpr dart::compiler::target::word
AOT_SubtypeTestCache_kDestinationType = 2;
static constexpr dart::compiler::target::word
@@ -9594,7 +9594,7 @@
static constexpr dart::compiler::target::word
AOT_SubtypeTestCache_kFunctionTypeArguments = 5;
static constexpr dart::compiler::target::word
- AOT_SubtypeTestCache_kInstanceClassIdOrFunction = 1;
+ AOT_SubtypeTestCache_kInstanceCidOrSignature = 1;
static constexpr dart::compiler::target::word
AOT_SubtypeTestCache_kDestinationType = 2;
static constexpr dart::compiler::target::word
@@ -10191,7 +10191,7 @@
static constexpr dart::compiler::target::word
AOT_SubtypeTestCache_kFunctionTypeArguments = 5;
static constexpr dart::compiler::target::word
- AOT_SubtypeTestCache_kInstanceClassIdOrFunction = 1;
+ AOT_SubtypeTestCache_kInstanceCidOrSignature = 1;
static constexpr dart::compiler::target::word
AOT_SubtypeTestCache_kDestinationType = 2;
static constexpr dart::compiler::target::word
@@ -10794,7 +10794,7 @@
static constexpr dart::compiler::target::word
AOT_SubtypeTestCache_kFunctionTypeArguments = 5;
static constexpr dart::compiler::target::word
- AOT_SubtypeTestCache_kInstanceClassIdOrFunction = 1;
+ AOT_SubtypeTestCache_kInstanceCidOrSignature = 1;
static constexpr dart::compiler::target::word
AOT_SubtypeTestCache_kDestinationType = 2;
static constexpr dart::compiler::target::word
@@ -11395,7 +11395,7 @@
static constexpr dart::compiler::target::word
AOT_SubtypeTestCache_kFunctionTypeArguments = 5;
static constexpr dart::compiler::target::word
- AOT_SubtypeTestCache_kInstanceClassIdOrFunction = 1;
+ AOT_SubtypeTestCache_kInstanceCidOrSignature = 1;
static constexpr dart::compiler::target::word
AOT_SubtypeTestCache_kDestinationType = 2;
static constexpr dart::compiler::target::word
@@ -11995,7 +11995,7 @@
static constexpr dart::compiler::target::word
AOT_SubtypeTestCache_kFunctionTypeArguments = 5;
static constexpr dart::compiler::target::word
- AOT_SubtypeTestCache_kInstanceClassIdOrFunction = 1;
+ AOT_SubtypeTestCache_kInstanceCidOrSignature = 1;
static constexpr dart::compiler::target::word
AOT_SubtypeTestCache_kDestinationType = 2;
static constexpr dart::compiler::target::word
diff --git a/runtime/vm/compiler/runtime_offsets_list.h b/runtime/vm/compiler/runtime_offsets_list.h
index fe34979..08f4fe7 100644
--- a/runtime/vm/compiler/runtime_offsets_list.h
+++ b/runtime/vm/compiler/runtime_offsets_list.h
@@ -78,7 +78,7 @@
CONSTANT(NativeEntry, kNumCallWrapperArguments) \
CONSTANT(String, kMaxElements) \
CONSTANT(SubtypeTestCache, kFunctionTypeArguments) \
- CONSTANT(SubtypeTestCache, kInstanceClassIdOrFunction) \
+ CONSTANT(SubtypeTestCache, kInstanceCidOrSignature) \
CONSTANT(SubtypeTestCache, kDestinationType) \
CONSTANT(SubtypeTestCache, kInstanceDelayedFunctionTypeArguments) \
CONSTANT(SubtypeTestCache, kInstanceParentFunctionTypeArguments) \
diff --git a/runtime/vm/compiler/stub_code_compiler_arm.cc b/runtime/vm/compiler/stub_code_compiler_arm.cc
index ea32cf7..0045e4e 100644
--- a/runtime/vm/compiler/stub_code_compiler_arm.cc
+++ b/runtime/vm/compiler/stub_code_compiler_arm.cc
@@ -2676,20 +2676,23 @@
Label loop, not_closure;
if (n >= 5) {
- __ LoadClassIdMayBeSmi(STCInternalRegs::kInstanceCidOrFunctionReg,
+ __ LoadClassIdMayBeSmi(STCInternalRegs::kInstanceCidOrSignatureReg,
TypeTestABI::kInstanceReg);
} else {
- __ LoadClassId(STCInternalRegs::kInstanceCidOrFunctionReg,
+ __ LoadClassId(STCInternalRegs::kInstanceCidOrSignatureReg,
TypeTestABI::kInstanceReg);
}
- __ CompareImmediate(STCInternalRegs::kInstanceCidOrFunctionReg, kClosureCid);
+ __ CompareImmediate(STCInternalRegs::kInstanceCidOrSignatureReg, kClosureCid);
__ b(¬_closure, NE);
// Closure handling.
{
- __ ldr(STCInternalRegs::kInstanceCidOrFunctionReg,
+ __ ldr(STCInternalRegs::kInstanceCidOrSignatureReg,
FieldAddress(TypeTestABI::kInstanceReg,
target::Closure::function_offset()));
+ __ ldr(STCInternalRegs::kInstanceCidOrSignatureReg,
+ FieldAddress(STCInternalRegs::kInstanceCidOrSignatureReg,
+ target::Function::signature_offset()));
if (n >= 3) {
__ ldr(
kInstanceInstantiatorTypeArgumentsReg,
@@ -2713,7 +2716,8 @@
__ Bind(¬_closure);
if (n >= 3) {
Label has_no_type_arguments;
- __ LoadClassById(kScratchReg, STCInternalRegs::kInstanceCidOrFunctionReg);
+ __ LoadClassById(kScratchReg,
+ STCInternalRegs::kInstanceCidOrSignatureReg);
__ mov(kInstanceInstantiatorTypeArgumentsReg, Operand(kNullReg));
__ ldr(
kScratchReg,
@@ -2733,7 +2737,7 @@
__ PushRegister(kNullReg);
}
}
- __ SmiTag(STCInternalRegs::kInstanceCidOrFunctionReg);
+ __ SmiTag(STCInternalRegs::kInstanceCidOrSignatureReg);
}
const intptr_t kNoDepth = -1;
@@ -2747,10 +2751,10 @@
__ ldr(kScratchReg,
Address(kCacheArrayReg,
target::kWordSize *
- target::SubtypeTestCache::kInstanceClassIdOrFunction));
+ target::SubtypeTestCache::kInstanceCidOrSignature));
__ cmp(kScratchReg, Operand(kNullReg));
__ b(¬_found, EQ);
- __ cmp(kScratchReg, Operand(STCInternalRegs::kInstanceCidOrFunctionReg));
+ __ cmp(kScratchReg, Operand(STCInternalRegs::kInstanceCidOrSignatureReg));
if (n == 1) {
__ b(&found, EQ);
} else {
diff --git a/runtime/vm/compiler/stub_code_compiler_arm64.cc b/runtime/vm/compiler/stub_code_compiler_arm64.cc
index ef37b4e..428b5df 100644
--- a/runtime/vm/compiler/stub_code_compiler_arm64.cc
+++ b/runtime/vm/compiler/stub_code_compiler_arm64.cc
@@ -2829,20 +2829,23 @@
Label loop, not_closure;
if (n >= 5) {
- __ LoadClassIdMayBeSmi(STCInternalRegs::kInstanceCidOrFunctionReg,
+ __ LoadClassIdMayBeSmi(STCInternalRegs::kInstanceCidOrSignatureReg,
TypeTestABI::TypeTestABI::kInstanceReg);
} else {
- __ LoadClassId(STCInternalRegs::kInstanceCidOrFunctionReg,
+ __ LoadClassId(STCInternalRegs::kInstanceCidOrSignatureReg,
TypeTestABI::kInstanceReg);
}
- __ CompareImmediate(STCInternalRegs::kInstanceCidOrFunctionReg, kClosureCid);
+ __ CompareImmediate(STCInternalRegs::kInstanceCidOrSignatureReg, kClosureCid);
__ b(¬_closure, NE);
// Closure handling.
{
- __ ldr(STCInternalRegs::kInstanceCidOrFunctionReg,
+ __ ldr(STCInternalRegs::kInstanceCidOrSignatureReg,
FieldAddress(TypeTestABI::kInstanceReg,
target::Closure::function_offset()));
+ __ LoadCompressed(STCInternalRegs::kInstanceCidOrSignatureReg,
+ FieldAddress(STCInternalRegs::kInstanceCidOrSignatureReg,
+ target::Function::signature_offset()));
if (n >= 3) {
__ ldr(
STCInternalRegs::kInstanceInstantiatorTypeArgumentsReg,
@@ -2865,7 +2868,8 @@
__ Bind(¬_closure);
if (n >= 3) {
Label has_no_type_arguments;
- __ LoadClassById(kScratchReg, STCInternalRegs::kInstanceCidOrFunctionReg);
+ __ LoadClassById(kScratchReg,
+ STCInternalRegs::kInstanceCidOrSignatureReg);
__ mov(STCInternalRegs::kInstanceInstantiatorTypeArgumentsReg, kNullReg);
__ LoadFieldFromOffset(
kScratchReg, kScratchReg,
@@ -2886,7 +2890,7 @@
kNullReg);
}
}
- __ SmiTag(STCInternalRegs::kInstanceCidOrFunctionReg);
+ __ SmiTag(STCInternalRegs::kInstanceCidOrSignatureReg);
}
Label found, done, next_iteration;
@@ -2896,10 +2900,10 @@
__ ldr(kScratchReg,
Address(kCacheArrayReg,
target::kWordSize *
- target::SubtypeTestCache::kInstanceClassIdOrFunction));
+ target::SubtypeTestCache::kInstanceCidOrSignature));
__ cmp(kScratchReg, Operand(kNullReg));
__ b(&done, EQ);
- __ cmp(kScratchReg, Operand(STCInternalRegs::kInstanceCidOrFunctionReg));
+ __ cmp(kScratchReg, Operand(STCInternalRegs::kInstanceCidOrSignatureReg));
if (n == 1) {
__ b(&found, EQ);
} else {
diff --git a/runtime/vm/compiler/stub_code_compiler_ia32.cc b/runtime/vm/compiler/stub_code_compiler_ia32.cc
index 7e7e6da..940b20f 100644
--- a/runtime/vm/compiler/stub_code_compiler_ia32.cc
+++ b/runtime/vm/compiler/stub_code_compiler_ia32.cc
@@ -2252,7 +2252,7 @@
// Other values are stored in non-kInstanceReg registers from TypeTestABI.
const Register kCacheArrayReg = TypeTestABI::kInstantiatorTypeArgumentsReg;
const Register kScratchReg = TypeTestABI::kSubtypeTestCacheReg;
- const Register kInstanceCidOrFunction =
+ const Register kInstanceCidOrSignature =
TypeTestABI::kFunctionTypeArgumentsReg;
const Register kInstanceInstantiatorTypeArgumentsReg =
TypeTestABI::kDstTypeReg;
@@ -2286,18 +2286,21 @@
Label loop, not_closure;
if (n >= 5) {
- __ LoadClassIdMayBeSmi(kInstanceCidOrFunction, TypeTestABI::kInstanceReg);
+ __ LoadClassIdMayBeSmi(kInstanceCidOrSignature, TypeTestABI::kInstanceReg);
} else {
- __ LoadClassId(kInstanceCidOrFunction, TypeTestABI::kInstanceReg);
+ __ LoadClassId(kInstanceCidOrSignature, TypeTestABI::kInstanceReg);
}
- __ cmpl(kInstanceCidOrFunction, Immediate(kClosureCid));
+ __ cmpl(kInstanceCidOrSignature, Immediate(kClosureCid));
__ j(NOT_EQUAL, ¬_closure, Assembler::kNearJump);
// Closure handling.
{
- __ movl(kInstanceCidOrFunction,
+ __ movl(kInstanceCidOrSignature,
FieldAddress(TypeTestABI::kInstanceReg,
target::Closure::function_offset()));
+ __ movl(kInstanceCidOrSignature,
+ FieldAddress(kInstanceCidOrSignature,
+ target::Function::signature_offset()));
if (n >= 3) {
__ movl(
kInstanceInstantiatorTypeArgumentsReg,
@@ -2320,7 +2323,7 @@
__ Bind(¬_closure);
if (n >= 3) {
Label has_no_type_arguments;
- __ LoadClassById(kScratchReg, kInstanceCidOrFunction);
+ __ LoadClassById(kScratchReg, kInstanceCidOrSignature);
__ movl(kInstanceInstantiatorTypeArgumentsReg, raw_null);
__ movl(
kScratchReg,
@@ -2338,7 +2341,7 @@
__ pushl(raw_null); // function.
}
}
- __ SmiTag(kInstanceCidOrFunction);
+ __ SmiTag(kInstanceCidOrSignature);
}
if (n >= 7) {
@@ -2358,10 +2361,10 @@
__ movl(kScratchReg,
Address(kCacheArrayReg,
target::kWordSize *
- target::SubtypeTestCache::kInstanceClassIdOrFunction));
+ target::SubtypeTestCache::kInstanceCidOrSignature));
__ cmpl(kScratchReg, raw_null);
__ j(EQUAL, &done, Assembler::kNearJump);
- __ cmpl(kScratchReg, kInstanceCidOrFunction);
+ __ cmpl(kScratchReg, kInstanceCidOrSignature);
if (n == 1) {
__ j(EQUAL, &done, Assembler::kNearJump);
} else {
diff --git a/runtime/vm/compiler/stub_code_compiler_x64.cc b/runtime/vm/compiler/stub_code_compiler_x64.cc
index 9aa8e8c..6b0782f 100644
--- a/runtime/vm/compiler/stub_code_compiler_x64.cc
+++ b/runtime/vm/compiler/stub_code_compiler_x64.cc
@@ -2791,20 +2791,23 @@
Label loop, not_closure;
if (n >= 5) {
- __ LoadClassIdMayBeSmi(STCInternalRegs::kInstanceCidOrFunctionReg,
+ __ LoadClassIdMayBeSmi(STCInternalRegs::kInstanceCidOrSignatureReg,
TypeTestABI::kInstanceReg);
} else {
- __ LoadClassId(STCInternalRegs::kInstanceCidOrFunctionReg,
+ __ LoadClassId(STCInternalRegs::kInstanceCidOrSignatureReg,
TypeTestABI::kInstanceReg);
}
- __ cmpq(STCInternalRegs::kInstanceCidOrFunctionReg, Immediate(kClosureCid));
+ __ cmpq(STCInternalRegs::kInstanceCidOrSignatureReg, Immediate(kClosureCid));
__ j(NOT_EQUAL, ¬_closure, Assembler::kNearJump);
// Closure handling.
{
- __ movq(STCInternalRegs::kInstanceCidOrFunctionReg,
+ __ movq(STCInternalRegs::kInstanceCidOrSignatureReg,
FieldAddress(TypeTestABI::kInstanceReg,
target::Closure::function_offset()));
+ __ LoadCompressed(STCInternalRegs::kInstanceCidOrSignatureReg,
+ FieldAddress(STCInternalRegs::kInstanceCidOrSignatureReg,
+ target::Function::signature_offset()));
if (n >= 3) {
__ movq(
STCInternalRegs::kInstanceInstantiatorTypeArgumentsReg,
@@ -2828,7 +2831,8 @@
__ Bind(¬_closure);
if (n >= 3) {
Label has_no_type_arguments;
- __ LoadClassById(kScratchReg, STCInternalRegs::kInstanceCidOrFunctionReg);
+ __ LoadClassById(kScratchReg,
+ STCInternalRegs::kInstanceCidOrSignatureReg);
__ movq(STCInternalRegs::kInstanceInstantiatorTypeArgumentsReg, kNullReg);
__ movl(
kScratchReg,
@@ -2846,7 +2850,7 @@
__ movq(kInstanceDelayedFunctionTypeArgumentsReg, kNullReg);
}
}
- __ SmiTag(STCInternalRegs::kInstanceCidOrFunctionReg);
+ __ SmiTag(STCInternalRegs::kInstanceCidOrSignatureReg);
}
Label found, not_found, next_iteration;
@@ -2856,10 +2860,10 @@
__ movq(kScratchReg,
Address(STCInternalRegs::kCacheEntryReg,
target::kWordSize *
- target::SubtypeTestCache::kInstanceClassIdOrFunction));
+ target::SubtypeTestCache::kInstanceCidOrSignature));
__ cmpq(kScratchReg, kNullReg);
__ j(EQUAL, ¬_found, Assembler::kNearJump);
- __ cmpq(kScratchReg, STCInternalRegs::kInstanceCidOrFunctionReg);
+ __ cmpq(kScratchReg, STCInternalRegs::kInstanceCidOrSignatureReg);
if (n == 1) {
__ j(EQUAL, &found, Assembler::kNearJump);
} else {
diff --git a/runtime/vm/constants_arm.h b/runtime/vm/constants_arm.h
index f638186..5ef978d 100644
--- a/runtime/vm/constants_arm.h
+++ b/runtime/vm/constants_arm.h
@@ -350,9 +350,9 @@
// Registers in addition to those listed in TypeTestABI used inside the
// implementation of subtype test cache stubs that are _not_ preserved.
struct STCInternalRegs {
- static const Register kInstanceCidOrFunctionReg = R9;
+ static const Register kInstanceCidOrSignatureReg = R9;
- static const intptr_t kInternalRegisters = (1 << kInstanceCidOrFunctionReg);
+ static const intptr_t kInternalRegisters = (1 << kInstanceCidOrSignatureReg);
};
// Calling convention when calling TypeTestingStub and SubtypeTestCacheStub.
diff --git a/runtime/vm/constants_arm64.h b/runtime/vm/constants_arm64.h
index 8abe440..69f5cf0 100644
--- a/runtime/vm/constants_arm64.h
+++ b/runtime/vm/constants_arm64.h
@@ -183,13 +183,13 @@
// Registers in addition to those listed in TypeTestABI used inside the
// implementation of subtype test cache stubs that are _not_ preserved.
struct STCInternalRegs {
- static const Register kInstanceCidOrFunctionReg = R6;
+ static const Register kInstanceCidOrSignatureReg = R6;
static const Register kInstanceInstantiatorTypeArgumentsReg = R5;
static const Register kInstanceParentFunctionTypeArgumentsReg = R9;
static const Register kInstanceDelayedFunctionTypeArgumentsReg = R10;
static const intptr_t kInternalRegisters =
- (1 << kInstanceCidOrFunctionReg) |
+ (1 << kInstanceCidOrSignatureReg) |
(1 << kInstanceInstantiatorTypeArgumentsReg) |
(1 << kInstanceParentFunctionTypeArgumentsReg) |
(1 << kInstanceDelayedFunctionTypeArgumentsReg);
diff --git a/runtime/vm/constants_x64.h b/runtime/vm/constants_x64.h
index 469b90b..953c2ce 100644
--- a/runtime/vm/constants_x64.h
+++ b/runtime/vm/constants_x64.h
@@ -160,11 +160,11 @@
// implementation of subtype test cache stubs that are _not_ preserved.
struct STCInternalRegs {
static const Register kCacheEntryReg = RDI;
- static const Register kInstanceCidOrFunctionReg = R10;
+ static const Register kInstanceCidOrSignatureReg = R10;
static const Register kInstanceInstantiatorTypeArgumentsReg = R13;
static const intptr_t kInternalRegisters =
- (1 << kCacheEntryReg) | (1 << kInstanceCidOrFunctionReg) |
+ (1 << kCacheEntryReg) | (1 << kInstanceCidOrSignatureReg) |
(1 << kInstanceInstantiatorTypeArgumentsReg);
};
diff --git a/runtime/vm/isolate_reload.cc b/runtime/vm/isolate_reload.cc
index f5cc809..46124a8 100644
--- a/runtime/vm/isolate_reload.cc
+++ b/runtime/vm/isolate_reload.cc
@@ -2116,7 +2116,7 @@
entries_(Array::Handle(zone)),
instantiator_type_arguments_(TypeArguments::Handle(zone)),
function_type_arguments_(TypeArguments::Handle(zone)),
- instance_cid_or_function_(Object::Handle(zone)),
+ instance_cid_or_signature_(Object::Handle(zone)),
instance_type_arguments_(TypeArguments::Handle(zone)),
parent_function_type_arguments_(TypeArguments::Handle(zone)),
delayed_function_type_arguments_(TypeArguments::Handle(zone)) {}
@@ -2215,7 +2215,7 @@
cls_ = value.clazz();
const intptr_t cid = cls_.id();
if (cid == kClosureCid) {
- instance_cid_or_function_ = Closure::Cast(value).function();
+ instance_cid_or_signature_ = Closure::Cast(value).signature();
instance_type_arguments_ =
Closure::Cast(value).instantiator_type_arguments();
parent_function_type_arguments_ =
@@ -2223,7 +2223,7 @@
delayed_function_type_arguments_ =
Closure::Cast(value).delayed_type_arguments();
} else {
- instance_cid_or_function_ = Smi::New(cid);
+ instance_cid_or_signature_ = Smi::New(cid);
if (cls_.NumTypeArguments() > 0) {
instance_type_arguments_ = value_.GetTypeArguments();
} else {
@@ -2243,8 +2243,8 @@
bool cache_hit = false;
for (intptr_t i = 0; entries_.At(i) != Object::null();
i += SubtypeTestCache::kTestEntryLength) {
- if ((entries_.At(i + SubtypeTestCache::kInstanceClassIdOrFunction) ==
- instance_cid_or_function_.ptr()) &&
+ if ((entries_.At(i + SubtypeTestCache::kInstanceCidOrSignature) ==
+ instance_cid_or_signature_.ptr()) &&
(entries_.At(i + SubtypeTestCache::kDestinationType) ==
type_.ptr()) &&
(entries_.At(i + SubtypeTestCache::kInstanceTypeArguments) ==
@@ -2275,7 +2275,7 @@
ASSERT(!FLAG_identity_reload);
field.set_needs_load_guard(true);
} else {
- cache_.AddCheck(instance_cid_or_function_, type_,
+ cache_.AddCheck(instance_cid_or_signature_, type_,
instance_type_arguments_, instantiator_type_arguments_,
function_type_arguments_,
parent_function_type_arguments_,
@@ -2293,7 +2293,7 @@
Array& entries_;
TypeArguments& instantiator_type_arguments_;
TypeArguments& function_type_arguments_;
- Object& instance_cid_or_function_;
+ Object& instance_cid_or_signature_;
TypeArguments& instance_type_arguments_;
TypeArguments& parent_function_type_arguments_;
TypeArguments& delayed_function_type_arguments_;
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 0834a41..7a61184 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -9367,7 +9367,11 @@
PrintParameters(thread, zone, name_visibility, printer);
printer->AddString(") => ");
const AbstractType& res_type = AbstractType::Handle(zone, result_type());
- res_type.PrintName(name_visibility, printer);
+ if (!res_type.IsNull()) {
+ res_type.PrintName(name_visibility, printer);
+ } else {
+ printer->AddString("null");
+ }
}
bool Function::HasInstantiatedSignature(Genericity genericity,
@@ -17953,7 +17957,7 @@
}
void SubtypeTestCache::AddCheck(
- const Object& instance_class_id_or_function,
+ const Object& instance_class_id_or_signature,
const AbstractType& destination_type,
const TypeArguments& instance_type_arguments,
const TypeArguments& instantiator_type_arguments,
@@ -17973,8 +17977,8 @@
SubtypeTestCacheTable entries(data);
auto entry = entries[old_num];
- ASSERT(entry.Get<kInstanceClassIdOrFunction>() == Object::null());
- entry.Set<kInstanceClassIdOrFunction>(instance_class_id_or_function);
+ ASSERT(entry.Get<kInstanceCidOrSignature>() == Object::null());
+ entry.Set<kInstanceCidOrSignature>(instance_class_id_or_signature);
entry.Set<kDestinationType>(destination_type);
entry.Set<kInstanceTypeArguments>(instance_type_arguments);
entry.Set<kInstantiatorTypeArguments>(instantiator_type_arguments);
@@ -17992,7 +17996,7 @@
void SubtypeTestCache::GetCheck(
intptr_t ix,
- Object* instance_class_id_or_function,
+ Object* instance_class_id_or_signature,
AbstractType* destination_type,
TypeArguments* instance_type_arguments,
TypeArguments* instantiator_type_arguments,
@@ -18004,7 +18008,7 @@
->isolate_group()
->subtype_test_cache_mutex()
->IsOwnedByCurrentThread());
- GetCurrentCheck(ix, instance_class_id_or_function, destination_type,
+ GetCurrentCheck(ix, instance_class_id_or_signature, destination_type,
instance_type_arguments, instantiator_type_arguments,
function_type_arguments,
instance_parent_function_type_arguments,
@@ -18013,7 +18017,7 @@
void SubtypeTestCache::GetCurrentCheck(
intptr_t ix,
- Object* instance_class_id_or_function,
+ Object* instance_class_id_or_signature,
AbstractType* destination_type,
TypeArguments* instance_type_arguments,
TypeArguments* instantiator_type_arguments,
@@ -18024,7 +18028,7 @@
Array& data = Array::Handle(cache());
SubtypeTestCacheTable entries(data);
auto entry = entries[ix];
- *instance_class_id_or_function = entry.Get<kInstanceClassIdOrFunction>();
+ *instance_class_id_or_signature = entry.Get<kInstanceCidOrSignature>();
*destination_type = entry.Get<kDestinationType>();
*instance_type_arguments = entry.Get<kInstanceTypeArguments>();
*instantiator_type_arguments = entry.Get<kInstantiatorTypeArguments>();
@@ -18037,7 +18041,7 @@
}
bool SubtypeTestCache::HasCheck(
- const Object& instance_class_id_or_function,
+ const Object& instance_class_id_or_signature,
const AbstractType& destination_type,
const TypeArguments& instance_type_arguments,
const TypeArguments& instantiator_type_arguments,
@@ -18056,8 +18060,8 @@
SubtypeTestCacheTable entries(data);
for (intptr_t i = 0; i < last_index; i++) {
const auto entry = entries[i];
- if (entry.Get<kInstanceClassIdOrFunction>() ==
- instance_class_id_or_function.ptr() &&
+ if (entry.Get<kInstanceCidOrSignature>() ==
+ instance_class_id_or_signature.ptr() &&
entry.Get<kDestinationType>() == destination_type.ptr() &&
entry.Get<kInstanceTypeArguments>() == instance_type_arguments.ptr() &&
entry.Get<kInstantiatorTypeArguments>() ==
@@ -18097,7 +18101,7 @@
const char* line_prefix) const {
const char* separator =
line_prefix == nullptr ? ", " : OS::SCreate(zone, "\n%s", line_prefix);
- auto& instance_class_id_or_function = Object::Handle(zone);
+ auto& instance_class_id_or_signature = Object::Handle(zone);
auto& destination_type = AbstractType::Handle(zone);
auto& instance_type_arguments = TypeArguments::Handle(zone);
auto& instantiator_type_arguments = TypeArguments::Handle(zone);
@@ -18105,7 +18109,7 @@
auto& instance_parent_function_type_arguments = TypeArguments::Handle(zone);
auto& instance_delayed_type_arguments = TypeArguments::Handle(zone);
auto& result = Bool::Handle(zone);
- GetCurrentCheck(index, &instance_class_id_or_function, &destination_type,
+ GetCurrentCheck(index, &instance_class_id_or_signature, &destination_type,
&instance_type_arguments, &instantiator_type_arguments,
&function_type_arguments,
&instance_parent_function_type_arguments,
@@ -18114,7 +18118,7 @@
buffer->Printf(
"[ %#" Px ", %#" Px ", %#" Px ", %#" Px ", %#" Px ", %#" Px ", %#" Px
", %#" Px " ]",
- static_cast<uword>(instance_class_id_or_function.ptr()),
+ static_cast<uword>(instance_class_id_or_signature.ptr()),
static_cast<uword>(destination_type.ptr()),
static_cast<uword>(instance_type_arguments.ptr()),
static_cast<uword>(instantiator_type_arguments.ptr()),
@@ -18122,14 +18126,14 @@
static_cast<uword>(instance_parent_function_type_arguments.ptr()),
static_cast<uword>(instance_delayed_type_arguments.ptr()),
static_cast<uword>(result.ptr()));
- if (instance_class_id_or_function.IsSmi()) {
+ if (instance_class_id_or_signature.IsSmi()) {
buffer->Printf("%sclass id: %" Pd "", separator,
- Smi::Cast(instance_class_id_or_function).Value());
+ Smi::Cast(instance_class_id_or_signature).Value());
} else {
- ASSERT(instance_class_id_or_function.IsFunction());
- buffer->Printf("%sfunction: %s", separator,
- Function::Cast(instance_class_id_or_function)
- .ToFullyQualifiedCString());
+ ASSERT(instance_class_id_or_signature.IsFunctionType());
+ buffer->Printf(
+ "%sfunction: %s", separator,
+ FunctionType::Cast(instance_class_id_or_signature).ToCString());
}
if (!destination_type.IsNull()) {
buffer->Printf("%sdestination type: %s", separator,
@@ -18147,11 +18151,11 @@
}
}
if (!instance_type_arguments.IsNull()) {
- if (instance_class_id_or_function.IsSmi()) {
+ if (instance_class_id_or_signature.IsSmi()) {
buffer->Printf("%sinstance type arguments: %s", separator,
instance_type_arguments.ToCString());
} else {
- ASSERT(instance_class_id_or_function.IsFunction());
+ ASSERT(instance_class_id_or_signature.IsFunctionType());
buffer->Printf("%sclosure instantiator function type arguments: %s",
separator, instance_type_arguments.ToCString());
}
@@ -18165,12 +18169,12 @@
function_type_arguments.ToCString());
}
if (!instance_parent_function_type_arguments.IsNull()) {
- ASSERT(instance_class_id_or_function.IsFunction());
+ ASSERT(instance_class_id_or_signature.IsFunctionType());
buffer->Printf("%sclosure parent function type arguments: %s", separator,
instance_parent_function_type_arguments.ToCString());
}
if (!instance_delayed_type_arguments.IsNull()) {
- ASSERT(instance_class_id_or_function.IsFunction());
+ ASSERT(instance_class_id_or_signature.IsFunctionType());
buffer->Printf("%sclosure delayed function type arguments: %s", separator,
instance_delayed_type_arguments.ToCString());
}
@@ -24972,6 +24976,10 @@
const Function& function,
const Context& context,
Heap::Space space) {
+ ASSERT(instantiator_type_arguments.IsCanonical());
+ ASSERT(function_type_arguments.IsCanonical());
+ ASSERT(delayed_type_arguments.IsCanonical());
+ ASSERT(FunctionType::Handle(function.signature()).IsCanonical());
Closure& result = Closure::Handle();
{
ObjectPtr raw =
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 4766260..a04f9b1 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -6940,7 +6940,7 @@
public:
enum Entries {
kTestResult = 0,
- kInstanceClassIdOrFunction = 1,
+ kInstanceCidOrSignature = 1,
kDestinationType = 2,
kInstanceTypeArguments = 3,
kInstantiatorTypeArguments = 4,
@@ -6951,7 +6951,7 @@
};
virtual intptr_t NumberOfChecks() const;
- void AddCheck(const Object& instance_class_id_or_function,
+ void AddCheck(const Object& instance_class_id_or_signature,
const AbstractType& destination_type,
const TypeArguments& instance_type_arguments,
const TypeArguments& instantiator_type_arguments,
@@ -6960,7 +6960,7 @@
const TypeArguments& instance_delayed_type_arguments,
const Bool& test_result) const;
void GetCheck(intptr_t ix,
- Object* instance_class_id_or_function,
+ Object* instance_class_id_or_signature,
AbstractType* destination_type,
TypeArguments* instance_type_arguments,
TypeArguments* instantiator_type_arguments,
@@ -6972,7 +6972,7 @@
// Like GetCheck(), but does not require the subtype test cache mutex and so
// may see an outdated view of the cache.
void GetCurrentCheck(intptr_t ix,
- Object* instance_class_id_or_function,
+ Object* instance_class_id_or_signature,
AbstractType* destination_type,
TypeArguments* instance_type_arguments,
TypeArguments* instantiator_type_arguments,
@@ -6987,7 +6987,7 @@
//
// If [index] is not nullptr, then it is set to the matching entry's index.
// If [result] is not nullptr, then it is set to the matching entry's result.
- bool HasCheck(const Object& instance_class_id_or_function,
+ bool HasCheck(const Object& instance_class_id_or_signature,
const AbstractType& destination_type,
const TypeArguments& instance_type_arguments,
const TypeArguments& instantiator_type_arguments,
@@ -10982,6 +10982,10 @@
return OFFSET_OF(UntaggedClosure, function_);
}
+ FunctionTypePtr signature() const {
+ return untag()->function()->untag()->signature();
+ }
+
ContextPtr context() const { return untag()->context(); }
static intptr_t context_offset() {
return OFFSET_OF(UntaggedClosure, context_);
diff --git a/runtime/vm/object_test.cc b/runtime/vm/object_test.cc
index 324a031..d119a05 100644
--- a/runtime/vm/object_test.cc
+++ b/runtime/vm/object_test.cc
@@ -2644,7 +2644,7 @@
const Context& context = Context::Handle(Context::New(0));
Function& parent = Function::Handle();
const String& parent_name = String::Handle(Symbols::New(thread, "foo_papa"));
- const FunctionType& signature = FunctionType::ZoneHandle(FunctionType::New());
+ FunctionType& signature = FunctionType::ZoneHandle(FunctionType::New());
parent = Function::New(signature, parent_name,
UntaggedFunction::kRegularFunction, false, false,
false, false, false, cls, TokenPosition::kMinSource);
@@ -2652,12 +2652,17 @@
{
SafepointWriteRwLocker ml(thread, thread->isolate_group()->program_lock());
cls.SetFunctions(functions);
+ cls.Finalize();
}
Function& function = Function::Handle();
const String& function_name = String::Handle(Symbols::New(thread, "foo"));
function = Function::NewClosureFunction(function_name, parent,
TokenPosition::kMinSource);
+ signature = function.signature();
+ signature.set_result_type(Object::dynamic_type());
+ signature ^= ClassFinalizer::FinalizeType(signature);
+ function.set_signature(signature);
const Closure& closure = Closure::Handle(
Closure::New(Object::null_type_arguments(), Object::null_type_arguments(),
function, context));
diff --git a/runtime/vm/runtime_entry.cc b/runtime/vm/runtime_entry.cc
index e420a88..7584d90 100644
--- a/runtime/vm/runtime_entry.cc
+++ b/runtime/vm/runtime_entry.cc
@@ -736,6 +736,9 @@
const Bool& result,
const SubtypeTestCache& new_cache) {
ASSERT(!new_cache.IsNull());
+ ASSERT(destination_type.IsCanonical());
+ ASSERT(instantiator_type_arguments.IsCanonical());
+ ASSERT(function_type_arguments.IsCanonical());
Class& instance_class = Class::Handle(zone);
if (instance.IsSmi()) {
instance_class = Smi::Class();
@@ -745,23 +748,26 @@
// If the type is uninstantiated and refers to parent function type
// parameters, the function_type_arguments have been canonicalized
// when concatenated.
- ASSERT(function_type_arguments.IsNull() ||
- function_type_arguments.IsCanonical());
- auto& instance_class_id_or_function = Object::Handle(zone);
+ auto& instance_class_id_or_signature = Object::Handle(zone);
auto& instance_type_arguments = TypeArguments::Handle(zone);
auto& instance_parent_function_type_arguments = TypeArguments::Handle(zone);
auto& instance_delayed_type_arguments = TypeArguments::Handle(zone);
if (instance_class.IsClosureClass()) {
const auto& closure = Closure::Cast(instance);
const auto& closure_function = Function::Handle(zone, closure.function());
- instance_class_id_or_function = closure_function.ptr();
+ instance_class_id_or_signature = closure_function.signature();
instance_type_arguments = closure.instantiator_type_arguments();
instance_parent_function_type_arguments = closure.function_type_arguments();
instance_delayed_type_arguments = closure.delayed_type_arguments();
+ ASSERT(instance_class_id_or_signature.IsCanonical());
+ ASSERT(instance_type_arguments.IsCanonical());
+ ASSERT(instance_parent_function_type_arguments.IsCanonical());
+ ASSERT(instance_delayed_type_arguments.IsCanonical());
} else {
- instance_class_id_or_function = Smi::New(instance_class.id());
+ instance_class_id_or_signature = Smi::New(instance_class.id());
if (instance_class.NumTypeArguments() > 0) {
instance_type_arguments = instance.GetTypeArguments();
+ ASSERT(instance_type_arguments.IsCanonical());
}
}
if (FLAG_trace_type_checks) {
@@ -780,7 +786,7 @@
buffer.Printf(
" raw entry: [ %#" Px ", %#" Px ", %#" Px ", %#" Px ", %#" Px
", %#" Px ", %#" Px ", %#" Px " ]\n",
- static_cast<uword>(instance_class_id_or_function.ptr()),
+ static_cast<uword>(instance_class_id_or_signature.ptr()),
static_cast<uword>(destination_type.ptr()),
static_cast<uword>(instance_type_arguments.ptr()),
static_cast<uword>(instantiator_type_arguments.ptr()),
@@ -803,20 +809,10 @@
}
return;
}
- ASSERT(instance_type_arguments.IsNull() ||
- instance_type_arguments.IsCanonical());
- ASSERT(instantiator_type_arguments.IsNull() ||
- instantiator_type_arguments.IsCanonical());
- ASSERT(function_type_arguments.IsNull() ||
- function_type_arguments.IsCanonical());
- ASSERT(instance_parent_function_type_arguments.IsNull() ||
- instance_parent_function_type_arguments.IsCanonical());
- ASSERT(instance_delayed_type_arguments.IsNull() ||
- instance_delayed_type_arguments.IsCanonical());
intptr_t colliding_index = -1;
auto& old_result = Bool::Handle(zone);
if (new_cache.HasCheck(
- instance_class_id_or_function, destination_type,
+ instance_class_id_or_signature, destination_type,
instance_type_arguments, instantiator_type_arguments,
function_type_arguments, instance_parent_function_type_arguments,
instance_delayed_type_arguments, &colliding_index, &old_result)) {
@@ -839,7 +835,7 @@
// found missing and now.
return;
}
- new_cache.AddCheck(instance_class_id_or_function, destination_type,
+ new_cache.AddCheck(instance_class_id_or_signature, destination_type,
instance_type_arguments, instantiator_type_arguments,
function_type_arguments,
instance_parent_function_type_arguments,