Erik Eckstein
23b4c6fc34
embedded: fix specialization of associated conformance entries in witness tables
...
When creating a specialized witness table, we need to get the right specialized conformance.
In IRGen don't emit associated conformance witness table entries if the protocol is not a class protocol.
In this case the associated type can never be used to create an existential. Therefore such a witness table entry is never used at runtime in embedded swift.
Fixes a compiler crash
rdar://146448091
2025-03-11 11:33:10 +01:00
Konrad `ktoso` Malawski
e056c63c89
[Concurrency] Implement isIsolatingCurrentContext requirement and mode ( #79788 )
2025-03-11 09:48:38 +09:00
Kuba (Brecka) Mracek
43919e8b8a
Merge pull request #79706 from kubamracek/embedded-concurrency-deleted-method
...
[embedded][Concurrency] Fix missing swift_deletedAsyncMethodError
2025-03-10 12:27:00 -07:00
Konrad `ktoso` Malawski
fda7f539fb
Reapply "Task names" ( #79562 ) ( #79600 )
2025-03-08 10:58:49 +09:00
Kuba Mracek
71a5e397e4
[embedded][Concurrency] Fix missing swift_deletedAsyncMethodError
2025-03-01 06:48:39 -08:00
Kuba Mracek
40aea83c6b
[embedded] Allow string-interpolatings in assert, assertionFailure, precondition, preconditionFailure
2025-02-28 18:47:47 -08:00
Kuba Mracek
01d7e231c3
[embedded] Allow string-interpolating fatalError in Embedded Swift
2025-02-28 08:53:09 -08:00
Konrad `ktoso` Malawski
09003d6f11
Revert "Merge pull request #77609 from ktoso/wip-task-names" ( #79562 )
...
This reverts commit 4ab5d2604f .
2025-02-23 22:59:21 -08:00
Konrad `ktoso` Malawski
4ab5d2604f
Merge pull request #77609 from ktoso/wip-task-names
...
[Concurrency] Task names
2025-02-21 22:28:33 +09:00
Doug Gregor
3c8ef82963
Enable usable of Span by default
...
Usage of Span was temporarily behind an experimental feature flag. Now
that SE-0447 has been accepted, remove the experimental feature flag and
allow Span usage everywhere.
Implements rdar://144819992.
2025-02-14 10:45:47 -08:00
Erik Eckstein
5b93eb31bf
Optimizer: remove the AllocVectorLowering pass
...
It's not needed anymore, because the "FixedArray" experimental feature is replaced by inline-arrays.
2025-02-12 10:51:14 +01:00
Kuba (Brecka) Mracek
63b2f58d9e
Merge pull request #79242 from kubamracek/embedded-mergeable-symbols
...
[embedded] Add an experimental -Xfrontend -mergeable-symbols to allow linking multiple .o modules in Embedded Swift
2025-02-10 15:17:05 -08:00
Allan Shortlidge
022596473f
Merge pull request #79248 from tshortli/abi-compatible-platform-decl-reachability
...
AST: Platform-specific fixes for `-unavailable-decl-optimization`
2025-02-09 16:53:59 -08:00
Kuba (Brecka) Mracek
31af4d9ed5
Merge pull request #79243 from kubamracek/embedded-currenttask
...
[embedded] Add a test for withUnsafeCurrentTask
2025-02-09 16:04:20 -08:00
Allan Shortlidge
b9e1cbd3ac
AST: Enable -unavailable-decl-optimization on visionOS.
...
Using availability domains, reimplement the algorithm that determines whether a
declaration is unavailable at runtime. The new algorithm takes ABI compatible
platforms into account, ensuring that declarations that are available on iOS do
not get treated as unreachable at runtime when compiling for visionOS.
Resolves rdar://116742214.
2025-02-09 11:19:08 -08:00
Allan Shortlidge
e47638940e
AST: Introduce swift::getAvailabilityConstraintsForDecl().
...
This new query is designed to become the canonical source of information
regarding whether a declaration is available to use in a given
`AvailabilityContext`. It should be adopted as the foundational building block
for all other queries that answer more specific questions about the
availability of a specific delcaration.
The implementation of this query has been copied from a variety of sources
which should eventually be deleted once the new query has been fully adopted.
NFC.
2025-02-08 22:47:01 -08:00
Kuba Mracek
0d814ceb81
[embedded] Add a test for withUnsafeCurrentTask
2025-02-08 13:36:26 -08:00
Kuba Mracek
b2f87e7614
[embedded] Add an experimental -Xfrontend -mergeable-symbols to allow linking multiple .o modules in Embedded Swift
2025-02-08 11:56:09 -08:00
Kuba (Brecka) Mracek
96862b4bb0
Merge pull request #79082 from swiftlang/revert-78986-embedded-api-descriptor
...
Revert "[embedded] Don't emit extensions to API descriptor under Embedded Swift, avoid compiler crash"
2025-01-31 16:59:23 -08:00
Kuba (Brecka) Mracek
3afe8ebdf6
Merge pull request #78919 from kubamracek/embedded-dict-init
...
[embedded] Support Dictionary.init(uniqueKeysWithValues:) in Embedded Swift
2025-01-31 11:03:04 -08:00
Kuba (Brecka) Mracek
7d257c9a05
Revert "[embedded] Don't emit extensions to API descriptor under Embedded Swift, avoid compiler crash"
2025-01-31 11:01:52 -08:00
Kuba (Brecka) Mracek
fd9777e500
Merge pull request #78986 from kubamracek/embedded-api-descriptor
...
[embedded] Don't emit extensions to API descriptor under Embedded Swift, avoid compiler crash
2025-01-31 11:01:45 -08:00
Kuba Mracek
6d31a8b7b0
[embedded] Restrict test/embedded/dict-init.swift to macOS only
2025-01-30 09:16:39 -08:00
Kuba (Brecka) Mracek
7c685ba36b
Merge pull request #78915 from kubamracek/embedded-string-switch-with-cache
...
[embedded] Support _findStringSwitchCaseWithCache in Embedded Swift
2025-01-28 15:56:22 -08:00
Kuba Mracek
fcc851b5c8
[embedded] Adjust test/embedded/api-descriptor-crash.swift for Linux mangling
2025-01-28 13:42:18 -08:00
Kuba (Brecka) Mracek
53921e4c8c
Merge pull request #78920 from kubamracek/embedded-wae
...
[embedded] Support withoutActuallyEscaping in Embedded Swift
2025-01-28 12:32:48 -08:00
Kuba Mracek
636c82dfda
[embedded] Don't emit extensions to API descriptor under Embedded Swift, avoid compiler crash
2025-01-28 11:13:57 -08:00
Erik Eckstein
3e4a4d62ed
embedded: make sure to serialize vtable methods with the right linkage
...
In embedded mode CrossModuleOptimization must visit all vtable methods to make sure that no private/internal methods are serialized.
Fixes a compiler crash
rdar://143153941
2025-01-28 11:19:35 +01:00
Kuba Mracek
4da68126eb
[embedded] Mark test/embedded/without-actually-escaping.swift as REQUIRES: swift_test_mode_optimize_none
2025-01-27 10:15:45 -08:00
Kuba Mracek
8e3ee38324
[embedded] Support withoutActuallyEscaping in Embedded Swift
2025-01-25 15:24:20 -08:00
Kuba Mracek
c99e9e4922
[embedded] Support Dictionary.init(uniqueKeysWithValues:) in Embedded Swift
2025-01-25 14:55:19 -08:00
Kuba Mracek
92b0c5f5d0
[embedded] Support _findStringSwitchCaseWithCache in Embedded Swift
2025-01-25 09:09:47 -08:00
Allan Shortlidge
fe138e014a
AST: Track an unavailable domain instead of platform in AvailabilityContext.
...
Now that most of the compiler tracks availability in terms of
AvailabilityDomain, it's time to do so in AvailabilityContext as well. This
will ensure that the compiler accurately suppresses diagnostics about a decl
being unavailable in an arbitrary domain when the context of the use is already
unavailable in that domain.
With this change, most of the special-casing for the Embedded Swift availability
domain has been removed from the compiler, outside of parsing and interface
printing.
2025-01-22 06:40:11 -08:00
Kuba (Brecka) Mracek
8d3b0d0e8c
Merge pull request #78779 from kubamracek/embeddded-arm64e-none-macho-requires-cc
...
[embedded] Mark test/embedded/ptrauth-none-macho.swift as REQUIRES: embedded_stdlib_cross_compiling
2025-01-21 23:18:23 -08:00
Kuba (Brecka) Mracek
0a081f8cd3
Merge pull request #78748 from kubamracek/embedded-centralize-test-os-filter
...
[embedded] Centralize the OS/target requirements on (most) Embedded Swift tests
2025-01-21 15:14:47 -08:00
Kuba Mracek
2542bc4495
[embedded] Mark test/embedded/ptrauth-none-macho.swift as REQUIRES: embedded_stdlib_cross_compiling
2025-01-21 09:40:28 -08:00
Alejandro Alonso
11fbd94668
Merge pull request #78664 from Azoy/unicode-16
...
[stdlib] Unicode 16
2025-01-21 09:29:35 -08:00
Kuba Mracek
d8c0c25b4b
[embedded] Centralize the OS/target requirements on (most) Embedded Swift tests
2025-01-19 11:44:55 -08:00
Kuba (Brecka) Mracek
7f5686d5ff
Merge pull request #78613 from kubamracek/embedded-arm64e-none-macho
...
[embedded] Add a test for arm64e ptrauth using -none-macho triple
2025-01-18 20:44:58 -08:00
Alejandro Alonso
69f6df024d
Remove consonant check
2025-01-17 17:46:14 -08:00
Alejandro Alonso
29378d3132
Update embedded unicode dead strip test v2
2025-01-16 16:08:25 -08:00
Alejandro Alonso
6d5acec493
Update embedded dead strip tests
2025-01-16 13:36:50 -08:00
Kuba Mracek
4110b390e9
[embedded] Add a test for arm64e ptrauth using -none-macho triple
2025-01-13 11:59:49 -08:00
Erik Eckstein
cc308c97cf
embedded: make sure to generate witness tables which are imported from other modules
...
In embedded swift all the code is generated in the top-level module.
De-serialized witness tables for class existentials must be code-gen'd and therefore made non-external.
Fixes an unresolved symbol linker error.
rdar://142561676
2025-01-13 14:08:35 +01:00
Arnold Schwaighofer
c7b343d603
Disable this test on anything but macOS
...
Attempting to unblock bots
Specifically, this also seems to fail on PR tests:
```
Failed Tests (1):
Swift(iphonesimulator-x86_64) :: embedded/wrong-linkage.swift
```
rdar://142601111
2025-01-09 14:17:02 -08:00
Erik Eckstein
67b8c08ef1
SILLinker: convert an assert to a compiler error message
...
Having a wrong linkage can happen if the user "re-defines" an existing function with a wrong linkage, e.g. using `@_cdecl`.
2025-01-08 11:00:27 +01:00
Kuba Mracek
054527731e
[embedded] Add test/embedded/availability-macos.swift
2024-12-18 13:46:36 -08:00
Kuba (Brecka) Mracek
0bbaa3519b
Merge pull request #78100 from kubamracek/embedded-no-metadata-cxx
...
[embedded] Don't emit metadata references from C++ interop
2024-12-12 21:14:52 -08:00
Kuba (Brecka) Mracek
7946bf7840
Merge pull request #78147 from kubamracek/embedded-cxxshim
...
[embedded] Include and use cxxshims in the embedded/ resource dir
2024-12-12 20:36:56 -08:00
Kuba Mracek
77c6494cdb
[embedded] Add test/embedded/cxx-no-metadata.swift testcase
2024-12-12 15:32:24 -08:00