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

Unified Diff: src/objects.h

Issue 250893002: Revert "HashTable::EnsureCapacity() handlified." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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 | « no previous file | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 3fd8d7b15a7e483c294b39a62512c59574518eb9..d926165c3e06e358ff595567f5ba58a175286743 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -3736,7 +3736,7 @@ class HashTable: public FixedArray {
PretenureFlag pretenure = NOT_TENURED);
// Returns a new HashTable object.
- MUST_USE_RESULT static Handle<Derived> New(
+ static Handle<Derived> New(
Isolate* isolate,
int at_least_space_for,
MinimumCapacity capacity_option = USE_DEFAULT_MINIMUM_CAPACITY,
@@ -3843,17 +3843,6 @@ class HashTable: public FixedArray {
return (last + number) & (size - 1);
}
- // Attempt to shrink hash table after removal of key.
- static Handle<Derived> Shrink(Handle<Derived> table, Key key);
-
- // Ensure enough space for n additional elements.
- MUST_USE_RESULT static Handle<Derived> EnsureCapacity(
- Handle<Derived> table,
- int n,
- Key key,
- PretenureFlag pretenure = NOT_TENURED);
-
- private:
// Returns _expected_ if one of entries given by the first _probe_ probes is
// equal to _expected_. Otherwise, returns the entry given by the probe
// number _probe_.
@@ -3862,7 +3851,21 @@ class HashTable: public FixedArray {
void Swap(uint32_t entry1, uint32_t entry2, WriteBarrierMode mode);
// Rehashes this hash-table into the new table.
- void Rehash(Handle<Derived> new_table, Key key);
+ void Rehash(Derived* new_table, Key key);
+
+ // Attempt to shrink hash table after removal of key.
+ static Handle<Derived> Shrink(Handle<Derived> table, Key key);
+
+ // Ensure enough space for n additional elements.
+ MUST_USE_RESULT MaybeObject* EnsureCapacity(
+ int n,
+ Key key,
+ PretenureFlag pretenure = NOT_TENURED);
+ static Handle<Derived> EnsureCapacity(
+ Handle<Derived> table,
+ int n,
+ Key key,
+ PretenureFlag pretenure = NOT_TENURED);
};
@@ -4105,15 +4108,6 @@ class Dictionary: public HashTable<Derived, Shape, Key> {
static void GenerateNewEnumerationIndices(Handle<Derived> dictionary);
static const int kMaxNumberKeyIndex = DerivedHashTable::kPrefixStartIndex;
static const int kNextEnumerationIndexIndex = kMaxNumberKeyIndex + 1;
-
- private:
- // This is to hide HashTable::New() which could clash with Dictionary::New().
- // The latter one must be used for creating Dictionary and successors.
- MUST_USE_RESULT static Handle<Derived> New(
- Isolate* isolate,
- int at_least_space_for,
- MinimumCapacity capacity_option,
- PretenureFlag pretenure);
};
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698