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

Unified Diff: src/objects-debug.cc

Issue 1165603002: Starting using GlobalDictionary for global objects instead of NameDictionary. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-debug.cc
diff --git a/src/objects-debug.cc b/src/objects-debug.cc
index d9931574632dbef36df568bdce2cfdfe4ccb5e37..e78238d55fd4d74f1f1533e1bf9430e5845c5aa6 100644
--- a/src/objects-debug.cc
+++ b/src/objects-debug.cc
@@ -1064,6 +1064,11 @@ void JSObject::IncrementSpillStatistics(SpillInformation* info) {
info->number_of_objects_with_fast_properties_++;
info->number_of_fast_used_fields_ += map()->NextFreePropertyIndex();
info->number_of_fast_unused_fields_ += map()->unused_property_fields();
+ } else if (IsGlobalObject()) {
+ GlobalDictionary* dict = global_dictionary();
+ info->number_of_slow_used_properties_ += dict->NumberOfElements();
+ info->number_of_slow_unused_properties_ +=
+ dict->Capacity() - dict->NumberOfElements();
} else {
NameDictionary* dict = property_dictionary();
info->number_of_slow_used_properties_ += dict->NumberOfElements();
« no previous file with comments | « src/objects.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698