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 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
678 // Install bailout jump. | 678 // Install bailout jump. |
679 LongJumpScope jump; | 679 LongJumpScope jump; |
680 if (setjmp(*jump.Set()) == 0) { | 680 if (setjmp(*jump.Set()) == 0) { |
681 // Parse the callee function. | 681 // Parse the callee function. |
682 bool in_cache; | 682 bool in_cache; |
683 ParsedFunction* parsed_function; | 683 ParsedFunction* parsed_function; |
684 { | 684 { |
685 TimerScope timer(FLAG_compiler_stats, | 685 TimerScope timer(FLAG_compiler_stats, |
686 &CompilerStats::graphinliner_parse_timer, | 686 &CompilerStats::graphinliner_parse_timer, |
687 isolate()); | 687 isolate()); |
| 688 Compiler::EnsureUnoptimizedCode(Thread::Current(), function); |
688 parsed_function = GetParsedFunction(function, &in_cache); | 689 parsed_function = GetParsedFunction(function, &in_cache); |
689 } | 690 } |
690 | 691 |
691 // Load IC data for the callee. | 692 // Load IC data for the callee. |
692 ZoneGrowableArray<const ICData*>* ic_data_array = | 693 ZoneGrowableArray<const ICData*>* ic_data_array = |
693 new(Z) ZoneGrowableArray<const ICData*>(); | 694 new(Z) ZoneGrowableArray<const ICData*>(); |
694 function.RestoreICDataMap(ic_data_array); | 695 function.RestoreICDataMap(ic_data_array); |
695 | 696 |
696 // Build the callee graph. | 697 // Build the callee graph. |
697 InlineExitCollector* exit_collector = | 698 InlineExitCollector* exit_collector = |
(...skipping 1178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1876 intptr_t FlowGraphInliner::NextInlineId(const Function& function, | 1877 intptr_t FlowGraphInliner::NextInlineId(const Function& function, |
1877 intptr_t parent_id) { | 1878 intptr_t parent_id) { |
1878 const intptr_t id = inline_id_to_function_->length(); | 1879 const intptr_t id = inline_id_to_function_->length(); |
1879 inline_id_to_function_->Add(&function); | 1880 inline_id_to_function_->Add(&function); |
1880 caller_inline_id_->Add(parent_id); | 1881 caller_inline_id_->Add(parent_id); |
1881 return id; | 1882 return id; |
1882 } | 1883 } |
1883 | 1884 |
1884 | 1885 |
1885 } // namespace dart | 1886 } // namespace dart |
OLD | NEW |