| 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 isolate->set_ic_data_array( | 159 isolate->set_ic_data_array( |
| 160 ExtractTypeFeedbackArray(unoptimized_code)); | 160 ExtractTypeFeedbackArray(unoptimized_code)); |
| 161 } | 161 } |
| 162 } | 162 } |
| 163 | 163 |
| 164 // Build the flow graph. | 164 // Build the flow graph. |
| 165 FlowGraphBuilder builder(parsed_function); | 165 FlowGraphBuilder builder(parsed_function); |
| 166 flow_graph = builder.BuildGraph(); | 166 flow_graph = builder.BuildGraph(); |
| 167 | 167 |
| 168 // Transform to SSA. | 168 // Transform to SSA. |
| 169 if (optimized) flow_graph->ComputeSSA(); | 169 if (optimized) flow_graph->ComputeSSA(0); // start at virtual index 0. |
| 170 | 170 |
| 171 if (FLAG_print_flow_graph) { | 171 if (FLAG_print_flow_graph) { |
| 172 OS::Print("Before Optimizations\n"); | 172 OS::Print("Before Optimizations\n"); |
| 173 FlowGraphPrinter printer(*flow_graph); | 173 FlowGraphPrinter printer(*flow_graph); |
| 174 printer.PrintBlocks(); | 174 printer.PrintBlocks(); |
| 175 } | 175 } |
| 176 if (Dart::flow_graph_writer() != NULL) { | 176 if (Dart::flow_graph_writer() != NULL) { |
| 177 // Write flow graph to file. | 177 // Write flow graph to file. |
| 178 FlowGraphVisualizer printer(*flow_graph); | 178 FlowGraphVisualizer printer(*flow_graph); |
| 179 printer.PrintFunction(); | 179 printer.PrintFunction(); |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 576 result = isolate->object_store()->sticky_error(); | 576 result = isolate->object_store()->sticky_error(); |
| 577 isolate->object_store()->clear_sticky_error(); | 577 isolate->object_store()->clear_sticky_error(); |
| 578 isolate->set_long_jump_base(base); | 578 isolate->set_long_jump_base(base); |
| 579 return result.raw(); | 579 return result.raw(); |
| 580 } | 580 } |
| 581 UNREACHABLE(); | 581 UNREACHABLE(); |
| 582 return Object::null(); | 582 return Object::null(); |
| 583 } | 583 } |
| 584 | 584 |
| 585 } // namespace dart | 585 } // namespace dart |
| OLD | NEW |