Karoy Lorentey
9b322e3e8e
[stdlib] Optional: Allow non-escapable wrapped types
2025-03-24 12:15:38 -07:00
Karoy Lorentey
9d86a45af9
[stdlib] ExpressibleByNilLiteral: allow ~Escapable conformers
2025-03-24 12:15:37 -07:00
Karoy Lorentey
db92d2b915
[stdlib] Generalize MemoryLayout for ~Escapable types
2025-03-24 12:15:33 -07:00
Guillaume Lessard
c21de062bb
Merge pull request #78561 from glessard/rdar137710901-span-properties-prototype
...
[SE-0456] Span properties (part 1)
2025-03-24 08:47:47 -07:00
Guillaume Lessard
7b035936e4
[temporary] disable spans over inline elements
2025-03-21 17:26:29 -07:00
Guillaume Lessard
d5cb7ddf64
[stdlib] changes to lifetime annotations
...
Changes to lifetime annotations implemented in https://github.com/swiftlang/swift/pull/80064
2025-03-21 17:24:45 -07:00
Andrew Trick
c6116be7b5
Update stdlib source with explicit @lifetime(copy self)
2025-03-19 11:59:04 -07:00
Andrew Trick
411a65be2e
Add @lifetime annotation to RawSpan.init() and Span.init()
...
These empty initializers have @lifetime(immortal).
2025-03-19 11:59:04 -07:00
Alejandro Alonso
25b10ebf76
Merge pull request #78092 from Azoy/enumerated-collection
...
[stdlib] Conditionally conform EnumeratedSequence to Collection(s)
2025-03-18 09:24:08 -07:00
Ben Rimmington
bbe26880a5
[stdlib] Update InlineArray (2) ( #79866 )
...
* Amend doc comments.
* Add `guard` for empty array.
* Add tests for initialization errors.
* Use `Self.` to call static method.
* Use `_checkIndex` in `swapAt` method.
* Wrap overlong lines.
2025-03-18 05:59:15 +00:00
Doug Gregor
9c2c4ea07f
Merge pull request #79707 from DougGregor/transparent-integer-conversions
...
[Stdlib performance] Make integer conversion operations transparent
2025-03-17 16:37:16 -07:00
Erik Eckstein
5030c829ea
stdlib: annotate the compiler intrinsic function _arrayConditionalCast with a semantic attribute
...
This is need for the optimizer to remove redundant array casts
2025-03-15 08:32:57 +01:00
Mike Ash
f1070f7f1e
Merge pull request #80000 from swiftlang/jgrynspan/145945680-mangledtypename-nonescapable
...
[Runtime] Allow ~Escapable types in _getMangledTypeName.
2025-03-14 11:53:12 -04:00
Guillaume Lessard
39ca3dee4d
Merge pull request #80003 from glessard/span-gardening
...
[stdlib] fix `Span`'s `Sendable` conformance
2025-03-13 18:54:42 -07:00
Guillaume Lessard
e81a2ee3a1
[stdlib] correctly express Span sendability
2025-03-13 13:54:18 -07:00
Alejandro Alonso
b0d98549cb
Update to match api acceptance
2025-03-13 09:58:44 -07:00
Alejandro Alonso
9894440454
Conditionally conform EnumeratedSequence to Collections
2025-03-13 09:58:09 -07:00
Guillaume Lessard
35b851453d
[gardening] update some copyright years
2025-03-12 09:56:41 -07:00
Doug Gregor
ad626f9c0e
[Stdlib performance] Make integer conversion operations transparent
...
The integer conversion operations were inlinable, but aren't getting
inlined in debug builds, which results in unreasonably poor
performance. Mark them as transparent so we don't end up with
unspecialized generic code in the hot path.
Fixes https://github.com/swiftlang/swift/issues/78501
2025-03-12 07:40:49 -07:00
Mike Ash
c7922b29af
Merge pull request #79774 from mikeash/bigger-empty-va-list-storage
...
[Stdlib] Make alignedStorageForEmptyVaLists bigger.
2025-03-11 23:10:24 -04:00
Mike Ash
70e1931caa
[Stdlib] Make alignedStorageForEmptyVaLists bigger.
...
Expand alignedStorageForEmptyVaLists to eight Doubles. This produces more predictable output for code that calls a variadic function without parameters where the function still expects them, such as passing an arbitary string to a string formatting function. It's still unsound, but this makes it more predictable.
rdar://145083971
2025-03-11 09:29:07 -04:00
Doug Gregor
733dd86c92
Merge pull request #79896 from DougGregor/strict-memory-safety-cleanups
...
Strict memory safety cleanups
2025-03-11 01:26:30 -07:00
Michael Gottesman
04bb69f426
Merge pull request #79727 from gottesmm/pr-025c1133954b74e7b4eda77e1a6f3bcafd4eb6cf
...
[concurrency] Add initial support for SwiftSettings to control defaultIsolation at the file level.
2025-03-10 22:35:00 -07:00
Michael Gottesman
f64dd5a8d5
[concurrency] Add initial support for SwiftSettings to control defaultIsolation at the file level.
...
We introduce a new macro called #SwiftSettings that can be used in conjunction
with a new stdlib type called SwiftSetting to control the default isolation at
the file level. It overrides the current default isolation whether it is the
current nonisolated state or main actor (when -enable-experimental-feature
UnspecifiedMeansMainActorIsolated is set).
2025-03-10 17:33:45 -07:00
Doug Gregor
f668feaf64
[Standard library] Additional strict-memory-safety annotations
2025-03-10 15:42:05 -07:00
Guillaume Lessard
940628a23a
[stdlib] add newly-required unsafe annotations
2025-03-10 15:20:51 -07:00
Guillaume Lessard
39b4303e79
[stdlib] match KeyValuePairs’s Element type
2025-03-10 08:54:07 -07:00
Guillaume Lessard
83dc08d006
[stdlib] remove an unneeded annotation
2025-03-10 08:54:07 -07:00
Guillaume Lessard
7188d0b187
[stdlib] add span property to KeyValuePairs
2025-03-10 08:54:07 -07:00
Guillaume Lessard
d0d528521a
[stdlib] add span property to InlineArray
2025-03-10 08:54:06 -07:00
Guillaume Lessard
264747ac77
[stdlib] add span property to CollectionOfOne
2025-03-10 08:51:56 -07:00
Guillaume Lessard
7bbb8348e3
[stdlib] add span properties to array types
2025-03-10 08:51:56 -07:00
Guillaume Lessard
acdfb3711a
[stdlib] refactor lazy-eager-bridging for reusability
2025-03-10 08:51:56 -07:00
Guillaume Lessard
9cdd83b469
[stdlib] add span properties to UnsafeBufferPointer family
2025-03-10 08:51:56 -07:00
Guillaume Lessard
85b53bb023
[stdlib] add bytes property to Span
2025-03-10 08:51:56 -07:00
Guillaume Lessard
7214717fba
Merge pull request #79708 from glessard/span-gardening
...
[SE-0447] Span and RawSpan tests
2025-03-07 22:00:58 -08:00
nate-chandler
c0ba520fac
Merge pull request #79781 from nate-chandler/general-coro/20250227/1
...
[CoroutineAccessors] Dispatch and PtrAuth.
2025-03-07 20:08:42 -08:00
Ben Rimmington
e5487d86f0
Merge pull request #79800 from benrimmington/inline-array
...
[stdlib] Update `InlineArray`
2025-03-08 02:32:44 +00:00
Guillaume Lessard
4ec8c6e345
[stdlib] document unsafe behaviour for empty spans
2025-03-07 13:23:25 -08:00
Guillaume Lessard
3bd04acadb
Apply suggestions from code review
2025-03-07 13:23:25 -08:00
Guillaume Lessard
5f24c66ea7
[stdlib] define properties also for ~Escapable elements
...
These should be available for any type of element `Span` can have in the future, including non-escapable elements. Making this change now avoids future churn.
Addresses rdar://146130842
2025-03-07 13:23:24 -08:00
Evan Wilde
28f96411c9
Merge pull request #79778 from etcwilde/ewilde/yo-dawg-heard-you-liked-swift
...
CMake: option to disable swift in swift
2025-03-07 13:12:00 -08:00
Ben Rimmington
aa64816b98
Merge branch 'main' into inline-array
2025-03-07 20:31:04 +00:00
Guillaume Lessard
077a01f807
Merge pull request #79813 from glessard/unchecked-bounds-are-unsafe
...
[stdlib] Unchecked bounds are unsafe
2025-03-07 12:20:05 -08:00
Nate Chandler
35d06c325d
[CoroutineAccessors] Witness and vtable dispatch.
...
And thunking.
2025-03-07 11:46:50 -08:00
Evan Wilde
ddaf003c56
Get stdlib building again
...
PR 79186 (https://github.com/swiftlang/swift/pull/79186 ) moved one of
the mandatory passes from the C++ implementation to the Swift
implementation resulting in a compiler that is unable to build the
standard library. The pass used to ensure that inaccessible control-flow
positions after an infinite loop was marked with `unreachable` in SIL.
Since the pass is no longer running, any function that returns a value
that also has an infinite loop internally must place a fatalError after
the infinite loop or it will fail to compile as the compiler will
determine that the function does not return from all control flow paths
even though some of the paths are unreachable.
2025-03-06 13:32:54 -08:00
Doug Gregor
0ec13f9a90
Build compiler and runtimes without Swift
...
Remove dependency on macros from compiler and stdlib build when
bootstrapping the compiler without Swift available.
2025-03-06 13:32:52 -08:00
Ben Rimmington
30e167b499
[stdlib] Add unchecked subscript to InlineArray
2025-03-06 19:25:50 +00:00
Ben Rimmington
d0bab4082d
[stdlib] Add isEmpty property to InlineArray
2025-03-06 19:25:50 +00:00
Ben Rimmington
428d269a18
[stdlib] Use Index typealias of InlineArray
2025-03-06 19:25:50 +00:00