Index: src/objects.h |
diff --git a/src/objects.h b/src/objects.h |
index 401ce404ac31d06e275a0fa7eaa5e57b883ff5b7..23b0cbe1540798e4b50314740043d90262eccdf3 100644 |
--- a/src/objects.h |
+++ b/src/objects.h |
@@ -4134,12 +4134,15 @@ class ObjectHashTable: public HashTable<ObjectHashTable, |
// returned in case the key is not present. |
Object* Lookup(Handle<Object> key); |
- // Adds (or overwrites) the value associated with the given key. Mapping a |
- // key to the hole value causes removal of the whole entry. |
+ // Adds (or overwrites) the value associated with the given key. |
static Handle<ObjectHashTable> Put(Handle<ObjectHashTable> table, |
Handle<Object> key, |
Handle<Object> value); |
+ // Returns an ObjectHashTable (possibly |table|) where |key| has been removed. |
+ static Handle<ObjectHashTable> Remove(Handle<ObjectHashTable> table, |
arv (Not doing code reviews)
2014/05/30 18:47:08
I wasn't sure if I should add a `bool* was_present
|
+ Handle<Object> key); |
+ |
private: |
friend class MarkCompactCollector; |
@@ -4204,10 +4207,17 @@ class OrderedHashTable: public FixedArray { |
// if possible. |
static Handle<Derived> Shrink(Handle<Derived> table); |
- // Returns a new empty OrderedHashTable and updates all the iterators to |
- // point to the new table. |
+ // Returns a new empty OrderedHashTable and records the clearing so that |
+ // exisiting iterators can be updated. |
static Handle<Derived> Clear(Handle<Derived> table); |
+ // Returns an OrderedHashTable (possibly |table|) where |key| has been |
+ // removed. |
+ static Handle<Derived> Remove(Handle<Derived> table, Handle<Object> key, |
+ bool* was_present); |
+ |
+ static Handle<Derived> Remove(Handle<Derived> table, Handle<Object> key); |
adamk
2014/05/30 20:13:58
I'm not sure you need this anywhere after you upda
arv (Not doing code reviews)
2014/05/30 20:53:07
Done.
|
+ |
// Returns kNotFound if the key isn't present. |
int FindEntry(Handle<Object> key); |
@@ -4331,8 +4341,6 @@ class OrderedHashSet: public OrderedHashTable< |
bool Contains(Handle<Object> key); |
static Handle<OrderedHashSet> Add( |
Handle<OrderedHashSet> table, Handle<Object> key); |
- static Handle<OrderedHashSet> Remove( |
- Handle<OrderedHashSet> table, Handle<Object> key, bool* was_present); |
}; |