Index: runtime/vm/jit_optimizer.cc |
diff --git a/runtime/vm/jit_optimizer.cc b/runtime/vm/jit_optimizer.cc |
index 63c79bc2a0f948c63075106fea7611d72b981b57..00f1588f9eba4a371e5e32346d7717be82bb297c 100644 |
--- a/runtime/vm/jit_optimizer.cc |
+++ b/runtime/vm/jit_optimizer.cc |
@@ -1707,20 +1707,13 @@ void JitOptimizer::VisitInstanceCall(InstanceCallInstr* instr) { |
// we don't have one target. |
const Function& target = |
Function::Handle(Z, unary_checks.GetTargetAt(0)); |
- if (target.recognized_kind() == MethodRecognizer::kObjectRuntimeType) { |
- has_one_target = |
- PolymorphicInstanceCallInstr::ComputeRuntimeType(unary_checks) != |
- Type::null(); |
- } else { |
- const bool polymorphic_target = |
- MethodRecognizer::PolymorphicTarget(target); |
- has_one_target = !polymorphic_target; |
- } |
+ const bool polymorphic_target = MethodRecognizer::PolymorphicTarget(target); |
+ has_one_target = !polymorphic_target; |
} |
if (has_one_target) { |
- const Function& target = Function::Handle(Z, unary_checks.GetTargetAt(0)); |
- const RawFunction::Kind function_kind = target.kind(); |
+ RawFunction::Kind function_kind = |
+ Function::Handle(Z, unary_checks.GetTargetAt(0)).kind(); |
if (!flow_graph()->InstanceCallNeedsClassCheck(instr, function_kind)) { |
PolymorphicInstanceCallInstr* call = |
new(Z) PolymorphicInstanceCallInstr(instr, unary_checks, |