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

Unified Diff: src/objects.cc

Issue 1472293002: Make sure that NormalizeElements and ShouldConvertToFastElements are based on the same values (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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/elements.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 42a1c7e317863d57cf3f406e3ad099ec44793053..7905f39c17c2d52a049231d4b3b87417c276d5a0 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -14646,6 +14646,8 @@ static bool ShouldConvertToFastElements(JSObject* object,
uint32_t dictionary_size = static_cast<uint32_t>(dictionary->Capacity()) *
SeededNumberDictionary::kEntrySize;
+
+ // Turn fast if the dictionary only saves 50% space.
return 2 * dictionary_size >= *new_capacity;
}
« no previous file with comments | « src/elements.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698