Chromium Code Reviews| Index: runtime/vm/object.cc |
| diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc |
| index 770559879a4ecfe123d18cb807db308b7ee06ade..34f66c2f9e0b547b8367e94adae80abfcb2ac3e5 100644 |
| --- a/runtime/vm/object.cc |
| +++ b/runtime/vm/object.cc |
| @@ -418,7 +418,6 @@ void Object::InitOnce() { |
| // Allocate and initialize the null class. |
| cls = Class::New<Instance>(kNullCid); |
| cls.set_is_finalized(); |
| - cls.set_is_type_finalized(); |
| isolate->object_store()->set_null_class(cls); |
| // Allocate and initialize the free list element class. |
| @@ -855,21 +854,11 @@ RawError* Object::Init(Isolate* isolate) { |
| RegisterClass(cls, Symbols::Bool(), core_lib); |
| pending_classes.Add(cls, Heap::kOld); |
| - // TODO(12364): The class 'Null' is not registered in the class dictionary |
| - // because it is not exported by dart:core. |
| cls = Class::New<Instance>(kNullCid); |
| - cls.set_name(Symbols::Null()); |
| - // We immediately mark Null as finalized because it has no corresponding |
| - // source. |
| - cls.set_is_finalized(); |
| - cls.set_is_type_finalized(); |
| + cls.set_is_prefinalized(); |
| object_store->set_null_class(cls); |
| - cls.set_library(core_lib); // A sort of fiction for the mirrors. |
| - // When/if we promote Null to an ordinary class, it should be added to the |
| - // core library, given source and added to the list of classes pending |
| - // finalization. |
| - // RegisterClass(cls, Symbols::Null(), core_lib); |
| - // pending_classes.Add(cls, Heap::kOld); |
| + RegisterClass(cls, Symbols::Null(), core_lib); |
| + pending_classes.Add(cls, Heap::kOld); |
| cls = object_store->array_class(); // Was allocated above. |
| RegisterPrivateClass(cls, Symbols::ObjectArray(), core_lib); |
| @@ -10475,8 +10464,8 @@ RawString* AbstractType::ClassName() const { |
| bool AbstractType::IsNullType() const { |
| - ASSERT(Type::Handle(Type::NullType()).IsCanonical()); |
| - return raw() == Type::NullType(); |
| + return HasResolvedTypeClass() && |
| + (type_class() == Type::Handle(Type::NullType()).type_class()); |
|
siva
2013/08/14 18:53:31
why not
return HasResolvedTypeClass() && (type_cla
rmacnak
2013/08/14 22:31:34
Done.
|
| } |