Commit Graph
657 Commits
Author SHA1 Message Date
Karoy Lorentey 8dd4e591b3 [BitArray] Update DocC following bitwise op adjustments 2024-01-29 17:04:27 -08:00
Karoy Lorentey de8ba5d7ad [BitArray] Disable bitwise operators for now
The current family of operations is far too restrictive, and the generalization is a topic of ongoing investigation. In particular, the operator syntax seems unlikely to survive when we want to support operations over slices.

Don’t ship BitArray with API that we’ll potentially regret; instead, just leave these off for now.
2024-01-29 17:01:00 -08:00
Karoy Lorentey 1a0ac8c06c Merge branch 'release/1.0' into release/1.1
# Conflicts:
#	Sources/DequeModule/CMakeLists.txt
#	Sources/DequeModule/Deque+Collection.swift
#	Sources/DequeModule/Deque+Sendable.swift
#	Sources/OrderedCollections/OrderedDictionary/OrderedDictionary+Elements.SubSequence.swift
#	Sources/OrderedCollections/OrderedDictionary/OrderedDictionary+Elements.swift
#	Sources/OrderedCollections/OrderedDictionary/OrderedDictionary+Sendable.swift
#	Sources/OrderedCollections/OrderedDictionary/OrderedDictionary+Sequence.swift
#	Sources/OrderedCollections/OrderedDictionary/OrderedDictionary+Values.swift
#	Sources/OrderedCollections/OrderedSet/OrderedSet+Sendable.swift
#	Sources/OrderedCollections/OrderedSet/OrderedSet+SubSequence.swift
#	Sources/OrderedCollections/OrderedSet/OrderedSet+UnorderedView.swift
#	Sources/OrderedCollections/OrderedSet/OrderedSet+UnstableInternals.swift
2023-12-21 15:17:15 -08:00
Karoy Lorentey cdcf9e606a Update CMake configuration 2023-12-19 17:45:02 -08:00
Karoy Lorentey 9d4a1e5ad2 [OrderedSet] Don’t try to conform to Sendable below Swift 5.5 2023-12-19 17:10:37 -08:00
Karoy Lorentey 03d60bed63 Merge pull request #343 from lorentey/sendable-1.0
[1.0] Backport Sendable conformances on all public types
2023-12-18 18:43:30 -05:00
Karoy Lorentey 8bfcaddd5f [1.0] Update copyright dates 2023-12-18 15:35:56 -08:00
Karoy Lorentey 7d43c07a71 Backport Sendable conformances on all public types
Resolves #317
2023-12-18 15:25:38 -08:00
Karoy Lorentey 40e737cdaf [OrderedDictionary] Fix usage of deprecated API in index(forKey:) docs
Resolves #289.
2023-12-18 15:00:55 -08:00
Karoy Lorentey 1016901f5e Merge pull request #341 from vanvoorden/vanvoorden/deque-equality
[Deque] check deque equality with buffer identity
2023-12-12 21:54:46 -05:00
Karoy Lorentey 8b8a14f0e1 Merge pull request #340 from vanvoorden/vanvoorden/ordered-set-equality
[OrderedSet] forward ordered set equality to elements property
2023-12-12 21:54:30 -05:00
Rick van Voorden 2122327782 deque storage equality helper 2023-12-12 14:16:21 -08:00
Rick van Voorden e37e505da5 ordered set fix compiler error 2023-12-12 12:33:38 -08:00
Rick van VoordenandKaroy Lorentey 9430147598 ordered set bounds equality check
Co-authored-by: Karoy Lorentey <klorentey@apple.com>
2023-12-12 12:27:48 -08:00
Rick van VoordenandKaroy Lorentey 5fa8e440a2 remove extra test equality helper function
Co-authored-by: Karoy Lorentey <klorentey@apple.com>
2023-12-12 11:18:18 -08:00
Rick van Voorden 22306e061a check deque equality with buffer identity 2023-12-11 19:30:34 -08:00
Rick van Voorden e2b033c8ea forward ordered set subsequence equality to elements property 2023-12-11 15:24:07 -08:00
Rick van Voorden 3caf13b4f8 forward ordered set equality to elements property 2023-12-08 20:32:31 -08:00
Rick van Voorden e42fb868b7 forward ordered dictionary values equality to values property 2023-12-08 17:39:25 -08:00
Karoy Lorentey 33e2e610f5 Merge branch 'release/1.0' into release/1.1
# Conflicts:
#	Tests/_CollectionsTestSupport/MinimalTypes/MinimalDecoder.swift
2023-11-14 18:06:24 -08:00
Karoy Lorentey c44d56f4c8 Merge pull request #327 from lorentey/heap-better-bulk-insert
[Heap] insert(contentsOf:) Switch to Floyd’s if we’re inserting too many items
2023-11-14 17:56:22 -08:00
Karoy LorenteyandStephen Canon 19ec155f60 Update Sources/HeapModule/Heap.swift
Co-authored-by: Stephen Canon <stephentyrone@gmail.com>
2023-11-14 11:06:05 -08:00
Karoy Lorentey 069dd4e5df [Heap] insert(contentsOf:) Switch to Floyd’s if we’re inserting too many items 2023-11-13 21:28:24 -08:00
Karoy Lorentey 7686af1555 [Heap] Improve type-level doc comment 2023-11-13 18:33:43 -08:00
kati-kms b72a6cfd93 Fix typos: OrderedSet.swift DocC 2023-11-10 15:38:16 +09:00
Karoy Lorentey 33f23b6a06 [RopeModule] Remove unnecessary typealiases
These render the emitted .swiftinterface unusable when the module is built with library evolution enabled.
2023-10-18 17:57:00 -07:00
Karoy Lorentey bd1a622735 [CMake, Xcode] Update buid configurations 2023-10-18 15:54:07 -07:00
Karoy Lorentey 9436aab34c [HashTreeCollections] _StorageHeader.swift → _HashNodeHeader.swift 2023-10-18 15:52:05 -07:00
Karoy Lorentey de2c8a9086 [RopeModule] Allow building with library evolution enabled
rdar://114659667
2023-10-18 14:22:12 -07:00
Karoy Lorentey bf742617f3 [test] Fix typename shadowing warning in Swift 5.9 2023-10-02 21:09:11 -07:00
Karoy Lorentey 09c09f0f73 Fix CustomStringConvertible/CustomDebugStringConvertible conformances
- For CustomStringConvertible, `description` should print elements using `String(reflecting:)` rather than `String(describing:)`, to avoid element output from interfering with syntactically relevant punctuation within structured list displays.
- To make this work without making displays overly verbose, make `debugDescription` mostly the same as `description`, except for escaping raw string displays when and if needed.
- Avoid printing type names in `debugDescription` — it is generally not helpful, as the type is already easily accessible elsewhere. Including it makes for overly verbose displays when the type serves as an Element of a collection.
- Avoid having `debugDescription` return the empty string — it can be confusing when such a description appears in list displays.

