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