Commit Graph

179448 Commits

Author SHA1 Message Date
Eric Miotto
c1257eb4ef Runtimes: introduce SwiftOnoneSupport
The main goal for now is to have this building, with little
concern about matching the build flags used currently.

Keep it disabled by default on Apple platforms.

Addresses rdar://143151393
2025-02-03 11:34:51 -08:00
eeckstein
4306b57590 Merge pull request #79109 from eeckstein/workaround-clang-crash
Sema: don't use `llvm::StringSwitch` for runtime function names
swift-DEVELOPMENT-SNAPSHOT-2025-02-03-a
2025-02-03 13:57:47 +01:00
Erik Eckstein
ed4863f76c Sema: don't use llvm::StringSwitch for runtime function names
Using `llvm::StringSwitch` with this many cases causes clang to crash due to a stack overflow.
Works around rdar://143944155
2025-02-03 09:54:07 +01:00
Arnold Schwaighofer
c95c45201e Merge pull request #78996 from aschwaighofer/checked_cast_br_nightmares
SIL: Update formal source type in SimplifyRefCasts when possible
swift-DEVELOPMENT-SNAPSHOT-2025-02-02-a
2025-02-02 08:27:01 -08:00
Slava Pestov
19d3987c43 Merge pull request #79105 from slavapestov/revert-one-way-removal
Partial revert of https://github.com/swiftlang/swift/pull/78301
2025-02-02 09:11:44 -05:00
Slava Pestov
0882a078f7 Regression test for rdar://problem/143338891 2025-02-02 00:43:16 -05:00
Slava Pestov
f35dd66b77 Revert "Sema: Don't generate OneWayEqual constraints for pattern bindings"
This reverts commit 5071e96a78.
2025-02-02 00:43:15 -05:00
Slava Pestov
5b4218c38d Revert "Sema: Remove ConstraintKind::OneWayEqual"
This reverts commit 385d66f24e.
2025-02-02 00:43:15 -05:00
Slava Pestov
fa73be2415 Revert "Sema: Remove one-way constraint handling from computeConnectedComponents()"
This reverts commit dd3e49c3ac.
2025-02-02 00:43:15 -05:00
Slava Pestov
8af183cca8 Revert "Sema: Remove DependentComponentSplitterStep"
This reverts commit 9fb6d9251e.
2025-02-02 00:43:15 -05:00
Slava Pestov
8800c3b630 Revert "Sema: Simplify depthFirstSearch() a bit now that it only has one caller"
This reverts commit 25ad700fb0.
2025-02-02 00:43:15 -05:00
Slava Pestov
99595e615e Revert "Sema: Split up gatherConstraints() into gatherAllConstraints() and gatherNearbyConstraints()"
This reverts commit 2230c3a17e.
2025-02-02 00:43:15 -05:00
Allan Shortlidge
8127c83cf0 Merge pull request #79099 from tshortli/fix-warnings
Gardening: Fix various recently introduced warnings
2025-02-01 18:18:23 -08:00
Arnold Schwaighofer
a8fa4fb0eb Merge pull request #79100 from aschwaighofer/fix_ptrauth_field_fptr_import
Update SILGen/ptrauth_field_fptr_import.swift
2025-02-01 15:14:37 -08:00
Andrew Trick
1a31647a68 Update SILGen/ptrauth_field_fptr_import.swift
Fixes rdar://141739653

Update this test after:

commit 68c1e54dc2
Merge: 4666a418e0 30d81c9e97
Author: Andrew Trick <atrick@apple.com>
Date:   Tue Dec 17 16:12:32 2024

    Merge pull request #78247 from atrick/unsafeaddress_markdep

    SILGen: emit mark_dependence for unsafeAddress
