Chromium Code Reviews| Index: runtime/vm/flow_graph_compiler.cc |
| diff --git a/runtime/vm/flow_graph_compiler.cc b/runtime/vm/flow_graph_compiler.cc |
| index 433d91ae94a656f2642f0011dcfeaf35e740c04a..e3b7ad6d6ae4cf7db50cfbdac6348b1eb5bf9509 100644 |
| --- a/runtime/vm/flow_graph_compiler.cc |
| +++ b/runtime/vm/flow_graph_compiler.cc |
| @@ -252,7 +252,8 @@ void FlowGraphCompiler::InitCompiler() { |
| if (current->IsInstanceCall()) { |
| ic_data = current->AsInstanceCall()->ic_data(); |
| } |
| - if ((ic_data != NULL) && (ic_data->NumberOfUsedChecks() == 0)) { |
| + if ((ic_data == NULL) || |
| + ((ic_data != NULL) && (ic_data->NumberOfUsedChecks() == 0))) { |
|
srdjan
2015/10/21 17:37:46
When do you see ic_data NULL, except for precompil
Florian Schneider
2015/10/22 13:59:25
Same here. Defensive left over check.
|
| may_reoptimize_ = true; |
|
rmacnak
2015/10/21 18:00:30
Can we rename this to has_ic_calls_ or, probably b
Florian Schneider
2015/10/22 13:59:25
may_reoptimize_ has no effect with precompilation
|
| } |
| if (is_leaf && |
| @@ -1097,9 +1098,7 @@ void FlowGraphCompiler::GenerateInstanceCall( |
| if (is_optimizing() && (ic_data.NumberOfUsedChecks() == 0)) { |
| // Emit IC call that will count and thus may need reoptimization at |
| // function entry. |
| - ASSERT(!is_optimizing() |
| - || may_reoptimize() |
| - || flow_graph().IsCompiledForOsr()); |
| + ASSERT(may_reoptimize() || flow_graph().IsCompiledForOsr()); |
| switch (ic_data.NumArgsTested()) { |
| case 1: |
| EmitOptimizedInstanceCall( |