Skip to content

Commit 6ee9fce

Browse files
committed
[stdlib] Set, Dictionary: Remove remaining internal typealiases
1 parent 2201d0e commit 6ee9fce

File tree

2 files changed

+18
-26
lines changed

2 files changed

+18
-26
lines changed

stdlib/public/core/Dictionary.swift

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2197,8 +2197,6 @@ final internal class _HashableTypedNativeDictionaryStorage<Key: Hashable, Value>
21972197
internal struct _NativeDictionary<Key, Value> {
21982198
@usableFromInline
21992199
internal typealias Element = (key: Key, value: Value)
2200-
@usableFromInline // FIXME(sil-serialize-all)
2201-
internal typealias TypedStorage = _TypedNativeDictionaryStorage<Key, Value>
22022200

22032201
/// See this comments on _RawNativeDictionaryStorage and its subclasses to
22042202
/// understand why we store an untyped storage here.
@@ -2222,10 +2220,11 @@ internal struct _NativeDictionary<Key, Value> {
22222220
@inlinable // FIXME(sil-serialize-all)
22232221
internal init(_exactBucketCount bucketCount: Int, unhashable: ()) {
22242222
let bitmapWordCount = _UnsafeBitMap.sizeInWords(forSizeInBits: bucketCount)
2225-
let storage = Builtin.allocWithTailElems_3(TypedStorage.self,
2226-
bitmapWordCount._builtinWordValue, UInt.self,
2227-
bucketCount._builtinWordValue, Key.self,
2228-
bucketCount._builtinWordValue, Value.self)
2223+
let storage = Builtin.allocWithTailElems_3(
2224+
_TypedNativeDictionaryStorage<Key, Value>.self,
2225+
bitmapWordCount._builtinWordValue, UInt.self,
2226+
bucketCount._builtinWordValue, Key.self,
2227+
bucketCount._builtinWordValue, Value.self)
22292228
self.init(_exactBucketCount: bucketCount, storage: storage)
22302229
}
22312230

@@ -2441,10 +2440,6 @@ internal struct _NativeDictionary<Key, Value> {
24412440
}
24422441

24432442
extension _NativeDictionary where Key: Hashable {
2444-
@usableFromInline
2445-
internal typealias HashTypedStorage =
2446-
_HashableTypedNativeDictionaryStorage<Key, Value>
2447-
24482443
@inlinable // FIXME(sil-serialize-all)
24492444
@inline(__always)
24502445
internal init(minimumCapacity: Int) {
@@ -2469,10 +2464,11 @@ extension _NativeDictionary where Key: Hashable {
24692464
@inlinable // FIXME(sil-serialize-all)
24702465
internal init(_exactBucketCount bucketCount: Int) {
24712466
let bitmapWordCount = _UnsafeBitMap.sizeInWords(forSizeInBits: bucketCount)
2472-
let storage = Builtin.allocWithTailElems_3(HashTypedStorage.self,
2473-
bitmapWordCount._builtinWordValue, UInt.self,
2474-
bucketCount._builtinWordValue, Key.self,
2475-
bucketCount._builtinWordValue, Value.self)
2467+
let storage = Builtin.allocWithTailElems_3(
2468+
_HashableTypedNativeDictionaryStorage<Key, Value>.self,
2469+
bitmapWordCount._builtinWordValue, UInt.self,
2470+
bucketCount._builtinWordValue, Key.self,
2471+
bucketCount._builtinWordValue, Value.self)
24762472
self.init(_exactBucketCount: bucketCount, storage: storage)
24772473
}
24782474

stdlib/public/core/Set.swift

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1743,9 +1743,6 @@ final internal class _HashableTypedNativeSetStorage<Element: Hashable>
17431743
@usableFromInline
17441744
@_fixed_layout
17451745
internal struct _NativeSet<Element> {
1746-
@usableFromInline
1747-
internal typealias TypedStorage = _TypedNativeSetStorage<Element>
1748-
17491746
/// See this comments on _RawNativeSetStorage and its subclasses to
17501747
/// understand why we store an untyped storage here.
17511748
@usableFromInline
@@ -1768,9 +1765,10 @@ internal struct _NativeSet<Element> {
17681765
@inlinable // FIXME(sil-serialize-all)
17691766
internal init(_exactBucketCount bucketCount: Int, unhashable: ()) {
17701767
let bitmapWordCount = _UnsafeBitMap.sizeInWords(forSizeInBits: bucketCount)
1771-
let storage = Builtin.allocWithTailElems_2(TypedStorage.self,
1772-
bitmapWordCount._builtinWordValue, UInt.self,
1773-
bucketCount._builtinWordValue, Element.self)
1768+
let storage = Builtin.allocWithTailElems_2(
1769+
_TypedNativeSetStorage<Element>.self,
1770+
bitmapWordCount._builtinWordValue, UInt.self,
1771+
bucketCount._builtinWordValue, Element.self)
17741772
self.init(_exactBucketCount: bucketCount, storage: storage)
17751773
}
17761774

@@ -1974,9 +1972,6 @@ internal struct _NativeSet<Element> {
19741972
}
19751973

19761974
extension _NativeSet/*: _SetBuffer*/ where Element: Hashable {
1977-
@usableFromInline
1978-
internal typealias HashTypedStorage = _HashableTypedNativeSetStorage<Element>
1979-
19801975
@inlinable // FIXME(sil-serialize-all)
19811976
@inline(__always)
19821977
internal init(minimumCapacity: Int) {
@@ -2001,9 +1996,10 @@ extension _NativeSet/*: _SetBuffer*/ where Element: Hashable {
20011996
@inlinable // FIXME(sil-serialize-all)
20021997
internal init(_exactBucketCount bucketCount: Int) {
20031998
let bitmapWordCount = _UnsafeBitMap.sizeInWords(forSizeInBits: bucketCount)
2004-
let storage = Builtin.allocWithTailElems_2(HashTypedStorage.self,
2005-
bitmapWordCount._builtinWordValue, UInt.self,
2006-
bucketCount._builtinWordValue, Element.self)
1999+
let storage = Builtin.allocWithTailElems_2(
2000+
_HashableTypedNativeSetStorage<Element>.self,
2001+
bitmapWordCount._builtinWordValue, UInt.self,
2002+
bucketCount._builtinWordValue, Element.self)
20072003
self.init(_exactBucketCount: bucketCount, storage: storage)
20082004
}
20092005

0 commit comments

Comments
 (0)