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

Unified Diff: runtime/vm/flow_graph_type_propagator.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_type_propagator.cc
===================================================================
--- runtime/vm/flow_graph_type_propagator.cc (revision 39070)
+++ runtime/vm/flow_graph_type_propagator.cc (working copy)
@@ -523,10 +523,10 @@
cid_ = kNullCid;
} else if (type_->HasResolvedTypeClass()) {
const Class& type_class = Class::Handle(type_->type_class());
- if (FLAG_use_cha || IsKnownPrivateClass(type_class)) {
+ if (FLAG_use_cha && IsKnownPrivateClass(type_class)) {
Florian Schneider 2014/08/12 11:37:10 This is the fix for bug #1.
Vyacheslav Egorov (Google) 2014/08/12 12:16:56 Something is not right here. I suggest we just kil
Florian Schneider 2014/08/13 10:34:40 Done. Also removed HasSubclassesSafe. There is onl
// A known private class cannot be subclassed or implemented.
if (!type_class.is_implemented() &&
- !CHA::HasSubclassesSafe(type_class.id())) {
+ !Isolate::Current()->cha()->HasSubclassesSafe(type_class.id())) {
cid_ = type_class.id();
} else {
cid_ = kDynamicCid;
@@ -743,7 +743,7 @@
intptr_t cid = kDynamicCid;
if (FLAG_use_cha && type.HasResolvedTypeClass()) {
const Class& type_class = Class::Handle(type.type_class());
- if (!CHA::HasSubclasses(type_class.id())) {
+ if (!Isolate::Current()->cha()->HasSubclasses(type_class.id())) {
cid = type_class.id();
}
}
@@ -788,15 +788,18 @@
return ZoneCompileType::Wrap(CompileType::Null());
}
- return ZoneCompileType::Wrap(CompileType::FromAbstractType(dst_type()));
+ return ZoneCompileType::Wrap(
+ CompileType::FromAbstractType(dst_type(), value_type->is_nullable()));
Florian Schneider 2014/08/12 11:37:10 This line and the change below add tracking of nul
}
bool AssertAssignableInstr::RecomputeType() {
CompileType* value_type = value()->Type();
- return UpdateType(value_type->IsMoreSpecificThan(dst_type())
- ? *value_type
- : CompileType::FromAbstractType(dst_type()));
+ return UpdateType(
+ value_type->IsMoreSpecificThan(dst_type())
+ ? *value_type
+ : CompileType::FromAbstractType(dst_type(),
+ value_type->is_nullable()));
}

Powered by Google App Engine
This is Rietveld 408576698