| 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 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 699 bool in_cache; | 699 bool in_cache; |
| 700 ParsedFunction* parsed_function; | 700 ParsedFunction* parsed_function; |
| 701 { | 701 { |
| 702 CSTAT_TIMER_SCOPE(thread(), graphinliner_parse_timer); | 702 CSTAT_TIMER_SCOPE(thread(), graphinliner_parse_timer); |
| 703 parsed_function = GetParsedFunction(function, &in_cache); | 703 parsed_function = GetParsedFunction(function, &in_cache); |
| 704 } | 704 } |
| 705 | 705 |
| 706 // Load IC data for the callee. | 706 // Load IC data for the callee. |
| 707 ZoneGrowableArray<const ICData*>* ic_data_array = | 707 ZoneGrowableArray<const ICData*>* ic_data_array = |
| 708 new(Z) ZoneGrowableArray<const ICData*>(); | 708 new(Z) ZoneGrowableArray<const ICData*>(); |
| 709 const bool clone_descriptors = Compiler::IsBackgroundCompilation(); | 709 const bool clone_ic_data = Compiler::IsBackgroundCompilation(); |
| 710 function.RestoreICDataMap(ic_data_array, clone_descriptors); | 710 function.RestoreICDataMap(ic_data_array, clone_ic_data); |
| 711 if (Compiler::IsBackgroundCompilation() && | 711 if (Compiler::IsBackgroundCompilation() && |
| 712 (function.ic_data_array() == Array::null())) { | 712 (function.ic_data_array() == Array::null())) { |
| 713 Compiler::AbortBackgroundCompilation(Thread::kNoDeoptId); | 713 Compiler::AbortBackgroundCompilation(Thread::kNoDeoptId); |
| 714 } | 714 } |
| 715 | 715 |
| 716 // Build the callee graph. | 716 // Build the callee graph. |
| 717 InlineExitCollector* exit_collector = | 717 InlineExitCollector* exit_collector = |
| 718 new(Z) InlineExitCollector(caller_graph_, call); | 718 new(Z) InlineExitCollector(caller_graph_, call); |
| 719 FlowGraphBuilder builder(*parsed_function, | 719 FlowGraphBuilder builder(*parsed_function, |
| 720 *ic_data_array, | 720 *ic_data_array, |
| (...skipping 2327 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 |