| 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 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 650 (flow_graph->graph_entry()->SuccessorCount() == 1)) { | 650 (flow_graph->graph_entry()->SuccessorCount() == 1)) { |
| 651 // TODO(fschneider): Support allocation sinking with try-catch. | 651 // TODO(fschneider): Support allocation sinking with try-catch. |
| 652 sinking = new AllocationSinking(flow_graph); | 652 sinking = new AllocationSinking(flow_graph); |
| 653 sinking->Optimize(); | 653 sinking->Optimize(); |
| 654 } | 654 } |
| 655 DEBUG_ASSERT(flow_graph->VerifyUseLists()); | 655 DEBUG_ASSERT(flow_graph->VerifyUseLists()); |
| 656 | 656 |
| 657 DeadCodeElimination::EliminateDeadPhis(flow_graph); | 657 DeadCodeElimination::EliminateDeadPhis(flow_graph); |
| 658 DEBUG_ASSERT(flow_graph->VerifyUseLists()); | 658 DEBUG_ASSERT(flow_graph->VerifyUseLists()); |
| 659 | 659 |
| 660 FlowGraphTypePropagator::Propagate(flow_graph); |
| 661 DEBUG_ASSERT(flow_graph->VerifyUseLists()); |
| 662 |
| 660 // Ensure that all phis inserted by optimization passes have consistent | 663 // Ensure that all phis inserted by optimization passes have consistent |
| 661 // representations. | 664 // representations. |
| 662 optimizer.SelectRepresentations(); | 665 optimizer.SelectRepresentations(); |
| 663 | 666 |
| 664 if (optimizer.Canonicalize()) { | 667 if (optimizer.Canonicalize()) { |
| 665 // To fully remove redundant boxing (e.g. BoxDouble used only in | 668 // To fully remove redundant boxing (e.g. BoxDouble used only in |
| 666 // environments and UnboxDouble instructions) instruction we | 669 // environments and UnboxDouble instructions) instruction we |
| 667 // first need to replace all their uses and then fold them away. | 670 // first need to replace all their uses and then fold them away. |
| 668 // For now we just repeat Canonicalize twice to do that. | 671 // For now we just repeat Canonicalize twice to do that. |
| 669 // TODO(vegorov): implement a separate representation folding pass. | 672 // TODO(vegorov): implement a separate representation folding pass. |
| (...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1222 const Object& result = | 1225 const Object& result = |
| 1223 PassiveObject::Handle(isolate->object_store()->sticky_error()); | 1226 PassiveObject::Handle(isolate->object_store()->sticky_error()); |
| 1224 isolate->object_store()->clear_sticky_error(); | 1227 isolate->object_store()->clear_sticky_error(); |
| 1225 return result.raw(); | 1228 return result.raw(); |
| 1226 } | 1229 } |
| 1227 UNREACHABLE(); | 1230 UNREACHABLE(); |
| 1228 return Object::null(); | 1231 return Object::null(); |
| 1229 } | 1232 } |
| 1230 | 1233 |
| 1231 } // namespace dart | 1234 } // namespace dart |
| OLD | NEW |