| 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 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 } | 447 } |
| 448 // We have to perform range analysis after LICM because it | 448 // We have to perform range analysis after LICM because it |
| 449 // optimistically moves CheckSmi through phis into loop preheaders | 449 // optimistically moves CheckSmi through phis into loop preheaders |
| 450 // making some phis smi. | 450 // making some phis smi. |
| 451 optimizer.InferSmiRanges(); | 451 optimizer.InferSmiRanges(); |
| 452 DEBUG_ASSERT(flow_graph->VerifyUseLists()); | 452 DEBUG_ASSERT(flow_graph->VerifyUseLists()); |
| 453 } | 453 } |
| 454 | 454 |
| 455 if (FLAG_constant_propagation) { | 455 if (FLAG_constant_propagation) { |
| 456 // Constant propagation can use information from range analysis to | 456 // Constant propagation can use information from range analysis to |
| 457 // find unreachable branch targets. | 457 // find unreachable branch targets and eliminate branches that have |
| 458 // the same true- and false-target. |
| 458 ConstantPropagator::OptimizeBranches(flow_graph); | 459 ConstantPropagator::OptimizeBranches(flow_graph); |
| 459 DEBUG_ASSERT(flow_graph->VerifyUseLists()); | 460 DEBUG_ASSERT(flow_graph->VerifyUseLists()); |
| 460 } | 461 } |
| 461 | 462 |
| 462 if (FLAG_propagate_types) { | 463 if (FLAG_propagate_types) { |
| 463 // Recompute types after code movement was done to ensure correct | 464 // Recompute types after code movement was done to ensure correct |
| 464 // reaching types for hoisted values. | 465 // reaching types for hoisted values. |
| 465 FlowGraphTypePropagator propagator(flow_graph); | 466 FlowGraphTypePropagator propagator(flow_graph); |
| 466 propagator.Propagate(); | 467 propagator.Propagate(); |
| 467 DEBUG_ASSERT(flow_graph->VerifyUseLists()); | 468 DEBUG_ASSERT(flow_graph->VerifyUseLists()); |
| (...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 924 Object::Handle(isolate->object_store()->sticky_error()); | 925 Object::Handle(isolate->object_store()->sticky_error()); |
| 925 isolate->object_store()->clear_sticky_error(); | 926 isolate->object_store()->clear_sticky_error(); |
| 926 isolate->set_long_jump_base(base); | 927 isolate->set_long_jump_base(base); |
| 927 return result.raw(); | 928 return result.raw(); |
| 928 } | 929 } |
| 929 UNREACHABLE(); | 930 UNREACHABLE(); |
| 930 return Object::null(); | 931 return Object::null(); |
| 931 } | 932 } |
| 932 | 933 |
| 933 } // namespace dart | 934 } // namespace dart |
| OLD | NEW |