Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(308)

Side by Side Diff: runtime/vm/flow_graph_inliner.cc

Issue 1343383003: VM: Store edge counters in one per-function array. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 const intptr_t prev_deopt_id = isolate()->deopt_id(); 680 const intptr_t prev_deopt_id = isolate()->deopt_id();
681 isolate()->set_deopt_id(0); 681 isolate()->set_deopt_id(0);
682 // Install bailout jump. 682 // Install bailout jump.
683 LongJumpScope jump; 683 LongJumpScope jump;
684 if (setjmp(*jump.Set()) == 0) { 684 if (setjmp(*jump.Set()) == 0) {
685 // Parse the callee function. 685 // Parse the callee function.
686 bool in_cache; 686 bool in_cache;
687 ParsedFunction* parsed_function; 687 ParsedFunction* parsed_function;
688 { 688 {
689 CSTAT_TIMER_SCOPE(thread(), graphinliner_parse_timer); 689 CSTAT_TIMER_SCOPE(thread(), graphinliner_parse_timer);
690 if (!Compiler::always_optimize()) {
691 const Error& error = Error::Handle(Z,
692 Compiler::EnsureUnoptimizedCode(Thread::Current(), function));
693 if (!error.IsNull()) {
694 Exceptions::PropagateError(error);
695 }
696 }
697 parsed_function = GetParsedFunction(function, &in_cache); 690 parsed_function = GetParsedFunction(function, &in_cache);
698 } 691 }
699 692
700 // Load IC data for the callee. 693 // Load IC data for the callee.
701 ZoneGrowableArray<const ICData*>* ic_data_array = 694 ZoneGrowableArray<const ICData*>* ic_data_array =
702 new(Z) ZoneGrowableArray<const ICData*>(); 695 new(Z) ZoneGrowableArray<const ICData*>();
703 function.RestoreICDataMap(ic_data_array); 696 function.RestoreICDataMap(ic_data_array);
704 697
705 // Build the callee graph. 698 // Build the callee graph.
706 InlineExitCollector* exit_collector = 699 InlineExitCollector* exit_collector =
(...skipping 1184 matching lines...) Expand 10 before | Expand all | Expand 10 after
1891 intptr_t FlowGraphInliner::NextInlineId(const Function& function, 1884 intptr_t FlowGraphInliner::NextInlineId(const Function& function,
1892 intptr_t parent_id) { 1885 intptr_t parent_id) {
1893 const intptr_t id = inline_id_to_function_->length(); 1886 const intptr_t id = inline_id_to_function_->length();
1894 inline_id_to_function_->Add(&function); 1887 inline_id_to_function_->Add(&function);
1895 caller_inline_id_->Add(parent_id); 1888 caller_inline_id_->Add(parent_id);
1896 return id; 1889 return id;
1897 } 1890 }
1898 1891
1899 1892
1900 } // namespace dart 1893 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698