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 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
693 bool in_cache; | 693 bool in_cache; |
694 ParsedFunction* parsed_function; | 694 ParsedFunction* parsed_function; |
695 { | 695 { |
696 CSTAT_TIMER_SCOPE(thread(), graphinliner_parse_timer); | 696 CSTAT_TIMER_SCOPE(thread(), graphinliner_parse_timer); |
697 parsed_function = GetParsedFunction(function, &in_cache); | 697 parsed_function = GetParsedFunction(function, &in_cache); |
698 } | 698 } |
699 | 699 |
700 // Load IC data for the callee. | 700 // Load IC data for the callee. |
701 ZoneGrowableArray<const ICData*>* ic_data_array = | 701 ZoneGrowableArray<const ICData*>* ic_data_array = |
702 new(Z) ZoneGrowableArray<const ICData*>(); | 702 new(Z) ZoneGrowableArray<const ICData*>(); |
703 function.RestoreICDataMap(ic_data_array); | 703 const bool clone_descriptors = Compiler::IsBackgroundCompilation(); |
| 704 function.RestoreICDataMap(ic_data_array, clone_descriptors); |
704 | 705 |
705 // Build the callee graph. | 706 // Build the callee graph. |
706 InlineExitCollector* exit_collector = | 707 InlineExitCollector* exit_collector = |
707 new(Z) InlineExitCollector(caller_graph_, call); | 708 new(Z) InlineExitCollector(caller_graph_, call); |
708 FlowGraphBuilder builder(*parsed_function, | 709 FlowGraphBuilder builder(*parsed_function, |
709 *ic_data_array, | 710 *ic_data_array, |
710 exit_collector, | 711 exit_collector, |
711 Compiler::kNoOSRDeoptId); | 712 Compiler::kNoOSRDeoptId); |
712 builder.SetInitialBlockId(caller_graph_->max_block_id()); | 713 builder.SetInitialBlockId(caller_graph_->max_block_id()); |
713 FlowGraph* callee_graph; | 714 FlowGraph* callee_graph; |
(...skipping 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1893 intptr_t FlowGraphInliner::NextInlineId(const Function& function, | 1894 intptr_t FlowGraphInliner::NextInlineId(const Function& function, |
1894 intptr_t parent_id) { | 1895 intptr_t parent_id) { |
1895 const intptr_t id = inline_id_to_function_->length(); | 1896 const intptr_t id = inline_id_to_function_->length(); |
1896 inline_id_to_function_->Add(&function); | 1897 inline_id_to_function_->Add(&function); |
1897 caller_inline_id_->Add(parent_id); | 1898 caller_inline_id_->Add(parent_id); |
1898 return id; | 1899 return id; |
1899 } | 1900 } |
1900 | 1901 |
1901 | 1902 |
1902 } // namespace dart | 1903 } // namespace dart |
OLD | NEW |