| 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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 graph_builder.current_ssa_temp_index()); | 203 graph_builder.current_ssa_temp_index()); |
| 204 allocator.ResolveConstraints(); | 204 allocator.ResolveConstraints(); |
| 205 allocator.AnalyzeLiveness(); | 205 allocator.AnalyzeLiveness(); |
| 206 | 206 |
| 207 // Temporary bailout until we support code generation from SSA form. | 207 // Temporary bailout until we support code generation from SSA form. |
| 208 graph_builder.Bailout("No SSA code generation support."); | 208 graph_builder.Bailout("No SSA code generation support."); |
| 209 } | 209 } |
| 210 } | 210 } |
| 211 } | 211 } |
| 212 | 212 |
| 213 bool is_leaf = false; |
| 214 if (optimized) { |
| 215 FlowGraphAnalyzer analyzer(block_order); |
| 216 analyzer.Analyze(); |
| 217 is_leaf = analyzer.is_leaf(); |
| 218 } |
| 213 Assembler assembler; | 219 Assembler assembler; |
| 214 FlowGraphCompiler graph_compiler(&assembler, parsed_function, | 220 FlowGraphCompiler graph_compiler(&assembler, parsed_function, |
| 215 block_order, optimized); | 221 block_order, optimized, is_leaf); |
| 216 { | 222 { |
| 217 TimerScope timer(FLAG_compiler_stats, | 223 TimerScope timer(FLAG_compiler_stats, |
| 218 &CompilerStats::graphcompiler_timer, | 224 &CompilerStats::graphcompiler_timer, |
| 219 isolate); | 225 isolate); |
| 220 graph_compiler.CompileGraph(); | 226 graph_compiler.CompileGraph(); |
| 221 } | 227 } |
| 222 { | 228 { |
| 223 TimerScope timer(FLAG_compiler_stats, | 229 TimerScope timer(FLAG_compiler_stats, |
| 224 &CompilerStats::codefinalizer_timer, | 230 &CompilerStats::codefinalizer_timer, |
| 225 isolate); | 231 isolate); |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 isolate->object_store()->clear_sticky_error(); | 588 isolate->object_store()->clear_sticky_error(); |
| 583 isolate->set_long_jump_base(base); | 589 isolate->set_long_jump_base(base); |
| 584 return result.raw(); | 590 return result.raw(); |
| 585 } | 591 } |
| 586 UNREACHABLE(); | 592 UNREACHABLE(); |
| 587 return Object::null(); | 593 return Object::null(); |
| 588 } | 594 } |
| 589 | 595 |
| 590 | 596 |
| 591 } // namespace dart | 597 } // namespace dart |
| OLD | NEW |