Commit Graph

184177 Commits

Author SHA1 Message Date
Charles Zablit
0e7694683a [windows] update to the 6.1.2 toolchain in build.ps1 2025-09-05 16:17:00 +01:00
Konrad `ktoso` Malawski
d76b070efd Merge pull request #84067 from swiftlang/pick-6.2.1-nonisolatednonsending-by-default-and-nondistributed 2025-09-05 16:05:27 +09:00
Konrad Malawski
7713dec67d [Distributed] We're currently not using this isDistributedThunk func 2025-09-05 08:35:17 +09:00
Dario Rexin
8177a6a21a Merge pull request #84008 from drexin/wip-159143492-6.2.1
[6.2.1][IRGen] Fix computation of spare bits for fixed arrays
2025-09-04 13:25:55 -07:00
eeckstein
e35a45f7b7 Merge pull request #83965 from eeckstein/fix-simplify-alloc-stack-apply-6.2.1
[6.2.1] Optimizer: fix handling of dependent existential archetypes in `alloc_stack` and `apply` simplification
2025-09-04 17:18:22 +02:00
eeckstein
d7ff11b2c4 Merge pull request #83966 from eeckstein/fix-combine-apply-of-convertfunction-6.2.1
[6.2.1] SILCombine: fix `convert_function` -> `apply` peephole for generic function types
2025-09-04 10:25:54 +02:00
Dario Rexin
8dc35c846c [IRGen] Fix computation of spare bits for fixed arrays
rdar://159143492

Previously all bits after the spare bits of the first element were marked as spare bits. This caused enum tags to be stored in bits used by the payload.
2025-09-03 10:26:04 -07:00
Konrad Malawski
9524c10a43 [Concurrency/Distributed] ensure distributed thunks are @concurrent
Otherwise the "nonisolated nonsending by default" mode blows up as
distributed thunk signatures dont match expectations.

This undoes the fix from https://github.com/swiftlang/swift/pull/83940
and applies the fix on the synthesis side of the distributed thunks,
such that they are @concurrent always -- which keeps their old semantics
basically, regardless of what "default" mode we have.
2025-09-03 19:00:03 +09:00
Konrad Malawski
4c283e5959 [Concurrency/Distributed] nonisolated-nonsending by default breaks distributed thunks
the new NonisolatedNonsendingByDefault upcoming feature breaks remote
calls in distributed actors, because the expected isolation doesn't
match and the runtime swift_distributed_execute_target_resume will
crash.

This is a short term fix to unblock adopters, however preferably we
should mark the thunks as nonisolated(nonsending), though that seems to
be more involved.

resolves rdar://159247975
2025-09-03 08:21:05 +09:00
Mishal Shah
cd0a1513ad Merge pull request #83938 from swiftlang/shahmishal/update-6.2.1-runtime-version
[6.2.1] Update the runtime version to 6.2
2025-09-02 10:04:38 -07:00
nate-chandler
3c1c195500 Merge pull request #83995 from nate-chandler/cherrypick/release/6.2.1/rdar158149082
6.2.1: [AllocBoxToStack] Don't destroy in dead-ends.
2025-08-29 16:35:54 -07:00
Nate Chandler
5851dcb971 [MemoryLifetimeVerifier] Permit leaks in dead-ends 2025-08-28 19:08:41 -07:00
Nate Chandler
eb9f5b2a92 [AllocBoxToStack] Don't destroy in dead-ends.
It is valid to leak a value on paths into dead-end regions.
Specifically, it is valid to leak an `alloc_box`.  Thus, "final
releases" in dead-end regions may not destroy the box and consequently
may not release its contents.  Therefore it's invalid to lower such final
releases to `dealloc_stack`s, let alone `destroy_addr`s.  The in-general
invalidity of that transformation results in miscompiling whenever a box
is leaked and its projected address is used after such final releases.

Fix this by not treating final releases as boundary markers of the
`alloc_box` and not lowering them to `destroy_addr`s and
`dealloc_stack`s.

