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
Alejandro Alonso
0374dfc621
Merge pull request #517 from Azoy/renaming-to-xcodeproj
...
Add BasicContainer rename to xcodeproj
2025-09-18 11:59:30 -07:00
Alejandro Alonso
90934a152b
Add BasicContainer rename to xcodeproj
2025-09-18 11:19:20 -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
Alejandro Alonso
1fd30364b5
Merge pull request #515 from Azoy/trailing-xcodeproj
...
[Xcode] Add trailing elements to xcodeproj
2025-09-16 09:48:58 -07:00
Alejandro Alonso
101bac2d30
Add trailing elements to xcodeproj
...
asdasd
2025-09-15 18:27:47 -07:00
Guillaume Lessard
4cfab5d3f1
Merge pull request #513 from DougGregor/trailing-elements
...
Add "trailing elements" module with facilities for tail-allocated storage
2025-09-12 15:11:22 -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
Guillaume Lessard
cb5b73104c
[actions] exclude Xcode 26 beta 6
...
This version of Xcode includes SDKs that don’t support backdeployment of `Span` and friends. This is fixed in Xcode 26 17A321 released on September 9th.
2025-09-12 10:49: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
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
Max Desiatov
868884d743
Add checks for Wasm compatibility to pull_request.yml
...
This library currently has no PR testing for Wasm, even though it's a dependency of other libraries that declare Wasm support. To prevent possible future regressions, let's add Wasm build checks to the CI workflows.
rdar://135961596
2025-08-20 10:46:57 +02: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
b115390475
Merge pull request #506 from viere1234/main
...
[SortedCollections] Fix incorrect offset calculation in BTree.findAnyIndex
2025-08-17 21:32:12 -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
097f923f3f
[workflows] Exclude Swift 5.10 toolchains
2025-08-17 21:18:16 -07:00
Karoy Lorentey
7d75a8e359
[6.0] Add missing ArrayModule/_CollectionsTestSupport dependency
2025-08-17 21:18:16 -07:00
Karoy Lorentey
336567b6dd
Silence very helpful concurrency error on stdout/stderr access
2025-08-17 21:18:15 -07:00
Karoy Lorentey
fd8eb146ec
[TestSupport] Add TestPrintable protocol
2025-08-17 21:18:13 -07:00
Karoy Lorentey
b71cc36f2d
[TestSupport] Add Container validator and StaccatoContainer
...
These are precursors for container protocols, referenced by the new array tests
2025-08-17 13:33:41 -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
0e8dd37073
Box → ClassBox
...
In preparation of adding the public, noncopyable Box type
2025-08-17 13:33:28 -07:00
Karoy Lorentey
2ca8bca67d
Resolve Swift 6 concurrency issues
...
This is just slapping `nonisolated(unsafe)` on global variables in the test suite.
Our tests do not support concurrent execution.
2025-08-17 13:33:28 -07:00
Karoy Lorentey
59bc4a4824
Add support for lifetime tracked noncopyable structs
2025-08-17 13:33:27 -07:00
Karoy Lorentey
04408a450d
Minimal collections: add support for testing contiguous collection APIs
2025-08-17 13:23:01 -07:00
Karoy Lorentey
5f03d1bc24
Adopt availability macros
2025-08-17 13:23:01 -07:00
Karoy Lorentey
54c65310f4
Adopt #filePath in test assertions
2025-08-17 13:23:00 -07:00