Commit Graph
13 Commits
Author SHA1 Message Date
Guillaume Lessard 73f45ac311 [concurrency] conform Deque.Iterator uncheckedly to Sendable 2024-08-19 18:03:24 -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 55db6d936c Remove workaround for SR-14663
Our updated minimum toolchain requirement is Swift 5.7, and the stdlib in that version has the fix included.

We’ve seen reports that the bug may not deploy back in all cases to earlier OS releases, but it still seems worth trying to remove the workaround, as it has some undesirable runtime implications.
2024-01-31 19:34:37 -08:00
Karoy Lorentey e27e422927 [Deque] Update copyright notices 2024-01-31 19:34:36 -08:00
Karoy Lorentey 04ee7c0b1d [Deque] Modernize generic declaration syntax 2024-01-31 19:34:34 -08:00
Karoy Lorentey a8dad62bc9 Remove obsolete swift(>=5.5)/swift(>=5.6) checks 2023-04-10 18:33:52 -07:00
Karoy Lorentey cbab9e3737 Introduce COLLECTIONS_SINGLE_MODULE condition 2023-03-21 18:42:33 -07:00
Karoy Lorentey 48ac82c029 [Deque] Modernize code base for Swift 5.5 2022-10-09 20:11:51 -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 98cd753866 [Deque] Force-inline the subscript’s _modify accessor to work around a performance issue
Resolves #164.
2022-08-31 13:53:52 -07:00
Károly Lőrentey efefae5653 [Deque] append(contentsOf:): Use exponential capacity reservation
Depending on the supplied sequence, `Deque.append(contentsOf:)` currently reserves just enough capacity as it needs to perform the append. This isn't right -- it can result in O(n) reallocs instead of O(log(n)) when items are incrementally appended in constant-sized `append(contents:)` batches.
2021-11-15 16:12:28 -08:00
Karoy Lorentey 56b82b1b7f Freeze some types for consistency with their inlinable initializers
Note: @frozen does *not* mean that we actually consider these struct types frozen. Their layout may arbitrarily change between even minor releases.
2021-08-30 15:31:12 -07:00
Karoy Lorentey fa45de1018 Work around another MergeModules crash (#62)
* [utils] Add utility for shuffling sources to help reproduce MergeModules issues

* [Deque] Collapse Sequence/Collection conformances into a single file

The MergeModules phase in the compiler is broken: it isn’t always able to correctly handle circular dependencies across source files, like the ones that keep organically popping up with Sequence/Collection conformances that are defined in separate files.

Such dependencies sometimes triggers a compiler crash, depending on some (unknown) environmental parameters.

Trying to manually find and eliminate these circular dependencies has not proved productive. Instead, roll all Collection conformances into a single, huge source file.

* [Deque] Update CMakeLists
2021-07-08 17:02:00 -07:00