| 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 DEBUG_ASSERT(flow_graph->ValidateUseLists()); | 196 DEBUG_ASSERT(flow_graph->ValidateUseLists()); |
| 197 } | 197 } |
| 198 | 198 |
| 199 // Propagate types and eliminate more type tests. | 199 // Propagate types and eliminate more type tests. |
| 200 FlowGraphTypePropagator propagator(*flow_graph); | 200 FlowGraphTypePropagator propagator(*flow_graph); |
| 201 propagator.PropagateTypes(); | 201 propagator.PropagateTypes(); |
| 202 | 202 |
| 203 // Verify that the use lists are still valid. | 203 // Verify that the use lists are still valid. |
| 204 DEBUG_ASSERT(flow_graph->ValidateUseLists()); | 204 DEBUG_ASSERT(flow_graph->ValidateUseLists()); |
| 205 | 205 |
| 206 // Propagate sminess from CheckSmi to phis. |
| 207 optimizer.PropagateSminess(); |
| 208 |
| 206 // Do optimizations that depend on the propagated type information. | 209 // Do optimizations that depend on the propagated type information. |
| 207 optimizer.OptimizeComputations(); | 210 optimizer.OptimizeComputations(); |
| 208 | 211 |
| 209 // Unbox doubles. | 212 // Unbox doubles. |
| 210 flow_graph->ComputeUseLists(); | 213 flow_graph->ComputeUseLists(); |
| 211 optimizer.SelectRepresentations(); | 214 optimizer.SelectRepresentations(); |
| 212 | 215 |
| 213 if (FLAG_cse) { | 216 if (FLAG_cse) { |
| 214 flow_graph->ComputeUseLists(); | 217 flow_graph->ComputeUseLists(); |
| 215 DominatorBasedCSE::Optimize(flow_graph->graph_entry()); | 218 DominatorBasedCSE::Optimize(flow_graph->graph_entry()); |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 576 result = isolate->object_store()->sticky_error(); | 579 result = isolate->object_store()->sticky_error(); |
| 577 isolate->object_store()->clear_sticky_error(); | 580 isolate->object_store()->clear_sticky_error(); |
| 578 isolate->set_long_jump_base(base); | 581 isolate->set_long_jump_base(base); |
| 579 return result.raw(); | 582 return result.raw(); |
| 580 } | 583 } |
| 581 UNREACHABLE(); | 584 UNREACHABLE(); |
| 582 return Object::null(); | 585 return Object::null(); |
| 583 } | 586 } |
| 584 | 587 |
| 585 } // namespace dart | 588 } // namespace dart |
| OLD | NEW |