Index: src/objects.h |
diff --git a/src/objects.h b/src/objects.h |
index a3c52adc590a206f4323ecda1791cad3ad1e5146..bec3cf28834ae9875a5cab676f5c3fd1f4c10c0b 100644 |
--- a/src/objects.h |
+++ b/src/objects.h |
@@ -3221,6 +3221,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 |
@@ -3420,6 +3423,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); |