| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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/dart_entry.h" | 9 #include "vm/dart_entry.h" |
| 10 #include "vm/debugger.h" | 10 #include "vm/debugger.h" |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 | 197 |
| 198 bool FlowGraphCompiler::CanOptimize() { | 198 bool FlowGraphCompiler::CanOptimize() { |
| 199 return !FLAG_report_usage_count && | 199 return !FLAG_report_usage_count && |
| 200 (FLAG_optimization_counter_threshold >= 0) && | 200 (FLAG_optimization_counter_threshold >= 0) && |
| 201 !Isolate::Current()->debugger()->IsActive(); | 201 !Isolate::Current()->debugger()->IsActive(); |
| 202 } | 202 } |
| 203 | 203 |
| 204 | 204 |
| 205 void FlowGraphCompiler::VisitBlocks() { | 205 void FlowGraphCompiler::VisitBlocks() { |
| 206 for (intptr_t i = 0; i < block_order().length(); ++i) { | 206 for (intptr_t i = 0; i < block_order().length(); ++i) { |
| 207 assembler()->Comment("B%"Pd"", i); | |
| 208 // Compile the block entry. | 207 // Compile the block entry. |
| 209 BlockEntryInstr* entry = block_order()[i]; | 208 BlockEntryInstr* entry = block_order()[i]; |
| 209 assembler()->Comment("B%"Pd"", entry->block_id()); |
| 210 set_current_block(entry); | 210 set_current_block(entry); |
| 211 entry->PrepareEntry(this); | 211 entry->PrepareEntry(this); |
| 212 // Compile all successors until an exit, branch, or a block entry. | 212 // Compile all successors until an exit, branch, or a block entry. |
| 213 for (ForwardInstructionIterator it(entry); !it.Done(); it.Advance()) { | 213 for (ForwardInstructionIterator it(entry); !it.Done(); it.Advance()) { |
| 214 Instruction* instr = it.Current(); | 214 Instruction* instr = it.Current(); |
| 215 if (FLAG_code_comments) EmitComment(instr); | 215 if (FLAG_code_comments) EmitComment(instr); |
| 216 if (instr->IsParallelMove()) { | 216 if (instr->IsParallelMove()) { |
| 217 parallel_move_resolver_.EmitNativeCode(instr->AsParallelMove()); | 217 parallel_move_resolver_.EmitNativeCode(instr->AsParallelMove()); |
| 218 } else { | 218 } else { |
| 219 ASSERT(instr->locs() != NULL); | 219 ASSERT(instr->locs() != NULL); |
| (...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 899 case ABOVE: return unsigned_left > unsigned_right; | 899 case ABOVE: return unsigned_left > unsigned_right; |
| 900 case ABOVE_EQUAL: return unsigned_left >= unsigned_right; | 900 case ABOVE_EQUAL: return unsigned_left >= unsigned_right; |
| 901 default: | 901 default: |
| 902 UNIMPLEMENTED(); | 902 UNIMPLEMENTED(); |
| 903 return false; | 903 return false; |
| 904 } | 904 } |
| 905 } | 905 } |
| 906 | 906 |
| 907 | 907 |
| 908 } // namespace dart | 908 } // namespace dart |
| OLD | NEW |