| 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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 FlowGraphBuilder graph_builder(parsed_function); | 188 FlowGraphBuilder graph_builder(parsed_function); |
| 189 graph_builder.BuildGraph(optimized); | 189 graph_builder.BuildGraph(optimized); |
| 190 | 190 |
| 191 // The non-optimizing compiler compiles blocks in reverse postorder, | 191 // The non-optimizing compiler compiles blocks in reverse postorder, |
| 192 // because it is a 'natural' order for the human reader of the | 192 // because it is a 'natural' order for the human reader of the |
| 193 // generated code. | 193 // generated code. |
| 194 intptr_t length = graph_builder.postorder_block_entries().length(); | 194 intptr_t length = graph_builder.postorder_block_entries().length(); |
| 195 for (intptr_t i = length - 1; i >= 0; --i) { | 195 for (intptr_t i = length - 1; i >= 0; --i) { |
| 196 block_order.Add(graph_builder.postorder_block_entries()[i]); | 196 block_order.Add(graph_builder.postorder_block_entries()[i]); |
| 197 } | 197 } |
| 198 // TODO(fschneider): Temporarily disable on ia32 until all instructions | |
| 199 // produced by the FlowGraphOptimizer are implemented on ia32. | |
| 200 #if defined(TARGET_ARCH_IA32) | |
| 201 if (optimized && !FLAG_use_new_compiler) { | |
| 202 #else | |
| 203 if (optimized) { | 198 if (optimized) { |
| 204 #endif | |
| 205 FlowGraphOptimizer optimizer(block_order); | 199 FlowGraphOptimizer optimizer(block_order); |
| 206 optimizer.ApplyICData(); | 200 optimizer.ApplyICData(); |
| 207 } | 201 } |
| 208 } | 202 } |
| 209 | 203 |
| 210 Assembler assembler; | 204 Assembler assembler; |
| 211 FlowGraphCompiler graph_compiler(&assembler, parsed_function, | 205 FlowGraphCompiler graph_compiler(&assembler, parsed_function, |
| 212 block_order, optimized); | 206 block_order, optimized); |
| 213 { | 207 { |
| 214 TimerScope timer(FLAG_compiler_stats, | 208 TimerScope timer(FLAG_compiler_stats, |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 isolate->object_store()->clear_sticky_error(); | 547 isolate->object_store()->clear_sticky_error(); |
| 554 isolate->set_long_jump_base(base); | 548 isolate->set_long_jump_base(base); |
| 555 return result.raw(); | 549 return result.raw(); |
| 556 } | 550 } |
| 557 UNREACHABLE(); | 551 UNREACHABLE(); |
| 558 return Object::null(); | 552 return Object::null(); |
| 559 } | 553 } |
| 560 | 554 |
| 561 | 555 |
| 562 } // namespace dart | 556 } // namespace dart |
| OLD | NEW |