| 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/compiler.h" | 5 #include "vm/compiler.h" |
| 6 | 6 |
| 7 #include "vm/assembler.h" | 7 #include "vm/assembler.h" |
| 8 #include "vm/ast_printer.h" | 8 #include "vm/ast_printer.h" |
| 9 #include "vm/code_generator.h" | 9 #include "vm/code_generator.h" |
| 10 #include "vm/code_patcher.h" | 10 #include "vm/code_patcher.h" |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 // generated code. | 190 // generated code. |
| 191 intptr_t length = graph_builder.postorder_block_entries().length(); | 191 intptr_t length = graph_builder.postorder_block_entries().length(); |
| 192 for (intptr_t i = length - 1; i >= 0; --i) { | 192 for (intptr_t i = length - 1; i >= 0; --i) { |
| 193 block_order.Add(graph_builder.postorder_block_entries()[i]); | 193 block_order.Add(graph_builder.postorder_block_entries()[i]); |
| 194 } | 194 } |
| 195 if (optimized) { | 195 if (optimized) { |
| 196 FlowGraphOptimizer optimizer(block_order); | 196 FlowGraphOptimizer optimizer(block_order); |
| 197 optimizer.ApplyICData(); | 197 optimizer.ApplyICData(); |
| 198 | 198 |
| 199 if (FLAG_use_ssa) { | 199 if (FLAG_use_ssa) { |
| 200 printf("====================================\n"); | |
| 201 // Perform register allocation on the SSA graph. | 200 // Perform register allocation on the SSA graph. |
| 202 FlowGraphAllocator allocator(graph_builder.postorder_block_entries(), | 201 FlowGraphAllocator allocator(graph_builder.postorder_block_entries(), |
| 203 graph_builder.current_ssa_temp_index()); | 202 graph_builder.current_ssa_temp_index()); |
| 204 allocator.ResolveConstraints(); | 203 allocator.ResolveConstraints(); |
| 205 allocator.AnalyzeLiveness(); | 204 allocator.AnalyzeLiveness(); |
| 206 | 205 |
| 207 // Temporary bailout until we support code generation from SSA form. | 206 // Temporary bailout until we support code generation from SSA form. |
| 208 graph_builder.Bailout("No SSA code generation support."); | 207 graph_builder.Bailout("No SSA code generation support."); |
| 209 } | 208 } |
| 210 } | 209 } |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 588 isolate->object_store()->clear_sticky_error(); | 587 isolate->object_store()->clear_sticky_error(); |
| 589 isolate->set_long_jump_base(base); | 588 isolate->set_long_jump_base(base); |
| 590 return result.raw(); | 589 return result.raw(); |
| 591 } | 590 } |
| 592 UNREACHABLE(); | 591 UNREACHABLE(); |
| 593 return Object::null(); | 592 return Object::null(); |
| 594 } | 593 } |
| 595 | 594 |
| 596 | 595 |
| 597 } // namespace dart | 596 } // namespace dart |
| OLD | NEW |