| 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 | 8 |
| 9 #include "vm/ast_printer.h" | 9 #include "vm/ast_printer.h" |
| 10 #include "vm/code_generator.h" | 10 #include "vm/code_generator.h" |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 FlowGraphTypePropagator propagator(flow_graph); | 187 FlowGraphTypePropagator propagator(flow_graph); |
| 188 propagator.PropagateTypes(); | 188 propagator.PropagateTypes(); |
| 189 } | 189 } |
| 190 | 190 |
| 191 // Verify that the use lists are still valid. | 191 // Verify that the use lists are still valid. |
| 192 DEBUG_ASSERT(flow_graph->ValidateUseLists()); | 192 DEBUG_ASSERT(flow_graph->ValidateUseLists()); |
| 193 | 193 |
| 194 // Propagate sminess from CheckSmi to phis. | 194 // Propagate sminess from CheckSmi to phis. |
| 195 optimizer.PropagateSminess(); | 195 optimizer.PropagateSminess(); |
| 196 | 196 |
| 197 // Use propagated class-ids to optimize further. |
| 198 optimizer.ApplyClassIds(); |
| 199 |
| 197 // Do optimizations that depend on the propagated type information. | 200 // Do optimizations that depend on the propagated type information. |
| 201 // TODO(srdjan): Should this be called CanonicalizeComputations? |
| 198 optimizer.OptimizeComputations(); | 202 optimizer.OptimizeComputations(); |
| 199 | 203 |
| 200 // Unbox doubles. | 204 // Unbox doubles. |
| 201 flow_graph->ComputeUseLists(); | 205 flow_graph->ComputeUseLists(); |
| 202 optimizer.SelectRepresentations(); | 206 optimizer.SelectRepresentations(); |
| 203 | 207 |
| 204 if (FLAG_constant_propagation || | 208 if (FLAG_constant_propagation || |
| 205 FLAG_common_subexpression_elimination) { | 209 FLAG_common_subexpression_elimination) { |
| 206 flow_graph->ComputeUseLists(); | 210 flow_graph->ComputeUseLists(); |
| 207 } | 211 } |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 result = isolate->object_store()->sticky_error(); | 589 result = isolate->object_store()->sticky_error(); |
| 586 isolate->object_store()->clear_sticky_error(); | 590 isolate->object_store()->clear_sticky_error(); |
| 587 isolate->set_long_jump_base(base); | 591 isolate->set_long_jump_base(base); |
| 588 return result.raw(); | 592 return result.raw(); |
| 589 } | 593 } |
| 590 UNREACHABLE(); | 594 UNREACHABLE(); |
| 591 return Object::null(); | 595 return Object::null(); |
| 592 } | 596 } |
| 593 | 597 |
| 594 } // namespace dart | 598 } // namespace dart |
| OLD | NEW |