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

Unified Diff: runtime/vm/flow_graph_optimizer.cc

Issue 463103002: Fix bug with CHA dependencies by recording a set of classes for registering code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: address remaining comments Created 6 years, 4 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/flow_graph_optimizer.h ('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_optimizer.cc
===================================================================
--- runtime/vm/flow_graph_optimizer.cc (revision 39070)
+++ runtime/vm/flow_graph_optimizer.cc (working copy)
@@ -2275,8 +2275,8 @@
if (function.IsDynamicFunction() &&
callee_receiver->IsParameter() &&
(callee_receiver->AsParameter()->index() == 0)) {
- return CHA::HasOverride(Class::Handle(I, function.Owner()),
- call->function_name());
+ return isolate()->cha()->HasOverride(Class::Handle(I, function.Owner()),
+ call->function_name());
}
return true;
}
@@ -2293,7 +2293,8 @@
(callee_receiver->AsParameter()->index() == 0)) {
const String& field_name =
String::Handle(I, Field::NameFromGetter(call->function_name()));
- return CHA::HasOverride(Class::Handle(I, function.Owner()), field_name);
+ return isolate()->cha()->HasOverride(
+ Class::Handle(I, function.Owner()), field_name);
}
return true;
}
@@ -3893,7 +3894,7 @@
// Returns true if checking against this type is a direct class id comparison.
-static bool TypeCheckAsClassEquality(const AbstractType& type) {
+bool FlowGraphOptimizer::TypeCheckAsClassEquality(const AbstractType& type) {
ASSERT(type.IsFinalized() && !type.IsMalformedOrMalbounded());
// Requires CHA.
if (!FLAG_use_cha) return false;
@@ -3902,9 +3903,9 @@
// Signature classes have different type checking rules.
if (type_class.IsSignatureClass()) return false;
// Could be an interface check?
- if (type_class.is_implemented()) return false;
- const intptr_t type_cid = type_class.id();
- if (CHA::HasSubclasses(type_cid)) return false;
+ if (isolate()->cha()->IsImplemented(type_class)) return false;
+ // Check if there are subclasses.
+ if (isolate()->cha()->HasSubclasses(type_class)) return false;
const intptr_t num_type_args = type_class.NumTypeArguments();
if (num_type_args > 0) {
// Only raw types can be directly compared, thus disregarding type
« no previous file with comments | « runtime/vm/flow_graph_optimizer.h ('k') | runtime/vm/flow_graph_type_propagator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698