| 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 1674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1685 // Move push arguments of the call. | 1685 // Move push arguments of the call. |
| 1686 for (intptr_t i = 0; i < call_->ArgumentCount(); ++i) { | 1686 for (intptr_t i = 0; i < call_->ArgumentCount(); ++i) { |
| 1687 PushArgumentInstr* push = call_->PushArgumentAt(i); | 1687 PushArgumentInstr* push = call_->PushArgumentAt(i); |
| 1688 push->ReplaceUsesWith(push->value()->definition()); | 1688 push->ReplaceUsesWith(push->value()->definition()); |
| 1689 push->previous()->LinkTo(push->next()); | 1689 push->previous()->LinkTo(push->next()); |
| 1690 cursor->LinkTo(push); | 1690 cursor->LinkTo(push); |
| 1691 cursor = push; | 1691 cursor = push; |
| 1692 } | 1692 } |
| 1693 const ICData& old_checks = call_->ic_data(); | 1693 const ICData& old_checks = call_->ic_data(); |
| 1694 const ICData& new_checks = ICData::ZoneHandle( | 1694 const ICData& new_checks = ICData::ZoneHandle( |
| 1695 ICData::New(Function::Handle(old_checks.owner()), | 1695 ICData::New(Function::Handle(old_checks.Owner()), |
| 1696 String::Handle(old_checks.target_name()), | 1696 String::Handle(old_checks.target_name()), |
| 1697 Array::Handle(old_checks.arguments_descriptor()), | 1697 Array::Handle(old_checks.arguments_descriptor()), |
| 1698 old_checks.deopt_id(), | 1698 old_checks.deopt_id(), |
| 1699 1)); // Number of args tested. | 1699 1)); // Number of args tested. |
| 1700 for (intptr_t i = 0; i < non_inlined_variants_.length(); ++i) { | 1700 for (intptr_t i = 0; i < non_inlined_variants_.length(); ++i) { |
| 1701 new_checks.AddReceiverCheck(non_inlined_variants_[i].cid, | 1701 new_checks.AddReceiverCheck(non_inlined_variants_[i].cid, |
| 1702 *non_inlined_variants_[i].target, | 1702 *non_inlined_variants_[i].target, |
| 1703 non_inlined_variants_[i].count); | 1703 non_inlined_variants_[i].count); |
| 1704 } | 1704 } |
| 1705 PolymorphicInstanceCallInstr* fallback_call = | 1705 PolymorphicInstanceCallInstr* fallback_call = |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1912 intptr_t FlowGraphInliner::NextInlineId(const Function& function, | 1912 intptr_t FlowGraphInliner::NextInlineId(const Function& function, |
| 1913 intptr_t parent_id) { | 1913 intptr_t parent_id) { |
| 1914 const intptr_t id = inline_id_to_function_->length(); | 1914 const intptr_t id = inline_id_to_function_->length(); |
| 1915 inline_id_to_function_->Add(&function); | 1915 inline_id_to_function_->Add(&function); |
| 1916 caller_inline_id_->Add(parent_id); | 1916 caller_inline_id_->Add(parent_id); |
| 1917 return id; | 1917 return id; |
| 1918 } | 1918 } |
| 1919 | 1919 |
| 1920 | 1920 |
| 1921 } // namespace dart | 1921 } // namespace dart |
| OLD | NEW |