Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index f2c21ac4bd6dc157dec41203fa8de6aee7a1611b..9a4af5317e9a0b82aeddb19ca6b139b06cad7719 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -905,6 +905,9 @@ bool Object::IsNameDictionary() const { |
} |
+bool Object::IsGlobalDictionary() const { return IsDictionary(); } |
+ |
+ |
bool Object::IsSeededNumberDictionary() const { |
return IsDictionary(); |
} |
@@ -3383,6 +3386,7 @@ CAST_ACCESSOR(FixedDoubleArray) |
CAST_ACCESSOR(FixedTypedArrayBase) |
CAST_ACCESSOR(Foreign) |
CAST_ACCESSOR(GlobalObject) |
+CAST_ACCESSOR(GlobalDictionary) |
Jakob Kummerow
2015/06/01 14:33:29
nit: move before GlobalObject to maintain alpha-so
Igor Sheludko
2015/06/01 14:59:36
Done.
|
CAST_ACCESSOR(HandlerTable) |
CAST_ACCESSOR(HeapObject) |
CAST_ACCESSOR(JSArray) |
@@ -6731,10 +6735,20 @@ bool JSObject::HasIndexedInterceptor() { |
NameDictionary* JSObject::property_dictionary() { |
DCHECK(!HasFastProperties()); |
+ // TODO(ishell): Uncomment, once all property_dictionary() usages for global |
+ // objects are replaced with global_dictionary(). |
+ // DCHECK(!IsGlobalObject()); |
return NameDictionary::cast(properties()); |
} |
+GlobalDictionary* JSObject::global_dictionary() { |
+ DCHECK(!HasFastProperties()); |
+ DCHECK(IsGlobalObject()); |
+ return GlobalDictionary::cast(properties()); |
+} |
+ |
+ |
SeededNumberDictionary* JSObject::element_dictionary() { |
DCHECK(HasDictionaryElements()); |
return SeededNumberDictionary::cast(elements()); |