[BasicContainers] Hashed containers: Add Equatable/Hashable conformances and related methods

This commit is contained in:
Karoy Lorentey committed 2026-02-24 16:40:45 -08:00
1 parent 0e12c9e748
commit 0538000ffd
19 files changed
+445 -14

No files matched your search

+8
View File
@@ -66,6 +66,8 @@ target_sources(${module_name} PRIVATE
"RigidSet/RigidSet+BorrowingSequence.swift"
"RigidSet/RigidSet+Consumption.swift"
"RigidSet/RigidSet+Debugging.swift"
"RigidSet/RigidSet+Equatable.swift"
"RigidSet/RigidSet+Hashable.swift"
"RigidSet/RigidSet+Initializers.swift"
"RigidSet/RigidSet+Insertions.swift"
"RigidSet/RigidSet+Lookup.swift"
@@ -75,6 +77,8 @@ target_sources(${module_name} PRIVATE
"UniqueSet/UniqueSet+BorrowingSequence.swift"
"UniqueSet/UniqueSet+Consumption.swift"
"UniqueSet/UniqueSet+Debugging.swift"
"UniqueSet/UniqueSet+Equatable.swift"
"UniqueSet/UniqueSet+Hashable.swift"
"UniqueSet/UniqueSet+Initializers.swift"
"UniqueSet/UniqueSet+Insertions.swift"
"UniqueSet/UniqueSet+Lookup.swift"
@@ -82,6 +86,8 @@ target_sources(${module_name} PRIVATE
"UniqueSet/UniqueSet+Resizing.swift"
"RigidDictionary/RigidDictionary.swift"
"RigidDictionary/RigidDictionary+Consumption.swift"
"RigidDictionary/RigidDictionary+Equatable.swift"
"RigidDictionary/RigidDictionary+Hashable.swift"
"RigidDictionary/RigidDictionary+Initializers.swift"
"RigidDictionary/RigidDictionary+Insertions.swift"
"RigidDictionary/RigidDictionary+Keys.swift"
@@ -90,6 +96,8 @@ target_sources(${module_name} PRIVATE
"RigidDictionary/RigidDictionary+Resizing.swift"
"UniqueDictionary/UniqueDictionary.swift"
"UniqueDictionary/UniqueDictionary+Consumption.swift"
"UniqueDictionary/UniqueDictionary+Equatable.swift"
"UniqueDictionary/UniqueDictionary+Hashable.swift"
"UniqueDictionary/UniqueDictionary+Initializers.swift"
"UniqueDictionary/UniqueDictionary+Insertions.swift"
"UniqueDictionary/UniqueDictionary+Keys.swift"
@@ -46,10 +46,35 @@ public protocol GeneralizedHashable: GeneralizedEquatable, ~Copyable, ~Escapable
/// of this instance.
func hash(into hasher: inout Hasher)
// Raw top-level hashing interface. Some standard library types (mostly
// primitives) specialize this to eliminate small resiliency overheads. (This
// only matters for tiny keys.)
func _rawHashValue(seed: Int) -> Int
/// The temporary substitute to `Hashable._rawHashValue(seed:)`, the raw
/// top-level hashing interface. Some standard library types (mostly
/// primitives) specialize this to eliminate small resiliency overheads. (This
/// only matters for tiny keys.)
///
/// We avoid using the stdlib name as the stdlib's default implementation is
/// overwhelmingly preferable but it isn't (easily) reimplementable outside
/// of the stdlib.
///
/// This will be replaced by the actual `Hashable` method when its
/// generalization ships.
func _rawHashValue_temp(seed: Int) -> Int
}
extension GeneralizedHashable where Self: ~Copyable & ~Escapable {
@inlinable
public func _rawHashValue_temp(seed: Int) -> Int {
var hasher = Hasher()
hasher.combine(seed)
self.hash(into: &hasher)
return hasher.finalize()
}
}
extension GeneralizedHashable where Self: Hashable {
@inlinable
public func _rawHashValue_temp(seed: Int) -> Int {
_rawHashValue(seed: seed)
}
}
extension GeneralizedHashable where Self: ~Copyable & ~Escapable {
@@ -60,7 +85,7 @@ extension GeneralizedHashable where Self: ~Copyable & ~Escapable {
@_alwaysEmitIntoClient
@inline(__always)
public var hashValue: Int {
_rawHashValue(seed: 0)
_rawHashValue_temp(seed: 0)
}
}
@@ -223,4 +223,15 @@ extension _HTable {
self._maxProbeLength = 0
}
}
extension _HTable {
@usableFromInline
package func isTriviallyIdentical(to other: borrowing Self) -> Bool {
self._count == other._count
&& self._capacity == other._capacity
&& self._bitmap == other._bitmap
&& self._maxProbeLength == other._maxProbeLength
&& self.scale == other.scale
}
}
#endif
@@ -0,0 +1,65 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift Collections open source project
//
// Copyright (c) 2026 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
//
//===----------------------------------------------------------------------===//
#if !COLLECTIONS_SINGLE_MODULE
import InternalCollectionsUtilities
import ContainersPreview
#endif
#if compiler(>=6.3) && COLLECTIONS_UNSTABLE_NONCOPYABLE_KEYS
@available(SwiftStdlib 5.0, *)
extension RigidDictionary {
@inlinable
public func isTriviallyIdentical(to other: borrowing Self) -> Bool {
self._keys.isTriviallyIdentical(to: other._keys)
&& self._values == other._values
}
}
@available(SwiftStdlib 5.0, *)
extension RigidDictionary {
@inlinable
public func isEqual(
to other: borrowing Self,
by areEquivalent: (borrowing Value, borrowing Value) -> Bool
) -> Bool {
if self.isTriviallyIdentical(to: other) { return true }
guard self.count == other.count else { return false }
var it = self._keys._table.makeBucketIterator()
while let next = it.nextOccupiedRegion() {
var lb = next.lowerBound
while lb < next.upperBound {
let res = other._find(self._keyPtr(at: lb).pointee)
guard let rb = res.bucket else { return false }
let lp = self._valuePtr(at: lb)
let rp = other._valuePtr(at: rb)
guard areEquivalent(lp.pointee, rp.pointee) else { return false }
lb._offset &+= 1
}
}
return true
}
}
@available(SwiftStdlib 5.0, *)
extension RigidDictionary: GeneralizedEquatable where Value: GeneralizedEquatable { // Should be Equatable
@inlinable
public static func ==(left: borrowing Self, right: borrowing Self) -> Bool {
left.isEqual(to: right, by: ==)
}
}
#endif
@@ -0,0 +1,41 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift Collections open source project
//
// Copyright (c) 2026 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
//
//===----------------------------------------------------------------------===//
#if !COLLECTIONS_SINGLE_MODULE
import InternalCollectionsUtilities
import ContainersPreview
#endif
#if compiler(>=6.3) && COLLECTIONS_UNSTABLE_NONCOPYABLE_KEYS
@available(SwiftStdlib 5.0, *)
extension RigidDictionary: GeneralizedHashable where Value: GeneralizedHashable { // Should be Hashable
@inlinable
public func hash(into hasher: inout Hasher) {
var commutativeHash = 0
var it = self._keys._table.makeBucketIterator()
while let next = it.nextOccupiedRegion() {
var b = next.lowerBound
while b < next.upperBound {
// Note that we use a copy of our own hasher here. This makes hash values
// dependent on its state, eliminating static collision patterns.
var elementHasher = hasher
_keyPtr(at: b).pointee.hash(into: &elementHasher)
_valuePtr(at: b).pointee.hash(into: &elementHasher)
commutativeHash ^= elementHasher.finalize()
b._offset &+= 1
}
}
hasher.combine(commutativeHash)
}
}
#endif
@@ -54,7 +54,7 @@ extension RigidDictionary where Key: ~Copyable, Value: ~Copyable {
let bucket = self._keys._table.insertNew_Large(
hashValue: hashValue,
hashGenerator: {
keys[$0]._rawHashValue(seed: seed)
keys[$0]._rawHashValue_temp(seed: seed)
},
swapper: { bucket in
swap(&key, &keys[bucket])
@@ -32,7 +32,7 @@ extension RigidDictionary where Key: ~Copyable, Value: ~Copyable {
self._keys._table.resolveHole(
at: bucket,
hashGenerator: {
keys[$0.offset]._rawHashValue(seed: seed)
keys[$0.offset]._rawHashValue_temp(seed: seed)
},
mover: {
(keys + $1.offset).initialize(to: (keys + $0.offset).move())
@@ -67,10 +67,10 @@ extension RigidDictionary where Key: ~Copyable, Value: ~Copyable {
selector: {
srcKey = sourceKeys + $0.offset
srcValue = sourceValues + $0.offset
return srcKey.pointee._rawHashValue(seed: seed)
return srcKey.pointee._rawHashValue_temp(seed: seed)
},
hashGenerator: {
targetKeys[$0.offset]._rawHashValue(seed: seed)
targetKeys[$0.offset]._rawHashValue_temp(seed: seed)
},
swapper: {
swap(&srcKey.pointee, &targetKeys[$0.offset])
@@ -0,0 +1,51 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift Collections open source project
//
// Copyright (c) 2026 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
//
//===----------------------------------------------------------------------===//
#if !COLLECTIONS_SINGLE_MODULE
import InternalCollectionsUtilities
import ContainersPreview
#endif
#if compiler(>=6.3) && COLLECTIONS_UNSTABLE_NONCOPYABLE_KEYS
@available(SwiftStdlib 5.0, *)
extension RigidSet {
@inlinable
public func isTriviallyIdentical(to other: borrowing Self) -> Bool {
self._members == other._members
&& self._table.isTriviallyIdentical(to: other._table)
}
}
@available(SwiftStdlib 5.0, *)
extension RigidSet: GeneralizedEquatable { // Should be Equatable
@inlinable
public static func ==(left: borrowing Self, right: borrowing Self) -> Bool {
if left.isTriviallyIdentical(to: right) { return true }
guard left.count == right.count else { return false }
var lit = left.makeBorrowingIterator()
while true {
let l = lit.nextSpan()
if l.isEmpty { break }
var i = 0
while i < l.count {
guard right.contains(l[i]) else { return false }
i &+= 1
}
}
return true
}
}
#endif
@@ -0,0 +1,47 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift Collections open source project
//
// Copyright (c) 2026 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
//
//===----------------------------------------------------------------------===//
#if !COLLECTIONS_SINGLE_MODULE
import InternalCollectionsUtilities
import ContainersPreview
#endif
#if compiler(>=6.3) && COLLECTIONS_UNSTABLE_NONCOPYABLE_KEYS
@available(SwiftStdlib 5.0, *)
extension RigidSet: GeneralizedHashable { // Should be Hashable
@inlinable
public func hash(into hasher: inout Hasher) {
// Generate a seed from a snapshot of the hasher. This makes members' hash
// values depend on the state of the hasher, which improves hashing
// quality. (E.g., it makes it possible to resolve collisions by passing in
// a different hasher.)
let copy = hasher
hasher.combine(_rawHashValue(seed: copy.finalize()))
}
@inlinable
public func _rawHashValue(seed: Int) -> Int {
var hash = 0
var it = self.makeBorrowingIterator()
while true {
let next = it.nextSpan()
var i = 0
while i < next.count {
hash ^= next[i]._rawHashValue_temp(seed: seed)
i &+= 1
}
}
return hash
}
}
#endif
@@ -65,7 +65,7 @@ extension RigidSet where Element: ~Copyable {
let bucket = _table.insertNew_Large(
hashValue: hashValue,
hashGenerator: {
storage[$0]._rawHashValue(seed: seed)
storage[$0]._rawHashValue_temp(seed: seed)
},
swapper: {
swap(&item, &storage[$0])
@@ -49,7 +49,7 @@ extension RigidSet where Element: ~Copyable {
_table.resolveHole(
at: bucket,
hashGenerator: {
members[$0.offset]._rawHashValue(seed: seed)
members[$0.offset]._rawHashValue_temp(seed: seed)
},
mover: {
(members + $1.offset).initialize(to: (members + $0.offset).move())
@@ -64,10 +64,10 @@ extension RigidSet where Element: ~Copyable {
from: &old._table,
selector: {
src = source + $0.offset
return src.pointee._rawHashValue(seed: seed)
return src.pointee._rawHashValue_temp(seed: seed)
},
hashGenerator: {
target[$0.offset]._rawHashValue(seed: seed)
target[$0.offset]._rawHashValue_temp(seed: seed)
},
swapper: {
swap(&src.pointee, &target[$0.offset])
@@ -14,7 +14,10 @@ import InternalCollectionsUtilities
import ContainersPreview
#endif
#if compiler(>=6.3) && COLLECTIONS_UNSTABLE_NONCOPYABLE_KEYS
/// A fixed-capacity, noncopyable, unordered hashed container of unique
/// elements.
@available(SwiftStdlib 5.0, *)
@frozen
public struct RigidSet<Element: GeneralizedHashable & ~Copyable>: ~Copyable {
@@ -147,7 +150,7 @@ extension RigidSet where Element: ~Copyable {
internal borrowing func _hashValue(
for item: borrowing Element
) -> Int {
item._rawHashValue(seed: _seed)
item._rawHashValue_temp(seed: _seed)
}
}
@@ -0,0 +1,50 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift Collections open source project
//
// Copyright (c) 2026 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
//
//===----------------------------------------------------------------------===//
#if !COLLECTIONS_SINGLE_MODULE
import InternalCollectionsUtilities
import ContainersPreview
#endif
#if compiler(>=6.3) && COLLECTIONS_UNSTABLE_NONCOPYABLE_KEYS
@available(SwiftStdlib 5.0, *)
extension UniqueDictionary {
@inlinable
@inline(__always)
public func isTriviallyIdentical(to other: borrowing Self) -> Bool {
self._storage.isTriviallyIdentical(to: other._storage)
}
}
@available(SwiftStdlib 5.0, *)
extension UniqueDictionary {
@inlinable
@inline(__always)
public func isEqual(
to other: borrowing Self,
by areEquivalent: (borrowing Value, borrowing Value) -> Bool
) -> Bool {
self._storage.isEqual(to: other._storage, by: areEquivalent)
}
}
@available(SwiftStdlib 5.0, *)
extension UniqueDictionary: GeneralizedEquatable where Value: GeneralizedEquatable { // Should be Equatable
@inlinable
@inline(__always)
public static func ==(left: borrowing Self, right: borrowing Self) -> Bool {
left.isEqual(to: right, by: ==)
}
}
#endif
@@ -0,0 +1,28 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift Collections open source project
//
// Copyright (c) 2026 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
//
//===----------------------------------------------------------------------===//
#if !COLLECTIONS_SINGLE_MODULE
import InternalCollectionsUtilities
import ContainersPreview
#endif
#if compiler(>=6.3) && COLLECTIONS_UNSTABLE_NONCOPYABLE_KEYS
@available(SwiftStdlib 5.0, *)
extension UniqueDictionary: GeneralizedHashable where Value: GeneralizedHashable { // Should be Hashable
@inlinable
@inline(__always)
public func hash(into hasher: inout Hasher) {
self._storage.hash(into: &hasher)
}
}
#endif
@@ -0,0 +1,38 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift Collections open source project
//
// Copyright (c) 2026 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
//
//===----------------------------------------------------------------------===//
#if !COLLECTIONS_SINGLE_MODULE
import InternalCollectionsUtilities
import ContainersPreview
#endif
#if compiler(>=6.3) && COLLECTIONS_UNSTABLE_NONCOPYABLE_KEYS
@available(SwiftStdlib 5.0, *)
extension UniqueSet {
@inlinable
@inline(__always)
public func isTriviallyIdentical(to other: borrowing Self) -> Bool {
self._storage.isTriviallyIdentical(to: other._storage)
}
}
@available(SwiftStdlib 5.0, *)
extension UniqueSet: GeneralizedEquatable { // Should be Equatable
@inlinable
@inline(__always)
public static func ==(left: borrowing Self, right: borrowing Self) -> Bool {
left._storage == right._storage
}
}
#endif
@@ -0,0 +1,32 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift Collections open source project
//
// Copyright (c) 2026 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
//
//===----------------------------------------------------------------------===//
#if !COLLECTIONS_SINGLE_MODULE
import InternalCollectionsUtilities
import ContainersPreview
#endif
#if compiler(>=6.3) && COLLECTIONS_UNSTABLE_NONCOPYABLE_KEYS
@available(SwiftStdlib 5.0, *)
extension UniqueSet: GeneralizedHashable { // Should be Hashable
@inlinable
public func hash(into hasher: inout Hasher) {
_storage.hash(into: &hasher)
}
@inlinable
public func _rawHashValue(seed: Int) -> Int {
_storage._rawHashValue(seed: seed)
}
}
#endif
@@ -102,6 +102,7 @@
7D479CF92F4D07F200A8CB59 /* RigidDictionary+Removals.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D479CF72F4D07F200A8CB59 /* RigidDictionary+Removals.swift */; };
7D479CFC2F4D080500A8CB59 /* UniqueDictionary+Removals.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D479CFB2F4D080500A8CB59 /* UniqueDictionary+Removals.swift */; };
7D479CFD2F4D080500A8CB59 /* UniqueDictionary+Keys.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D479CFA2F4D080500A8CB59 /* UniqueDictionary+Keys.swift */; };
7D479CFF2F4E487C00A8CB59 /* RigidSet+Equatable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D479CFE2F4E487700A8CB59 /* RigidSet+Equatable.swift */; };
7D48BCDC2E51554900D7F6F7 /* ClassBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D48BCDB2E51554900D7F6F7 /* ClassBox.swift */; };
7D48BCDF2E51558700D7F6F7 /* TestPrintable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D48BCDD2E51558700D7F6F7 /* TestPrintable.swift */; };
7D48BCE02E51558700D7F6F7 /* LifetimeTrackedStruct.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D48BCDE2E51558700D7F6F7 /* LifetimeTrackedStruct.swift */; };
@@ -502,6 +503,13 @@
7DE9221C29CA8576004483EB /* RangeReplaceableCollectionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DE921F729CA8576004483EB /* RangeReplaceableCollectionTests.swift */; };
7DE9221D29CA8576004483EB /* DequeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DE921F829CA8576004483EB /* DequeTests.swift */; };
7DE9221E29CA8576004483EB /* MutableCollectionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DE921F929CA8576004483EB /* MutableCollectionTests.swift */; };
7DEB31522F4E720900F9AF28 /* RigidSet+Hashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DEB31512F4E720500F9AF28 /* RigidSet+Hashable.swift */; };
7DEB31542F4E75B500F9AF28 /* UniqueSet+Equatable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DEB31532F4E75AF00F9AF28 /* UniqueSet+Equatable.swift */; };
7DEB31562F4E75BC00F9AF28 /* UniqueSet+Hashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DEB31552F4E75B800F9AF28 /* UniqueSet+Hashable.swift */; };
7DEB31582F4E762200F9AF28 /* RigidDictionary+Equatable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DEB31572F4E761D00F9AF28 /* RigidDictionary+Equatable.swift */; };
7DEB315A2F4E78F800F9AF28 /* RigidDictionary+Hashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DEB31592F4E78F200F9AF28 /* RigidDictionary+Hashable.swift */; };
7DEB315C2F4E7A2500F9AF28 /* UniqueDictionary+Equatable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DEB315B2F4E7A2000F9AF28 /* UniqueDictionary+Equatable.swift */; };
7DEB315E2F4E7B8700F9AF28 /* UniqueDictionary+Hashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DEB315D2F4E7B8200F9AF28 /* UniqueDictionary+Hashable.swift */; };
7DEBDB6E29CCE44A00ADC226 /* SortedCollectionAPIChecker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DEBDB3029CCE43600ADC226 /* SortedCollectionAPIChecker.swift */; };
7DEBDB6F29CCE44A00ADC226 /* MinimalMutableRangeReplaceableRandomAccessCollection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DEBDB3F29CCE43600ADC226 /* MinimalMutableRangeReplaceableRandomAccessCollection.swift */; };
7DEBDB7029CCE44A00ADC226 /* ResettableValue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DEBDB4229CCE43600ADC226 /* ResettableValue.swift */; };
@@ -653,6 +661,7 @@
7D479CF72F4D07F200A8CB59 /* RigidDictionary+Removals.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "RigidDictionary+Removals.swift"; sourceTree = "<group>"; };
7D479CFA2F4D080500A8CB59 /* UniqueDictionary+Keys.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UniqueDictionary+Keys.swift"; sourceTree = "<group>"; };
7D479CFB2F4D080500A8CB59 /* UniqueDictionary+Removals.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UniqueDictionary+Removals.swift"; sourceTree = "<group>"; };
7D479CFE2F4E487700A8CB59 /* RigidSet+Equatable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "RigidSet+Equatable.swift"; sourceTree = "<group>"; };
7D48BCC92E51524200D7F6F7 /* CMakeLists.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
7D48BCDB2E51554900D7F6F7 /* ClassBox.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassBox.swift; sourceTree = "<group>"; };
7D48BCDD2E51558700D7F6F7 /* TestPrintable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestPrintable.swift; sourceTree = "<group>"; };
@@ -1090,6 +1099,13 @@
7DE921F729CA8576004483EB /* RangeReplaceableCollectionTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RangeReplaceableCollectionTests.swift; sourceTree = "<group>"; };
7DE921F829CA8576004483EB /* DequeTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DequeTests.swift; sourceTree = "<group>"; };
7DE921F929CA8576004483EB /* MutableCollectionTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MutableCollectionTests.swift; sourceTree = "<group>"; };
7DEB31512F4E720500F9AF28 /* RigidSet+Hashable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "RigidSet+Hashable.swift"; sourceTree = "<group>"; };
7DEB31532F4E75AF00F9AF28 /* UniqueSet+Equatable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UniqueSet+Equatable.swift"; sourceTree = "<group>"; };
7DEB31552F4E75B800F9AF28 /* UniqueSet+Hashable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UniqueSet+Hashable.swift"; sourceTree = "<group>"; };
7DEB31572F4E761D00F9AF28 /* RigidDictionary+Equatable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "RigidDictionary+Equatable.swift"; sourceTree = "<group>"; };
7DEB31592F4E78F200F9AF28 /* RigidDictionary+Hashable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "RigidDictionary+Hashable.swift"; sourceTree = "<group>"; };
7DEB315B2F4E7A2000F9AF28 /* UniqueDictionary+Equatable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UniqueDictionary+Equatable.swift"; sourceTree = "<group>"; };
7DEB315D2F4E7B8200F9AF28 /* UniqueDictionary+Hashable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UniqueDictionary+Hashable.swift"; sourceTree = "<group>"; };
7DEBDB2129CCE43600ADC226 /* Combinatorics.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Combinatorics.swift; sourceTree = "<group>"; };
7DEBDB2229CCE43600ADC226 /* TestContext.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestContext.swift; sourceTree = "<group>"; };
7DEBDB2329CCE43600ADC226 /* Assertions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Assertions.swift; sourceTree = "<group>"; };
@@ -1264,6 +1280,8 @@
7D479CCC2F46D23400A8CB59 /* UniqueSet+BorrowingSequence.swift */,
7D479CC42F46D20400A8CB59 /* UniqueSet+Consumption.swift */,
7D479CBA2F46A71500A8CB59 /* UniqueSet+Debugging.swift */,
7DEB31532F4E75AF00F9AF28 /* UniqueSet+Equatable.swift */,
7DEB31552F4E75B800F9AF28 /* UniqueSet+Hashable.swift */,
7D479CD32F46DD9600A8CB59 /* UniqueSet+Initializers.swift */,
7D479CC82F46D21800A8CB59 /* UniqueSet+Insertions.swift */,
7D479CCA2F46D22B00A8CB59 /* UniqueSet+Lookup.swift */,
@@ -1278,6 +1296,8 @@
children = (
7D479CD52F47CB4600A8CB59 /* UniqueDictionary.swift */,
7D479CEE2F47F4E300A8CB59 /* UniqueDictionary+Consumption.swift */,
7DEB315B2F4E7A2000F9AF28 /* UniqueDictionary+Equatable.swift */,
7DEB315D2F4E7B8200F9AF28 /* UniqueDictionary+Hashable.swift */,
7D479CDA2F47CD8900A8CB59 /* UniqueDictionary+Initializers.swift */,
7D479CE22F47D63300A8CB59 /* UniqueDictionary+Insertions.swift */,
7D479CFA2F4D080500A8CB59 /* UniqueDictionary+Keys.swift */,
@@ -1334,6 +1354,8 @@
children = (
7D7246832F3D9DDB00112FD0 /* RigidDictionary.swift */,
7D479CEC2F47F40700A8CB59 /* RigidDictionary+Consumption.swift */,
7DEB31572F4E761D00F9AF28 /* RigidDictionary+Equatable.swift */,
7DEB31592F4E78F200F9AF28 /* RigidDictionary+Hashable.swift */,
7D479CD82F47CBB400A8CB59 /* RigidDictionary+Initializers.swift */,
7D479CDE2F47D5C300A8CB59 /* RigidDictionary+Insertions.swift */,
7D479CF62F4D07F200A8CB59 /* RigidDictionary+Keys.swift */,
@@ -1351,6 +1373,8 @@
7D479CAF2F450E3F00A8CB59 /* RigidSet+BorrowingSequence.swift */,
7D479CC02F46D14800A8CB59 /* RigidSet+Consumption.swift */,
7D479CB82F46A6D700A8CB59 /* RigidSet+Debugging.swift */,
7D479CFE2F4E487700A8CB59 /* RigidSet+Equatable.swift */,
7DEB31512F4E720500F9AF28 /* RigidSet+Hashable.swift */,
7D479CD12F46DD8600A8CB59 /* RigidSet+Initializers.swift */,
7D479CBE2F46D09E00A8CB59 /* RigidSet+Insertions.swift */,
7D479CBC2F46D05000A8CB59 /* RigidSet+Lookup.swift */,
@@ -2483,6 +2507,7 @@
7D479CC92F46D22100A8CB59 /* UniqueSet+Insertions.swift in Sources */,
7D2A779C2F27F2BF005780C7 /* Deque+ExpressibleByArrayLiteral.swift in Sources */,
7DE9213B29CA70F4004483EB /* TreeSet+Hashable.swift in Sources */,
7DEB31562F4E75BC00F9AF28 /* UniqueSet+Hashable.swift in Sources */,
7DE9200D29CA70F3004483EB /* OrderedDictionary+Equatable.swift in Sources */,
7DE9207C29CA70F4004483EB /* BigSubstring.swift in Sources */,
7DE9205F29CA70F4004483EB /* BigString+Index.swift in Sources */,
@@ -2501,6 +2526,7 @@
7D479CFD2F4D080500A8CB59 /* UniqueDictionary+Keys.swift in Sources */,
7DE9208A29CA70F4004483EB /* BigString+Comparable.swift in Sources */,
7DE9213629CA70F4004483EB /* TreeSet+SetAlgebra basics.swift in Sources */,
7D479CFF2F4E487C00A8CB59 /* RigidSet+Equatable.swift in Sources */,
7DE9202C29CA70F3004483EB /* OrderedSet+Initializers.swift in Sources */,
7DE9213229CA70F4004483EB /* TreeSet+SetAlgebra formSymmetricDifference.swift in Sources */,
7DE9203429CA70F3004483EB /* OrderedSet+Partial SetAlgebra formUnion.swift in Sources */,
@@ -2540,6 +2566,7 @@
7DE9216029CA70F4004483EB /* _HashNode+Structural isDisjoint.swift in Sources */,
7D479CF32F47FB4100A8CB59 /* _HTable+Removal.swift in Sources */,
7DE9203529CA70F3004483EB /* OrderedSet+CustomReflectable.swift in Sources */,
7DEB31582F4E762200F9AF28 /* RigidDictionary+Equatable.swift in Sources */,
7DE920C929CA70F4004483EB /* BitSet+BidirectionalCollection.swift in Sources */,
7DE920ED29CA70F4004483EB /* BitArray+Extras.swift in Sources */,
7DE9206829CA70F4004483EB /* BigString+Chunk+Append and Insert.swift in Sources */,
@@ -2629,13 +2656,16 @@
7D479CD22F46DD8600A8CB59 /* RigidSet+Initializers.swift in Sources */,
7DE920E129CA70F4004483EB /* UInt+Tricks.swift in Sources */,
7D479CDD2F47D59C00A8CB59 /* RigidDictionary+Lookup.swift in Sources */,
7DEB31522F4E720900F9AF28 /* RigidSet+Hashable.swift in Sources */,
7DE920EB29CA70F4004483EB /* BitArray+Fill.swift in Sources */,
7DE9201929CA70F3004483EB /* OrderedDictionary+Values.swift in Sources */,
7DE9213929CA70F4004483EB /* TreeSet+SetAlgebra Initializers.swift in Sources */,
7DEB315E2F4E7B8700F9AF28 /* UniqueDictionary+Hashable.swift in Sources */,
7DE9217729CA70F4004483EB /* TreeDictionary+Keys.swift in Sources */,
7D57A2BA2F340B58002543BD /* UniqueArray+Consumption.swift in Sources */,
7DE920DA29CA70F4004483EB /* BitSet._UnsafeHandle.swift in Sources */,
7DE920D129CA70F4004483EB /* BitSet.Index.swift in Sources */,
7DEB315A2F4E78F800F9AF28 /* RigidDictionary+Hashable.swift in Sources */,
7DAD899E2E8B09C300DD5786 /* UInt+first and last set bit.swift in Sources */,
7DAD899F2E8B09C300DD5786 /* UInt+reversed.swift in Sources */,
7DAD89A02E8B09C300DD5786 /* FixedWidthInteger+roundUpToPowerOfTwo.swift in Sources */,
@@ -2760,6 +2790,7 @@
7DE9216429CA70F4004483EB /* _HashNode.swift in Sources */,
7DAD89A52E8B09D900DD5786 /* _UnsafeBitSet+_Word.swift in Sources */,
7DAD89A62E8B09D900DD5786 /* _UnsafeBitSet+Index.swift in Sources */,
7DEB31542F4E75B500F9AF28 /* UniqueSet+Equatable.swift in Sources */,
7DAD89A72E8B09D900DD5786 /* _UnsafeBitSet.swift in Sources */,
7DE9201E29CA70F3004483EB /* OrderedSet+Partial SetAlgebra symmetricDifference.swift in Sources */,
7DE9207A29CA70F4004483EB /* BigString+UTF8View.swift in Sources */,
@@ -2816,6 +2847,7 @@
7DE9215A29CA70F4004483EB /* _HashNode+Structural subtracting.swift in Sources */,
7DE9217E29CA70F4004483EB /* Heap+ExpressibleByArrayLiteral.swift in Sources */,
7DE448452F2D3705005853A7 /* BinaryInteger extensions.swift in Sources */,
7DEB315C2F4E7A2500F9AF28 /* UniqueDictionary+Equatable.swift in Sources */,
7DA23F5A2F32C68300E4C03A /* RigidArray+Hashable.swift in Sources */,
7DE9204029CA70F3004483EB /* OrderedSet+Partial SetAlgebra isStrictSuperset.swift in Sources */,
7DE920BF29CA70F4004483EB /* BitSet+Codable.swift in Sources */,