Chromium Code Reviews| 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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 | 198 // TODO(fschneider): Temporarily disable on ia32 until all instructions |
| 199 // produced by the FlowGraphOptimizer are implemented on ia32. | 199 // produced by the FlowGraphOptimizer are implemented on ia32. |
|
Vyacheslav Egorov (Google)
2012/06/08 11:32:53
remove this comment?
srdjan
2012/06/08 14:55:24
Done.
| |
| 200 #if defined(TARGET_ARCH_IA32) | |
| 201 if (optimized && !FLAG_use_new_compiler) { | |
| 202 #else | |
| 203 if (optimized) { | 200 if (optimized) { |
| 204 #endif | |
| 205 FlowGraphOptimizer optimizer(block_order); | 201 FlowGraphOptimizer optimizer(block_order); |
| 206 optimizer.ApplyICData(); | 202 optimizer.ApplyICData(); |
| 207 } | 203 } |
| 208 } | 204 } |
| 209 | 205 |
| 210 Assembler assembler; | 206 Assembler assembler; |
| 211 FlowGraphCompiler graph_compiler(&assembler, parsed_function, | 207 FlowGraphCompiler graph_compiler(&assembler, parsed_function, |
| 212 block_order, optimized); | 208 block_order, optimized); |
| 213 { | 209 { |
| 214 TimerScope timer(FLAG_compiler_stats, | 210 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(); | 549 isolate->object_store()->clear_sticky_error(); |
| 554 isolate->set_long_jump_base(base); | 550 isolate->set_long_jump_base(base); |
| 555 return result.raw(); | 551 return result.raw(); |
| 556 } | 552 } |
| 557 UNREACHABLE(); | 553 UNREACHABLE(); |
| 558 return Object::null(); | 554 return Object::null(); |
| 559 } | 555 } |
| 560 | 556 |
| 561 | 557 |
| 562 } // namespace dart | 558 } // namespace dart |
| OLD | NEW |