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

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: 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
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,18 +3894,18 @@
// 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;
if (!type.IsInstantiated()) return false;
- const Class& type_class = Class::Handle(type.type_class());
+ const Class& type_class = Class::ZoneHandle(type.type_class());
Vyacheslav Egorov (Google) 2014/08/12 12:16:56 Why ZoneHandle?
Florian Schneider 2014/08/13 10:34:40 Done.
// 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()->HasSubclasses(type_cid)) 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

Powered by Google App Engine
This is Rietveld 408576698