Guillaume Lessard
c1b872998d
[stdlib] mark mutableBytes property as unsafe
...
We should have marked this as unsafe originally.
2026-01-08 21:29:03 -08:00
Arnold Schwaighofer
4c0dc76ea2
Merge pull request #86291 from aschwaighofer/embedded_fix_swift_coroFrameAlloc_32bit
...
[embedded] Fix the type of the type descriminator parameter of swift_coroFrameAlloc on 32 bit platforms
2026-01-07 23:00:39 -08:00
Hamish Knight
6ae31c96c1
Merge pull request #86357 from hamishknight/add-unsafe
...
[stdlib] Add another missing `unsafe`
2026-01-08 06:22:14 +00:00
Hamish Knight
f0f76664c3
[stdlib] Add another missing unsafe
2026-01-07 19:56:12 +00:00
Saleem Abdulrasool
5dc5ecd6c9
runtime: silence a warning on clang
...
`[[no_unique_address]]` is a C++20 feature and we currently use C++17.
Guard this with `__clang__` and use the clang namespaced attribute which
is available. Additionally, since this feature is supported by MSVC as
well as an extension in earlier versions, use the MSVC scoped attribute
on MSVC.
2026-01-07 10:43:38 -08:00
Guillaume Lessard
674b742df3
Merge pull request #85945 from AZero13/patch-19
...
Fix assignment in header.count setter
2026-01-07 10:30:48 -08:00
Hamish Knight
2b27e32b84
Merge pull request #86329 from Azoy/fix-unsafe-error
...
[stdlib] Add missing unsafe modifier in StaticPrint
2026-01-07 11:22:14 +00:00
Doug Gregor
41c096642f
Merge pull request #86306 from DougGregor/embedded-string-deconstruct
...
[Embedded Swift] Enable String._deconstructUTF8 for Embedded Swift
2026-01-06 20:53:59 -08:00
Alejandro Alonso
bc21d3ef8a
Add missing unsafe modifier
2026-01-06 12:56:42 -08:00
Alastair Houghton
7f91815fb8
Merge pull request #86249 from AZero13/patch-23
...
[Runtime][Backtracing][Linux] Read and write from `ptr`, not `buf`.
2026-01-06 17:30:06 +00:00
Alastair Houghton
6adf4dc465
Merge pull request #86243 from AZero13/nfc
...
Fix typos in Register
2026-01-06 17:13:53 +00:00
Evan Wilde
9ec92071c8
Merge pull request #86300 from etcwilde/ewilde/freebsd-unsafe-mutex
...
FreeBSD: Synchronization: Add missing unsafe flags
2026-01-06 08:54:17 -08:00
Alastair Houghton
7fb395ab4b
Merge pull request #86212 from AZero13/fixtypo
...
target.pid should be pid
2026-01-06 16:53:03 +00:00
Alastair Houghton
7458a46b87
Merge pull request #86215 from AZero13/mains
...
Remove extraneous ) in backtrace
2026-01-06 16:51:25 +00:00
Alastair Houghton
68ae4e6012
Merge pull request #86213 from AZero13/spawns
...
posix_spawn returns error in result, not errno
2026-01-06 16:47:35 +00:00
Guillaume Lessard
f4e78a61df
Merge pull request #84672 from valeriyvan/AsyncThrowingStream
...
Fix typo in AsyncThrowingStream.swift
2026-01-06 02:10:17 -08:00
Doug Gregor
a69b43d91f
Merge pull request #86301 from DougGregor/newtype-nonobjc
...
Fix import of newtype'd types whenever Objective-C interoperability is disabled
2026-01-06 09:40:35 +01:00
Konrad `ktoso` Malawski
3b1bf0795b
Concurrency: improve withTaskPriorityEscal... docs and adopt noniso(nonsend) ( #86282 )
2026-01-06 12:53:20 +09:00
Guillaume Lessard
ea74e6fd35
Merge pull request #84281 from valeriyvan/OutputSpan-doccoments2
...
Minor fixes in doc comments in OutputSpan.swift
2026-01-05 17:44:13 -08:00
Guillaume Lessard
066b323344
Merge pull request #84282 from valeriyvan/OutputSpan-remove-excessive-cast
...
Remove excessive cast in OutputSpan.swift
2026-01-05 17:43:33 -08:00
Guillaume Lessard
39a42718fc
Merge pull request #84838 from valeriyvan/TemporaryAllocation
...
Fix doc comment in TemporaryAllocation.swift
2026-01-05 17:43:03 -08:00
Doug Gregor
32c716d7cd
[Embedded Swift] Enable String._deconstructUTF8 for Embedded Swift
...
Some support libraries depend on String._deconstructUTF8, and it's just
as relevant in Embedded Swift as it is in normal Swift.
This introduces the public typealias `_ConvertedObject` to paper over
the AnyObject/NativeObject difference between normal and Embedded Swift
for these underscored APIs.
Fixes rdar://166250256.
2026-01-05 14:50:14 -08:00
Doug Gregor
cac9b9d398
Fix _SwiftNewtypeWrapper when not using the Objective-C runtime
...
When Objective-C interoperability was disabled, we were not including
the default implementations of _ObjectiveCBridgeable for
_SwiftNewtypeWrapper-conforming types in the standard library. This
meant that the _ObjectiveCBridgeable conformance of newtype'd imported
types was broken.
Enable those implementations by dropping the `#if _runtime(_ObjC)`
check and drop the Objective-C interop requirement for the
corresponding test.
Fixes rdar://167570178.
2026-01-05 13:33:34 -08:00
Doug Gregor
7dc72f5b13
Include _SwiftNewtypeWrapper in the Embedded Swift standard library build
...
This is an unnecessary difference. Fixes rdar://167569022.
2026-01-05 13:33:31 -08:00
Evan Wilde
d11891ff56
FreeBSD: Synchronization: Add missing unsafe flags
...
The FreeBSD Mutex implementation contained several un-annotated unsafe
pointer accesses resulting in build-failures after enabling strict
memory safety.
Fixes : #86289
2026-01-05 12:59:43 -08:00
Arnold Schwaighofer
0491c59946
[embedded] Fix the type of the type descriminator parameter of swift_coroFrameAlloc on 32 bit platforms
...
The type of malloc_type_id_t is a 64bit integer (unsigned long long).
https://github.com/swiftlang/swift/issues/86069
2026-01-05 09:21:26 -08:00
Alejandro Alonso
536518bbb4
Merge pull request #86276 from Azoy/unsafe-shall-be-errored
...
[stdlib] Make strict memory safety an error in the stdlib
2026-01-04 15:40:41 -08:00
Doug Gregor
22ee05e2db
Merge pull request #86273 from DougGregor/stdlib-alphabetical-order
2026-01-04 23:28:48 +00:00
Alejandro Alonso
8909023c90
Merge pull request #86067 from Azoy/unicode-17
...
[stdlib] Update to Unicode 17
2026-01-03 16:54:02 -05:00
Alejandro Alonso
2e46df25a5
Make strict memory safety an error in the stdlib
2026-01-03 11:39:27 -08:00
Doug Gregor
49ff5277dd
[stdlib] Use case-sensitive alphabetical order for sources
...
Alphabetize to match SwiftPM's ordering of source files when building
the standard library. This uncovers a source-ordering dependency that
does exist involving typealiases of protocol names within protocols.
Work around the issue in the two places where it affects the standard
library.
2026-01-03 16:12:11 +00:00
Doug Gregor
e90eb3267a
[stdlib] Merge "essential" and "non-essential" sources
...
This distinction is not relevant anymore. Merge the lists so everything
can be alphabetized.
2026-01-03 15:07:00 +00:00
Doug Gregor
abd4e47af6
[stdlib] Alphabetize standard library sources
...
Whatever compiler bugs prevented the standard library source files from
being alphabetized have been fixed. Alphabetize the sources as we
always wanted.
2026-01-03 15:00:43 +00:00
Saleem Abdulrasool
4f7263dc61
Merge pull request #86214 from AZero13/swap
...
backtrace: correct `cyan` and `magenta` colour code values
2026-01-02 10:41:13 -08:00
AZero13
61a5079b14
stdlib: Fix OpenBSD typo in preprocessor in Concurrency/Clock.cpp ( #85885 )
...
As a result, openbsd was falling back to the std::chrono::duration_cast code.
2026-01-02 18:07:58 +00:00
Guillaume Lessard
f43173f0db
Merge pull request #86225 from AZero13/io
2026-01-02 10:05:07 -08:00
AZero13
93d545dd25
Read and write from ptr, not buffer
...
This causes both functions to repeatedly read/write the same bytes from the beginning of the buffer instead of advancing through it.
2026-01-01 12:58:38 -05:00
AZero13
c83e58c6f4
Fix typos in Register
...
37-38 are reserved, not 36
2025-12-31 16:26:03 -05:00
AZero13
c27be4ad7c
Remove redundant reserveCapacity
2025-12-29 19:42:18 -05:00
AZero13
9064257a41
Reserve the total expected capacity, not the delta
...
We were reserving the delta, but that is wrong and would lead to unneeded allocations.
2025-12-28 13:56:00 -05:00
AZero13
e895af4d1a
Runtime: Fix error message concatenation using null pointer
...
Error history is lost because we used current, which is set to nullptr, so it would just print (null)
2025-12-28 12:43:52 -05:00
Guillaume Lessard
6b0c233042
[stdlib] simplifications
2025-12-27 19:05:15 -08:00
Guillaume Lessard
9e54b6ff3c
[stdlib] improve explanatory comment
2025-12-27 19:05:15 -08:00
Guillaume Lessard
d9ea401943
[stdlib] consolidate defer blocks
2025-12-27 19:05:15 -08:00
Guillaume Lessard
3330461baa
[stdlib] address some repetition
2025-12-27 19:05:15 -08:00
Guillaume Lessard
e5147d1e55
[stdlib] tweak availability for SwiftCompatibilitySpan
2025-12-27 19:05:15 -08:00
Guillaume Lessard
daf2e6a99d
[stdlib] explain why we don’t need a defer block
2025-12-27 19:05:15 -08:00
Guillaume Lessard
08163e96ad
[stdlib] fix doc-comment style
2025-12-27 19:05:15 -08:00
Guillaume Lessard
dc022a57a6
[stdlib] add SE-0485 ContiguousArray.append with OutputSpan
2025-12-27 19:05:15 -08:00
Guillaume Lessard
d303e07884
[stdlib] add SE-0485 Array.append with OutputSpan
2025-12-27 19:05:15 -08:00