Commit Graph
1081 Commits
Author SHA1 Message Date
3405691582 8bbbe287c3 ManagedBuffer.capacity is unavailable on OpenBSD.
ManagedBuffer.capacity depends on malloc introspection (e.g.,
`malloc_size`), which is not available on this platform -- and is thus
marked as such.

Here, _HashNode.Storage is a ManagedBuffer. Thankfully, the uses of
.capacity are fairly limited: one for statistic purposes, which we just
completely omit on the platform, and the other, setting a minimum
capacity in the header by the buffer's .capacity; the alternative being
setting that minimum capacity directly.
2025-05-16 00:21:24 -07:00
Dakshin Devanand 0495c7b6a1 Make Heap._UnsafeHandle min/maxValue tie-breaker consistent with Swift.min/max 2025-05-16 00:19:24 -07:00
Peter Meyers 8349280c51 Add test 2025-05-16 00:16:10 -07:00
Peter Meyers 3fb4855e0e [OrderedSet] Add OrderedSet.appending(contentsOf:) 2025-05-16 00:16:00 -07:00
Karoy Lorentey f17ad98e30 Merge pull request #471 from lorentey/editorconfig
Add .editorconfig
2025-05-15 14:58:18 -07:00
Karoy Lorentey 117a1aad2d Don’t set a global tab width; indent_width is a fine default for it
Still override it to 4 in actual code with indent_size 2, in case we have stray tabs in there somewhere.
2025-05-15 14:15:30 -07:00
Karoy Lorentey b0020457d5 Merge pull request #472 from lorentey/specialize
Reimplement `_specialize(_:for:)` for the 5.9 stdlib
2025-05-15 14:10:06 -07:00
Karoy Lorentey cb7bb04262 Fix some omissions 2025-05-14 17:20:05 -07:00
Karoy Lorentey 0bd8dec08b Reimplement _specialize(_:for:) for the 5.9 stdlib 2025-05-14 16:40:25 -07:00
Karoy Lorentey 79d2904ac7 Add .editorconfig 2025-05-14 16:14:58 -07:00
Karoy Lorentey 9241bc09b9 Merge pull request #453 from apple/add-github-actions-1.2
[release/1.2] [CI] Add support for GitHub Actions
2025-03-05 16:31:22 -08:00
Mishal Shah cfbebf4c80 Drop support for Swift 5.8 2025-03-04 22:10:05 -08:00
Mishal Shah 890bcb6c6a Update the CODE_OF_CONDUCT.md to https://swift.org/code-of-conduct
(cherry picked from commit 5a152a7e33)
2025-03-04 22:05:09 -08:00
Mishal Shah 5448059189 [CI] Add support for GitHub Actions 2025-03-04 22:01:39 -08:00
Karoy Lorentey 973459e875 Merge pull request #449 from lorentey/typo-fix-1.2
[1.2][OrderedDictionary] fix a typo
2025-02-06 17:57:28 -08:00
김봉균 1cb3ca50a6 fix typo 2025-02-06 17:54:37 -08:00
Karoy Lorentey b5e880dd6a Merge pull request #446 from Steelskin/fabrice/cmake-install-paths
[cmake] Install libraries in standard directories
2025-02-06 17:51:22 -08:00
Fabrice de Gans 99db3179fc Change file names for toolchain module build
This also reverts 40adeb7, which seems to have been done in error.
2025-02-03 15:42:44 -08:00
Fabrice de Gans e0021fbb75 [cmake] Install libraries in standard directories
Previously, libs were installed under `lib/swift/${os}`. They should be
installed in the default library directory for the relevant target
system.
In addition, swiftmodules were installed in the older layout format.
This changes to use the standard modern layout format for swiftmodules.
2025-02-03 13:16:49 -08:00
Karoy Lorentey 0c11f0915a Merge pull request #447 from michael-yuji/amd64
fix amd64 support
2025-01-28 16:45:37 -08:00
Michael Chiu 40adeb7fd7 shouldnot install .swiftdoc as .swiftmodule 2025-01-27 15:13:00 -08:00
Michael Chiu 1e32c450e4 Fix amd64 support 2025-01-27 15:12:43 -08:00
Karoy Lorentey 1e6a561203 Merge pull request #433 from apple/dn-optimize-unspecialized-performance
Optimize unspecialized `OrderedSet.init` and `OrderedSet.firstIndex(of:)`
2024-11-21 16:31:49 -08:00
Karoy Lorentey 2709b96947 Minor code style updates 2024-11-18 13:59:31 -08:00
David Nadoba 13245da5f5 Optimize unspecialized OrderedSet.init and OrderedSet.firstIndex(of:) 2024-11-18 13:59:23 -08:00
Karoy Lorentey ee59f38779 Merge pull request #423 from apple/release-1.2-setup
Set up release/1.2 branch
2024-10-01 12:51:07 -07:00
Karoy Lorentey ccff1fbf71 Post-merge CI configuration updates 2024-09-30 10:37:37 -07:00
Karoy Lorentey ed81088202 [Xcode] Update Xcode project 2024-09-25 17:01:23 -07:00
Karoy Lorentey 755c06dd88 Adopt _pointerBitWidth 2024-09-25 14:17:32 -07:00
Karoy Lorentey e4cd17cc53 Remove support code for outdated toolchains 2024-09-25 14:14:48 -07:00
Karoy Lorentey 28f66a0ce5 Mark empty singletons as nonisolated(unsafe) 2024-09-25 14:06:31 -07:00
Karoy Lorentey 09cbf9b271 [_CollectionsUtilities] Fix visibility modifiers in single module mode 2024-09-25 14:02:36 -07:00
Karoy Lorentey 596f00fe91 [_CollectionsUtilities] Delete obsolete compatibility definitions
(cherry picked from commit 0d4376d5cd)

