Index: runtime/vm/flow_graph_inliner.cc |
diff --git a/runtime/vm/flow_graph_inliner.cc b/runtime/vm/flow_graph_inliner.cc |
index a8e27c04c676222df00f560f571e4136c9e54818..8ee673924629ba7db508622c72f75cd75baba107 100644 |
--- a/runtime/vm/flow_graph_inliner.cc |
+++ b/runtime/vm/flow_graph_inliner.cc |
@@ -2102,86 +2102,6 @@ static intptr_t PrepareInlineIndexedOp(FlowGraph* flow_graph, |
} |
-static intptr_t MethodKindToCid(MethodRecognizer::Kind kind) { |
- switch (kind) { |
- case MethodRecognizer::kImmutableArrayGetIndexed: |
- return kImmutableArrayCid; |
- |
- case MethodRecognizer::kObjectArrayGetIndexed: |
- case MethodRecognizer::kObjectArraySetIndexed: |
- return kArrayCid; |
- |
- case MethodRecognizer::kGrowableArrayGetIndexed: |
- case MethodRecognizer::kGrowableArraySetIndexed: |
- return kGrowableObjectArrayCid; |
- |
- case MethodRecognizer::kFloat32ArrayGetIndexed: |
- case MethodRecognizer::kFloat32ArraySetIndexed: |
- return kTypedDataFloat32ArrayCid; |
- |
- case MethodRecognizer::kFloat64ArrayGetIndexed: |
- case MethodRecognizer::kFloat64ArraySetIndexed: |
- return kTypedDataFloat64ArrayCid; |
- |
- case MethodRecognizer::kInt8ArrayGetIndexed: |
- case MethodRecognizer::kInt8ArraySetIndexed: |
- return kTypedDataInt8ArrayCid; |
- |
- case MethodRecognizer::kUint8ArrayGetIndexed: |
- case MethodRecognizer::kUint8ArraySetIndexed: |
- return kTypedDataUint8ArrayCid; |
- |
- case MethodRecognizer::kUint8ClampedArrayGetIndexed: |
- case MethodRecognizer::kUint8ClampedArraySetIndexed: |
- return kTypedDataUint8ClampedArrayCid; |
- |
- case MethodRecognizer::kExternalUint8ArrayGetIndexed: |
- case MethodRecognizer::kExternalUint8ArraySetIndexed: |
- return kExternalTypedDataUint8ArrayCid; |
- |
- case MethodRecognizer::kExternalUint8ClampedArrayGetIndexed: |
- case MethodRecognizer::kExternalUint8ClampedArraySetIndexed: |
- return kExternalTypedDataUint8ClampedArrayCid; |
- |
- case MethodRecognizer::kInt16ArrayGetIndexed: |
- case MethodRecognizer::kInt16ArraySetIndexed: |
- return kTypedDataInt16ArrayCid; |
- |
- case MethodRecognizer::kUint16ArrayGetIndexed: |
- case MethodRecognizer::kUint16ArraySetIndexed: |
- return kTypedDataUint16ArrayCid; |
- |
- case MethodRecognizer::kInt32ArrayGetIndexed: |
- case MethodRecognizer::kInt32ArraySetIndexed: |
- return kTypedDataInt32ArrayCid; |
- |
- case MethodRecognizer::kUint32ArrayGetIndexed: |
- case MethodRecognizer::kUint32ArraySetIndexed: |
- return kTypedDataUint32ArrayCid; |
- |
- case MethodRecognizer::kInt64ArrayGetIndexed: |
- case MethodRecognizer::kInt64ArraySetIndexed: |
- return kTypedDataInt64ArrayCid; |
- |
- case MethodRecognizer::kFloat32x4ArrayGetIndexed: |
- case MethodRecognizer::kFloat32x4ArraySetIndexed: |
- return kTypedDataFloat32x4ArrayCid; |
- |
- case MethodRecognizer::kInt32x4ArrayGetIndexed: |
- case MethodRecognizer::kInt32x4ArraySetIndexed: |
- return kTypedDataInt32x4ArrayCid; |
- |
- case MethodRecognizer::kFloat64x2ArrayGetIndexed: |
- case MethodRecognizer::kFloat64x2ArraySetIndexed: |
- return kTypedDataFloat64x2ArrayCid; |
- |
- default: |
- break; |
- } |
- return kIllegalCid; |
-} |
- |
- |
static Instruction* GetCheckClass(FlowGraph* flow_graph, |
Definition* to_check, |
const ICData& unary_checks, |
@@ -2204,8 +2124,7 @@ static bool InlineGetIndexed(FlowGraph* flow_graph, |
Definition* receiver, |
TargetEntryInstr** entry, |
Definition** last) { |
- intptr_t array_cid = MethodKindToCid(kind); |
- ASSERT(array_cid != kIllegalCid); |
+ intptr_t array_cid = MethodRecognizer::MethodKindToReceiverCid(kind); |
Definition* array = receiver; |
Definition* index = call->ArgumentAt(1); |
@@ -2262,8 +2181,7 @@ static bool InlineSetIndexed(FlowGraph* flow_graph, |
const ICData& value_check, |
TargetEntryInstr** entry, |
Definition** last) { |
- intptr_t array_cid = MethodKindToCid(kind); |
- ASSERT(array_cid != kIllegalCid); |
+ intptr_t array_cid = MethodRecognizer::MethodKindToReceiverCid(kind); |
Definition* array = receiver; |
Definition* index = call->ArgumentAt(1); |