Commit Graph

27 Commits

Author SHA1 Message Date
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