Rintaro Ishizaki
ca5a020e21
[CMake] '-no-emit-module-separately-wmo' for swift modules
...
Emitting modules in separate frontend job doesn't give any benefits
because single add_library is just a single job from CMake's point of
view. Clients need to wait for `.dylib`/`.so` being emitted before using
the `.swiftmodule`. *Not* emitting modules separately is actually faster
in CMake because it doesn't parse and typecheck the source code twice.
2025-03-11 13:33:34 -07:00
Slava Pestov
4c60e036ac
Merge pull request #79882 from slavapestov/sizeof-constraint
...
Sema: Optimize Constraint layout to save 24 bytes
2025-03-11 14:30:44 -04:00
Egor Zhdan
9560b86099
Merge pull request #79890 from swiftlang/egorzhdan/nsoptions-name-based
...
[cxx-interop] Remove workarounds for `CF_OPTIONS` default arguments
2025-03-11 18:18:27 +00:00
Doug Gregor
fed1a74848
Merge pull request #79904 from DougGregor/unsafe-concurrency-cycle
...
[Strict memory safety] Eliminate false cycle when checking nonisolated(unsafe)
2025-03-11 11:01:09 -07:00
Doug Gregor
2efa05d615
Merge pull request #79905 from DougGregor/DougGregor/concurrency-lib-6-2-fix
...
[Concurrency lib] Stdlib 9999 -> 6.2, where this code would land
2025-03-11 10:56:38 -07:00
Allan Shortlidge
e68d8edb03
Merge pull request #79902 from tshortli/result-builder-member-import-visibility
...
Sema: Adjust result builder operation lookup for MemberImportVisibility
2025-03-11 10:45:46 -07:00
eeckstein
ca76efabb4
Merge pull request #79908 from eeckstein/fix-witness-table-specialization
...
embedded: fix specialization of associated conformance entries in witness tables
2025-03-11 18:16:23 +01:00
eeckstein
19c51e2ae2
Merge pull request #79872 from WeZZard/bugfix/unchecked-ref-casting-with-optional-any-object
...
[SILOptimizer] Fixes the ValueDefUseWalker to handle potential unchecked_ref_cast between optional and non-optional class types.
2025-03-11 17:15:10 +01:00
eeckstein
4949e2eae3
Merge pull request #79906 from eeckstein/fix-alloc-vector-builtin
...
MemAccessUtils: handle the obsolete allocVector builtin
2025-03-11 15:13:54 +01:00
Slava Pestov
e48d00d26c
Merge pull request #79876 from jameesbrown/pack-generic-param
...
[CS] Deep-equality match OpenedArchetypeTypes
2025-03-11 10:02:15 -04:00
Egor Zhdan
5b7c595b2e
[cxx-interop] Remove workarounds for CF_OPTIONS default arguments
...
ClangImporter has logic that infers default arguments of certain C/C++ types, such as the types declared via `CF_OPTIONS`/`NS_OPTIONS` macros.
There were some workarounds in place which triggered for C++ interop mode specifically. The workarounds were applying a heuristic based on the name of the type, which tried to match the behavior to non-C++ interop mode for certain types from the OS SDK. That was not working well for user-defined types, causing source compatibility breakages when enabling C++ interop.
This change replaces the name-based heuristic with a more robust criteria.
See also 3791ccb6 .
rdar://142961112
2025-03-11 12:47:21 +00:00
Anthony Latsis
5a92bc5e12
Merge pull request #79897 from AnthonyLatsis/danaus-plexippus-3
...
Small adjustments to adoption mode modeling
2025-03-11 11:47:18 +00:00
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
Erik Eckstein
ecfa808425
IRGen: convert two asserts to ASSERT to check the conditions also in a release-built compiler
2025-03-11 11:20:16 +01:00
Erik Eckstein
5212d92b57
Swift AST: add Conformance.getAssociatedConformance
2025-03-11 11:17:00 +01:00
Allan Shortlidge
0afb206711
Merge pull request #79899 from tshortli/more-unavailability-tests
...
Tests: Add more coverage of unavailable decls in unavailable contexts
2025-03-11 02:37:43 -07:00
Doug Gregor
733dd86c92
Merge pull request #79896 from DougGregor/strict-memory-safety-cleanups
...
Strict memory safety cleanups
2025-03-11 01:26:30 -07:00
Doug Gregor
24f4e6486d
Merge pull request #79885 from DougGregor/remove-region-isolation-assert
...
[Region analysis] Remove an assertion that doesn't always hold
2025-03-11 01:26:04 -07:00
Doug Gregor
1132934a4b
Merge pull request #79887 from DougGregor/remove-serialization-assertion
...
[Serialization] Remove spurious assertion
2025-03-11 01:21:35 -07:00
Erik Eckstein
a54502aee9
MemAccessUtils: handle the obsolete allocVector builtin
...
This builtin was removed. But to be able to parse old Swift.swiftinterface files it is required to handle the builtin in MemAccessUtils.
2025-03-11 08:03:17 +01:00
Doug Gregor
0de53547e5
[Concurrency lib] Stdlib 9999 -> 6.2, where this code would land
2025-03-10 23:07:06 -07:00
eeckstein
e4cb2daa31
Merge pull request #79878 from eeckstein/fix-condition-forwarding
...
ConditionForwarding: don't violate ownership
2025-03-11 07:04:05 +01:00
Doug Gregor
81e8f75f93
[Strict memory safety] Eliminate false cycle when checking nonisolated(unsafe)
...
Whenc hecking for nonisolated(unsafe), don't evaluate the full isolation
of the entity, because doing so causes a reference cycle.
2025-03-10 22:59:50 -07:00
Michael Gottesman
04bb69f426
Merge pull request #79727 from gottesmm/pr-025c1133954b74e7b4eda77e1a6f3bcafd4eb6cf
...
[concurrency] Add initial support for SwiftSettings to control defaultIsolation at the file level.
2025-03-10 22:35:00 -07:00
Konrad `ktoso` Malawski
6e725f277d
Update CLion instructions ( #79900 )
...
We use the `RelWithDebInfo` configuration nowadays, so correct the instructions.
2025-03-10 22:27:03 -07:00
Saleem Abdulrasool
2cf3c3eac5
Merge pull request #79867 from jerryjrchen/update-vim-syntax
...
Match freestanding macros in vim syntax
2025-03-10 21:50:18 -07:00
Allan Shortlidge
7a514c99e2
Sema: Adjust result builder operation lookup for MemberImportVisibility.
...
To avoid spurious diagnostics about unavailable operations when checking uses
of functions that take result builder closures, lookup of result builder
operations needs to ignore the restrictions of the `MemberImportVisibility`
feature. The result builder transform should simply use the operations that are
found and allow later checks to diagnose the use of inaccessible builder
operations.
Resolves rdar://144100445.
2025-03-10 20:54:41 -07:00
WeZZard
4c479824ef
[SILOptimizer] Eliminate non-case handling for implicit Optional non-Optional casting of unchecked_ref_cast in ValueDefUseWalker.
2025-03-11 09:39:50 +08:00
WeZZard
2237faca04
[SILOptimizer] Refines the implementation of of the bridged SILType for Swift.
2025-03-11 09:29:11 +08:00
WeZZard
775e28f785
[SILOptimizer] Adds test cases for the escaping analysis of .
2025-03-11 09:26:41 +08:00
Anthony Latsis
ae70d384e0
[NFC] Basic: Restrict adoption mode to upcoming and experimental features
2025-03-11 01:15:33 +00:00
Anthony Latsis
b3df0dcd08
[NFC] Basic: Do not return true in LangOptions::hasFeature if adoption mode
...
This check is used to enact features, whereas adoption mode should not
change behavior.
2025-03-11 01:14:39 +00:00
Anthony Latsis
b102c986aa
[NFC] Basic: Use scoped enum for feature states
...
To prevent unexpected implicit conversions to integral types.
2025-03-11 01:14:39 +00:00
Anthony Latsis
6b12faf5c1
[NFC] TypeCheckType: Compute language mode to limit diagnostic behavior for ExistentialAny
2025-03-11 01:14:39 +00:00
Konrad `ktoso` Malawski
e056c63c89
[Concurrency] Implement isIsolatingCurrentContext requirement and mode ( #79788 )
2025-03-11 09:48:38 +09:00
Michael Gottesman
f64dd5a8d5
[concurrency] Add initial support for SwiftSettings to control defaultIsolation at the file level.
...
We introduce a new macro called #SwiftSettings that can be used in conjunction
with a new stdlib type called SwiftSetting to control the default isolation at
the file level. It overrides the current default isolation whether it is the
current nonisolated state or main actor (when -enable-experimental-feature
UnspecifiedMeansMainActorIsolated is set).
2025-03-10 17:33:45 -07:00
Pavel Yaskevich
1e88bc6849
Merge pull request #79828 from xedin/rdar-145103149
...
[CSBindings] Don't delay inferred loeading-dot base inference if sour…
2025-03-10 17:29:23 -07:00
Allan Shortlidge
7c47d0a9b2
Tests: Add more coverage of unavailable decls in unavailable contexts.
...
Specifically, calls to extension members with various kinds of unavailability
in the context of a program compiled for app extensions.
2025-03-10 16:33:33 -07:00
James Brown
edb0fa7b3d
[CS] Deep-equality match OpenedArchetypeTypes
...
When we have two distinct OpenedArchetypeTypes that have the same
interface type and UUID, we need to match their generic arguments.
2025-03-10 19:19:53 -04:00
Doug Gregor
7c8e99d4df
Suppress memory-safety diagnostic for SwiftONoneSupport
...
It's a weird beast.
2025-03-10 16:16:43 -07:00
kperryua
580fe1e7d6
Merge pull request #79898 from swiftlang/Azoy-patch-1
...
[AST] Add missing parameter to ValueGeneric feature
2025-03-10 16:00:14 -07:00
Alejandro Alonso
33a1a66728
Update Features.def
2025-03-10 15:57:04 -07:00
Doug Gregor
53f14688a6
Update strict memory safety annotations for Synchronization module
2025-03-10 15:42:32 -07:00
Doug Gregor
9f2859edd8
Update Cxx library for strict memory safety
2025-03-10 15:42:29 -07:00
Doug Gregor
f404c8a58c
[Distributed] Inject "unsafe" expression for synthesized unsafe code
2025-03-10 15:42:25 -07:00
Doug Gregor
170845b864
Strict memory safety cleanups for the concurrency library
2025-03-10 15:42:11 -07:00
Doug Gregor
f668feaf64
[Standard library] Additional strict-memory-safety annotations
2025-03-10 15:42:05 -07:00
Alejandro Alonso
d0513a7aec
Merge pull request #79665 from Azoy/value-generics-no-more-experiment
...
[AST] Make ValueGenerics feature always available
2025-03-10 15:14:34 -07:00
Saleem Abdulrasool
d75b7cda2f
Merge pull request #79627 from compnerd/sdk-takes-stage
...
utils: avoid double staging the SDK
2025-03-10 15:13:40 -07:00
Dave Lee
8ad295aa02
Fix a comment reference to TaskGroupBase ( #79622 )
...
Update a reference to `TaskGroupImpl` to `TaskGroupBase`.
2025-03-10 13:16:03 -07:00