| 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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 block_info->set_fallthrough_label(fallthrough_label); | 219 block_info->set_fallthrough_label(fallthrough_label); |
| 220 } | 220 } |
| 221 | 221 |
| 222 | 222 |
| 223 void FlowGraphCompiler::VisitBlocks() { | 223 void FlowGraphCompiler::VisitBlocks() { |
| 224 CompactBlocks(); | 224 CompactBlocks(); |
| 225 | 225 |
| 226 for (intptr_t i = 0; i < block_order().length(); ++i) { | 226 for (intptr_t i = 0; i < block_order().length(); ++i) { |
| 227 // Compile the block entry. | 227 // Compile the block entry. |
| 228 BlockEntryInstr* entry = block_order()[i]; | 228 BlockEntryInstr* entry = block_order()[i]; |
| 229 assembler()->Comment("B%"Pd"", entry->block_id()); | 229 assembler()->Comment("B%" Pd "", entry->block_id()); |
| 230 set_current_block(entry); | 230 set_current_block(entry); |
| 231 | 231 |
| 232 if (WasCompacted(entry)) { | 232 if (WasCompacted(entry)) { |
| 233 continue; | 233 continue; |
| 234 } | 234 } |
| 235 | 235 |
| 236 entry->EmitNativeCode(this); | 236 entry->EmitNativeCode(this); |
| 237 // Compile all successors until an exit, branch, or a block entry. | 237 // Compile all successors until an exit, branch, or a block entry. |
| 238 for (ForwardInstructionIterator it(entry); !it.Done(); it.Advance()) { | 238 for (ForwardInstructionIterator it(entry); !it.Done(); it.Advance()) { |
| 239 Instruction* instr = it.Current(); | 239 Instruction* instr = it.Current(); |
| (...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1139 | 1139 |
| 1140 for (int i = 0; i < len; i++) { | 1140 for (int i = 0; i < len; i++) { |
| 1141 sorted->Add(CidTarget(ic_data.GetReceiverClassIdAt(i), | 1141 sorted->Add(CidTarget(ic_data.GetReceiverClassIdAt(i), |
| 1142 &Function::ZoneHandle(ic_data.GetTargetAt(i)), | 1142 &Function::ZoneHandle(ic_data.GetTargetAt(i)), |
| 1143 ic_data.GetCountAt(i))); | 1143 ic_data.GetCountAt(i))); |
| 1144 } | 1144 } |
| 1145 sorted->Sort(HighestCountFirst); | 1145 sorted->Sort(HighestCountFirst); |
| 1146 } | 1146 } |
| 1147 | 1147 |
| 1148 } // namespace dart | 1148 } // namespace dart |
| OLD | NEW |