# Conflicts:
#	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-09-25 14:02:04 -07:00
Karoy Lorentey 5a60599749 Update README 2024-09-24 18:29:53 -07:00
Karoy Lorentey d27f39e3b9 Bump required toolchain to Swift 5.9 2024-09-24 16:47:15 -07:00
Karoy Lorentey 671108c966 Merge pull request #422 from apple/riscv64
[CMake] Handle riscv64
1.1.4
2024-09-24 16:12:49 -07:00
Neil Jones a49afbe1be add support for riscv64
(cherry picked from commit 7d18b37a95)

# Conflicts:
#	cmake/modules/SwiftSupport.cmake
2024-09-24 15:46:07 -07:00
Karoy Lorentey 44187cfe62 Merge pull request #421 from al45tair/fix-static-linux-sdk-support
[Build] Use `SWIFT_SYSTEM_NAME` rather than just lowercasing.
2024-09-23 10:31:49 -07:00
Alastair Houghton fec5a5a630 [Build] Use SWIFT_SYSTEM_NAME rather than just lowercasing.
Lowercasing `CMAKE_SYSTEM_NAME` to find the name Swift uses for a platform
is not guaranteed to work.  Instead, use the `SWIFT_SYSTEM_NAME` variable,
which lets us override the name when building the Static SDK for Linux.

Fixes #420.
2024-09-23 11:16:41 +01:00
Karoy Lorentey 409410c518 Merge pull request #419 from lamtrinhdev/Update_CMake_release_1.1
Add more file in Sources/BitCollections/CMakeLists.txt
2024-09-20 13:59:14 -07:00
LamTrinh.Dev 7f49fa5164 Add more file in Sources/BitCollections/CMakeLists.txt 2024-09-04 18:18:09 +07:00
Guillaume Lessard 9bf03ff58c Merge pull request #414 from glessard/rdar134300306
[concurrency] conform Deque.Iterator to unchecked-Sendable
1.1.3
2024-08-19 18:45:56 -07:00
Guillaume Lessard 0f138be402 remove references to a deleted file 2024-08-19 18:17:03 -07:00
Guillaume Lessard 73f45ac311 [concurrency] conform Deque.Iterator uncheckedly to Sendable 2024-08-19 18:03:24 -07:00
Yuta Saito 38602cff9f Merge pull request #408 from kateinoigakukun/yt/wasm-archs
[CMake] Add support for WebAssembly target architectures
2024-08-02 01:02:02 +09:00
Yuta Saito effb33569a [CMake] Add support for WebAssembly target architectures
To repair the swift-corelibs-foundation build on WebAssembly, we need to
add support for Wasm targets to swift-collections' CMake build system.
2024-08-01 00:30:34 +00:00
Karoy Lorentey 293314a584 Merge pull request #403 from quokkaKyu/release/1.1
add 'final' keyword to class
2024-07-18 14:38:35 -07:00
Karoy Lorentey 2db08b3d06 Merge pull request #405 from apple/accidentally-quadratic-BigString-init
[BigString] Fix accidentally quadratic `BigString.init`
2024-07-15 15:33:11 -07:00
Karoy Lorentey 5e1fe6e8f0 [BigString] Fix accidentally quadratic BigString.init
When ingesting a `String` instance, `BigString` assumes that the input string has a reasonably efficient UTF-8 view.

Unfortunately, that is very much not the case when the input happens to be backed by a bridged NSString object — it appears that in this case, the ingester loop invokes some operation(s) with linear complexity in the size of the entire input, rendering the ingester’s overall complexity quadratic.

The BigString ingester is only expected to operate within a single chunk at the time. It’s unclear precisely which operation triggers the quadratic behavior; ideally we should figure it out and resolve it with a more targeted fix.

In the meantime, a blunt stopgap fix is to force-transcode the input string to UTF-8 at the time the ingester is initialized. This unnecessarily wastes some (temporary) memory on holding the transcoded string, but it avoids the quadratic cliff.
2024-07-15 13:13:44 -07:00
quokkakyu 6b8276e252 add 'final' keyword to class 2024-07-15 09:27:27 +09:00