2025-02-01 15:10:25 -08:00
Allan Shortlidge
afd99725eb Merge pull request #79070 from tshortli/model-custom-availability-domains
AST/Sema: Model custom availability domains
2025-02-01 14:09:37 -08:00
Allan Shortlidge
4799f1e295 Concurrency: Suppress some warnings. 2025-02-01 13:52:43 -08:00
Allan Shortlidge
2b8d1be3ca Backtracing: Suppress a "switch covers known cases" warning. 2025-02-01 10:28:27 -08:00
Allan Shortlidge
e65aab74dd stdlib: Fix an unused variable warning. 2025-02-01 10:28:27 -08:00
Allan Shortlidge
2175e29cfa Frontend: Fix warnings about unused variables. 2025-02-01 10:28:27 -08:00
Allan Shortlidge
1675098e8c Observation: Fix warnings about unused variables. 2025-02-01 10:28:27 -08:00
Allan Shortlidge
79c017377d Parse: Temporarily revert removal of diagnostic.
SourceKit-LSP tests depend on the exact behavior of this diagnostic (which I
don't plan to preserve) so I'm reverting the consolidation temporarily to get
unblocked.
2025-02-01 10:07:20 -08:00
Arnold Schwaighofer
cbbfd17464 Merge pull request #79097 from aschwaighofer/disable_some_c++_interop_tests_non_macos
Temporarily disable tests on anything but macosx
2025-02-01 09:20:25 -08:00
Arnold Schwaighofer
82d13bbdbd Temporarily disable tests on anything but macosx
They brake multiple bots.

rdar://144000451
2025-02-01 09:18:57 -08:00
Adrian Prantl
c5ad72336a Merge pull request #79088 from adrian-prantl/array-element-accessor
Add an accessor for LLDB (NFC)
2025-02-01 08:00:40 -08:00
Becca Royal-Gordon
69a77d8f09 Merge pull request #79094 from beccadax/rdar143582383 2025-02-01 03:09:32 -08:00
Alastair Houghton
dd40b2f501 Merge pull request #79071 from al45tair/eng/PR-143869185
[Backtracing] Bump minimum deployment targets.
2025-02-01 10:28:14 +00:00
Meghana Gupta
7d554b7968 Merge pull request #79089 from meg-gupta/fixapis
Fix swift::areUsesWithinValueLifetime for guaranteed values
2025-01-31 21:56:47 -08:00
Pavel Yaskevich
d245dac784 Merge pull request #79086 from xedin/small-solver-perf-optimizations
[CSOptimizer] A few small performance optimizations
2025-01-31 21:20:50 -08:00
Becca Royal-Gordon
956bd10be4 Prevent shadowing of unavailable member impls
Typically, access control denies access to member implementations, so the imported interface decl will be used instead. However, in contexts that permit direct access to stored properties—such as accessors, inits, and deinits—their member implementations are accessible; the compiler then relies on a shadowing rule favoring Swift decls over ObjC decls to eliminate the imported interface decl.

However, there are many rules that are higher-priority than the Swift vs. ObjC decls one. In particular, a recent change to availability checking in #77886 caused a higher-priority rule to begin eliminating member implementations which belonged to unavailable extensions. This caused regressions in projects using `@objc @implementation` with classes that are unavailable in Mac Catalyst.

Introduce a fairly high-priority shadowing rule that favors a member implementation over its interface when both are present (i.e. when direct access to storage is permitted).

Fixes rdar://143582383.
2025-01-31 21:01:06 -08:00
Allan Shortlidge
1e76f19be9 Sema: Reject version specs in @available attributes for custom domains. 2025-01-31 17:31:13 -08:00
Allan Shortlidge
5c61a2d53e Sema: Require experimental feature to use custom availability domains. 2025-01-31 17:31:13 -08:00
Allan Shortlidge
770ddad742 AST/Sema: Look up custom availability domains by name.
Store the domain definitions defined on the command line on the `ModuleDecl` for
the main module.
2025-01-31 17:31:13 -08:00
Allan Shortlidge
f9799aeba9 AST: Introduce a Custom availability domain kind. 2025-01-31 17:31:07 -08:00
Allan Shortlidge
4b773a45ca AST: Move AvailabilityDomain ordering to Availabilty.cpp.
Availability attribute inferrence is currently the only thing that depends on
having a total ordering on AvailabilityDomains.
2025-01-31 17:31:07 -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
Artem Chikin
c7c0262343 Merge pull request #79080 from artemcm/EmptySetNotNullForStubs
[Dependency Scanning] Make deprecated PCM arg libSwiftScan stubs return empty sets instead of nullptr
2025-01-31 16:32:19 -08:00
Arnold Schwaighofer
9b66fdf272 Merge pull request #79072 from al45tair/eng/PR-143865183
[Backtracing] Uncached(Local|Remote)MemoryReader only exists on macOS and Linux.
2025-01-31 16:02:04 -08:00
Meghana Gupta
53553fa172 Fix swift::areUsesWithinValueLifetime for guaranteed values
To find if all the uses are within a guaranteed value, we should find all borrow introducers.

swift::findOwnershipReferenceAggregate looks only through forwarding operations with single operands.

For simplicity, continue using swift::findOwnershipReferenceAggregate, but return false when it does
not find a borrow introducer.
2025-01-31 15:10:57 -08:00
Cyndy Ishida
3232df4d67 Reapply '[BuildSystem] Stop building for i386-watch-simulator (#77692)' (#79018)
* Reapply '[BuildSystem] Stop building for i386-watch-simulator (#77692)'

    * [BuildSystem] Stop building for i386-watch-simulator

    In Xcode16 it is not supported.

This initially broke client projects who were still building the legacy
architecture but now that's resolved.
2025-01-31 15:04:28 -08:00
Adrian Prantl
30defa2569 Add an accessor for LLDB (NFC) 2025-01-31 14:51:23 -08:00
Philippe Hausler
854fa5c4e3 [Observation] Disable caching of KeyPaths (#78853)
* [Observation] Disable caching of KeyPaths

* Remove the cached keypath annottion for the ObservationTracked peer macro
2025-01-31 13:50:05 -08:00
Pavel Yaskevich
f661374667 Merge pull request #79005 from xedin/dont-touch-whitespace-by-default
[.editorconfig] Don't trim trailing whitespace
2025-01-31 13:36:45 -08:00
Pavel Yaskevich
72340f39b8 [CSOptimizer] Look through OptionalEvaluationExprs when dealing with unapplied disjunctions
This improves performance for situations like `a?.b + 2` by
giving a high score to `b` which prioritizes it over an operator.
2025-01-31 13:07:29 -08:00
Pavel Yaskevich
6bc23b5057 [CSOptimizer] Don't consider disabled overloads when checking whether disjunction is supported
Non-operator disjunctions are supported only if all of their _active_
choices are concrete.
2025-01-31 13:06:51 -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
Artem Chikin
9e5c40092e [Dependency Scanning] Make deprecated PCM arg libSwiftScan stubs return empty sets instead of nullptr
Recent change deprecated these methods and made the stubs return nullptr instead of empty sets, which will still trigger an error in a driver which pre-dates the change.
2025-01-31 10:25:34 -08:00
Saleem Abdulrasool
f695875aa1 Merge pull request #79058 from compnerd/dynamism
utils: rename `Foundation` to `DynamicFoundation`
2025-01-31 10:09:26 -08:00