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

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

Issue 1672873003: Bailout if field state changed during background compilation. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: a Created 4 years, 10 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
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/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 689 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 { 700 {
701 CSTAT_TIMER_SCOPE(thread(), graphinliner_parse_timer); 701 CSTAT_TIMER_SCOPE(thread(), graphinliner_parse_timer);
702 parsed_function = GetParsedFunction(function, &in_cache); 702 parsed_function = GetParsedFunction(function, &in_cache);
703 } 703 }
704 704
705 // Load IC data for the callee. 705 // Load IC data for the callee.
706 ZoneGrowableArray<const ICData*>* ic_data_array = 706 ZoneGrowableArray<const ICData*>* ic_data_array =
707 new(Z) ZoneGrowableArray<const ICData*>(); 707 new(Z) ZoneGrowableArray<const ICData*>();
708 const bool clone_descriptors = Compiler::IsBackgroundCompilation(); 708 const bool clone_descriptors = Compiler::IsBackgroundCompilation();
709 function.RestoreICDataMap(ic_data_array, clone_descriptors); 709 function.RestoreICDataMap(ic_data_array, clone_descriptors);
710 if (Compiler::IsBackgroundCompilation() &&
711 (function.ic_data_array() == Array::null())) {
712 Compiler::AbortBackgroundCompilation(Thread::kNoDeoptId);
713 }
710 714
711 // Build the callee graph. 715 // Build the callee graph.
712 InlineExitCollector* exit_collector = 716 InlineExitCollector* exit_collector =
713 new(Z) InlineExitCollector(caller_graph_, call); 717 new(Z) InlineExitCollector(caller_graph_, call);
714 FlowGraphBuilder builder(*parsed_function, 718 FlowGraphBuilder builder(*parsed_function,
715 *ic_data_array, 719 *ic_data_array,
716 exit_collector, 720 exit_collector,
717 Compiler::kNoOSRDeoptId); 721 Compiler::kNoOSRDeoptId);
718 builder.SetInitialBlockId(caller_graph_->max_block_id()); 722 builder.SetInitialBlockId(caller_graph_->max_block_id());
719 FlowGraph* callee_graph; 723 FlowGraph* callee_graph;
(...skipping 1216 matching lines...) Expand 10 before | Expand all | Expand 10 after
1936 intptr_t FlowGraphInliner::NextInlineId(const Function& function, 1940 intptr_t FlowGraphInliner::NextInlineId(const Function& function,
1937 intptr_t parent_id) { 1941 intptr_t parent_id) {
1938 const intptr_t id = inline_id_to_function_->length(); 1942 const intptr_t id = inline_id_to_function_->length();
1939 inline_id_to_function_->Add(&function); 1943 inline_id_to_function_->Add(&function);
1940 caller_inline_id_->Add(parent_id); 1944 caller_inline_id_->Add(parent_id);
1941 return id; 1945 return id;
1942 } 1946 }
1943 1947
1944 1948
1945 } // namespace dart 1949 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698