| Index: runtime/vm/flow_graph_optimizer.cc
|
| ===================================================================
|
| --- runtime/vm/flow_graph_optimizer.cc (revision 22603)
|
| +++ runtime/vm/flow_graph_optimizer.cc (working copy)
|
| @@ -1377,6 +1377,12 @@
|
| }
|
|
|
|
|
| +void FlowGraphOptimizer::InlineObjectCid(InstanceCallInstr* call) {
|
| + LoadClassIdInstr* load = new LoadClassIdInstr(new Value(call->ArgumentAt(0)));
|
| + ReplaceCall(call, load);
|
| +}
|
| +
|
| +
|
| static intptr_t OffsetForLengthGetter(MethodRecognizer::Kind kind) {
|
| switch (kind) {
|
| case MethodRecognizer::kObjectArrayLength:
|
| @@ -1439,6 +1445,10 @@
|
|
|
| // VM objects length getter.
|
| switch (recognized_kind) {
|
| + case MethodRecognizer::kObjectCid: {
|
| + InlineObjectCid(call);
|
| + return true;
|
| + }
|
| case MethodRecognizer::kObjectArrayLength:
|
| case MethodRecognizer::kImmutableArrayLength:
|
| case MethodRecognizer::kTypedDataLength:
|
|
|