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

Unified Diff: src/objects-inl.h

Issue 1163673003: Introducing GlobalDictionary, a backing store for global objects. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressing comments Created 5 years, 7 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
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index f2c21ac4bd6dc157dec41203fa8de6aee7a1611b..2f55d71e725c3f63f0630e2a89c2381cef858f19 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();
}
@@ -3382,6 +3385,7 @@ CAST_ACCESSOR(FixedArrayBase)
CAST_ACCESSOR(FixedDoubleArray)
CAST_ACCESSOR(FixedTypedArrayBase)
CAST_ACCESSOR(Foreign)
+CAST_ACCESSOR(GlobalDictionary)
CAST_ACCESSOR(GlobalObject)
CAST_ACCESSOR(HandlerTable)
CAST_ACCESSOR(HeapObject)
@@ -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());
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698