| 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/block_scheduler.h" | 10 #include "vm/block_scheduler.h" |
| (...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 446 | 446 |
| 447 if (FLAG_range_analysis) { | 447 if (FLAG_range_analysis) { |
| 448 // Propagate types after store-load-forwarding. Some phis may have | 448 // Propagate types after store-load-forwarding. Some phis may have |
| 449 // become smi phis that can be processed by range analysis. | 449 // become smi phis that can be processed by range analysis. |
| 450 FlowGraphTypePropagator::Propagate(flow_graph); | 450 FlowGraphTypePropagator::Propagate(flow_graph); |
| 451 DEBUG_ASSERT(flow_graph->VerifyUseLists()); | 451 DEBUG_ASSERT(flow_graph->VerifyUseLists()); |
| 452 | 452 |
| 453 // We have to perform range analysis after LICM because it | 453 // We have to perform range analysis after LICM because it |
| 454 // optimistically moves CheckSmi through phis into loop preheaders | 454 // optimistically moves CheckSmi through phis into loop preheaders |
| 455 // making some phis smi. | 455 // making some phis smi. |
| 456 optimizer.InferSmiRanges(); | 456 optimizer.InferIntRanges(); |
| 457 DEBUG_ASSERT(flow_graph->VerifyUseLists()); | 457 DEBUG_ASSERT(flow_graph->VerifyUseLists()); |
| 458 } | 458 } |
| 459 | 459 |
| 460 if (FLAG_constant_propagation) { | 460 if (FLAG_constant_propagation) { |
| 461 // Constant propagation can use information from range analysis to | 461 // Constant propagation can use information from range analysis to |
| 462 // find unreachable branch targets and eliminate branches that have | 462 // find unreachable branch targets and eliminate branches that have |
| 463 // the same true- and false-target. | 463 // the same true- and false-target. |
| 464 ConstantPropagator::OptimizeBranches(flow_graph); | 464 ConstantPropagator::OptimizeBranches(flow_graph); |
| 465 DEBUG_ASSERT(flow_graph->VerifyUseLists()); | 465 DEBUG_ASSERT(flow_graph->VerifyUseLists()); |
| 466 } | 466 } |
| (...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 977 const Object& result = | 977 const Object& result = |
| 978 Object::Handle(isolate->object_store()->sticky_error()); | 978 Object::Handle(isolate->object_store()->sticky_error()); |
| 979 isolate->object_store()->clear_sticky_error(); | 979 isolate->object_store()->clear_sticky_error(); |
| 980 return result.raw(); | 980 return result.raw(); |
| 981 } | 981 } |
| 982 UNREACHABLE(); | 982 UNREACHABLE(); |
| 983 return Object::null(); | 983 return Object::null(); |
| 984 } | 984 } |
| 985 | 985 |
| 986 } // namespace dart | 986 } // namespace dart |
| OLD | NEW |