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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 | 149 |
150 bool FlowGraphCompiler::CanOptimize() { | 150 bool FlowGraphCompiler::CanOptimize() { |
151 return !FLAG_report_usage_count && | 151 return !FLAG_report_usage_count && |
152 (FLAG_optimization_counter_threshold >= 0) && | 152 (FLAG_optimization_counter_threshold >= 0) && |
153 !Isolate::Current()->debugger()->IsActive(); | 153 !Isolate::Current()->debugger()->IsActive(); |
154 } | 154 } |
155 | 155 |
156 | 156 |
157 void FlowGraphCompiler::VisitBlocks() { | 157 void FlowGraphCompiler::VisitBlocks() { |
158 for (intptr_t i = 0; i < block_order().length(); ++i) { | 158 for (intptr_t i = 0; i < block_order().length(); ++i) { |
159 assembler()->Comment("B%d", i); | 159 assembler()->Comment("B%"Pd"", i); |
160 // Compile the block entry. | 160 // Compile the block entry. |
161 BlockEntryInstr* entry = block_order()[i]; | 161 BlockEntryInstr* entry = block_order()[i]; |
162 set_current_block(entry); | 162 set_current_block(entry); |
163 entry->PrepareEntry(this); | 163 entry->PrepareEntry(this); |
164 // Compile all successors until an exit, branch, or a block entry. | 164 // Compile all successors until an exit, branch, or a block entry. |
165 for (ForwardInstructionIterator it(entry); !it.Done(); it.Advance()) { | 165 for (ForwardInstructionIterator it(entry); !it.Done(); it.Advance()) { |
166 Instruction* instr = it.Current(); | 166 Instruction* instr = it.Current(); |
167 if (FLAG_code_comments) EmitComment(instr); | 167 if (FLAG_code_comments) EmitComment(instr); |
168 if (instr->IsParallelMove()) { | 168 if (instr->IsParallelMove()) { |
169 parallel_move_resolver_.EmitNativeCode(instr->AsParallelMove()); | 169 parallel_move_resolver_.EmitNativeCode(instr->AsParallelMove()); |
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
801 return; | 801 return; |
802 } | 802 } |
803 } | 803 } |
804 | 804 |
805 // This move is not blocked. | 805 // This move is not blocked. |
806 EmitMove(index); | 806 EmitMove(index); |
807 } | 807 } |
808 | 808 |
809 | 809 |
810 } // namespace dart | 810 } // namespace dart |
OLD | NEW |