Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(389)

Unified Diff: runtime/vm/method_recognizer.cc

Issue 2235433002: VM: Add more array intrinsics. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: addressed comments Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/method_recognizer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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[] = {
« no previous file with comments | « runtime/vm/method_recognizer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698