Guillaume Lessard
0922b6b622
[span] improve argument labels for safe initializers
2024-11-07 11:19:28 -08:00
Guillaume Lessard
9a8f5a7e9d
[span] update more doc-comments
2024-11-07 11:18:40 -08:00
Guillaume Lessard
6272ad66a0
[span] address review feedback
2024-11-06 22:48:28 -08:00
Christian
023590a566
Improved Error._domain calculation ( #77369 )
2024-11-06 15:09:55 -08:00
Allan Shortlidge
26bd056852
stdlib: Add @_disfavoredOverload to various functions for Embedded.
...
Functions like `fatalError()` have overloads for Embedded Swift only that take
StaticString instead of String, since String is unavailable. Unfortunately,
many of these overloads create the opportunity for ambiguity in certain
contexts. The easiest way to avoid the ambiguities is to mark each of the
overloads taking `String` as `@_disfavoredOverload`. Another approach that
could work would be to remove the default arguments from the `String` variants
in Embedded Swift only, but that would create even more duplication of source
code so it doesn't seem worth it.
2024-11-02 10:41:08 -07:00
Kuba Mracek
db94dc7d36
[Concurrency] Fix memory leak around mismatched refcounting in Concurrency
2024-10-31 21:43:02 -07:00
Kuba (Brecka) Mracek
79d8de952f
Merge pull request #77240 from kubamracek/embedded-printing-types
...
[embedded] Make Bool string-interpolatable in Embedded Swift, clarify support in docs
2024-10-26 07:56:36 -07:00
Kuba Mracek
68e01f2249
[embedded] Make Bool string-interpolatable in Embedded Swift, clarify support in docs
2024-10-25 22:05:58 -07:00
Guillaume Lessard
c2abbbf4f6
[span] annotate lifetimes that can’t be correct
2024-10-25 18:45:10 -07:00
Guillaume Lessard
2d65dc4f41
[span] lifetime argument tweaks
2024-10-25 18:45:10 -07:00
Guillaume Lessard
c4c9383658
[span] borrow pointer or buffer initializer parameters
2024-10-25 18:45:10 -07:00
Guillaume Lessard
eaf74acbcb
[span] add missing RawSpan initializers
2024-10-25 18:45:10 -07:00
Guillaume Lessard
fafd9d3690
[span] readability improvements
2024-10-25 18:45:10 -07:00
Guillaume Lessard
e37475bace
[span] small ABI tweaks
2024-10-25 18:45:10 -07:00
Guillaume Lessard
57345f7f6f
[span] remove _shrink functions added for review purposes
2024-10-23 18:19:21 -07:00
Guillaume Lessard
b508206844
[span] improve indices(of:) and byteOffsets(of:)
2024-10-23 18:19:21 -07:00
Guillaume Lessard
5d49bd60b7
[span] allow start pointers of empty spans to be exposed
2024-10-23 14:59:07 -07:00
Guillaume Lessard
6fa9780bc5
[span] improve _elementsEqual
2024-10-23 14:48:25 -07:00
Guillaume Lessard
108034e4b0
[span] fix a bounds-checking mistake
2024-10-23 14:06:26 -07:00
Guillaume Lessard
e58e50d17c
[span] add availability annotations
2024-10-23 13:14:26 -07:00
Guillaume Lessard
909409181a
[gardening] add a relevant FIXME comment
2024-10-23 13:14:22 -07:00
Kuba Mracek
0048c1c624
[embedded] Document the details of the Embedded Swift's refcounting scheme
2024-10-21 08:56:22 -07:00
Guillaume Lessard
979523014c
[span] update to match latest proposal tweaks
2024-10-19 23:46:54 -07:00
Kuba Mracek
8666aef39f
[embedded] Fix a memory leak caused by incorrect refcounting logic around doNotFreeBit
2024-10-18 23:19:40 -07:00
Guillaume Lessard
7faf7bc634
[stdlib] add Span
2024-10-18 22:57:43 -07:00
Guillaume Lessard
5b3647270b
[stdlib] add RawSpan
2024-10-18 22:57:43 -07:00
Guillaume Lessard
5e819aeea6
[stdlib] generalize isPOD() over suppressible protocols
2024-10-18 22:57:43 -07:00
David Smith
bed89567d4
Disable calling _swift_stdlib_dyld_is_objc_constant_string, it's unnecessary currently ( #77064 )
2024-10-17 19:01:08 -07:00
Kuba (Brecka) Mracek
44bea0552a
Merge pull request #76029 from kubamracek/embedded-traps-unique
...
[embedded] Make assert helper functions always inlined to avoid trap basic blocks from merging
2024-10-16 22:46:39 -07:00
Nate Cook
9265743adc
Add validation to CollectionDifference decoder ( #76876 )
...
The `CollectionDifference` type has a few different invariants
that were not being validated when initializing using the type's
`Decodable` conformance, since the type was using the
autogenerated `Codable` implementation. This change provides
manual implementations of the `Encodable` and `Decodable`
requirements, and adds tests that validate the failure when trying
to decode invalid JSON for CollectionDifference (and a few other
types).
2024-10-11 17:23:55 -07:00
David Smith
bca125c760
rdar://137709108 (Mitigate the code size increase from eager-lazy array bridging by marking some methods release none) ( #76966 )
2024-10-10 23:29:25 -07:00
Karoy Lorentey
29cf262ef7
[stdlib] String.Index: conform to CustomDebugStringConvertible instead
...
Apply the LSG’s modifications as detailed in their review notes.
2024-10-07 17:00:13 -07:00
Karoy Lorentey
28ed16b469
[stdlib] String.Index.description: Explicitly note that the returned format is not stable
...
This tends to be generally through for most `description` properties, but explicitly calling it out should help preventing people from trying to parse the result in this case.
2024-10-07 16:02:18 -07:00
Karoy Lorentey
e39613b851
[stdlib] String.Index.description: Use @_aeic for now
2024-10-07 16:02:18 -07:00
Karoy Lorentey
01792372a9
[stdlib] String.Index: conform to CustomStringConvertible
...
This better exposes the internals of string indices, demystifying their operation and radically simplifying working with them.
2024-10-07 16:02:16 -07:00
Konrad `ktoso` Malawski
dea3b59331
Merge pull request #76250 from ktoso/wip-experimental-isolated-deinit
2024-10-03 17:19:10 +09:00
Egor Zhdan
7f597c63ae
Merge pull request #76726 from swiftlang/egorzhdan/char8_t
...
[cxx-interop] Support `char8_t` C++20 type
2024-10-02 16:10:17 +01:00
Doug Gregor
af49172b55
Mark Range.init(uncheckedBounds:) and ClosedRange.init(uncheckedBounds:) as @unsafe
2024-09-30 15:20:36 -07:00
Konrad `ktoso` Malawski
45b97f146b
Merge branch 'main' into wip-experimental-isolated-deinit
2024-09-30 13:47:39 +09:00
Amritpan Kaur
6066418340
Merge pull request #73242 from amritpan/metatype-kp-implementation
2024-09-28 02:46:15 -07:00
Philippe Hausler
4f53f189e0
[Embedded] Enable RangeSet for embedded targets ( #76614 )
2024-09-27 09:20:11 -07:00
Egor Zhdan
fcb590690e
[cxx-interop] Support char8_t C++20 type
...
https://en.cppreference.com/w/cpp/keyword/char8_t
This is based on a patch from Varun Gandhi: https://github.com/swiftlang/swift/pull/26153
rdar://39988329 / resolves https://github.com/swiftlang/swift/issues/68726
2024-09-27 13:56:03 +01:00
Amritpan Kaur
1c494c4d89
[StdLib] Handle nil property descriptors.
2024-09-25 12:54:52 -07:00
Kuba (Brecka) Mracek
d3c5149714
Merge pull request #76658 from kubamracek/embedded-managed-buffer
...
[embedded] Add support for ManagedBuffer to Embedded Swift
2024-09-25 02:54:55 -07:00
Kuba Mracek
0b50c2155e
Don't emit upcast to the same type in SimplifyAllocRefDynamic, add test, add comment
2024-09-24 08:48:51 -07:00
Kuba Mracek
c7a5569c4f
[embedded] Add support for ManagedBuffer to Embedded Swift
...
This makes ManagedBuffer available and usable in Embedded Swift, by:
- Removing an internal consistency check from ManagedBuffer that relies on metatypes.
- Making the .create() API transparent (to hoist the metatype to the callee).
- Adding a AllocRefDynamicInst simplification to convert `alloc_ref_dynamic` to `alloc_ref`, which removes a metatype use.
- Adding tests for the above.
2024-09-23 13:32:50 -07:00
Konrad `ktoso` Malawski
b9319d80f1
Merge branch 'main' into wip-experimental-isolated-deinit
2024-09-23 09:01:06 +09:00
Meghana Gupta
961e6ea104
Merge pull request #76294 from meg-gupta/rewritenext
...
Rewrite UnsafeRawBufferPointer.Iterator.next
2024-09-20 12:10:39 -07:00
Konrad `ktoso` Malawski
d89347bed0
Merge branch 'main' into wip-experimental-isolated-deinit
2024-09-20 18:34:45 +09:00
Guillaume Lessard
a35dea18c5
[gardening] remove obsolete annotations
2024-09-19 12:56:31 -07:00