| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX. |
| 6 | 6 |
| 7 #include "vm/flow_graph_compiler.h" | 7 #include "vm/flow_graph_compiler.h" |
| 8 | 8 |
| 9 #include "vm/cha.h" | 9 #include "vm/cha.h" |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 if ((locs != NULL) && locs->can_call()) { | 145 if ((locs != NULL) && locs->can_call()) { |
| 146 is_leaf = false; | 146 is_leaf = false; |
| 147 } | 147 } |
| 148 } | 148 } |
| 149 } | 149 } |
| 150 } | 150 } |
| 151 } | 151 } |
| 152 if (is_leaf) { | 152 if (is_leaf) { |
| 153 // Remove the stack overflow check at function entry. | 153 // Remove the stack overflow check at function entry. |
| 154 Instruction* first = flow_graph_.graph_entry()->normal_entry()->next(); | 154 Instruction* first = flow_graph_.graph_entry()->normal_entry()->next(); |
| 155 ASSERT(first->IsCheckStackOverflow()); | |
| 156 if (first->IsCheckStackOverflow()) first->RemoveFromGraph(); | 155 if (first->IsCheckStackOverflow()) first->RemoveFromGraph(); |
| 157 } | 156 } |
| 158 } | 157 } |
| 159 | 158 |
| 160 | 159 |
| 161 bool FlowGraphCompiler::CanOptimize() { | 160 bool FlowGraphCompiler::CanOptimize() { |
| 162 return !FLAG_report_usage_count && | 161 return !FLAG_report_usage_count && |
| 163 (FLAG_optimization_counter_threshold >= 0); | 162 (FLAG_optimization_counter_threshold >= 0); |
| 164 } | 163 } |
| 165 | 164 |
| (...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1139 | 1138 |
| 1140 for (int i = 0; i < len; i++) { | 1139 for (int i = 0; i < len; i++) { |
| 1141 sorted->Add(CidTarget(ic_data.GetReceiverClassIdAt(i), | 1140 sorted->Add(CidTarget(ic_data.GetReceiverClassIdAt(i), |
| 1142 &Function::ZoneHandle(ic_data.GetTargetAt(i)), | 1141 &Function::ZoneHandle(ic_data.GetTargetAt(i)), |
| 1143 ic_data.GetCountAt(i))); | 1142 ic_data.GetCountAt(i))); |
| 1144 } | 1143 } |
| 1145 sorted->Sort(HighestCountFirst); | 1144 sorted->Sort(HighestCountFirst); |
| 1146 } | 1145 } |
| 1147 | 1146 |
| 1148 } // namespace dart | 1147 } // namespace dart |
| OLD | NEW |