| 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/branch_optimizer.h" | 8 #include "vm/branch_optimizer.h" |
| 9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
| 10 #include "vm/flags.h" | 10 #include "vm/flags.h" |
| (...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 874 inlined_recursive_call_ = true; | 874 inlined_recursive_call_ = true; |
| 875 } | 875 } |
| 876 thread()->set_deopt_id(prev_deopt_id); | 876 thread()->set_deopt_id(prev_deopt_id); |
| 877 | 877 |
| 878 call_data->callee_graph = callee_graph; | 878 call_data->callee_graph = callee_graph; |
| 879 call_data->parameter_stubs = param_stubs; | 879 call_data->parameter_stubs = param_stubs; |
| 880 call_data->exit_collector = exit_collector; | 880 call_data->exit_collector = exit_collector; |
| 881 | 881 |
| 882 // When inlined, we add the guarded fields of the callee to the caller's | 882 // When inlined, we add the guarded fields of the callee to the caller's |
| 883 // list of guarded fields. | 883 // list of guarded fields. |
| 884 for (intptr_t i = 0; | 884 const ZoneGrowableArray<const Field*>& callee_guarded_fields = |
| 885 i < callee_graph->guarded_fields()->length(); | 885 *callee_graph->parsed_function().guarded_fields(); |
| 886 ++i) { | 886 for (intptr_t i = 0; i < callee_guarded_fields.length(); ++i) { |
| 887 FlowGraph::AddToGuardedFields(caller_graph_->guarded_fields(), | 887 caller_graph()-> |
| 888 (*callee_graph->guarded_fields())[i]); | 888 parsed_function().AddToGuardedFields(callee_guarded_fields[i]); |
| 889 } | 889 } |
| 890 // When inlined, we add the deferred prefixes of the callee to the | 890 // When inlined, we add the deferred prefixes of the callee to the |
| 891 // caller's list of deferred prefixes. | 891 // caller's list of deferred prefixes. |
| 892 caller_graph()->AddToDeferredPrefixes( | 892 caller_graph()->AddToDeferredPrefixes( |
| 893 callee_graph->deferred_prefixes()); | 893 callee_graph->deferred_prefixes()); |
| 894 | 894 |
| 895 FlowGraphInliner::SetInliningId(callee_graph, | 895 FlowGraphInliner::SetInliningId(callee_graph, |
| 896 inliner_->NextInlineId(callee_graph->function(), | 896 inliner_->NextInlineId(callee_graph->function(), |
| 897 call_data->caller_inlining_id_)); | 897 call_data->caller_inlining_id_)); |
| 898 TRACE_INLINING(THR_Print(" Success\n")); | 898 TRACE_INLINING(THR_Print(" Success\n")); |
| (...skipping 2149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3048 return InlineDoubleOp(flow_graph, Token::kMUL, call, entry, last); | 3048 return InlineDoubleOp(flow_graph, Token::kMUL, call, entry, last); |
| 3049 case MethodRecognizer::kDoubleDiv: | 3049 case MethodRecognizer::kDoubleDiv: |
| 3050 return InlineDoubleOp(flow_graph, Token::kDIV, call, entry, last); | 3050 return InlineDoubleOp(flow_graph, Token::kDIV, call, entry, last); |
| 3051 default: | 3051 default: |
| 3052 return false; | 3052 return false; |
| 3053 } | 3053 } |
| 3054 } | 3054 } |
| 3055 | 3055 |
| 3056 | 3056 |
| 3057 } // namespace dart | 3057 } // namespace dart |
| OLD | NEW |