| 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 } | 179 } |
| 180 | 180 |
| 181 if (optimized) { | 181 if (optimized) { |
| 182 FlowGraphOptimizer optimizer(*flow_graph); | 182 FlowGraphOptimizer optimizer(*flow_graph); |
| 183 optimizer.ApplyICData(); | 183 optimizer.ApplyICData(); |
| 184 | 184 |
| 185 // Propagate types and eliminate more type tests. | 185 // Propagate types and eliminate more type tests. |
| 186 FlowGraphTypePropagator propagator(*flow_graph); | 186 FlowGraphTypePropagator propagator(*flow_graph); |
| 187 propagator.PropagateTypes(); | 187 propagator.PropagateTypes(); |
| 188 | 188 |
| 189 | |
| 190 // Do optimizations that depend on the propagated type information. | 189 // Do optimizations that depend on the propagated type information. |
| 191 optimizer.OptimizeComputations(); | 190 optimizer.OptimizeComputations(); |
| 192 | 191 |
| 193 if (FLAG_local_cse) { | 192 if (FLAG_local_cse) { |
| 194 LocalCSE local_cse(*flow_graph); | 193 LocalCSE local_cse(*flow_graph); |
| 195 local_cse.Optimize(); | 194 local_cse.Optimize(); |
| 196 } | 195 } |
| 197 | 196 |
| 198 // Perform register allocation on the SSA graph. | 197 // Perform register allocation on the SSA graph. |
| 199 FlowGraphAllocator allocator(*flow_graph); | 198 FlowGraphAllocator allocator(*flow_graph); |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 552 result = isolate->object_store()->sticky_error(); | 551 result = isolate->object_store()->sticky_error(); |
| 553 isolate->object_store()->clear_sticky_error(); | 552 isolate->object_store()->clear_sticky_error(); |
| 554 isolate->set_long_jump_base(base); | 553 isolate->set_long_jump_base(base); |
| 555 return result.raw(); | 554 return result.raw(); |
| 556 } | 555 } |
| 557 UNREACHABLE(); | 556 UNREACHABLE(); |
| 558 return Object::null(); | 557 return Object::null(); |
| 559 } | 558 } |
| 560 | 559 |
| 561 } // namespace dart | 560 } // namespace dart |
| OLD | NEW |