rdar://158149082
2025-08-28 19:08:41 -07:00
Mishal Shah
df5b356e7e Merge pull request #83929 from charles-zablit/charles-zablit/windows/update-to-3.10.1
🍒 [windows] upgrade to Python 3.10.1
2025-08-28 10:32:33 -07:00
Pavel Yaskevich
6e34c90c39 [6.2.1][TypeCheckEffects] AbstractFunction: Parameter types should be mapped… (#83954)
… into context

- Explanation:

Parameter type could be represented by an associated type which is bound
to a concrete type by an extension, `AbstractFunction::getType()` should
map it into context before returning because the construct is that it
always produces a function type.

- Resolves: rdar://156955193

- Main Branch PR: https://github.com/swiftlang/swift/pull/83687

- Risk: Low. This is a very narrow fix that only affects situations when
parameter type, represented by an associated type, is bound by an
extension.

- Reviewed By: @DougGregor 

- Testing: Added new test-cases to the suite.

(cherry picked from commit 32b97d0e2a)
(cherry picked from commit 7f652915d9)

<!--
If this pull request is targeting a release branch, please fill out the
following form:

https://github.com/swiftlang/.github/blob/main/PULL_REQUEST_TEMPLATE/release.md?plain=1

Otherwise, replace this comment with a description of your changes and
rationale. Provide links to external references/discussions if
appropriate.
If this pull request resolves any GitHub issues, link them like so:

  Resolves <link to issue>, resolves <link to another issue>.

For more information about linking a pull request to an issue, see:

https://docs.github.com/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue
-->

<!--
Before merging this pull request, you must run the Swift continuous
integration tests.
For information about triggering CI builds via @swift-ci, see:

https://github.com/apple/swift/blob/main/docs/ContinuousIntegration.md#swift-ci

Thank you for your contribution to Swift!
-->
2025-08-28 09:59:27 -07:00
Erik Eckstein
36d2549bf4 SILCombine: fix convert_function -> apply peephole for generic function types
Currently we cannot deal with generic arguments/returns. Bail in this case.

Fixes a compiler crash
rdar://158809851
2025-08-28 07:29:53 +02:00
Erik Eckstein
fb80d0349c Optimizer: fix handling of dependent existential archetypes in alloc_stack and apply simplification
When replacing an opened existential type with the concrete type, we didn't consider that the existential archetype can also be a "dependent" type of the root archetype.
For now, just bail in this case. In future we can support dependent archetypes as well.

Fixes a compiler crash.
rdar://158594365
2025-08-28 07:17:54 +02:00
Erik Eckstein
62e4cfbea7 AST: add Type.interfaceTypeOfArchetype and some related APIs 2025-08-28 07:17:54 +02:00
Erik Eckstein
e84228baf4 Swift AST: add some Type APIs 2025-08-28 07:17:53 +02:00
Mishal Shah
b3e7c68bcd Update Runtimes/Supplemental/StringProcessing/CMakeLists.txt to 6.2.1 2025-08-27 14:39:24 -07:00
Mishal Shah
4e8f952ff5 Update Runtimes/Overlay/CMakeLists.txt to 6.2.1 2025-08-27 14:39:13 -07:00
Mishal Shah
e30e85385b Update Runtimes/Core/CMakeLists.txt to 6.2.1 2025-08-27 14:38:57 -07:00
Pavel Yaskevich
bbb11ec272 [TypeCheckEffects] AbstractFunction: Parameter types should be mapped into context
Parameter type could be represented by an associated type which is
bound to a concrete type by an extension, `AbstractFunction::getType()`
should map it into context before returning because the construct is
that it always produces a function type.

Resolves: rdar://156955193
(cherry picked from commit 32b97d0e2a)
(cherry picked from commit 7f652915d9)
2025-08-27 10:35:50 -07:00
Mishal Shah
95fefa36e1 Update the runtime version to 6.2
(cherry picked from commit 9231f97885)
2025-08-26 23:40:03 -07:00
Mishal Shah
70616b4dea Update the runtime version to 6.2.0 for Overlay and Supplemental
(cherry picked from commit 9f6a789374)
2025-08-26 23:40:03 -07:00
Charles Zablit
caec84cd54 [windows] upgrade to Python 3.10.1 2025-08-27 00:21:51 +01:00
Adrian Prantl
55f82ea3a0 Merge pull request #83845 from charles-zablit/charles-zablit/demangling/make-printGenericSignature-virtual-to-6.2.1
🍒 [demangling] make printGenericSignature virtual
2025-08-22 08:24:42 -07:00
Charles Zablit
6324f20318 [demangling] make printGenericSignature virtual 2025-08-21 15:09:15 +01:00
Mishal Shah
32e10149dd Merge pull request #83749 from swiftlang/bump-version-6.2.1
Bump the Swift version to 6.2.1
2025-08-15 09:11:33 -07:00
Mishal Shah
7aac9e3c6e Merge pull request #83747 from swiftlang/2-add-support-for-swift-6.2.0-6.2.1
[6.2.1][update-checkout] Add support for Swift 6.2.0 and 6.2.1
2025-08-14 23:23:04 -07:00
Mishal Shah
1082d64b06 Bump the Swift version to 6.2.1 2025-08-14 23:21:36 -07:00
Mishal Shah
3ef2ee6518 [update-checkout] Add support for Swift 6.2.0 and 6.2.1
(cherry picked from commit f906535bec)
(cherry picked from commit 94d331d23e)
2025-08-14 22:42:41 -07:00
Gábor Horváth
5cc6f245d0 Merge pull request #83592 from Xazax-hun/fix-bridging-header-reverse-interop-on-6.2 swift-6.2-DEVELOPMENT-SNAPSHOT-2025-08-10-a 2025-08-09 08:27:35 +01:00
Philippe Hausler
838cb7a91b Revert "[Observation] Ensure deinitialized Observable types don't leave active observations in memory (#82752)" (#83492)
This reverts commit a349e64039.

This is in concert of https://github.com/swiftlang/swift/pull/83436

<!--
If this pull request is targeting a release branch, please fill out the
following form:

https://github.com/swiftlang/.github/blob/main/PULL_REQUEST_TEMPLATE/release.md?plain=1

Otherwise, replace this comment with a description of your changes and
rationale. Provide links to external references/discussions if
appropriate.
If this pull request resolves any GitHub issues, link them like so:

  Resolves <link to issue>, resolves <link to another issue>.

For more information about linking a pull request to an issue, see:

https://docs.github.com/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue
-->

<!--
Before merging this pull request, you must run the Swift continuous
integration tests.
For information about triggering CI builds via @swift-ci, see:

https://github.com/apple/swift/blob/main/docs/ContinuousIntegration.md#swift-ci

Thank you for your contribution to Swift!
-->
swift-6.2-DEVELOPMENT-SNAPSHOT-2025-08-09-a
2025-08-08 17:13:13 -07:00
Gábor Horváth
ef63ec99e9 [6.2][cxx-interop] Fix crash when using bridging headers in reverse interop
Explanation: The original code had the assumption we only import
modules. However, there is a flag to import an umbrella header in which
case the clang nodes have no owning module. This PR prevents a null
dereference in that case.
Issues: rdar://157489426
Original PRs: #83540
Risk: Low, added a check to avoid null dereference.
Testing: Added a compiler test.
Reviewers: @egorzhdan
2025-08-07 15:58:31 +01:00
Augusto Noronha
0f0552886e Merge pull request #83557 from augusto2112/6.2-fix-opaque-infinite-rec
[DebugInfo] Fix infinite recursion when opaque return type is defined inside function returning it
swift-6.2-DEVELOPMENT-SNAPSHOT-2025-08-07-a
2025-08-06 12:00:30 -07:00
Konrad `ktoso` Malawski
2135b4d636 Merge pull request #83560 from eeckstein/fix-test-6.2
[6.2] tests: increase the timeout for `large_nested_array.swift.gyb`
swift-6.2-DEVELOPMENT-SNAPSHOT-2025-08-06-a
2025-08-06 17:02:57 +09:00
Erik Eckstein
d2e872fe6b tests: increase the timeout for large_nested_array.swift.gyb
This fixes a timeout failure in CI. It looks like that some CI machines are slower than expected.
I could not reproduce this locally. There doesn't seem to be a compile time regression.
2025-08-06 09:55:19 +02:00
Augusto Noronha
7b46d41823 [DebugInfo] Fix infinite recursion when opaque return type is defined
inside function returning it

A stack overflow would happen when the compiler tried emitting debug
info for a function whose opaque return type was declared inside the
function itself. This fixes the issue by emitting a forward declaration
for the function before emitting it.

rdar://150313956

(cherry picked from commit c03831f70d)
2025-08-05 17:36:28 -07:00
Hamish Knight
a8cea97b4b Merge pull request #82988 from hamishknight/enable-inlinearray-sugar-6.2
[6.2] Enable InlineArray type sugar
2025-08-05 22:21:05 +01:00
Adrian Prantl
aa3b06252d Merge pull request #83526 from adrian-prantl/157063577-6.2
[ClangImporter] Prefer serialized bridging headers in LLDB.
2025-08-05 09:43:47 -07:00
Adrian Prantl
95ad22e799 [ClangImporter] Prefer serialized bridging headers in LLDB.
Especially in an explicit modules project, LLDB might not know all the
search paths needed to imported the on disk header.

rdar://157063577
(cherry picked from commit a6678476d8)
2025-08-04 11:15:55 -07:00
Michael Gottesman
99a2db3392 Merge pull request #83410 from gottesmm/release/6.2-156919493
[6.2][concurrency] Emit nonisolated(nonsending) async throw initializers correctly
swift-6.2-DEVELOPMENT-SNAPSHOT-2025-08-01-a
2025-07-31 09:41:12 -07:00
Pavel Yaskevich
88f32b364e Merge pull request #83434 from xedin/rdar-157061896-6.2
[6.2][Concurrency] Downgrade errors when isolated member is referenced fro…
2025-07-31 09:06:04 -07:00
Pavel Yaskevich
c04eb7c482 [Concurrency] Downgrade errors when isolated member is referenced from a preconcurrency context
Such references used to be downgraded until Swift 6 but since the
context is `@preconcurrency` it should be possible for API authors
to introduce concurrency annotations such as `@Sendable` without
breaking clients even when they are compiled in Swift 6 mode.

Resolves: rdar://157061896
(cherry picked from commit 5ee673f358c9dd7dbbfe58f02bc78af60e0377b8)
2025-07-30 11:03:30 -07:00
Alexis Laferrière
eba3593d16 Merge pull request #83401 from swiftlang/revert-83234-wip-155863017-6.2
Revert "[6.2][Test] Fix IRGen/abi_v7k.swift"
swift-6.2-DEVELOPMENT-SNAPSHOT-2025-07-31-a
2025-07-30 11:03:06 -07:00
John McCall
369c75b121 Merge pull request #83386 from rjmccall/rewrite-nonisolated-nonsending-closure-types-6.2
[6.2] Rewrite the type of `nonisolated(nonsending)` closures
2025-07-30 13:10:36 -04:00
Michael Gottesman
9bfaeb3d7c Fix a test for difference in betwen macOS and Linux/Windows.
Specifically, I removed an availability flag on two SIL functions.

(cherry picked from commit 46148545d7)
2025-07-29 20:10:46 -07:00
Michael Gottesman
dcb3e5c48e [concurrency] Emit nonisolated(nonsending) async throw initializers correctly.
Specifically, we were not inserting the implicit isolated parameter and were not
setting up the actor prologue. To keep this specific to nonisolated(nonsending)
code, I only setup the actor prologue if we know that we have something that is
nonisolated(nonsending).

I also ported some async initializer tests to run with/without
nonisolated(nonsending) just to increase code coverage.

rdar://156919493
(cherry picked from commit 3871d22257)
2025-07-29 20:10:44 -07:00
Adrian Prantl
5754397c94 Merge pull request #82968 from swiftlang/dl/6.2-RemoteInspection-Add-AsyncTaskInfo.IsSuspended-based-on-HasTaskDependency
[6.2] RemoteInspection: Add AsyncTaskInfo.IsSuspended based on HasTaskDependency
swift-6.2-DEVELOPMENT-SNAPSHOT-2025-07-30-a
2025-07-29 11:12:40 -07:00