Jai
d9383e6aa5
Fix crash when accessing span of empty InlineArray ( #85268 )
...
Fix crash when creating a Span from an empty InlineArray whose storage
is only byte-aligned. #85265 .
---------
Co-authored-by: Guillaume Lessard <glessard@tffenterprises.com >
2025-11-04 10:15:24 -05:00
Xiaodi Wu
a9df691c33
[stdlib] Revise InlineArray documentation ( #84978 )
...
Update documentation for `InlineArray` to include examples with type
sugar, reword to avoid certain jargon that may be unfamiliar to some
standard library users, and incorporate additional details mostly drawn
from the proposal text.
---------
Co-authored-by: Alex Martini <amartini@apple.com >
2025-10-22 14:18:39 -07:00
Erik Eckstein
ec8dcc98ad
rename the feature AddressOfProperty to AddressOfProperty2
...
Fixes a build problem when using a mainline compiler with a 6.2 Swift.swiftinterface file.
This was caused by mistakenly cherry-picking the `#if $AddressOfProperty` conditions in the stdlib into 6.2 without the required compiler change.
2025-08-01 08:00:51 +02:00
Allan Shortlidge
71a5d9bd74
AST: Re-baseline ValueGenericsNameLookup feature.
2025-07-31 10:21:55 -07:00
Allan Shortlidge
6dd3e49954
AST: Re-baseline BuiltinEmplaceTypedThrows feature.
2025-07-31 10:21:55 -07:00
Guillaume Lessard
1d776a6b06
[stdlib] in-place initializer for InlineArray
2025-07-14 23:04:46 -07:00
Ben Rimmington
1b1e9d4d80
[stdlib] Update InlineArray documentation ( #82363 )
...
Remove misleading big O notation from initializers.
2025-06-27 11:14:24 +01:00
Alejandro Alonso
596b015994
Adjust ABI test and guard address of property
2025-06-25 14:08:53 -07:00
Alejandro Alonso
6953a7c6f9
Update InlineArray.swift
2025-06-25 14:00:16 -07:00
Alejandro Alonso
5ac3a655d4
Update InlineArray.swift
2025-06-25 14:00:15 -07:00
Alejandro Alonso
db13bf0802
Update InlineArray.swift
2025-06-25 14:00:14 -07:00
Alejandro Alonso
8058bd26f6
Remove underscored with buffer pointer APIs on InlineArray
2025-06-25 14:00:12 -07:00
Erik Eckstein
0dbc63a00b
Guard InlineArray addressors with feature flag
...
To be able to parse a recent Swift.swiftinterface file with a 6.2 compiler.
This is a follow-up fix for https://github.com/swiftlang/swift/pull/81441
rdar://154118968
2025-06-24 16:02:54 +02:00
Erik Eckstein
e3f25d710d
stdlib: make InlineArray work with the new vector_base_addr instruction
...
Don't unsafe-cast from the InlineArray struct itself, but from `_storage` which is the actual array buffer.
This also requires making `_storage` a var.
2025-05-12 19:25:12 +02:00
Alejandro Alonso
865aed0c38
Wrap InlineArray inlinable code in new feature
2025-04-29 10:02: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
Alejandro Alonso
b3f3dd79cf
Handle dynamically accessing the static member from type(of:)
2025-04-14 15:32:46 -07:00
Guillaume Lessard
79fb06faf3
[stdlib] update lifetime annotation syntax
2025-04-09 09:56:06 -07:00
Guillaume Lessard
f931d296a2
[stdlib] add InlineArray.mutableSpan
2025-04-09 09:56:06 -07:00
Guillaume Lessard
7dd029c372
Revert "[temporary] disable spans over inline elements"
...
This reverts commit e5c7dfc430 .
2025-04-04 14:50:51 -07:00
Allan Shortlidge
322443d91d
stdlib: Address StrictMemorySafety warnings in Array related code.
2025-03-31 16:43:01 -07:00
Dario Rexin
2f4a8a8658
Merge pull request #80272 from glessard/rdar137710901-span-properties-prototype
...
[temporary] disable spans over inline elements
2025-03-25 09:02:14 -07:00
Guillaume Lessard
e5c7dfc430
[temporary] disable spans over inline elements
...
unblocks building a debug-mode standard library
2025-03-25 08:55:53 -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
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
Guillaume Lessard
83dc08d006
[stdlib] remove an unneeded annotation
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
Ben Rimmington
aa64816b98
Merge branch 'main' into inline-array
2025-03-07 20:31:04 +00: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
Ben Rimmington
23e1741978
[stdlib] Update doc comments of InlineArray
...
- Write an overview of the type.
- Amend summaries of the initializers.
- Remove inapplicable example code.
- Add "Complexity: O(*n*)" to initializers.
- Add "Complexity: O(1)" to indexing APIs.
- Add FIXME comments.
2025-03-06 19:25:50 +00:00
Guillaume Lessard
dfb2e2f12e
[stdlib] annotate uses of Range.init(_uncheckedBounds:)
2025-03-05 18:52:11 -08:00
Meghana Gupta
4edaaa4dcc
Remove @_transparent from InlineArray.count
...
It is orthogonal to @_semantics. @_transparent annotated functions need to be
inlined early and @_semantics annotated functions need to be inlined late.
Remove @_transparent since it has no effect here.
2025-02-28 09:52:02 -08:00
Meghana Gupta
6908e9b776
Annotate some Span and InlineArray's methods with semantics
2025-02-28 09:52:00 -08:00
Doug Gregor
22eecacc35
Adopt unsafe annotations throughout the standard library
2025-02-26 14:28:01 -08:00
Alejandro Alonso
ff58dc6739
Use other feature syntax
2025-02-17 14:50:42 -08:00
Alejandro Alonso
7480668c7b
Add feature for Builtin.emplace typed throws
2025-02-17 12:45:05 -08:00
Alejandro Alonso
e4fb1f6761
Rename Slab to InlineArray
2025-02-11 10:26:44 -08:00