Index: runtime/vm/flow_graph_optimizer.cc |
=================================================================== |
--- runtime/vm/flow_graph_optimizer.cc (revision 27611) |
+++ runtime/vm/flow_graph_optimizer.cc (working copy) |
@@ -1382,20 +1382,6 @@ |
} |
-void FlowGraphOptimizer::AddToGuardedFields(const Field& field) { |
- if ((field.guarded_cid() == kDynamicCid) || |
- (field.guarded_cid() == kIllegalCid)) { |
- return; |
- } |
- for (intptr_t j = 0; j < guarded_fields_->length(); j++) { |
- if ((*guarded_fields_)[j]->raw() == field.raw()) { |
- return; |
- } |
- } |
- guarded_fields_->Add(&field); |
-} |
- |
- |
void FlowGraphOptimizer::InlineImplicitInstanceGetter(InstanceCallInstr* call) { |
ASSERT(call->HasICData()); |
const ICData& ic_data = *call->ic_data(); |
@@ -1422,7 +1408,7 @@ |
if (!field.is_nullable() || (field.guarded_cid() == kNullCid)) { |
load->set_result_cid(field.guarded_cid()); |
} |
- AddToGuardedFields(field); |
+ flow_graph_->builder().AddToGuardedFields(field); |
} |
// Discard the environment from the original instruction because the load |