| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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/flow_graph_inliner.h" | 5 #include "vm/flow_graph_inliner.h" |
| 6 | 6 |
| 7 #include "vm/block_scheduler.h" | 7 #include "vm/block_scheduler.h" |
| 8 #include "vm/compiler.h" | 8 #include "vm/compiler.h" |
| 9 #include "vm/flags.h" | 9 #include "vm/flags.h" |
| 10 #include "vm/flow_graph.h" | 10 #include "vm/flow_graph.h" |
| (...skipping 1635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1646 PolymorphicInstanceCallInstr* fallback_call = | 1646 PolymorphicInstanceCallInstr* fallback_call = |
| 1647 new PolymorphicInstanceCallInstr(call_->instance_call(), | 1647 new PolymorphicInstanceCallInstr(call_->instance_call(), |
| 1648 new_checks, | 1648 new_checks, |
| 1649 true); // With checks. | 1649 true); // With checks. |
| 1650 fallback_call->set_ssa_temp_index( | 1650 fallback_call->set_ssa_temp_index( |
| 1651 owner_->caller_graph()->alloc_ssa_temp_index()); | 1651 owner_->caller_graph()->alloc_ssa_temp_index()); |
| 1652 fallback_call->InheritDeoptTarget(isolate(), call_); | 1652 fallback_call->InheritDeoptTarget(isolate(), call_); |
| 1653 ReturnInstr* fallback_return = | 1653 ReturnInstr* fallback_return = |
| 1654 new ReturnInstr(call_->instance_call()->token_pos(), | 1654 new ReturnInstr(call_->instance_call()->token_pos(), |
| 1655 new Value(fallback_call)); | 1655 new Value(fallback_call)); |
| 1656 fallback_return->InheritDeoptTargetAfter(isolate(), call_); | 1656 fallback_return->InheritDeoptTargetAfter( |
| 1657 owner_->caller_graph(), |
| 1658 call_, |
| 1659 fallback_call); |
| 1657 AppendInstruction(AppendInstruction(cursor, fallback_call), | 1660 AppendInstruction(AppendInstruction(cursor, fallback_call), |
| 1658 fallback_return); | 1661 fallback_return); |
| 1659 exit_collector_->AddExit(fallback_return); | 1662 exit_collector_->AddExit(fallback_return); |
| 1660 cursor = NULL; | 1663 cursor = NULL; |
| 1661 } else { | 1664 } else { |
| 1662 // Remove push arguments of the call. | 1665 // Remove push arguments of the call. |
| 1663 for (intptr_t i = 0; i < call_->ArgumentCount(); ++i) { | 1666 for (intptr_t i = 0; i < call_->ArgumentCount(); ++i) { |
| 1664 PushArgumentInstr* push = call_->PushArgumentAt(i); | 1667 PushArgumentInstr* push = call_->PushArgumentAt(i); |
| 1665 push->ReplaceUsesWith(push->value()->definition()); | 1668 push->ReplaceUsesWith(push->value()->definition()); |
| 1666 push->RemoveFromGraph(); | 1669 push->RemoveFromGraph(); |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1782 OS::Print("After Inlining of %s\n", flow_graph_-> | 1785 OS::Print("After Inlining of %s\n", flow_graph_-> |
| 1783 parsed_function()->function().ToFullyQualifiedCString()); | 1786 parsed_function()->function().ToFullyQualifiedCString()); |
| 1784 FlowGraphPrinter printer(*flow_graph_); | 1787 FlowGraphPrinter printer(*flow_graph_); |
| 1785 printer.PrintBlocks(); | 1788 printer.PrintBlocks(); |
| 1786 } | 1789 } |
| 1787 } | 1790 } |
| 1788 } | 1791 } |
| 1789 } | 1792 } |
| 1790 | 1793 |
| 1791 } // namespace dart | 1794 } // namespace dart |
| OLD | NEW |