Commit Graph

192871 Commits

Author SHA1 Message Date
Mishal Shah
e8a9286c4a Merge pull request #84307 from tshortli/revert-require-swift-version-in-module-interfaces
Frontend: Temporarily downgrade `error_module_interface_requires_language_mode`
2025-09-15 14:13:11 -07:00
Allan Shortlidge
e2c8235a2c Frontend: Temporarily downgrade 'error_module_interface_requires_language_mode'.
Downgrade the new error in https://github.com/swiftlang/swift/pull/84244 to a
warning.

The PR smoke test build is using a different build system that is failing to
pass `-swift-version` arguments when building various stdlib modules. That
needs to be fixed, but for now we also need to unblock CI.
2025-09-15 14:10:24 -07:00
Hamish Knight
63d63d8c60 [CS] Bail from conjunction for non-zero SK_Hole
Previously we would only do this for `SK_Fix`, do the same for `SK_Hole`
since otherwise the score clearing logic for the conjunction could
result in losing the hole score.
2025-09-15 21:43:58 +01:00
swift-ci
374c577cc3 Merge remote-tracking branch 'origin/main' into rebranch 2025-09-15 12:56:24 -07:00
Doug Gregor
01873c996f Merge pull request #84283 from DougGregor/embedded-swift-untyped-throws-restriction
[Embedded] Diagnose untyped throws as an Embedded Swift restriction
2025-09-15 12:55:16 -07:00
swift-ci
b38afa03c4 Merge remote-tracking branch 'origin/main' into rebranch 2025-09-15 12:18:20 -07:00
Ben Barham
f2e654d7e1 Bump wasmkit to 0.1.6 for 6.2.1 2025-09-15 12:14:01 -07:00
Mishal Shah
a28d7a7e52 Merge pull request #80820 from swiftlang/maxd/bump-wasmkit
Bump WasmKit in `update-checkout-config.json` to 0.1.6
2025-09-15 11:57:13 -07:00
swift-ci
7e9e517121 Merge remote-tracking branch 'origin/main' into rebranch 2025-09-15 11:56:30 -07:00
Pavel Yaskevich
5207b0ec8a Merge pull request #84287 from xedin/issue-84150
[CSSimplify] Fix key path to function conversion to check key path re…
2025-09-15 11:48:30 -07:00
swift-ci
0d2c4ca9be Merge remote-tracking branch 'origin/main' into rebranch 2025-09-15 10:29:21 -07:00
Allan Shortlidge
cfe9f90347 Merge pull request #84244 from tshortli/require-swift-version-in-module-interfaces
Frontend: Require `-language-mode` option when emitting swiftinterfaces
2025-09-15 10:08:23 -07:00
Meghana Gupta
c764244df0 Merge pull request #84180 from meg-gupta/borrowandmutatepr
Add preliminary support for borrow accessors
2025-09-15 10:01:15 -07:00
Artem Chikin
926fc78b4c Merge pull request #84191 from artemcm/InMemoryDepScanSerializedDiagnostics
[Dependency Scanning] Configure a serialized diagnostics consumer for in-memory scans
2025-09-15 11:54:44 -04:00
Ryan Mansfield
4d6a37aecd Fix various HelpText typos. 2025-09-15 11:25:25 -04:00
swift-ci
909d200c14 Merge remote-tracking branch 'origin/main' into rebranch 2025-09-15 07:35:21 -07:00
Joe Groff
798621e9c5 Merge pull request #84264 from jckarter/trivial-address-only-switch
SILGen: Don't copy_addr [take] trivial address-only values.
2025-09-15 07:34:16 -07:00
Yuta Saito
5431bb115b [test][wasm] Add test to kill the missing func addr reservation 2025-09-15 14:30:10 +00:00
swift-ci
0883d42888 Merge remote-tracking branch 'origin/main' into rebranch 2025-09-15 07:19:04 -07:00
Doug Gregor
865c643cac Suppress Embedded Restriction diagnostics in code that won't be compiled as Embedded
When emitting diagnostics for the Embedded Swift restrictions outside
of Embedded Swift mode, consider `#if $Embedded` and `#if
hasFeature(Embedded)` configurations. If the code where we would emit
the diagnostic would be disabled in Embedded Swift by one of those
checks, don't emit the diagnostic. This helps code that can compile
either with Embedded or regular Swift stay within the restrictions on
Embedded Swift.
2025-09-15 07:10:00 -07:00
Gábor Horváth
b5ef290c1c Merge pull request #84203 from Xazax-hun/handle-unowned-in-impicit-value-init
[cxx-interop] Handle Unowned values in implicit value ctors
2025-09-15 16:06:33 +02:00
swift-ci
4c7c8c2e22 Merge remote-tracking branch 'origin/main' into rebranch 2025-09-15 06:58:07 -07:00
Hamish Knight
607abb99f9 Merge pull request #84272 from a7medev/add-parameter-name-to-signature
[IDE] Add internal parameter names in signature help
2025-09-15 14:46:13 +01:00
Egor Zhdan
2c790db45b [cxx-interop] Remove redundant -disable-availability-checking in test
rdar://159026025
2025-09-15 13:34:57 +01:00
Jakub Florek
e84bc084f4 Check for aliasing destroy_addr before hoisting load_borrow - end_borrow pair. 2025-09-15 12:42:30 +01:00
Hamish Knight
be1f82e36b [CS] Avoid emitting duplicate note for generic argument diagnostic
Since we can run CSGen multiple times, we need to guard the emission
of the note on whether the TypeRepr was already marked invalid (i.e
whether we already emitted a diagnostic for it).
2025-09-15 11:48:56 +01:00
Hamish Knight
b7519fabe6 [CS] Add IgnoreInvalidASTNode fix for invalid generic argument
Make sure we record a fix here to ensure we don't try to do CSApply
with holes.
2025-09-15 11:48:56 +01:00
swift-ci
503672fd94 Merge remote-tracking branch 'origin/main' into rebranch 2025-09-15 02:12:55 -07:00
Egor Zhdan
99e9ed8213 Merge pull request #84274 from egorzhdan/egorzhdan/rm-dead-partial-var
[cxx-interop] Remove dead logic in const import
2025-09-15 10:06:02 +01:00
swift-ci
09d0324a71 Merge remote-tracking branch 'origin/main' into rebranch 2025-09-15 01:41:51 -07:00
Hamish Knight
6761d8474d Merge pull request #84273 from hamishknight/the-whole-hole
[CS] Avoid forming DependentMemberType with hole base in `InferableTypeOpener`
2025-09-15 09:33:34 +01:00
Hamish Knight
411e14d00b Merge pull request #84275 from hamishknight/skippy
[CS] Avoid skipping SingleValueStmtExpr branch with ReturnStmt for completion
2025-09-15 09:33:17 +01:00
Pavel Yaskevich
ac27f53c04 [CSSimplify] Fix key path to function conversion to check key path requirements
`KeyPath` types now have conformance requirements placed on their
`Root` and `Value` types which need to be checked even when there
is a key path to function conversion involved, otherwise the solver
would be accepting invalid code.

