Karoy Lorentey
3c6cb8cd56
Update CMake configuration
2022-10-19 17:35:13 -07:00
Karoy Lorentey
381cf5d17e
Merge branch 'release/1.0' into release/1.1
2022-10-19 15:50:34 -07:00
Karoy Lorentey
734730d724
[OrderedSet] Split SetAlgebra predicates into individual files
...
This is to match the layout of all the other
SetAlgebra implementations in this package.
2022-10-19 15:20:30 -07:00
Karoy Lorentey
5dfd51238c
[OrderedSet] Review, test, fix, and document set relation predicates
2022-10-19 15:20:30 -07:00
Karoy Lorentey
8ce8a6bc86
[PersistentSet] Review, test, fix, and document set relation predicates
2022-10-19 15:20:17 -07:00
Karoy Lorentey
f843bd40bf
[PersistentSet] Add update(_:at:)
2022-10-19 15:20:17 -07:00
Karoy Lorentey
001df8e325
[BitSet] Review, test, fix, and document set relation predicates
...
- Update documentation
- Improve performance where possible
- Add missing test coverage where needed
2022-10-19 15:20:17 -07:00
Karoy Lorentey
291623d391
[BitSet] Implement isEqual(to:) family of functions
2022-10-19 01:40:06 -07:00
Karoy Lorentey
86d429604c
[BitSet] Doc updates
2022-10-19 01:40:06 -07:00
Karoy Lorentey
51a1554f89
Introduce _UniqueCollection & _SortedCollection
...
These marker-like protocols will allow certain
generic operations to get a performance boost
if the passed-in value happens to be guaranteed
to contain unique elements or to be sorted.
Also, review API checker protocols for Sets and
sorted collections and adjust things as needed.
BitSet gains custom implementations for min()
and max() as part of these improvements.
2022-10-19 01:40:06 -07:00
Karoy Lorentey
f76630db8e
[Internals] Add missing internal checking predicates & docs for all
2022-10-18 22:13:19 -07:00
Karoy Lorentey
2b4ec22949
[OrderedSet] Small doc updates/fixes
2022-10-18 22:03:29 -07:00
Karoy Lorentey
5b5651957b
[PersistentSet] Doc updates
2022-10-18 21:57:46 -07:00
Karoy Lorentey
02ea4e8492
[_CollectionsTestSupport] Move StringConvertibleValue under Utilities
2022-10-18 21:44:24 -07:00
Karoy Lorentey
fc8092d044
[Heap] Small preparation for improving insert(contentsOf:)
2022-10-14 10:34:58 -07:00
Karoy Lorentey
2e9447fb1c
[_CollectionsTestSupport] Richer support for combinatorial testing
2022-10-13 15:45:08 -07:00
Karoy Lorentey
dc01b52a21
[Heap] Fix stray character in COLLECTION_INTERNAL_CHECKS condition
2022-10-13 14:51:04 -07:00
Karoy Lorentey
fbebb69a1b
[Heap] Doc updates
2022-10-13 14:50:18 -07:00
Karoy Lorentey
1228e9c162
[Heap] Update docs for replaceMin/replaceMax
2022-10-12 16:01:48 -07:00
Karoy Lorentey
7138144f37
[Heap] Remove unnecessary testing APIs
...
We do not need a _raw initializer in the Heap implementation. The
heapify algorithm will not modify storage if it’s already in the
expected shape, so we can simply define one locally that double checks
that the order remains unchanged.
2022-10-12 16:01:23 -07:00
Karoy Lorentey
92d808d179
Merge branch 'heap-replace-extrema' into release/1.1
2022-10-12 15:23:17 -07:00
Karoy Lorentey
51604cd196
[OrderedCollections] Oops, restore custom wording for areInIncreasingOrder variants
2022-10-12 15:11:57 -07:00
Karoy Lorentey
b1506b6225
[SortedCollections] Remove for now
...
These are still on track for 1.2.0, but I’ll need to bump them from
the release/1.1 branch.
2022-10-11 17:55:35 -07:00
Saleem Abdulrasool
2a81cb1186
Update CMakeLists.txt
...
Remove accidental reference to CMakeLists.txt as a source file.
2022-10-11 13:46:20 -07:00
Karoy Lorentey
a624614717
[OrderedCollections] Document that sort is stable (as of SE-0372)
2022-10-11 13:38:10 -07:00
Karoy Lorentey
5aed92655d
[CMake] Update CMake build configuration
2022-10-11 13:11:37 -07:00
Karoy Lorentey
68844ec6d9
Integer Tricks → IntegerTricks
2022-10-11 13:11:28 -07:00
Karoy Lorentey
8b06c61c7e
Merge branch 'release/1.0' into release/1.1
2022-10-11 11:24:28 -07:00
Karoy Lorentey
6286cd0b99
Restore support for building with Swift 5.5
...
This is mostly about adding more type declarations to deal with type checker limitations in the older compiler.
This also includes workarounds that allow better support for CodingKeyRepresentable in PersistentDictionary, and it fixes a couple of small oversights on various #else branches.
2022-10-10 18:07:49 -07:00
Karoy Lorentey
7cec5d1ed7
[_CollectionsUtilities] Work around SR-14663
...
Unfortunate edge case: the new `initialize(fromContentsOf:)` from
SE-0370 is calling withContiguousStorageIfAvailable, so it is subject
to SR-14663.
This means we can either choose to continue maintaining the
workaround, or we can call the stdlib’s implementation, but not both.
2022-10-10 17:23:22 -07:00
Karoy Lorentey
541bd53958
[BitCollections] Move shared utilities to _CollectionsUtilities
2022-10-09 20:11:51 -07:00
Karoy Lorentey
3d11356006
[OrderedSet] Move RAC utilities to _CollectionsUtilities module
2022-10-09 20:11:51 -07:00
Karoy Lorentey
48ac82c029
[Deque] Modernize code base for Swift 5.5
2022-10-09 20:11:51 -07:00
Karoy Lorentey
1b71d2cd94
[BitSet] Fix invariant violation in member subscript
2022-10-09 16:12:17 -07:00
Karoy Lorentey
33b759b842
[Heap] PriorityQueueModule → HeapModule
2022-10-09 15:44:44 -07:00
Karoy Lorentey
0b86bb11d2
[PersistentSet] Flesh out API surface
...
Add customary overloads for high-level Set operations.
2022-10-09 15:26:32 -07:00
Karoy Lorentey
c1b8d2aa9c
[PersistentSet] Round out Collection conformance with underscored requirements
...
The two highlights are _customIndexOfEquatableElement and _customLastIndexOfEquatableElement, speeding up the implementation of `firstIndex(of:)` and `lastIndex(of:)`.
2022-10-09 15:23:12 -07:00
Karoy Lorentey
d7dbaee8b9
[PersistentCollections] Minor enhancements
2022-10-09 15:20:40 -07:00
Karoy Lorentey
4604c1bc38
[test] Add SetAPIChecker protocol
...
This is useful for validating the API surface of set-like types,
ensuring that we haven’t forgotten to implement members that
are part of users’ baseline expectations.
To ensure maximum utility, this protocol refines neither Collection
nor SetAlgebra.
2022-10-09 13:33:23 -07:00
Karoy Lorentey
78ac2eaed7
[BitSet] Add remove(at:) implementation
2022-10-09 13:20:12 -07:00
Karoy Lorentey
9b7c6ecb10
[SortedDictionary] SortedDictionary, .Iterator, .Index, .SubSequence, .SubSequence.Iterator, .Keys, .Keys.Iterator, .Values, .Values.Iterator: Explicitly conform to Sendable when Key and Value are both Sendable
2022-10-05 11:51:19 -07:00
Karoy Lorentey
58f7cf5a92
[SortedSet] SortedSet, .Iterator, .Index, .SubSequence, .SubSequence.Iterator: Explicitly conform to Sendable when Element is Sendable
2022-10-05 11:48:54 -07:00
Karoy Lorentey
3238b9b575
[PersistentDictionary] PersistentDictionary, .Iterator, .Index, .Keys, .Keys.Iterator, .Values, .Values.Iterator: Explicitly conform to Sendable when Key and Value are both Sendable
2022-10-05 11:46:43 -07:00
Karoy Lorentey
4b04acfe65
[PersistentSet] PersistentSet, .Iterator, .Index: Explicitly conform to Sendable where Element is Sendable
2022-10-05 11:45:23 -07:00
Karoy Lorentey
17b6c8f5c7
[OrderedDictionary] OrderedDictionary, .Iterator, .Values, .Elements, .Elements.SubSequence, .Elements.SubSequence.Iterator: Explicitly conform to Sendable when Element is Sendable
2022-10-05 11:44:06 -07:00
Karoy Lorentey
82aae27cff
[OrderedSet] OrderedSet, .SubSequence, .UnorderedView, .UnstableInternals: Explicitly conform to Sendable when Element is Sendable
2022-10-05 11:39:03 -07:00
Karoy Lorentey
a586afc5bf
[Heap] Heap: Explicitly conform to Sendable when Element is Sendable
2022-10-05 11:36:31 -07:00
Karoy Lorentey
da5284d433
[Deque] Deque, Deque.Iterator: Explicitly conform to Sendable when Element is Sendable
2022-10-05 11:35:54 -07:00
Karoy Lorentey
d2d2da6f3f
[BitSet] BitSet, BitSet.Iterator, BitSet.Index, BitSet.Counted: Explicitly conform to Sendable
2022-10-05 11:33:49 -07:00
Karoy Lorentey
14432582dc
[BitArray] Explicitly conform to Sendable
2022-10-05 11:33:31 -07:00