| 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 isolate->set_ic_data_array( | 151 isolate->set_ic_data_array( |
| 152 unoptimized_code.ExtractTypeFeedbackArray()); | 152 unoptimized_code.ExtractTypeFeedbackArray()); |
| 153 } | 153 } |
| 154 } | 154 } |
| 155 | 155 |
| 156 // Build the flow graph. | 156 // Build the flow graph. |
| 157 FlowGraphBuilder builder(parsed_function); | 157 FlowGraphBuilder builder(parsed_function); |
| 158 flow_graph = builder.BuildGraph(FlowGraphBuilder::kNotInlining); | 158 flow_graph = builder.BuildGraph(FlowGraphBuilder::kNotInlining); |
| 159 } | 159 } |
| 160 | 160 |
| 161 // Transform to SSA. | |
| 162 if (optimized) { | 161 if (optimized) { |
| 163 TimerScope timer(FLAG_compiler_stats, | 162 TimerScope timer(FLAG_compiler_stats, |
| 164 &CompilerStats::ssa_timer, | 163 &CompilerStats::ssa_timer, |
| 165 isolate); | 164 isolate); |
| 166 flow_graph->ComputeSSA(0); // Start at virtual register 0. | 165 // Transform to SSA (virtual register 0 and no inlining arguments). |
| 166 flow_graph->ComputeSSA(0, NULL); |
| 167 } | 167 } |
| 168 | 168 |
| 169 if (FLAG_print_flow_graph) { | 169 if (FLAG_print_flow_graph) { |
| 170 OS::Print("Before Optimizations\n"); | 170 OS::Print("Before Optimizations\n"); |
| 171 FlowGraphPrinter printer(*flow_graph); | 171 FlowGraphPrinter printer(*flow_graph); |
| 172 printer.PrintBlocks(); | 172 printer.PrintBlocks(); |
| 173 } | 173 } |
| 174 | 174 |
| 175 if (optimized) { | 175 if (optimized) { |
| 176 TimerScope timer(FLAG_compiler_stats, | 176 TimerScope timer(FLAG_compiler_stats, |
| (...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 result = isolate->object_store()->sticky_error(); | 605 result = isolate->object_store()->sticky_error(); |
| 606 isolate->object_store()->clear_sticky_error(); | 606 isolate->object_store()->clear_sticky_error(); |
| 607 isolate->set_long_jump_base(base); | 607 isolate->set_long_jump_base(base); |
| 608 return result.raw(); | 608 return result.raw(); |
| 609 } | 609 } |
| 610 UNREACHABLE(); | 610 UNREACHABLE(); |
| 611 return Object::null(); | 611 return Object::null(); |
| 612 } | 612 } |
| 613 | 613 |
| 614 } // namespace dart | 614 } // namespace dart |
| OLD | NEW |