Index: runtime/vm/flow_graph_type_propagator.cc |
diff --git a/runtime/vm/flow_graph_type_propagator.cc b/runtime/vm/flow_graph_type_propagator.cc |
index 986615f1b669b0924a459b550a725f229b3ea327..11df98a1d3f75a2b8e5578cf8d8878fe776fb32d 100644 |
--- a/runtime/vm/flow_graph_type_propagator.cc |
+++ b/runtime/vm/flow_graph_type_propagator.cc |
@@ -149,8 +149,6 @@ void FlowGraphTypePropagator::PropagateRecursive(BlockEntryInstr* block) { |
} |
} |
- HandleBranchOnStrictCompare(block); |
- |
for (intptr_t i = 0; i < block->dominated_blocks().length(); ++i) { |
PropagateRecursive(block->dominated_blocks()[i]); |
} |
@@ -159,61 +157,6 @@ void FlowGraphTypePropagator::PropagateRecursive(BlockEntryInstr* block) { |
} |
-void FlowGraphTypePropagator::HandleBranchOnStrictCompare( |
- BlockEntryInstr* block) { |
- BranchInstr* branch = block->last_instruction()->AsBranch(); |
- if (branch == NULL) { |
- return; |
- } |
- |
- StrictCompareInstr* compare = branch->comparison()->AsStrictCompare(); |
- if ((compare == NULL) || !compare->right()->BindsToConstant()) { |
- return; |
- } |
- |
- const intptr_t rollback_point = rollback_.length(); |
- |
- Definition* defn = compare->left()->definition(); |
- const Object& right = compare->right()->BoundConstant(); |
- intptr_t cid = right.GetClassId(); |
- |
- if (defn->IsLoadClassId() && right.IsSmi()) { |
- defn = defn->AsLoadClassId()->object()->definition(); |
- cid = Smi::Cast(right).Value(); |
- } |
- |
- if (!CheckClassInstr::IsImmutableClassId(cid)) { |
- if ((cid == kOneByteStringCid) || (cid == kTwoByteStringCid)) { |
- SetTypeOf(defn, ZoneCompileType::Wrap(CompileType::String())); |
- PropagateRecursive((compare->kind() == Token::kEQ_STRICT) ? |
- branch->true_successor() : branch->false_successor()); |
- RollbackTo(rollback_point); |
- } |
- return; |
- } |
- |
- if (compare->kind() == Token::kEQ_STRICT) { |
- if (cid == kNullCid) { |
- branch->set_constrained_type(MarkNonNullable(defn)); |
- PropagateRecursive(branch->false_successor()); |
- } |
- |
- SetCid(defn, cid); |
- PropagateRecursive(branch->true_successor()); |
- } else if (compare->kind() == Token::kNE_STRICT) { |
- if (cid == kNullCid) { |
- branch->set_constrained_type(MarkNonNullable(defn)); |
- PropagateRecursive(branch->true_successor()); |
- } |
- |
- SetCid(defn, cid); |
- PropagateRecursive(branch->false_successor()); |
- } |
- |
- RollbackTo(rollback_point); |
-} |
- |
- |
void FlowGraphTypePropagator::RollbackTo(intptr_t rollback_point) { |
for (intptr_t i = rollback_.length() - 1; i >= rollback_point; i--) { |
types_[rollback_[i].index()] = rollback_[i].type(); |