| 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..43a8458996f978a7bd75ed31a91053e907c1e4e2 100644
|
| --- a/runtime/vm/flow_graph_type_propagator.cc
|
| +++ b/runtime/vm/flow_graph_type_propagator.cc
|
| @@ -226,15 +226,17 @@ void FlowGraphTypePropagator::VisitCheckArrayBound(
|
|
|
|
|
| void FlowGraphTypePropagator::VisitCheckClass(CheckClassInstr* check) {
|
| - if (!check->unary_checks().NumberOfChecksIs(1) ||
|
| - !check->Dependencies().IsNone()) {
|
| + if (!check->cids().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));
|
| + SetCid(check->value()->definition(), check->cids().MonomorphicReceiverCid());
|
| }
|
|
|
|
|
| @@ -473,7 +475,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()->cids(), check->token_pos());
|
| check_clone->AsCheckClass()->set_licm_hoisted(
|
| check->AsCheckClass()->licm_hoisted());
|
| }
|
| @@ -1025,7 +1027,7 @@ CompileType AllocateUninitializedContextInstr::ComputeType() const {
|
|
|
| CompileType PolymorphicInstanceCallInstr::ComputeType() const {
|
| if (!IsSureToCallSingleRecognizedTarget()) return CompileType::Dynamic();
|
| - const Function& target = *targets_[0].target;
|
| + const Function& target = *targets_.TargetAt(0)->target;
|
| return (target.recognized_kind() != MethodRecognizer::kUnknown)
|
| ? CompileType::FromCid(MethodRecognizer::ResultCid(target))
|
| : CompileType::Dynamic();
|
|
|