Chromium Code Reviews| 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())); |
| } |