Commit Graph

7802 Commits

Author SHA1 Message Date
Alejandro Alonso
e41fe5a173 Special case some unknown builtin macros 2023-11-08 16:02:31 -08:00
Alejandro Alonso
3deacf8944 Fix backwards iteration of word breaking 2023-11-08 13:26:20 -08:00
Yuta Saito
7df19b86ea [stdlib] Fix calling convention mismatch for debugger utility functions (#69352)
This is the 3rd attempt to fix the mismatch, where the actual definition
(e.g. `swift_retainCount`) are defined with C calling-convention and the
callers wrongly expect Swift calling-convention.

The 1st fix broke ABI compatibility by introducing new symbol references
from app-side without any availability checks.
The 2nd fix broke lldb's retain counting feature due to new x-ref to
Clang module in serialized function body by `@_alwaysEmitIntoClient`.

This attemps to avoid introducing serialized x-ref to Clang module by
using new `@_extern(c)` attribute.

Resolves rdar://113910821

Co-authored-by: Karoy Lorentey <klorentey@apple.com>
2023-11-08 10:45:28 -08:00
Erik Eckstein
c8db45907f EmbeddedRuntime: add swift_willThrow 2023-11-08 16:23:28 +01:00
Erik Eckstein
de6edc70e8 stdlib: build the embedded stdlib core with -enable-ossa-modules
As it is the case for the regular stdlib core
2023-11-08 14:01:25 +01:00
Alejandro Alonso
17c30f162d Merge pull request #69194 from karwa/patch-17
[NFC][In Both Senses] Use _NormData type instead of performing a lookup directly
2023-11-07 21:44:19 -08:00
Alejandro Alonso
31aed274c4 Silence some standard library warnings 2023-11-07 15:03:53 -08:00
Philippe Hausler
7a2c21d312 [Embedded] enable random APIs if a RandomNumberGenerator is provided, but leave system random number generators unavailable (#69645) 2023-11-03 21:12:22 -07:00
Kuba (Brecka) Mracek
9d846a07e1 Merge pull request #69498 from kubamracek/embedded-once-thread-safe
[embedded] Make embedded swift_once thread-safe
2023-11-02 08:58:21 -07:00
Kuba Mracek
95d5d71d51 [embedded] Add asserts on predicate value into swift_once 2023-10-30 09:10:30 -07:00
Kuba Mracek
b057417e52 [embedded] Make embedded swift_once thread-safe 2023-10-29 20:33:43 -07:00
Karoy Lorentey
7176bd386e [5.11][stdlib] Bump runtime version indicator to 5.11 2023-10-26 13:52:37 -07:00
Karoy Lorentey
02531db29b [5.10][stdlib] Bump runtime version indicator to 5.10
(cherry picked from commit 6181609559)
2023-10-26 13:50:56 -07:00
Nate Cook
2c244b9698 Fix precondition in UMRBP.initialize(as:fromContentsOf:)
This precondition checks to make sure that the content-providing
collection isn't larger than the allocated buffer, but was preventing
using a buffer that is the exact same size as the collection.
2023-10-25 17:17:36 -05:00
Arnold Schwaighofer
235c27b749 Don't keep generic versions of PtrAuth functions alive
We don't support generating code for ptrauth builtins with generic
inputs (or non-constant inputs). We rely on specialization/inlining for
such code to work.

After a recent commit (#68843 ) code in IRGen keeps internal unreferenced
functions alive for debugging purposes.

This is a problem for the generic functions in PtrAuth.swift using
ptrauth builtins.

Opt out of this new behavior by sprinkling some pixie dust.

Fixes debug swift standard library builds targeting arm64e.

rdar://117411740
2023-10-24 11:52:47 -07:00
Kyle
f96ae2f2db [Documentation] Fix UnsafeMutablePointer's documentation 2023-10-20 10:54:44 +08:00
Kuba (Brecka) Mracek
ed105d02f4 Merge pull request #69256 from kubamracek/embedded-arc-crash
[embedded] Fix an LLVMARCOpts crash by avoiding direct calls to swift_retain/swift_release
2023-10-19 09:14:30 -07:00
Kuba Mracek
db10e78eb2 [embedded] Start diagnosing metatype/value_metatype instructions in embedded Swift 2023-10-18 16:51:10 -07:00
Philippe Hausler
e9b01a35d8 [Embedded] Include OptionSet as part of the embedded build (#69197)
* [Embedded] Include OptionSet as part of the embedded build

* [Embedded] Include SetAlgebra as part of the embedded build
2023-10-18 15:49:08 -07:00
Kuba Mracek
6900efe42c [embedded] Fix an LLVMARCOpts crash by avoiding direct calls to swift_retain/swift_release 2023-10-18 14:44:18 -07:00
Kuba (Brecka) Mracek
1686800c26 Merge pull request #69180 from kubamracek/embedded-move-protocol-aliases
[embedded] Move _CustomStringConvertibleOrNone/_LosslessStringConvertibleOrNone to avoid detaching doccomments from their declarations
2023-10-17 21:45:19 -07:00
Karl
d66e06a971 Remove unnecessary import 2023-10-15 20:03:52 +02:00
Karl
e9f11d70a6 [NFC][In Both Senses] Use _NormData type instead of performing a lookup directly 2023-10-15 19:36:10 +02:00
Kuba Mracek
624df4d71b [embedded] Make ExpressibleByStringInterpolation available in embedded Swift 2023-10-14 23:10:55 -07:00
Kuba Mracek
043a9fd15c [embedded] Move embedded ifdefs around in ObjectIdentifier.swift to avoid detaching doccomments from their decls 2023-10-14 11:27:14 -07:00
Kuba Mracek
c8a5ac0142 [embedded] Use Builtin.RawPointer as the argument type on swift_release_n 2023-10-13 20:55:58 -07:00
Kuba Mracek
3646c32b45 [embedded] Move _CustomStringConvertibleOrNone/_LosslessStringConvertibleOrNone to avoid detaching doccomments from their declarations 2023-10-13 15:31:30 -07:00
Pavel Yaskevich
a0dfab9ab2 [SE-0331] Mark unsafe pointer conformances to Sendable as explicitly unavailable
This is a preferred way to make sure that Sendable inference doesn't
happen for these types because they are marked as @frozen.
2023-10-10 21:42:46 -07:00
Saleem Abdulrasool
d61b8855e9 stdlib: map wchar_t to UInt16 on Windows
This is an ABI breaking change for Windows.  `WCHAR` on Windows is
mapped to `short` (`-fshort-wchar` makes it `unsigned short`).  When C++
interop is enabled, `WCHAR` will be mapped to `wchar_t` which is then
mapped to `short` (or `unsigned short` if `-fshort-wchar` is specified).
Correct the mapping type to get the desired behaviour.
2023-10-09 20:02:48 -07:00
Kuba Mracek
809fa63b83 [embedded] Pass all default stdlib SWIFT_COMPILE_FLAGS to the embedded stdlib build too 2023-10-09 09:00:51 -07:00
Kuba Mracek
5d8c55eacb [embedded] Initial Swift Concurrency for embedded Swift 2023-10-06 20:04:03 -07:00
Alex Martini
de18b08d18 Merge pull request #68993 from amartini51/assert_65958589
Replace "sanity check" in  doc comments per Apple Style Guide.

https://help.apple.com/applestyleguide/#/apsge70df12b?sub=apd57d1e8d9c

Resolves rdar://65958589
2023-10-06 09:23:45 -07:00
Alex Martini
ef84aa9b39 Replace "sanity check" in doc comments. 2023-10-05 11:41:37 -07:00
nate-chandler
a9e03df58c Revert "[Diagnostics] Require explicit releasenone." 2023-10-04 14:19:15 -07:00
Kuba Mracek
e9961323d8 [embedded] Avoid using Optional in the forward declared free() function in EmbeddedRuntime 2023-10-03 11:29:11 -07:00
Kuba (Brecka) Mracek
e3b3b47097 Merge pull request #68784 from kubamracek/embedded-roundingmode
[embedded] Fix a warning in stdlib build about never executed switch case
2023-10-03 09:04:20 -07:00
Kuba (Brecka) Mracek
75838507d8 Merge pull request #68929 from kubamracek/embedded-sdk3
[embedded] Resolve empty -sdk path warning in embedded stdlib build, take 3
2023-10-03 07:02:19 -07:00
Kuba (Brecka) Mracek
0d2f98a368 Merge pull request #68912 from kubamracek/embedded-closures-heap
[embedded] Support closures with captures and promoting locals to refcounted heap objects
2023-10-03 07:00:46 -07:00
Kuba (Brecka) Mracek
61be59948f Merge pull request #68786 from kubamracek/embedded-no-swiftinterface
[embedded] Do not emit .swiftinterface files for fragile modules (embedded stdlib, Cxx.swiftmodule)
2023-10-02 19:34:16 -07:00
Kuba Mracek
d579c62fee [embedded] Resolve empty -sdk path warning in embedded stdlib build, take 3 2023-10-02 17:55:02 -07:00
Kuba (Brecka) Mracek
8605da88b7 Merge pull request #68886 from kubamracek/embedded-atomic-refcount
[embedded] Use atomic load/store/rmw in embedded runtime refcounting implementation
2023-10-02 17:46:54 -07:00
Kuba Mracek
c6d0e4f76f [embedded] Support closures with captures and promoting locals to refcounted heap objects 2023-10-02 09:45:45 -07:00
Kuba Mracek
268a1e3556 Revert "[embedded] Resolve empty -sdk path warning in embedded stdlib build, take 2"
This reverts commit a1a48b5c83.
2023-10-02 09:35:21 -07:00
Kuba Mracek
a3f2984bf7 [embedded] Use atomics in swift_isUniquelyReferenced_nonNull_native too 2023-09-29 20:43:56 -07:00
Kuba Mracek
436f1993cb [embedded] Use atomic load/store/rmw in embedded runtime refcounting implementation 2023-09-29 17:36:45 -07:00
Kuba (Brecka) Mracek
17ba4aefba Merge pull request #68820 from kubamracek/embedded-static-object
[embedded] Add swift_initStaticObject to the embedded runtime
2023-09-29 13:16:48 -07:00
Kuba (Brecka) Mracek
967bc84d46 Merge pull request #68821 from kubamracek/embedded-retain-n
[embedded] Implement retain_n and release_n in the embedded runtime
2023-09-29 13:16:28 -07:00
Kuba (Brecka) Mracek
e8bbedbd08 Merge pull request #68829 from kubamracek/embedded-sdk2
[embedded] Resolve empty -sdk path warning in embedded stdlib build, take 2
2023-09-29 12:39:03 -07:00
Tim Kientzle
b35987fdcd Merge pull request #68720 from tbkka/tbkka-SwiftValue-Equatable
Make ObjC isEqual: delegate to Equatable when Hashable isn't available
2023-09-29 12:28:56 -07:00
Kuba Mracek
b9613368f6 [embedded] Check for refcount underflow in embeddded runtime 2023-09-28 09:50:25 -07:00