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

Unified Diff: src/objects.h

Issue 240023004: Handlify HashTable and Dictionary growing. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: CR feedback 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 | « src/factory.cc ('k') | 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 e0099d763baa0e8a6e7a582d850f0b620e4541b2..831e0135018a291b06ccd61d17808a74e0e31a2d 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -3858,6 +3858,11 @@ class HashTable: public FixedArray {
int n,
Key key,
PretenureFlag pretenure = NOT_TENURED);
+ static Handle<Derived> EnsureCapacity(
+ Handle<Derived> table,
+ int n,
+ Key key,
+ PretenureFlag pretenure = NOT_TENURED);
};
@@ -3964,7 +3969,8 @@ class MapCache: public HashTable<MapCache, MapCacheShape, HashTableKey*> {
public:
// Find cached value for a name key, otherwise return null.
Object* Lookup(FixedArray* key);
- MUST_USE_RESULT MaybeObject* Put(FixedArray* key, Map* value);
+ static Handle<MapCache> Put(
+ Handle<MapCache> map_cache, Handle<FixedArray> key, Handle<Map> value);
static inline MapCache* cast(Object* obj);
private:
@@ -4063,6 +4069,8 @@ class Dictionary: public HashTable<Derived, Shape, Key> {
// Ensure enough space for n additional elements.
MUST_USE_RESULT MaybeObject* EnsureCapacity(int n, Key key);
+ static Handle<Derived> EnsureCapacity(Handle<Derived> obj, int n, Key key);
+
#ifdef OBJECT_PRINT
void Print(FILE* out = stdout);
#endif
@@ -4273,12 +4281,6 @@ class ObjectHashTable: public HashTable<ObjectHashTable,
return reinterpret_cast<ObjectHashTable*>(obj);
}
- static Handle<ObjectHashTable> EnsureCapacity(
- Handle<ObjectHashTable> table,
- int n,
- Handle<Object> key,
- PretenureFlag pretenure = NOT_TENURED);
-
// Attempt to shrink hash table after removal of key.
static inline Handle<ObjectHashTable> Shrink(Handle<ObjectHashTable> table,
Handle<Object> key);
@@ -8285,8 +8287,6 @@ class CompilationCacheTable: public HashTable<CompilationCacheTable,
static Handle<CompilationCacheTable> PutRegExp(
Handle<CompilationCacheTable> cache, Handle<String> src,
JSRegExp::Flags flags, Handle<FixedArray> value);
- static Handle<CompilationCacheTable> EnsureCapacityFor(
- Handle<CompilationCacheTable> cache, int n, HashTableKey* key);
void Remove(Object* value);
static inline CompilationCacheTable* cast(Object* obj);
@@ -8390,8 +8390,6 @@ class CodeCacheHashTable: public HashTable<CodeCacheHashTable,
static const int kInitialSize = 64;
private:
- MUST_USE_RESULT MaybeObject* Put(Name* name, Code* code);
-
DISALLOW_IMPLICIT_CONSTRUCTORS(CodeCacheHashTable);
};
« no previous file with comments | « src/factory.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698