Karoy Lorentey
7d7d7aea1b
[stdlib] Delete leftover workaround
2024-03-18 11:03:49 -07:00
Karoy Lorentey
cf1c92f461
[stdlib] Remove all new public API for now
2024-03-18 11:03:49 -07:00
Karoy Lorentey
38001ae739
[stdlib] Apply @Azoy’s remaining review notes (thanks!)
2024-03-18 11:03:49 -07:00
Karoy Lorentey
2a1f15587e
[stdlib] Use hasFeature(Foo) instead of opaque $Foo syntax
2024-03-18 11:03:49 -07:00
Karoy Lorentey
776ec74dcf
[stdlib] {consuming,borrowing}{Flat,}Map: adopt typed throws
2024-03-18 11:03:49 -07:00
Karoy Lorentey
71519aaf98
[stdlib] Apply minor review notes
2024-03-18 11:03:49 -07:00
Karoy Lorentey
febfd34aac
[stdlib] Make MemoryLayout techically copyable
...
It’s a caseless enum, but there’s no reason to change this aspect of it.
2024-03-18 11:03:49 -07:00
Karoy Lorentey
2d23ab3226
[stdlib] withUnsafePointer: Spell out Error conformance on E
2024-03-18 11:03:49 -07:00
Karoy Lorentey
d70f197c24
[stdlib] Update SwiftStdlibLegacyABI convention to use @available(swift, obsoleted: 1)
...
Using version `2` here is just weird for no reason.
2024-03-18 11:03:49 -07:00
Karoy Lorentey
ce62475cd9
[stdlib] ManagedBuffer: Support for noncopyable Element
...
Header is tricky, but it’s on the TODO list for later.
2024-03-18 11:03:49 -07:00
Karoy Lorentey
d7c402f2f2
[stdlib] Add partial ~Copyable support to withUnsafeTemporaryAllocation facility
...
Generalizing the result type is not yet possible, but T works!
2024-03-18 11:03:49 -07:00
Karoy Lorentey
b83282b689
[stdlib] Temporarily disable round trip validation for debug types
2024-03-18 11:03:49 -07:00
Karoy Lorentey
3507a0cf8c
[stdlib] Add support for noncopyables to withUnsafePointer(to:) family
2024-03-18 11:03:49 -07:00
Karoy Lorentey
285c3d3744
[stdlib] Add support for noncopyables to withExtendedLifetime(of:) family
2024-03-18 11:03:49 -07:00
Karoy Lorentey
72fa98c4b6
[stdlib] Result: Initial support for noncopyable payloads
2024-03-18 11:03:49 -07:00
Karoy Lorentey
3cb9b3383e
[stdlib] Add support for noncopyables to swap(_:_:)
2024-03-18 11:03:49 -07:00
Karoy Lorentey
5ae757181e
[stdlib] UnsafeRawBufferPointer: new interactions with noncopyable types
2024-03-18 11:03:49 -07:00
Karoy Lorentey
d15d5004c8
[stdlib] Unsafe[Mutable]BufferPointer: Add support for non-copyable Pointee types
2024-03-18 11:03:49 -07:00
Karoy Lorentey
78270e1e4e
[stdlib] UnsafePointer: Resolve most of the symbol mismatches
2024-03-18 11:03:49 -07:00
Karoy Lorentey
5ceb055e29
[stdlib] UnsafePointer: Don’t let the compiler synthesize hashValue
2024-03-18 11:03:49 -07:00
Karoy Lorentey
5d90d81dac
[stdlib] Optional: Add @_preInverseGenerics to ExpressibleByNilLiteral conformance
2024-03-18 11:03:49 -07:00
Karoy Lorentey
deda7d6865
[stdlib] UnsafePointer: Add @_preInverseGenerics to _Pointer conformance
2024-03-18 11:03:49 -07:00
Karoy Lorentey
209c66cf74
[stdlib] UnsafePointer: Add @_preInverseGenerics to stored properties
2024-03-18 11:03:49 -07:00
Karoy Lorentey
0a676db16f
[stdlib] Generalize swap(_:_:) for noncopyable types
2024-03-18 11:03:49 -07:00
Karoy Lorentey
805f94b5a8
[stdlib] OpaquePointer: Adopt @_preInverseGenerics
2024-03-18 11:03:49 -07:00
Karoy Lorentey
d6296ab966
[stdlib] UnsafeRawPointer: Adopt @_preInverseGenerics
2024-03-18 11:03:49 -07:00
Karoy Lorentey
baa317c29a
[stdlib] Optional: Adopt @_preInverseGenerics
2024-03-18 11:03:49 -07:00
Karoy Lorentey
56ddafb0a0
[stdlib] UnsafePointer: Adopt @_preInverseGenerics
2024-03-18 11:03:49 -07:00
Karoy Lorentey
bfd2b068c1
[stdlib] MemoryLayout: Adopt @_preInverseGenerics
2024-03-18 11:03:49 -07:00
Karoy Lorentey
7d87ad5a8a
[stdlib] OpaquePointer: new interactions with noncopyable types
2024-03-18 11:03:49 -07:00
Karoy Lorentey
0568dbf903
[stdlib] UnsafeRawPointer: new interactions with noncopyable types
2024-03-18 11:03:49 -07:00
Karoy Lorentey
85a6b97e7a
[stdlib] Optional: Initial support for noncopyable payloads
...
- Enable BorrowingSwitch feature within the stdlib
- ExpressibleByNilLiteral: Add retroactive support for noncopyable conforming types
- Optional: draft an API surface for noncopyable payloads
[stdlib] Oops, the ExpressibleByNilLiteral conformance kept its implicit copyability
2024-03-18 11:03:49 -07:00
Karoy Lorentey
d0b39ac8db
[stdlib] Unsafe[Mutable]Pointer: Add support for non-copyable Pointee types
...
[stdlib] Pull back @_aeic on pointer → integer conversions
[stdlib] UnsafeMutablePointer.allocate: Fix thinko
[stdlib] Disable support for noncopyable pointees on some pointer operations
We have to temporarily pull back support for noncopyable pointees for UnsafeMutablePointer.initialize(to:), .moveInitialize, .moveUpdate, as the builtins they’re calling are no longer accepting such types.
These will return following a builtin audit.
[stdlib] Remove workarounds for certain builtins not supporting noncopyable use
https://github.com/apple/swift/pull/71733 fixed this!
[stdlib] Update FIXME
[stdlib] UnsafePointer: Update Swift version numbers
[stdlib] UnsafePointer: Actually hide legacy ABI
[stdlib] Remove workaround for U[M]BP.withMemoryRebound
2024-03-18 11:03:49 -07:00
Karoy Lorentey
7fc54cab80
[stdlib] MemoryLayout: Add support for non-copyable type arguments
...
[stdlib] MemoryLayout: Update Swift version numbers
[stdlib] MemoryLayout: Actually hide legacy ABI
2024-03-18 11:03:48 -07:00
Guillaume Lessard
d00866aa3c
Merge pull request #72365 from glessard/rethrowing-disappearing-act
...
[stdlib] preserve untyped-throws versions of functions
2024-03-15 19:36:19 -07:00
Guillaume Lessard
8459d0616d
[stdlib] make swiftinterfaces compatible with older toolchains
2024-03-15 16:50:12 -07:00
David Smith
dc405525f9
Optimize checking for all-ASCII bytes ( #72312 )
2024-03-14 16:13:34 -07:00
Kuba (Brecka) Mracek
d5e5723294
Merge pull request #72293 from kubamracek/embedded-synchronization
...
[embedded] Start building Synchronization in embedded Swift mode
2024-03-13 18:46:28 -07:00
Allan Shortlidge
20a8399488
stdlib: Guard @inlinable use of withMemoryRebound() with #if $TypedThrows.
...
Older compilers can no longer see the definition of `withMemoryRebound()` now
that it has adopted typed throws (https://github.com/apple/swift/pull/72036 ).
Resolves rdar://124540428
2024-03-13 11:38:24 -07:00
Kuba Mracek
48b8228acd
[embedded] Start building Synchronization in embedded Swift mode
2024-03-13 10:07:37 -07:00
Alejandro Alonso
56bb298d14
Merge pull request #72258 from Azoy/commandline-fixes
...
[stdlib] Deprecate CommandLine.arguments setter
2024-03-12 16:45:26 -07:00
Guillaume Lessard
d4abcde64a
Merge pull request #72233 from glessard/toplevel-withUUMP-typed-throws
...
[stdlib] convert `_withUnprotectedUnsafeMutablePointer()` to typed throws
2024-03-12 14:39:46 -07:00
Alejandro Alonso
552edd2ccb
Merge pull request #72101 from Azoy/sendable-all-the-things
...
[stdlib] Sendablize all the things
2024-03-12 13:37:15 -07:00
Alejandro Alonso
9d318220b9
Deprecate CommandLine.arguments setter
2024-03-12 09:54:53 -07:00
Alejandro Alonso
17401c627b
Remove explicit unavailable sendable from keypath
2024-03-12 09:20:40 -07:00
Doug Gregor
5bdd4e5772
Improve @_implements for associated type witnesses
...
Allow `@_implements` to be expressed in an extension of the protocol in
which the associated type is defined. Use this to uncomment an
intended use of `@_implements` in `Sequence` that could be used to
replace a longstanding hack for associated type inference.
Since this change means that the standard library module interface
won't be accepted by older compilers, introduce a suppressible feature
ssociatedTypeImplements` that covers the use of `@_implements` on type
declarations. This will hide the `@_implements` attribute from older
compilers.
2024-03-11 14:28:20 -07:00
Guillaume Lessard
0ccfa42957
[stdlib] convert _withUnprotectedUnsafeMutablePointer() to typed throws
2024-03-11 11:34:01 -07:00
Guillaume Lessard
78273b2390
Merge pull request #72089 from glessard/toplevel-withUMP-typed-throws
...
[stdlib] convert `withUnsafeMutablePointer()` to typed throws
2024-03-08 13:52:23 -08:00
Guillaume Lessard
805dd70cfe
Merge pull request #72074 from glessard/toplevel-withbytes-typed-throws
...
[stdlib] convert `withUnsafeBytes()` to typed throws
2024-03-08 08:55:08 -08:00
Oscar Byström Ericsson
af0c9fae8e
FlattenSequence/distance(from:to:) untrapping Int.min (v6).
...
1. Put the first region inside the if-else (same branch condition).
2. Use the forward distance in the highest region (as done in the middle).
2024-03-07 13:19:45 +01:00