| 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 if (parsed_function.function().deoptimization_counter() < | 142 if (parsed_function.function().deoptimization_counter() < |
| 143 FLAG_deoptimization_counter_threshold) { | 143 FLAG_deoptimization_counter_threshold) { |
| 144 const Code& unoptimized_code = | 144 const Code& unoptimized_code = |
| 145 Code::Handle(parsed_function.function().unoptimized_code()); | 145 Code::Handle(parsed_function.function().unoptimized_code()); |
| 146 isolate->set_ic_data_array( | 146 isolate->set_ic_data_array( |
| 147 unoptimized_code.ExtractTypeFeedbackArray()); | 147 unoptimized_code.ExtractTypeFeedbackArray()); |
| 148 } | 148 } |
| 149 } | 149 } |
| 150 | 150 |
| 151 // Build the flow graph. | 151 // Build the flow graph. |
| 152 FlowGraphBuilder builder(parsed_function); | 152 FlowGraphBuilder builder(parsed_function, NULL); // NULL = not inlining. |
| 153 flow_graph = builder.BuildGraph(FlowGraphBuilder::kNotInlining, | 153 flow_graph = builder.BuildGraph(0); // The initial loop depth is zero. |
| 154 0); // The initial loop depth is zero. | |
| 155 } | 154 } |
| 156 | 155 |
| 157 if (optimized) { | 156 if (optimized) { |
| 158 TimerScope timer(FLAG_compiler_stats, | 157 TimerScope timer(FLAG_compiler_stats, |
| 159 &CompilerStats::ssa_timer, | 158 &CompilerStats::ssa_timer, |
| 160 isolate); | 159 isolate); |
| 161 // Transform to SSA (virtual register 0 and no inlining arguments). | 160 // Transform to SSA (virtual register 0 and no inlining arguments). |
| 162 flow_graph->ComputeSSA(0, NULL); | 161 flow_graph->ComputeSSA(0, NULL); |
| 163 } | 162 } |
| 164 | 163 |
| (...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 638 Object::Handle(isolate->object_store()->sticky_error()); | 637 Object::Handle(isolate->object_store()->sticky_error()); |
| 639 isolate->object_store()->clear_sticky_error(); | 638 isolate->object_store()->clear_sticky_error(); |
| 640 isolate->set_long_jump_base(base); | 639 isolate->set_long_jump_base(base); |
| 641 return result.raw(); | 640 return result.raw(); |
| 642 } | 641 } |
| 643 UNREACHABLE(); | 642 UNREACHABLE(); |
| 644 return Object::null(); | 643 return Object::null(); |
| 645 } | 644 } |
| 646 | 645 |
| 647 } // namespace dart | 646 } // namespace dart |
| OLD | NEW |