831 Commits
Author SHA1 Message Date
Karoy Lorentey ccb6059969 Update docs
Final documentation pass
2025-09-29 09:23:00 -07:00
Karoy Lorentey 8df8ae3537 More doc updates 2025-09-28 22:56:02 -07:00
Karoy Lorentey 9cf2cf254a Update RigidArray API docs 2025-09-27 17:26:13 -07:00
Karoy Lorentey c6cc6ed150 Add some rudimentary docs to Box 2025-09-27 16:05:25 -07:00
Karoy Lorentey e5577bb12b Update DocC documentation 2025-09-27 16:05:12 -07:00
Karoy Lorentey 1dc2b7717f Revert "Don’t allow backdeployment of any Span types below the most recent Darwin OS releases"
This reverts commit 485e69bfb1.

# Conflicts:
#	CMakeLists.txt
2025-09-27 12:15:30 -07:00
Karoy Lorentey bdfaffbba6 Merge pull request #505 from Steelskin/fabrice/main-build-install-swift-libraries-arch-folder
build: Install libraries in an `arch` sub-folder
2025-09-26 23:51:16 -07:00
Karoy Lorentey 485e69bfb1 Don’t allow backdeployment of any Span types below the most recent Darwin OS releases
References to Span types trigger an issue where SwiftPM isn’t able to run command line executable targets or tests on older OSes.

Set the availability of everything that needs span types to the most recent Apple OS releases.

Hopefully we’ll be able to revert this once we figure out a better workaround.
2025-09-26 22:38:18 -07:00
Karoy Lorentey 76c643222f Update CMake config 2025-09-26 22:38:18 -07:00
Karoy Lorentey 097ea09b6a Update Collections.xcodeproj 2025-09-26 22:38:17 -07:00
Karoy Lorentey 31d3abcc22 Reindent TrailingElementsModule 2025-09-26 22:38:16 -07:00
Karoy Lorentey 346934794a Add package-wide source file header to TrailingElementsModule components 2025-09-26 18:53:13 -07:00
Karoy Lorentey 2ae7f11ecf Add draft version of borrowable Container protocol 2025-09-26 18:40:00 -07:00
Karoy Lorentey 155a8a010e InputSpan: Set availability to be consistent with other Span types 2025-09-26 18:40:00 -07:00
Karoy Lorentey 62ba5cf1ee Disable struct Shared for now 2025-09-26 18:39:59 -07:00
Karoy Lorentey 89c7e027ec struct Inout → struct Mut 2025-09-26 18:39:59 -07:00
Karoy Lorentey c0943d7658 struct Borrow → struct Ref 2025-09-26 18:39:59 -07:00
Karoy Lorentey 174efda735 RigidArray/UniqueArray: Final API cleanup pass
- Set availability to match Span availability
- Split implementation into multiple source files
- Add OutputSpan-based primitives that can be the bases of all append/insertion/replaceSubrange variants
- Add the ability to consume a subrange of items using an InputSpan
- Add bulk copying operations generic over the new Container protocol
2025-09-26 18:39:56 -07:00
Alejandro Alonso 377d2a55a8 Fix landing page of collections documentation 2025-09-24 23:21:02 -07:00
Karoy Lorentey c5059a58aa Merge pull request #516 from lorentey/container-previews-1
Containers: Naming updates, minor tweaks
2025-09-17 15:59:29 -07:00
Karoy Lorentey 6340fa0e9b Add an unavailable Box on prior Swift toolchains 2025-09-17 12:51:50 -07:00
Doug Gregor 43367db377 [TrailingArray] Handle trailing arrays where the element has greater alignment than the header
When this happens, we over-allocate and use the alignment of the
elements, and then move the start of the header after the point of
allocation such that the properly-aligned elements follow it
immediately.
2025-09-12 11:23:07 -07:00
Doug Gregor aa36f635ad Rename PaddedStorage to TrailingPadding 2025-09-08 18:59:45 -07:00
Doug Gregor e08ba6087d [TrailingElementsModule] Rename "takePointer" to "leakStorage", which is more descriptive 2025-09-08 18:56:51 -07:00
Doug Gregor b6208a9836 Rename IntrusiveManagedBuffer to TrailingArray 2025-09-08 18:54:48 -07:00
Doug Gregor ad56b1c8c4 [TrailingElementsModule] Underscore internal, ABI-exposed stored properties 2025-09-08 18:52:47 -07:00
Doug Gregor 2e7fb3e12a Add "trailing elements" module with facilities for tail-allocated storage
Introduce new types `IntrusiveManagedBuffer` and `PaddedStorage` that
consist of a fixed-sized header followed by variable-sized storage. The
design of these types is inspired by the existing `ManagedBuffer` type
in the standard library, but has been adjusted both to make them
non-copyable and to eliminate the requirement for heap allocation.
2025-09-05 15:52:27 -07:00
Karoy Lorentey 8890f47600 Remove workaround for lack of recent snapshots for Swift 6.2 on Windows 2025-09-04 15:28:15 -07:00
Karoy Lorentey 7a4e26b4c3 Renaming: DynamicArray → UniqueArray; ArrayModule → BasicContainers 2025-09-04 15:26:13 -07:00
Karoy Lorentey b5fc030a8e Merge pull request #508 from lorentey/container-previews-1
First round of noncopyable constructs: `Box`, `RigidArray`, `DynamicArray`
2025-08-29 18:23:24 -07:00
Karoy Lorentey 5cd51978a4 [Arrays] Use _assumeNonNegative on capacity properties
I’m not convinced this has a real effect, but.
2025-08-29 17:13:34 -07:00
Karoy Lorentey 3ff65774bd [DynamicArray] Reduce growth factor to 1.5 2025-08-29 17:12:19 -07:00
Fabrice de Gans 16f8d5b6bf Make the arch subdir optional
* Add an option to use an arch sub-directory for installing libraries.
* Rename variables to be consistent with other CMake variables in the
  project.
