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

Unified Diff: src/objects.cc

Issue 1146913002: Change hash table capacity defaults. (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.h ('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 645ea57e344d2727209c68fa90b4a98843108d0e..96115da5082a87d808deae17ddc1f0cfabb78d6e 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -14882,11 +14882,9 @@ Handle<Derived> HashTable<Derived, Shape, Key>::EnsureCapacity(
bool should_pretenure = pretenure == TENURED ||
((capacity > kMinCapacityForPretenure) &&
!isolate->heap()->InNewSpace(*table));
- Handle<Derived> new_table = HashTable::New(
- isolate,
- nof * 2,
- USE_DEFAULT_MINIMUM_CAPACITY,
- should_pretenure ? TENURED : NOT_TENURED);
+ Handle<Derived> new_table =
+ HashTable::New(isolate, nof * 2, USE_COMPUTED_MINIMUM_CAPACITY,
+ should_pretenure ? TENURED : NOT_TENURED);
table->Rehash(new_table, key);
return new_table;
@@ -14914,11 +14912,9 @@ Handle<Derived> HashTable<Derived, Shape, Key>::Shrink(Handle<Derived> table,
bool pretenure =
(at_least_room_for > kMinCapacityForPretenure) &&
!isolate->heap()->InNewSpace(*table);
- Handle<Derived> new_table = HashTable::New(
- isolate,
- at_least_room_for,
- USE_DEFAULT_MINIMUM_CAPACITY,
- pretenure ? TENURED : NOT_TENURED);
+ Handle<Derived> new_table =
+ HashTable::New(isolate, at_least_room_for, USE_COMPUTED_MINIMUM_CAPACITY,
+ pretenure ? TENURED : NOT_TENURED);
table->Rehash(new_table, key);
return new_table;
@@ -15885,10 +15881,8 @@ Handle<Derived> Dictionary<Derived, Shape, Key>::New(
int at_least_space_for,
PretenureFlag pretenure) {
DCHECK(0 <= at_least_space_for);
- Handle<Derived> dict = DerivedHashTable::New(isolate,
- at_least_space_for,
- USE_DEFAULT_MINIMUM_CAPACITY,
- pretenure);
+ Handle<Derived> dict = DerivedHashTable::New(
+ isolate, at_least_space_for, USE_COMPUTED_MINIMUM_CAPACITY, pretenure);
// Initialize the next enumeration index.
dict->SetNextEnumerationIndex(PropertyDetails::kInitialIndex);
« no previous file with comments | « src/objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698