Chromium Code Reviews| Index: runtime/vm/object.cc |
| diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc |
| index 34fccc0da35f0e2f171071406b9559af35f44eef..420adcbe459c13b4881e0ff027b050864b7b3468 100644 |
| --- a/runtime/vm/object.cc |
| +++ b/runtime/vm/object.cc |
| @@ -417,7 +417,6 @@ void Object::InitOnce() { |
| // Allocate and initialize the null class. |
| cls = Class::New<Instance>(kNullCid); |
| - cls.set_is_prefinalized(); |
| isolate->object_store()->set_null_class(cls); |
|
regis
2013/08/15 17:27:26
Shouldn't this be done in Object::InitFromSnapshot
rmacnak
2013/08/15 17:56:04
object_class is also created in both Init(Isolate*
|
| // Allocate and initialize the free list element class. |
| @@ -854,11 +853,9 @@ 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); |
| - object_store->set_null_class(cls); |
| cls.set_is_prefinalized(); |
| + object_store->set_null_class(cls); |
| RegisterClass(cls, Symbols::Null(), core_lib); |
| pending_classes.Add(cls, Heap::kOld); |
|
regis
2013/08/15 17:27:26
Shouldn't this paragraph be moved to after the com
rmacnak
2013/08/15 17:56:04
Moved null and bool down.
|
| @@ -10468,13 +10465,13 @@ RawString* AbstractType::ClassName() const { |
| bool AbstractType::IsNullType() const { |
| return HasResolvedTypeClass() && |
| - (type_class() == Type::Handle(Type::NullType()).type_class()); |
| + (type_class() == Isolate::Current()->object_store()->null_class()); |
| } |
| bool AbstractType::IsBoolType() const { |
| return HasResolvedTypeClass() && |
| - (type_class() == Type::Handle(Type::BoolType()).type_class()); |
| + (type_class() == Isolate::Current()->object_store()->bool_class()); |
| } |