Index: src/objects.h |
diff --git a/src/objects.h b/src/objects.h |
index 2abfb9dd816e7325d3f76594fd5561cf9f98fcbf..3330783e3a0fdba74a6e1c5569dbced587152597 100644 |
--- a/src/objects.h |
+++ b/src/objects.h |
@@ -3219,6 +3219,9 @@ class HashTable : public HashTableBase { |
Key key, |
PretenureFlag pretenure = NOT_TENURED); |
+ // Returns true if this table has sufficient capacity for adding n elements. |
+ bool HasSufficientCapacity(int n); |
+ |
// Sets the capacity of the hash table. |
void SetCapacity(int capacity) { |
// To scale a computed hash code to fit within the hash table, we |
@@ -3418,6 +3421,9 @@ class Dictionary: public HashTable<Derived, Shape, Key> { |
int at_least_space_for, |
PretenureFlag pretenure = NOT_TENURED); |
+ // Ensures that a new dictionary is created when the capacity is checked. |
+ void SetRequiresCopyOnCapacityChange(); |
+ |
// Ensure enough space for n additional elements. |
static Handle<Derived> EnsureCapacity(Handle<Derived> obj, int n, Key key); |