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 9617c03b3480e0c38da4ba21e4a48e71c1708757..13e31a181d7b7ac8551502c286c4d637f6bf2ff5 100644 |
--- a/runtime/vm/flow_graph_type_propagator.cc |
+++ b/runtime/vm/flow_graph_type_propagator.cc |
@@ -226,15 +226,18 @@ void FlowGraphTypePropagator::VisitCheckArrayBound( |
void FlowGraphTypePropagator::VisitCheckClass(CheckClassInstr* check) { |
- if (!check->unary_checks().NumberOfChecksIs(1) || |
- !check->Dependencies().IsNone()) { |
+ if (!check->targets().IsMonomorphic()) { |
+ return; |
+ } |
+ |
+ if (!check->Dependencies().IsNone()) { |
// TODO(vegorov): If check is affected by side-effect we can still propagate |
// the type further but not the cid. |
return; |
} |
SetCid(check->value()->definition(), |
- check->unary_checks().GetReceiverClassIdAt(0)); |
+ check->targets().MonomorphicReceiverCid()); |
} |
@@ -473,7 +476,7 @@ void FlowGraphTypePropagator::StrengthenAssertWith(Instruction* check) { |
ASSERT(check->IsCheckClass()); |
check_clone = new CheckClassInstr( |
assert->value()->Copy(zone()), assert->env()->deopt_id(), |
- check->AsCheckClass()->unary_checks(), check->token_pos()); |
+ check->AsCheckClass()->targets(), check->token_pos()); |
check_clone->AsCheckClass()->set_licm_hoisted( |
check->AsCheckClass()->licm_hoisted()); |
} |