Resolves #301.
2023-07-06 17:25:11 -07:00
Joakim Hassila b3d089e37d Update TreeSet.md
Fix typo

Replace this paragraph with a description of your changes and rationale. Provide links to an existing issue or external references/discussions, if appropriate.
2023-06-21 09:42:04 +02:00
Karoy Lorentey 03e7f0c401 [Rope] Fix find to return a zero remainder for the end position 2023-06-02 17:37:30 -07:00
Karoy Lorentey 03c9ef743a [Rope] Fix crash when calling replaceSubrange/removeSubrange on an empty rope 2023-06-01 20:24:24 -07:00
Karoy Lorentey 523a409ba4 Merge pull request #287 from lorentey/fix-BitSet-isEqualSet
[BitSet] Fix a thinko in BitSet.isEqualSet
2023-05-18 19:09:33 -07:00
Karoy Lorentey de0f594185 [BitSet] Fix a thinko in BitSet.isEqualSet 2023-05-18 18:36:29 -07:00
Karoy Lorentey 0c002200bb [CollectionUtilities] Silence a warning on 32 bit platforms
It turns out `UInt.bitWidth` is getting too eagerly inlined, so conditions based on it trigger spurious “code will never be executed” warnings. Silence those by switching to looking at `MemoryLayout<UInt>`, which doesn’t get turned into a constant *that* early.
2023-05-18 18:32:41 -07:00
Karoy Lorentey 3e4a8b4dff Merge branch 'release/1.0' into release/1.1
# Conflicts:
#	.gitignore
#	Package.swift
#	Sources/Collections/Collections.docc/Collections.md
#	Sources/Collections/Collections.docc/Extensions/Deque.md
#	Sources/Collections/Collections.docc/Extensions/OrderedSet.UnorderedView.md
#	Sources/Collections/Collections.docc/Extensions/OrderedSet.md
#	Sources/DequeModule/DequeModule.docc/DequeModule.md
#	Sources/DequeModule/DequeModule.docc/Extensions/Deque.md
#	Sources/OrderedCollections/HashTable/_HashTable+UnsafeHandle.swift
#	Sources/OrderedCollections/OrderedCollections.docc/Extensions/OrderedSet.UnorderedView.md
#	Sources/OrderedCollections/OrderedCollections.docc/Extensions/OrderedSet.md
#	Sources/OrderedCollections/OrderedCollections.docc/OrderedCollections.md
#	Sources/OrderedCollections/OrderedDictionary/OrderedDictionary.swift
#	Sources/OrderedCollections/OrderedSet/OrderedSet.swift
#	Sources/OrderedCollections/Utilities/_UnsafeBitset.swift
#	Utils/generate-docs.sh
2023-04-24 13:45:55 -07:00
Karoy Lorentey dce7b156e7 [Rope] remove(at:): Fix assertion when removing the last item creates a deficiency 2023-04-17 17:20:07 -07:00
Karoy Lorentey b0fe7ca8ba [Rope] replaceSubrange: take a sequence, not a collection 2023-04-14 14:38:30 -07:00
Karoy Lorentey 3fa52c48de [Rope] Add remove(at:), remove(at:in:) variants that preserve the position 2023-04-13 19:36:09 -07:00
Karoy Lorentey 1925ed3001 [Rope] update(at:by:): Invalidate indices
Calling this function is supposed to invalidate all indices other than
the input index — so let’s do that.
2023-04-12 17:55:19 -07:00
Karoy Lorentey cead2b3d64 [Rope] index(_:offsetBy:in:preferEnd:) fix result tuple labeling
This renames `remainder` to `remaining`, restoring API consistency.
2023-04-12 17:54:13 -07:00
Karoy Lorentey bc21b90ff1 [Rope] Minor usability fixes and API additions 2023-04-12 17:53:04 -07:00
Karoy Lorentey 4afdfe4da2 [Rope] Flesh out docs a little bit
Rope remains woefully undocumented, and I suspect its abstraction
level isn’t right for general use, but let’s see if writing up some
documentation for it will make it a bit more accessible.
2023-04-12 17:52:19 -07:00
Karoy Lorentey b727b93f9b Merge pull request #277 from lorentey/remove-swift-5.5-checks
Remove obsolete swift(>=5.5)/swift(>=5.6) checks
2023-04-10 18:45:31 -07:00
Karoy Lorentey a8dad62bc9 Remove obsolete swift(>=5.5)/swift(>=5.6) checks 2023-04-10 18:33:52 -07:00
Karoy Lorentey ac0c075ccc [HashCollections] Ensure self doesn’t get destroyed before we’re done working with it
The HashCollections module includes several mutating methods that dereference unmanaged references to internal nodes after the last usage of `self`. Prevent the compiler from destroying `self` before we’re done working within descendants of its tree.
2023-04-10 18:24:33 -07:00
Karoy Lorentey 1ea846bcae Merge pull request #275 from lorentey/ordereddictionary-doc-updates
[OrderedDictionary] Explicitly mention in documentation that keys/values are ordered
2023-04-10 17:45:21 -07:00
Karoy Lorentey 900e7851ab Merge pull request #271 from lorentey/fix-rope-sendable
Rope: Fix `Sendable` conformance
2023-04-10 17:43:23 -07:00