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

Unified Diff: runtime/vm/flow_graph.cc

Issue 2002583002: Background compiler should validate CHA decisions before committing the code. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: address comments Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/flow_graph_type_propagator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph.cc
diff --git a/runtime/vm/flow_graph.cc b/runtime/vm/flow_graph.cc
index bac0c4b7af4972c6766d47a05f55f97f5414da27..0c8dbc0a996a6087c29cc3ada5a5773a7450e430 100644
--- a/runtime/vm/flow_graph.cc
+++ b/runtime/vm/flow_graph.cc
@@ -444,13 +444,14 @@ bool FlowGraph::InstanceCallNeedsClassCheck(InstanceCallInstr* call,
? String::Handle(zone(), Field::NameFromGetter(call->function_name()))
: call->function_name();
const Class& cls = Class::Handle(zone(), function().Owner());
- if (!thread()->cha()->HasOverride(cls, name)) {
+ intptr_t subclass_count = 0;
+ if (!thread()->cha()->HasOverride(cls, name, &subclass_count)) {
if (FLAG_trace_cha) {
THR_Print(" **(CHA) Instance call needs no check, "
"no overrides of '%s' '%s'\n",
name.ToCString(), cls.ToCString());
}
- thread()->cha()->AddToLeafClasses(cls);
+ thread()->cha()->AddToGuardedClasses(cls, subclass_count);
return false;
}
}
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/flow_graph_type_propagator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698