Stephen Canon
567c619e3f
Remove "if and only if" language from [Raw]Span's _pointer field
...
"can be nil" paired with "if and only if" lends itself to misreading, so let's clean this up a bit.
2025-08-29 09:36:12 -04:00
Guillaume Lessard
476491392b
[stdlib] guard against underflow
2025-08-15 17:24:06 -07:00
Guillaume Lessard
f6a7c61245
[stdlib] fix availability of Span.bytes
2025-07-29 17:19:34 -07:00
Erik Eckstein
b540204a64
stdlib: specify the count of Span and MutableSpan as _assumeNonNegative
2025-07-22 12:24:58 +02:00
Erik Eckstein
cf16c1b19f
stdlib: revert workaround for Span bounds checking
2025-07-22 12:21:37 +02:00
Stephen Canon
ee9b38ca22
Use an explicit unsigned comparison for span index checks ( #83150 )
...
LLVM ought to be able to do this transformation for us, but it currently fails to do so. We can code around it easily enough. https://github.com/swiftlang/swift/pull/83172 has a better long-term fix.
2025-07-21 16:06:17 -04:00
Guillaume Lessard
b72c4422b8
Merge pull request #81637 from glessard/rdar147780495-OutputSpan-updates
...
[SE-0485] OutputSpan and OutputRawSpan
2025-07-17 14:14:52 -07:00
Guillaume Lessard
31235db588
[stdlib] add OutputSpan to backdeployment library
2025-07-16 17:15:28 -07:00
Guillaume Lessard
2689ef31e1
Merge pull request #82959 from glessard/rdar155474776-extracting
...
[stdlib] Implementation for SE-0488
2025-07-15 13:59:00 -07:00
Guillaume Lessard
fa87b3b944
[stdlib] remove bulk-update from MutableRawSpan per SE-0485
2025-07-14 23:04:49 -07:00
Guillaume Lessard
923a6e5292
[stdlib] remove bulk-update from MutableSpan per SE-0485
2025-07-14 23:04:48 -07:00
Guillaume Lessard
97a0bd743a
[stdlib] rename MutableRawSpan.extracting functions
2025-07-14 23:04:48 -07:00
Guillaume Lessard
6439a32997
[stdlib] rename MutableSpan.extracting functions
2025-07-14 23:04:48 -07:00
Guillaume Lessard
9e98783ec5
[stdlib] make OutputRawSpan changes from SE-0485
2025-07-14 23:04:48 -07:00
Guillaume Lessard
5f5e6b68c9
[stdlib] make OutputSpan changes from SE-0485
2025-07-14 23:04:47 -07:00
Guillaume Lessard
ada94db18c
[stdlib] internal UnsafeRawBufferPointer tweaks
2025-07-14 23:04:47 -07:00
Guillaume Lessard
733a261b28
[stdlib] InlineArray consumed by OutputSpan
2025-07-14 23:04:46 -07:00
Guillaume Lessard
4ed4f2e63c
[stdlib] add OutputRawSpan
2025-07-14 23:04:45 -07:00
Guillaume Lessard
2fce25b53f
[stdlib] add OutputSpan
2025-07-14 23:04:45 -07:00
Guillaume Lessard
1e3d26f8a6
[stdlib] rename RawSpan.extracting functions
2025-07-09 17:36:35 -07:00
Guillaume Lessard
dd833569e0
[stdlib] rename Span.extracting functions
2025-07-09 17:25:27 -07:00
Guillaume Lessard
fe6a8fac39
Merge pull request #82866 from glessard/rdar155275054-default-inits-allspans
...
[stdlib] Default initializers for Span-family types
2025-07-08 09:46:14 -07:00
Guillaume Lessard
619ec95693
[stdlib] add no-parameter initializers for Span types
...
This was an addition in SE-0485.
2025-07-07 17:57:12 -07:00
Guillaume Lessard
9ac65cf735
[stdlib] fix some unsafe errors
2025-07-07 02:29:51 -07:00
Valeriy Van
b1082d400f
Update stdlib/public/core/Span/RawSpan.swift
...
Co-authored-by: Guillaume Lessard <glessard@tffenterprises.com >
2025-06-09 20:14:46 +03:00
Valeriy Van
e49050a42a
Update stdlib/public/core/Span/RawSpan.swift
...
Co-authored-by: Guillaume Lessard <glessard@tffenterprises.com >
2025-06-09 20:14:25 +03:00
Valeriy Van
83d3d4b3cb
Fix doc comment
2025-06-09 18:01:36 +03:00
Valeriy Van
1c0306871c
Revert "Rename parameter count => byteCount to make signature match doc comment and match other methods"
...
This reverts commit 4129383ba7 .
2025-06-09 17:59:13 +03:00
Valeriy Van
43ead66f42
Fix doc comment
2025-06-09 11:56:45 +03:00
Valeriy Van
4129383ba7
Rename parameter count => byteCount to make signature match doc comment and match other methods
2025-06-09 11:56:06 +03:00
Valeriy Van
505d55c4d1
Add type parameter to make code match doc comment
2025-06-09 11:54:44 +03:00
Valeriy Van
c14699310f
Fix typo ( #82052 )
2025-06-07 23:16:43 -04:00
Guillaume Lessard
3d70e6087d
[stdlib] fix an extraneous symbol exported by MutableSpan
2025-05-28 13:32:21 -07:00
Doug Gregor
f04e916dff
Fix issue with older compilers not handling MutableSpan code
...
The use of SendableCompletionHandlers here is completely incidental,
because it happened to be introduced at roughly the same time as the
bits we needed for MutableSpan. Fixes rdar://148072153.
2025-05-05 10:12:06 -07:00
Andrew Trick
c25d46320c
Merge pull request #81105 from atrick/rdar146319009-borrow-constraint
...
Fix LifetimeDependenceDiagnostics: scoped dependence on a copy
2025-04-26 08:08:15 -07:00
Doug Gregor
050a514588
[Strict memory safety] Update standard library for unsafe treated as a call effect
2025-04-25 21:54:23 -07:00
Andrew Trick
e9d11283b9
Add _overrideLifetime to Span APIs
...
The implementation previously took advantage of a missing diagnostic. They
returned a borrowed Span with a dependency on a copied argument. This illegally
promotes the dependency. This is what the author intended to do (the
implementation was correct) but the compiler can't know that so the code needs
to be explicit about overriding the lifetime.
2025-04-25 17:58:24 -07:00
Guillaume Lessard
1f93566d69
Merge pull request #80517 from glessard/rdar138440979-MutableSpan-mutableBytes
...
[SE-0467] add mutableBytes to MutableSpan
2025-04-13 10:33:09 -07:00
Guillaume Lessard
cb390140d6
[stdlib] correct MutableRawSpan sizing
2025-04-10 10:31:18 -07:00
Guillaume Lessard
53b6b45bda
[stdlib] update lifetime annotation syntax
2025-04-10 10:31:18 -07:00
Guillaume Lessard
77431f5217
[stdlib] add MutableSpan.mutableBytes
2025-04-10 10:31:05 -07:00
Slava Pestov
17868a7b50
CompatibilitySpan: Fix stdlib build on visionOS
...
Swift CI tests visionOS, but PR testing does not. Oops.
2025-04-09 12:37:45 -04:00
Slava Pestov
43da773685
stdlib: Update {Mutable,}{Raw,}Span availability for backward deployment
2025-04-07 21:32:48 -04:00
Slava Pestov
4c8c3aab4f
CompatibilitySpan: Add MutableRawSpan.swift, MutableSpan.swift
2025-04-07 21:32:44 -04:00
Meghana Gupta
ef1e94577f
Revert "Merge pull request #80540 from swiftlang/revert-80452-lifetimeinout"
...
This reverts commit 6eaa07a880 , reversing
changes made to e75ee3f4cf .
2025-04-04 09:50:13 -07:00
Artem Chikin
39e1791b67
Revert "Add support for inout lifetime dependence"
2025-04-04 09:00:09 -07:00
Meghana Gupta
f4a980d62d
Update stdlib
2025-04-03 17:32:09 -07:00
Allan Shortlidge
d2e8edfc93
stdlib: Address StrictMemorySafety warnings in Span related code.
2025-03-31 16:45:08 -07:00
Guillaume Lessard
c9b1ab8c42
Merge pull request #79650 from glessard/rdar138440979-MutableSpan
...
[SE-0467] MutableSpan, with mutableSpan properties to Array, ArraySlice and ContiguousArray.
2025-03-28 17:59:47 -07:00
Guillaume Lessard
abf29e7433
[stdlib] adjust MutableSpan’s element constraint
2025-03-27 17:19:15 -07:00