Index: src/code-stub-assembler.cc |
diff --git a/src/code-stub-assembler.cc b/src/code-stub-assembler.cc |
index 6e1bde011b7525f40e04694850e26cc0c9421a39..ddaf2934c7b777c2a5a4f1c7a1588310d95d15ad 100644 |
--- a/src/code-stub-assembler.cc |
+++ b/src/code-stub-assembler.cc |
@@ -4574,9 +4574,10 @@ template Node* CodeStubAssembler::EntryToIndex<GlobalDictionary>(Node*, int); |
template Node* CodeStubAssembler::EntryToIndex<SeededNumberDictionary>(Node*, |
int); |
+// This must be kept in sync with HashTableBase::ComputeCapacity(). |
Node* CodeStubAssembler::HashTableComputeCapacity(Node* at_least_space_for) { |
- Node* capacity = IntPtrRoundUpToPowerOfTwo32( |
- WordShl(at_least_space_for, IntPtrConstant(1))); |
+ Node* capacity = IntPtrRoundUpToPowerOfTwo32(IntPtrAdd( |
+ at_least_space_for, WordShr(at_least_space_for, IntPtrConstant(1)))); |
return IntPtrMax(capacity, IntPtrConstant(HashTableBase::kMinCapacity)); |
} |