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 #if !defined(DART_PRECOMPILED_RUNTIME) | 4 #if !defined(DART_PRECOMPILED_RUNTIME) |
5 #include "vm/flow_graph_inliner.h" | 5 #include "vm/flow_graph_inliner.h" |
6 | 6 |
7 #include "vm/aot_optimizer.h" | 7 #include "vm/aot_optimizer.h" |
8 #include "vm/precompiler.h" | 8 #include "vm/precompiler.h" |
9 #include "vm/block_scheduler.h" | 9 #include "vm/block_scheduler.h" |
10 #include "vm/branch_optimizer.h" | 10 #include "vm/branch_optimizer.h" |
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
773 Compiler::AbortBackgroundCompilation(Thread::kNoDeoptId, | 773 Compiler::AbortBackgroundCompilation(Thread::kNoDeoptId, |
774 "ICData cleared while inlining"); | 774 "ICData cleared while inlining"); |
775 } | 775 } |
776 | 776 |
777 // Parse the callee function. | 777 // Parse the callee function. |
778 bool in_cache; | 778 bool in_cache; |
779 ParsedFunction* parsed_function; | 779 ParsedFunction* parsed_function; |
780 { | 780 { |
781 CSTAT_TIMER_SCOPE(thread(), graphinliner_parse_timer); | 781 CSTAT_TIMER_SCOPE(thread(), graphinliner_parse_timer); |
782 parsed_function = GetParsedFunction(function, &in_cache); | 782 parsed_function = GetParsedFunction(function, &in_cache); |
783 if (!function.CanBeInlined()) { | |
784 // As a side effect of parsing the function, it may be marked | |
Kevin Millikin (Google)
2017/02/24 14:32:28
We already know whether the function is async or a
| |
785 // as not inlinable. This happens for async and async* functions | |
786 // when causal stack traces are being tracked. | |
787 return false; | |
788 } | |
783 } | 789 } |
784 | 790 |
791 | |
785 // Build the callee graph. | 792 // Build the callee graph. |
786 InlineExitCollector* exit_collector = | 793 InlineExitCollector* exit_collector = |
787 new (Z) InlineExitCollector(caller_graph_, call); | 794 new (Z) InlineExitCollector(caller_graph_, call); |
788 FlowGraph* callee_graph; | 795 FlowGraph* callee_graph; |
789 if (UseKernelFrontEndFor(parsed_function)) { | 796 if (UseKernelFrontEndFor(parsed_function)) { |
790 kernel::TreeNode* node = static_cast<kernel::TreeNode*>( | 797 kernel::TreeNode* node = static_cast<kernel::TreeNode*>( |
791 parsed_function->function().kernel_function()); | 798 parsed_function->function().kernel_function()); |
792 | 799 |
793 kernel::FlowGraphBuilder builder( | 800 kernel::FlowGraphBuilder builder( |
794 node, parsed_function, *ic_data_array, exit_collector, | 801 node, parsed_function, *ic_data_array, exit_collector, |
(...skipping 2836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3631 } | 3638 } |
3632 | 3639 |
3633 default: | 3640 default: |
3634 return false; | 3641 return false; |
3635 } | 3642 } |
3636 } | 3643 } |
3637 | 3644 |
3638 | 3645 |
3639 } // namespace dart | 3646 } // namespace dart |
3640 #endif // !defined(DART_PRECOMPILED_RUNTIME) | 3647 #endif // !defined(DART_PRECOMPILED_RUNTIME) |
OLD | NEW |