Commit Graph
307 Commits
Author SHA1 Message Date
Guillaume Lessard c290bd3d04 Copy Span prototype to its own branch 2024-10-06 10:24:54 -07:00
Karoy Lorentey f6c1d3e348 [Tests] DynoArrayTests → DynamicArrayTests 2024-09-01 20:52:36 -07:00
Karoy Lorentey 3c66dab3b0 [Deque] Turn Deque<T> into a Shared<RigidDeque<T>> 2024-09-01 20:46:43 -07:00
Karoy Lorentey 5d51572d69 [Deque] Stop using ManagedBuffer
Instead, just have a regular class holding a HypoDeque. This requires two allocations per deque, but it makes representation a lot more straightforward.

I do not have a workable solution for empty singletons, though.
2024-08-06 19:17:04 -07:00
Karoy Lorentey 774be11219 [Future] Add HypoArray and DynoArray 2024-08-06 10:44:12 -07:00
Karoy Lorentey d58c5b60a5 Merge branch 'main' into future
# Conflicts:
#	Sources/CMakeLists.txt
#	Sources/InternalCollectionsUtilities/Compatibility/UnsafeMutableBufferPointer+SE-0370.swift.gyb
#	Sources/InternalCollectionsUtilities/Compatibility/UnsafeMutablePointer+SE-0370.swift.gyb
#	Sources/InternalCollectionsUtilities/Compatibility/UnsafeRawPointer extensions.swift.gyb
#	Sources/InternalCollectionsUtilities/Compatibility/autogenerated/UnsafeMutableBufferPointer+SE-0370.swift
#	Sources/InternalCollectionsUtilities/Compatibility/autogenerated/UnsafeMutablePointer+SE-0370.swift
#	Sources/InternalCollectionsUtilities/Compatibility/autogenerated/UnsafeRawPointer extensions.swift
#	Sources/InternalCollectionsUtilities/Specialize.swift.gyb
#	Sources/InternalCollectionsUtilities/autogenerated/Specialize.swift
2024-08-05 20:31:30 -07:00
Guillaume Lessard fe649d9a4c add convenience initializers for Span 2024-07-16 08:56:22 -07:00
Guillaume Lessard c0d0230905 add convenience initializers for RawSpan 2024-07-16 08:55:15 -07:00
Guillaume Lessard 6f4d9d8560 improve internal representation of RawSpan 2024-07-14 04:31:13 -07:00
Guillaume Lessard b7aab16cce improve internal representation of Span 2024-07-14 04:22:33 -07:00
Guillaume Lessard fefc900b92 changed uncheckedBounds to just unchecked 2024-07-02 14:02:58 -07:00
Alejandro Alonso 9c4d47328e Add box and cell tests 2024-07-02 11:26:50 -07:00
Guillaume Lessard f049c7ae66 better document unsafe operations of RawSpan 2024-06-28 18:35:37 -07:00
Guillaume Lessard 99b025049e add utilities to determine span containment relationships 2024-06-26 16:40:27 -07:00
Guillaume Lessard ce574378f8 improve bounds-checking and bounds-validation api 2024-06-25 10:27:59 -07:00
Guillaume Lessard b7ccc7206c use byteCount instead of count for RawSpan
- use the label `byteOffset` more consistently
2024-06-20 15:05:33 -07:00
Guillaume Lessard 539d11545e de-emphasize indices property on Span 2024-06-20 15:00:29 -07:00
Guillaume Lessard 5c2623b1a8 add tests for ContiguousStorage 2024-06-20 01:32:12 -07:00
Guillaume Lessard 228f3f3422 fix tests and ContiguousStorage 2024-06-19 18:10:42 -07:00
Guillaume Lessard b30103588f Rename prefix, suffix, dropFirst and dropLast 2024-06-17 11:09:30 -07:00
Guillaume Lessard 7f26f2705c Rename elementsEqual with an underscore 2024-06-14 12:47:25 -07:00
Guillaume Lessard fc451765e9 rename a property of RawSpan 2024-06-14 12:44:12 -07:00
Guillaume Lessard e94873a993 add Span and RawSpan, with tests 2024-06-14 11:31:48 -07:00
Guillaume Lessard 7b0599c529 fix autoclosure capture issue 2024-06-13 18:40:52 -07:00
Alejandro Alonso 908dafa21b Introduce the Inout type 2024-06-12 13:52:12 -07:00
Karoy Lorentey ad79ce5b6a Merge branch 'release/1.1'
# Conflicts:
#	.swiftci/5_10_ubuntu2204
#	.swiftci/5_7_ubuntu2204
#	.swiftci/5_8_ubuntu2204
#	.swiftci/5_9_ubuntu2204
#	.swiftci/nightly_6_0_macos
#	.swiftci/nightly_6_0_ubuntu2204
#	.swiftci/nightly_main_macos
#	.swiftci/nightly_main_ubuntu2204
2024-06-05 10:28:47 -07:00
Karoy Lorentey 6c31865359 [test] Add tests for Rope.join’s copy-on-write behavior 2024-05-31 16:59:25 -07:00
Karoy Lorentey 35d5746117 Rename _CollectionsUtilities to InternalCollectionsUtilities
We are forced to do this due to an Xcode issue (#364) with underscored module names.

This module remains unstable, despite the removal of the underscore. Directly importing it from outside the package remains unsupported. This module and/or its entire contents may go away or change in incompatible ways in any future swift-collections release.
2024-05-29 14:00:13 -07:00
Karoy Lorentey e9112f40dd [test] TreeDictionary.Keys: Remove stray print that’s flooding test output 2024-04-23 15:53:40 -07:00
Karoy Lorentey e004cd36fa Merge branch 'release/1.1' into merge.1.1→main
# Conflicts:
#	CMakeLists.txt
#	README.md
2024-02-07 17:35:40 -08:00
Karoy Lorentey 94cf62b3ba Merge pull request #352 from vanvoorden/vanvoorden/tree-dictionary-keys-equality
[TreeDictionary][Keys] Add Equatable and Hashable Conformance to TreeDictionary.Keys
2024-02-06 18:58:46 -08:00
Rick van Voorden c61e5e23c8 tree dictionary keys hashable cleanup 2024-02-06 17:26:21 -08:00
Rick van Voorden a04721360b tree dictionary keys hashable cleanup 2024-02-06 16:25:33 -08:00
Rick van Voorden ffa9e65ccc wip tree dictionary keys hashable 2024-02-06 15:58:31 -08:00
Rick van Voorden ff73ed71bb wip tree dictionary keys hashable 2024-02-06 15:57:54 -08:00
Dimitris Apostolou 7539583245 Fix typos
# Conflicts:
#	Sources/SortedCollections/BTree/_BTree+BidirectionalCollection.swift
#	Sources/SortedCollections/BTree/_BTree+UnsafeCursor.swift
#	Sources/SortedCollections/BTree/_BTree.Builder.swift
#	Sources/SortedCollections/BTree/_BTree.swift
#	Sources/SortedCollections/BTree/_Node.Splinter.swift
#	Sources/SortedCollections/BTree/_Node.Storage.swift
#	Sources/SortedCollections/BTree/_Node.UnsafeHandle+Insertion.swift
#	Sources/SortedCollections/BTree/_Node.swift
#	Tests/SortedCollectionsTests/BTree/Node+Join Tests.swift
2024-02-06 15:52:26 -08:00
Rick van Voorden 3abf60adae wip tree dictionary keys hashable 2024-02-06 14:21:29 -08:00
Dimitris Apostolou ab744afc39 Fix typos 2024-02-04 20:35:42 +02:00
Karoy Lorentey ffa4a58bc1 Update remaining copyright notices 2024-02-02 16:20:22 -08:00
Karoy Lorentey 3c99c84286 [Heap] Clean up description
- Don’t print the type name
- Include some information identifying the heap instance
2024-02-02 16:20:21 -08:00
Karoy Lorentey a0da2df799 [BitArray] Update LosslessStringConvertible initializer to accept new description format 2024-01-31 19:34:36 -08:00
Karoy Lorentey ae641c3d5d [BitArray] Fix description implementation; update tests 2024-01-31 19:34:36 -08:00
Karoy Lorentey e01391e562 [BitArray] Fix logic error in toggleAll()
D’oh — lucky the test coverage caught this; unlucky that the test wasn’t deterministic, and the chances of this occurring were quite low.
2024-01-31 19:34:36 -08:00
Karoy Lorentey 04aab35232 Merge pull request #353 from lorentey/disable-bitwise-ops-on-bitarray
[BitArray] Disable bitwise operators for now
2024-01-29 17:43:36 -08:00
Karoy Lorentey 7c9df00706 Merge pull request #328 from lorentey/heap-minmax-properties
[Heap] Convert min() and max() to properties
2024-01-29 17:42:06 -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
Rick van Voorden d846bb25b1 edit equal keys check 2024-01-28 14:15:17 -08:00
Rick van Voorden 0e4014c468 tree dictionary keys equality 2024-01-28 13:49:26 -08:00
Filip Klembara c623860624 Add tests for clearing btree using removeLast 2024-01-04 08:49:28 +01:00
Filip Klembara 9f3cced986 Add tests for clearing btree using removeFirst 2024-01-04 08:49:04 +01:00