Note that without function conversion the requirements come from
a type opened during assignment - https://github.com/swiftlang/swift/pull/80081/files.

Resolves: https://github.com/swiftlang/swift/issues/84150
2025-09-15 00:35:19 -07:00
swift-ci
f6b73559a7 Merge remote-tracking branch 'origin/main' into rebranch 2025-09-15 00:16:42 -07:00
Saleem Abdulrasool
57ad3607af Merge pull request #84268 from compnerd/packaging
utils: disable packaging on PR tests
2025-09-15 00:00:57 -07:00
Meghana Gupta
aeac529925 [NFC] Add notes on self argument of borrow accessor being non-lexical 2025-09-14 23:38:18 -07:00
Meghana Gupta
d3e41e5f2b Update SwiftCompilerSources' OwnershipLiveness utility for borrow accessors
It uses a check on conformance to ForwardInstruction for walking down guaranteed forwarding uses.
Since apply of borrow accessors cannot be represented as ForwardingInstruction, handle them separately.

Representing apply of borrow accessors for consistent handling in the optimizer is TBD.
2025-09-14 23:38:10 -07:00
Meghana Gupta
11097c4b9e Avoid inserting lexical scope for arguments of borrow accessors while inlining 2025-09-14 23:38:09 -07:00
Meghana Gupta
58957c3da2 [NFC] Update feature flags 2025-09-14 23:38:08 -07:00
Meghana Gupta
a42511e041 [NFC] Replace ApplyInst::getSubstCalleeConv()::hasGuaranteedAddressResult() with ApplyInst::hasGuaranteedAddressResult() 2025-09-14 23:38:07 -07:00
Meghana Gupta
995d6a77d9 Update hasGuaranteedResult and hasGuaranteedAddressResult 2025-09-14 23:38:06 -07:00
Meghana Gupta
6665cd5d46 [NFC] hasGuaranteedAddressResults -> hasGuaranteedAddressResult and hasGuaranteedResults -> hasGuaranteedResult 2025-09-14 23:38:06 -07:00
Meghana Gupta
29f5dad72f Disable GenericSpecializer for borrow accessors in OSSA temporarily 2025-09-14 23:38:05 -07:00
Meghana Gupta
51c64d5fda Update SideEffects for borrow accessors returning addresses
Add a read effect on the self parameter. Without this, the self parameter can get dead code eliminated by the GenericSpecializer.
2025-09-14 23:38:03 -07:00
Meghana Gupta
db0725cc91 Add some optimizer tests 2025-09-14 23:37:55 -07:00
Yuta Saito
e12642f917 [Legacy Driver][wasm] Pass --table-base to reserve low function addresses
WebAssembly does not have a reserved address space by default, so we
need to explicitly reserve low addresses for extra inhabitants for
enum types with pointer payloads. https://github.com/swiftlang/swift/pull/39300
added `--global-base` to reserve low data addresses, but we also need
to reserve low function addresses with `--table-base` for function
pointers because WebAssembly uses a separate address space for function
pointers.
2025-09-15 06:22:20 +00:00
Yuta Saito
6915a36895 [NFC][wasm] Fix incorrect comment about reserved low addresses 2025-09-15 06:21:35 +00:00
swift-ci
16051cbd01 Merge remote-tracking branch 'origin/main' into rebranch 2025-09-14 23:18:22 -07:00
Eric Miotto
168911a4ca Merge pull request #84255 from edymtt/edymtt/runtimes-pass-flag-to-emit-variant-modules
Runtimes: add support to emit variant modules
2025-09-14 23:07:00 -07:00
Doug Gregor
7d21bc332a [Embedded] Diagnose untyped throws as an Embedded Swift restriction
Untyped throws depends on existentials (`any Error`), and is therefore
not available in Embedded Swift. Introduce a diagnostic that diagnoses
any use of untyped throws, suggesting that one use typed throws
instead.

Make this an opt-in diagnostic enabled with `-Wwarning
EmbeddedRestrictions`, whether in Embedded Swift or not, using the
"default ignore" flag on these new warnings. Document this new
diagnostic group, and put the existing Embedded Swift error about
weak/unowned references in it as well.

Part of the general push to have the type checker identify code that
will not compile as Embedded Swift earlier, rdar://133874555.
2025-09-14 21:48:50 -07:00