| Index: src/objects.h
|
| diff --git a/src/objects.h b/src/objects.h
|
| index b6931e0eef59dbaba496698a2915531654acd3e2..c52a17bef6192a1203d7d6acfc388ae03b538d34 100644
|
| --- a/src/objects.h
|
| +++ b/src/objects.h
|
| @@ -1002,6 +1002,7 @@ template <class C> inline bool Is(Object* obj);
|
| V(PropertyCell) \
|
| V(WeakCell) \
|
| V(ObjectHashTable) \
|
| + V(ObjectHashSet) \
|
| V(WeakHashTable) \
|
| V(OrderedHashTable)
|
|
|
| @@ -3230,6 +3231,8 @@ class HashTable : public HashTableBase {
|
| inline int FindEntry(Key key);
|
| inline int FindEntry(Isolate* isolate, Key key, int32_t hash);
|
| int FindEntry(Isolate* isolate, Key key);
|
| + inline bool Has(Isolate* isolate, Key key);
|
| + inline bool Has(Key key);
|
|
|
| // Rehashes the table in-place.
|
| void Rehash(Key key);
|
| @@ -3456,11 +3459,13 @@ class Dictionary: public HashTable<Derived, Shape, Key> {
|
|
|
| // Collect the keys into the given KeyAccumulator, in ascending chronological
|
| // order of property creation.
|
| - static void CollectKeysTo(Handle<Dictionary<Derived, Shape, Key> > dictionary,
|
| - KeyAccumulator* keys, PropertyFilter filter);
|
| + static void CollectKeysTo(Handle<Dictionary<Derived, Shape, Key>> dictionary,
|
| + KeyAccumulator* keys);
|
|
|
| // Copies enumerable keys to preallocated fixed array.
|
| - void CopyEnumKeysTo(FixedArray* storage);
|
| + static void CopyEnumKeysTo(Handle<Dictionary<Derived, Shape, Key>> dictionary,
|
| + Handle<FixedArray> storage, KeyCollectionMode mode,
|
| + KeyAccumulator* accumulator);
|
|
|
| // Accessors for next enumeration index.
|
| void SetNextEnumerationIndex(int index) {
|
| @@ -3806,6 +3811,23 @@ class ObjectHashTable: public HashTable<ObjectHashTable,
|
| }
|
| };
|
|
|
| +class ObjectHashSetShape : public ObjectHashTableShape {
|
| + public:
|
| + static const int kPrefixSize = 0;
|
| + static const int kEntrySize = 1;
|
| +};
|
| +
|
| +class ObjectHashSet
|
| + : public HashTable<ObjectHashSet, ObjectHashSetShape, Handle<Object>> {
|
| + public:
|
| + static Handle<ObjectHashSet> Add(Handle<ObjectHashSet> set,
|
| + Handle<Object> key);
|
| +
|
| + inline bool Has(Isolate* isolate, Handle<Object> key, int32_t hash);
|
| + inline bool Has(Isolate* isolate, Handle<Object> key);
|
| +
|
| + DECLARE_CAST(ObjectHashSet)
|
| +};
|
|
|
| // OrderedHashTable is a HashTable with Object keys that preserves
|
| // insertion order. There are Map and Set interfaces (OrderedHashMap
|
|
|