| Index: runtime/vm/flow_graph_optimizer.cc
|
| diff --git a/runtime/vm/flow_graph_optimizer.cc b/runtime/vm/flow_graph_optimizer.cc
|
| index 9de13c52f7f69cc3c697614d3c7c71e64c70ab3d..61ee83555c5fd03c59afa9c09f4e7194a7e9c22d 100644
|
| --- a/runtime/vm/flow_graph_optimizer.cc
|
| +++ b/runtime/vm/flow_graph_optimizer.cc
|
| @@ -330,6 +330,26 @@ void FlowGraphOptimizer::VisitInstanceSetter(InstanceSetterComp* comp) {
|
| }
|
|
|
|
|
| +void FlowGraphOptimizer::VisitLoadIndexed(LoadIndexedComp* comp) {
|
| + if (!comp->HasICData()) return;
|
| +
|
| + const ICData& ic_data = *comp->ic_data();
|
| + if (ic_data.NumberOfChecks() == 0) return;
|
| + if (!HasOneTarget(ic_data)) return;
|
| +
|
| + Function& target = Function::Handle();
|
| + Class& cls = Class::Handle();
|
| + ic_data.GetOneClassCheckAt(0, &cls, &target);
|
| +
|
| + switch (cls.id()) {
|
| + case kArray:
|
| + case kImmutableArray:
|
| + case kGrowableObjectArray:
|
| + comp->set_receiver_type(static_cast<ObjectKind>(cls.id()));
|
| + }
|
| +}
|
| +
|
| +
|
| void FlowGraphOptimizer::VisitDo(DoInstr* instr) {
|
| instr->computation()->Accept(this);
|
| }
|
|
|