* Remove PlatformInfo as it is no longer needed.
2025-08-29 15:10:34 -07:00
Fabrice de Gans 2b8499a518 build: Install libraries in an arch sub-folder
This is the proper installation scheme for Swift libraries and
prevents having to manually copy them in build.ps1.
2025-08-29 15:00:21 -07:00
Karoy Lorentey 39dc431dbc Adjust use of @_transparent
Avoid using `@inlinable @_transparent` — the `@_transparent` attribute already implies inlinability, although evidently without the `@usableFromInline` parts. (`internal @_transparent` functions aren’t allowed to be called from inlinable functions.)

`@usableFromInline @_transparent` or `@_alwaysEmitIntoClient @_transparent` expresses the author’s intention better, making the choice of exposing a symbol explicit.
2025-08-26 14:03:16 -07:00
Karoy Lorentey dc55a17401 Merge pull request #507 from viere1234/patch
[SortedCollections] Fix B-tree root reduction during element removal causing data loss
2025-08-17 21:32:30 -07:00
Karoy Lorentey 66c49374ab [ArrayModule] Update DynamicArray tests 2025-08-17 21:18:16 -07:00
Karoy Lorentey c844631953 [ArrayModule] Disable new arrays on Windows under Swift 6.2 for now
Our current 6.2 development snapshots are wildly out of date and do not have OutputSpan yet.
2025-08-17 21:18:16 -07:00
Karoy Lorentey bc9c63ae41 [Rope] Highlight CoW issue in Swift 6 mode 2025-08-17 13:33:40 -07:00
Karoy Lorentey a95daaa253 [ArrayModule] Add (not yet functional) experimental/unstable API 2025-08-17 13:33:40 -07:00
Karoy Lorentey c68a2f924f [ContainersPreview] Add InputSpan 2025-08-17 13:33:40 -07:00
Karoy Lorentey c358154342 [ContainersPreview] Add unstable previews Borrow, Inout, Shared 2025-08-17 13:33:40 -07:00
Karoy Lorentey f679ec91b5 [ArrayModule] Add new module with RigidArray and DynamicArray 2025-08-17 13:33:39 -07:00
Karoy Lorentey b6050e3643 Add _isIdentical, _extracting(first:)/_extracting(last:) as UnsafeBufferPointer extensions 2025-08-17 13:33:29 -07:00
Karoy Lorentey c4433dd90c Add ContainersPreview module with struct Box 2025-08-17 13:33:29 -07:00
Karoy Lorentey a0417c18ea Add unsafe primitives for overriding lifetime dependencies 2025-08-17 13:33:28 -07:00
Karoy Lorentey 5f03d1bc24 Adopt availability macros 2025-08-17 13:23:01 -07:00
Brian Chang 21757b6add [BTree] Fix root reduction during element removal causing data loss
When removing elements from a B-tree, the root node could become empty while still having children. The previous code incorrectly called drop() which deallocated all children, causing massive data loss during removal operations.

This fix implements proper root reduction by moving the single remaining child out of the empty root, then safely dropping the now-empty parent node and promoting the extracted child to become the new root.

This fixes `test_modifySubscriptRemoval` in `SortedDictionaryTests`, so we re-enable SortedDictionary tests which now all pass.
2025-08-15 23:21:22 +08:00
Brian Chang e0b68624ba [BTree] Fix incorrect offset calculation in findAnyIndex
`findAnyIndex(forKey:)` miscomputed the global offset when a key was found in an internal B-tree node, due to missing child subtree counts in the calculation.
2025-08-13 13:43:18 +08:00
Karoy Lorentey e7ffe90ae7 Merge pull request #501 from faimin/main
Add the missing COLLECTIONS_SINGLE_MODULE when import InternalCollectionsUtils
2025-08-11 17:29:38 -07:00