@@ -2472,7 +2472,7 @@ internal struct _BitMap {
2472
2472
return UInt(bitPattern: i) % UInt(UInt._sizeInBits)
2473
2473
}
2474
2474
2475
- internal static func wordsFor(_ bitCount: Int) -> Int {
2475
+ internal static func sizeInWords(forCapacity bitCount: Int) -> Int {
2476
2476
return bitCount + Int._sizeInBytes - 1 / Int._sizeInBytes
2477
2477
}
2478
2478
@@ -2482,7 +2482,7 @@ internal struct _BitMap {
2482
2482
}
2483
2483
2484
2484
internal var numberOfWords: Int {
2485
- return _BitMap.wordsFor( bitCount)
2485
+ return _BitMap.sizeInWords(forCapacity: bitCount)
2486
2486
}
2487
2487
2488
2488
internal func initializeToZero() {
@@ -2544,7 +2544,7 @@ final internal class _Native${Self}StorageImpl<${TypeParameters}> :
2544
2544
/// Returns the bytes necessary to store a bit map of 'capacity' bytes and
2545
2545
/// padding to align the start to word alignment.
2546
2546
internal static func bytesForBitMap(capacity: Int) -> Int {
2547
- let numWords = _BitMap.wordsFor( capacity)
2547
+ let numWords = _BitMap.sizeInWords(forCapacity: capacity)
2548
2548
return numWords * strideof(UInt) + alignof(UInt)
2549
2549
}
2550
2550
@@ -2608,7 +2608,7 @@ final internal class _Native${Self}StorageImpl<${TypeParameters}> :
2608
2608
2609
2609
internal var _keys: UnsafeMutablePointer<Key> {
2610
2610
let bitMapSizeInBytes =
2611
- _unsafeMultiply(_BitMap.wordsFor( _capacity), strideof(UInt))
2611
+ _unsafeMultiply(_BitMap.sizeInWords(forCapacity: _capacity), strideof(UInt))
2612
2612
let start =
2613
2613
UnsafeMutablePointer<UInt8>(_initializedHashtableEntriesBitMapStorage)
2614
2614
+ bitMapSizeInBytes
0 commit comments