Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index 2417c3207b3e11279bc0640f5cf97df379993754..d63d790b8a46b1eef3507f93221d90a3c40c5f31 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -1967,6 +1967,17 @@ void DescriptorArray::Swap(int first, int second) { |
template<typename Shape, typename Key> |
+int HashTable<Shape, Key>::ComputeCapacity(int at_least_space_for) { |
+ const int kMinCapacity = 32; |
+ int capacity = RoundUpToPowerOf2(at_least_space_for * 2); |
+ if (capacity < kMinCapacity) { |
+ capacity = kMinCapacity; // Guarantee min capacity. |
+ } |
+ return capacity; |
+} |
+ |
+ |
+template<typename Shape, typename Key> |
int HashTable<Shape, Key>::FindEntry(Key key) { |
return FindEntry(GetIsolate(), key); |
} |