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; |
} |
} |