Index: runtime/vm/method_recognizer.cc |
diff --git a/runtime/vm/method_recognizer.cc b/runtime/vm/method_recognizer.cc |
index 03014ac358530d47fbb24b9b50a252058e93c46f..649a1fe638c3f4754de63cc32d676c0fb3997bc7 100644 |
--- a/runtime/vm/method_recognizer.cc |
+++ b/runtime/vm/method_recognizer.cc |
@@ -37,6 +37,87 @@ intptr_t MethodRecognizer::ResultCid(const Function& function) { |
} |
+intptr_t MethodRecognizer::MethodKindToReceiverCid(Kind kind) { |
+ switch (kind) { |
+ case kImmutableArrayGetIndexed: |
+ return kImmutableArrayCid; |
+ |
+ case kObjectArrayGetIndexed: |
+ case kObjectArraySetIndexed: |
+ return kArrayCid; |
+ |
+ case kGrowableArrayGetIndexed: |
+ case kGrowableArraySetIndexed: |
+ return kGrowableObjectArrayCid; |
+ |
+ case kFloat32ArrayGetIndexed: |
+ case kFloat32ArraySetIndexed: |
+ return kTypedDataFloat32ArrayCid; |
+ |
+ case kFloat64ArrayGetIndexed: |
+ case kFloat64ArraySetIndexed: |
+ return kTypedDataFloat64ArrayCid; |
+ |
+ case kInt8ArrayGetIndexed: |
+ case kInt8ArraySetIndexed: |
+ return kTypedDataInt8ArrayCid; |
+ |
+ case kUint8ArrayGetIndexed: |
+ case kUint8ArraySetIndexed: |
+ return kTypedDataUint8ArrayCid; |
+ |
+ case kUint8ClampedArrayGetIndexed: |
+ case kUint8ClampedArraySetIndexed: |
+ return kTypedDataUint8ClampedArrayCid; |
+ |
+ case kExternalUint8ArrayGetIndexed: |
+ case kExternalUint8ArraySetIndexed: |
+ return kExternalTypedDataUint8ArrayCid; |
+ |
+ case kExternalUint8ClampedArrayGetIndexed: |
+ case kExternalUint8ClampedArraySetIndexed: |
+ return kExternalTypedDataUint8ClampedArrayCid; |
+ |
+ case kInt16ArrayGetIndexed: |
+ case kInt16ArraySetIndexed: |
+ return kTypedDataInt16ArrayCid; |
+ |
+ case kUint16ArrayGetIndexed: |
+ case kUint16ArraySetIndexed: |
+ return kTypedDataUint16ArrayCid; |
+ |
+ case kInt32ArrayGetIndexed: |
+ case kInt32ArraySetIndexed: |
+ return kTypedDataInt32ArrayCid; |
+ |
+ case kUint32ArrayGetIndexed: |
+ case kUint32ArraySetIndexed: |
+ return kTypedDataUint32ArrayCid; |
+ |
+ case kInt64ArrayGetIndexed: |
+ case kInt64ArraySetIndexed: |
+ return kTypedDataInt64ArrayCid; |
+ |
+ case kFloat32x4ArrayGetIndexed: |
+ case kFloat32x4ArraySetIndexed: |
+ return kTypedDataFloat32x4ArrayCid; |
+ |
+ case kInt32x4ArrayGetIndexed: |
+ case kInt32x4ArraySetIndexed: |
+ return kTypedDataInt32x4ArrayCid; |
+ |
+ case kFloat64x2ArrayGetIndexed: |
+ case kFloat64x2ArraySetIndexed: |
+ return kTypedDataFloat64x2ArrayCid; |
+ |
+ default: |
+ break; |
+ } |
+ UNREACHABLE(); |
+ return kIllegalCid; |
+} |
+ |
+ |
#define KIND_TO_STRING(class_name, function_name, enum_name, type, fp) \ |
#enum_name, |
static const char* recognized_list_method_name[] = { |