| 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 | 8 |
| 9 #include "vm/ast_printer.h" | 9 #include "vm/ast_printer.h" |
| 10 #include "vm/code_generator.h" | 10 #include "vm/code_generator.h" |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 FlowGraphBuilder builder(parsed_function, NULL); // NULL = not inlining. | 152 FlowGraphBuilder builder(parsed_function, NULL); // NULL = not inlining. |
| 153 flow_graph = builder.BuildGraph(); | 153 flow_graph = builder.BuildGraph(); |
| 154 } | 154 } |
| 155 | 155 |
| 156 if (optimized) { | 156 if (optimized) { |
| 157 TimerScope timer(FLAG_compiler_stats, | 157 TimerScope timer(FLAG_compiler_stats, |
| 158 &CompilerStats::ssa_timer, | 158 &CompilerStats::ssa_timer, |
| 159 isolate); | 159 isolate); |
| 160 // Transform to SSA (virtual register 0 and no inlining arguments). | 160 // Transform to SSA (virtual register 0 and no inlining arguments). |
| 161 flow_graph->ComputeSSA(0, NULL); | 161 flow_graph->ComputeSSA(0, NULL); |
| 162 DEBUG_ASSERT(flow_graph->VerifyUseLists()); | 162 flow_graph->ComputeUseLists(); |
| 163 } | 163 } |
| 164 | 164 |
| 165 if (FLAG_print_flow_graph || | 165 if (FLAG_print_flow_graph || |
| 166 (optimized && FLAG_print_flow_graph_optimized)) { | 166 (optimized && FLAG_print_flow_graph_optimized)) { |
| 167 OS::Print("Before Optimizations\n"); | 167 OS::Print("Before Optimizations\n"); |
| 168 FlowGraphPrinter printer(*flow_graph); | 168 FlowGraphPrinter printer(*flow_graph); |
| 169 printer.PrintBlocks(); | 169 printer.PrintBlocks(); |
| 170 } | 170 } |
| 171 | 171 |
| 172 if (optimized) { | 172 if (optimized) { |
| (...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 642 Object::Handle(isolate->object_store()->sticky_error()); | 642 Object::Handle(isolate->object_store()->sticky_error()); |
| 643 isolate->object_store()->clear_sticky_error(); | 643 isolate->object_store()->clear_sticky_error(); |
| 644 isolate->set_long_jump_base(base); | 644 isolate->set_long_jump_base(base); |
| 645 return result.raw(); | 645 return result.raw(); |
| 646 } | 646 } |
| 647 UNREACHABLE(); | 647 UNREACHABLE(); |
| 648 return Object::null(); | 648 return Object::null(); |
| 649 } | 649 } |
| 650 | 650 |
| 651 } // namespace dart | 651 } // namespace dart |
| OLD | NEW |