Index: runtime/vm/intermediate_language.cc |
diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc |
index 79e5100a6b77a1d780817340c9e4f3bd93e64e7a..1fb896fd79c133ddbdd940acf8a3a9397f4b30b7 100644 |
--- a/runtime/vm/intermediate_language.cc |
+++ b/runtime/vm/intermediate_language.cc |
@@ -3345,16 +3345,6 @@ intptr_t PolymorphicInstanceCallInstr::CallCount() const { |
// PolymorphicInstanceCallInstr. |
#if !defined(TARGET_ARCH_DBC) |
void PolymorphicInstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
- if (!with_checks()) { |
- ASSERT(targets().HasSingleTarget()); |
- const Function& target = targets().FirstTarget(); |
- compiler->GenerateStaticCall(deopt_id(), instance_call()->token_pos(), |
- target, instance_call()->ArgumentCount(), |
- instance_call()->argument_names(), locs(), |
- ICData::Handle()); |
- return; |
- } |
- |
compiler->EmitPolymorphicInstanceCall( |
targets_, *instance_call(), instance_call()->ArgumentCount(), |
instance_call()->argument_names(), deopt_id(), |
@@ -3415,10 +3405,10 @@ Definition* InstanceCallInstr::Canonicalize(FlowGraph* flow_graph) { |
return this; |
} |
- const bool with_checks = false; |
- const bool complete = false; |
- PolymorphicInstanceCallInstr* specialized = new PolymorphicInstanceCallInstr( |
- this, *new_target, with_checks, complete); |
+ ASSERT(new_target->HasSingleTarget()); |
+ const Function& target = new_target->FirstTarget(); |
+ StaticCallInstr* specialized = |
+ StaticCallInstr::FromCall(flow_graph->zone(), this, target); |
flow_graph->InsertBefore(this, specialized, env(), FlowGraph::kValue); |
return specialized; |
} |
@@ -3443,7 +3433,7 @@ Definition* PolymorphicInstanceCallInstr::Canonicalize(FlowGraph* flow_graph) { |
bool PolymorphicInstanceCallInstr::IsSureToCallSingleRecognizedTarget() const { |
- if (FLAG_precompiled_mode && with_checks()) return false; |
+ if (FLAG_precompiled_mode && !complete()) return false; |
return targets_.HasSingleRecognizedTarget(); |
} |