Commit Graph

185864 Commits

Author SHA1 Message Date
Anton Korobeynikov
9b6730569c Update differential operators 2025-07-25 15:16:12 -07:00
Anton Korobeynikov
595abee2c1 First cut of parameter pack differentiation 2025-07-25 15:15:56 -07:00
Anton Korobeynikov
9758be89c7 Enforce ownership for pullback 2025-07-23 14:00:56 -07:00
Anton Korobeynikov
6a0e0d223e Initial support for differentiation of throwing functions 2025-07-23 14:00:56 -07:00
Dario Rexin
3bacfa7fb9 Merge pull request #83145 from drexin/wip-155863017
[Test] Fix IRGen/abi_v7k.swift
2025-07-21 15:58:04 -07:00
Ian Anderson
78552bb258 Merge pull request #83178 from ian-twilightcoder/expand-resp
[utils] expand @-filelist files with .resp filename extensions
2025-07-21 14:14:58 -07:00
Ben Barham
85f7797dd6 Merge pull request #82514 from bnbarham/use-compiler-version
Use SWIFT_COMPILER_VERSION before SWIFT_TOOLCHAIN_VERSION if it exists
2025-07-21 13:38:50 -07:00
Stephen Canon
ee9b38ca22 Use an explicit unsigned comparison for span index checks (#83150)
LLVM ought to be able to do this transformation for us, but it currently fails to do so. We can code around it easily enough. https://github.com/swiftlang/swift/pull/83172 has a better long-term fix.
2025-07-21 16:06:17 -04:00
Hamish Knight
cb0a21da2a Merge pull request #83170 from hamishknight/fix-assert
[IDE] Fix assertion failure in `PostfixCompletionCallback::Result::tryMerge`
2025-07-21 18:48:03 +01:00
Michael Ilseman
bed6408712 Better docs for UTF8Span (#83184)
Co-authored-by: Alex Martini <amartini@apple.com>
2025-07-21 11:02:29 -06:00
Max Desiatov
44a68115bf Merge pull request #83135 from MaxDesiatov/test-wasm-stdlib
build-script: allow `--test-wasm-stdlib` without `--build-wasm-stdlib`

This allows testing Wasm stdlib without fully rebuilding WASI sysroot and stdlib, while changes to stdlib itself are still detected by ninja as dependencies and are built incrementally, which is great for local builds.
2025-07-21 17:22:25 +01:00
eeckstein
4d8b58917b Merge pull request #83207 from artemcm/RestrictMacOSTest
[Test][Dependency Scanning] Restrict triple-sensitive to require macOS
2025-07-21 17:33:19 +02:00
Artem Chikin
a28a519bc3 [Test][Dependency Scanning] Restrict triple-sensitive to require macOS
Resolves rdar://156192088
2025-07-21 08:28:31 -07:00
Stephen Canon
337b20e8ed Remove some redundant unsafe markings (#83192)
We were getting warnings about these; remove them to cut down on noise.
2025-07-21 11:22:13 -04:00
Egor Zhdan
04726c04e3 Merge pull request #83181 from egorzhdan/egorzhdan/default-arg-lifetime-conformance
[cxx-interop] Prevent protocol conformance table from being prematurely populated
2025-07-21 12:22:44 +01:00
Max Desiatov
cf0e96c84b build_script_invocation.py: add a note about wasi-sdk-26 adoption 2025-07-21 12:14:48 +01:00
Yuta Saito
e76997aad2 Merge pull request #83191 from kateinoigakukun/yt/xctest-build-wasi 2025-07-21 18:42:04 +09:00
Yuta Saito
960afc5754 Merge pull request #83167 from kateinoigakukun/yt/wasip1
[wasm] Rename `wasm32-unknown-wasi` to `wasm32-unknown-wasip1`
2025-07-21 10:35:33 +09:00
Hamish Knight
837caf80a5 Merge pull request #83193 from hamishknight/sig
[test] Update some crasher signatures
2025-07-21 01:59:18 +01:00
Saleem Abdulrasool
867928d4a9 Merge pull request #83174 from compnerd/distributed-build
utils: add Distributed to the experimental Windows SDK
2025-07-20 17:19:01 -07:00
Hamish Knight
347d94bda5 [test] Add some alias crash signatures
The signatures here are bogus, put the correct signatures in as
aliases.
2025-07-20 18:46:18 +01:00
Hamish Knight
a2d707be2a [test] Remove duplicate test case
This is essentially the same as `8668a3eb11f2baf.swift`.
2025-07-20 18:32:45 +01:00
Hamish Knight
7e22f9264b [test] Update some crasher signatures
The signatures have changed here either due to code changes in the
repo or due to improvements to the signature detection, update the
test cases.
2025-07-20 18:32:38 +01:00
Yuta Saito
686d65513d [wasm] Build and install XCTest for Wasm Swift SDK
Install static XCTest library and its Swift module files in the following
directory structure:

```
usr/lib/swift_static/wasi/libXCTest.a
usr/lib/swift_static/wasi/XCTest.swiftmodule
```
2025-07-20 00:14:34 +00:00
Gábor Horváth
f40d3b4c2e Merge pull request #83176 from Xazax-hun/fix-ref-name-mangling 2025-07-19 19:24:30 +01:00
Slava Pestov
bb4f61e97b Merge pull request #83141 from slavapestov/fix-rdar82992151
Sema: Improve the infinite opaque return type check
2025-07-19 09:30:17 -04:00
Ian Anderson
fc96b8518b [utils] expand @-filelist files with .resp filename extensions
Xcode puts clang command line arguments in a single line in .resp files.
Split the argument printing routine into its own function print_arg.
When a clang response file is encountered, split each line into arguments and loop them through print_arg.
-c has an argument for clang
2025-07-18 22:35:53 -07:00
Allan Shortlidge
5d98ca63c7 Merge pull request #83168 from tshortli/custom-availability-domain-fix-its
AST/Sema: Generalize availability fix-its to support custom availability domains
2025-07-18 21:45:57 -07:00
Slava Pestov
4eaa7e3b47 AST: Add -max-substitution-count= and -max-substitution-depth= frontend flags 2025-07-18 20:03:03 -04:00
Slava Pestov
f909ca6921 Frontend: Clean up integer option parsing in ParseLangArgs() 2025-07-18 20:03:03 -04:00
Slava Pestov
81bf4490ae AST: Re-enable TypeSubstituter::transformSubstitutionMap() again
Now that we cache substituted substitution maps inside the
InFlightSubstitution, we can re-enable this.
2025-07-18 20:03:03 -04:00
Slava Pestov
8d05d79fad AST: Cache substituted substitution maps inside the InFlightSubstitution
A substitution map contains conformances, and a conformance can contain
a substitution map. This will always be a DAG, but not a tree, and to
avoid exponential blowup in certain edge cases, let's cache the work to
avoid visiting the same substitution map repeatedly, if multiple
conformances refer to the same substitution map.
2025-07-18 20:03:03 -04:00
Slava Pestov
b70f8a82b1 Sema: Improve the infinite opaque return type check
Now look through other opaque return types that appear in the
underlying type. This catches various forms of recursion that
otherwise would cause a SILGen or SILOptimizer crash.

- Fixes rdar://82992151.
2025-07-18 20:03:03 -04:00
Slava Pestov
103428fe80 AST: More robust recursion check for opaque types with infinite underlying types
Tracking seen declarations and substitution maps only detects the
situation where the opaque type's underlying type contains itself
with the same substitution map. However, it is also possible to
recurse with a different substitution map.

In general termination is undecidable with a problem like this,
so instead of trying to catch cycles, just impose a termination
limit.

This converts a stack overflow into an assertion, which is still
not ideal; we should really diagnose something instead. But this
is a first step.
2025-07-18 20:03:03 -04:00
Slava Pestov
7a0ff5ccb6 AST: Add SubstitutionMap::DumpStyle::NoConformances and use it by default for opaque types 2025-07-18 19:12:34 -04:00
Slava Pestov
97ce526153 Sema: Replace a usage of SubstFlags::SubstituteOpaqueArchetypes with transformRec()
The semantics of SubstFlags::SubstituteOpaqueArchetypes are changing
so this is no longer useful here.
2025-07-18 19:12:33 -04:00
Slava Pestov
ef0164dcbd AST: Small cleanup for InFlightSubstitution 2025-07-18 19:12:33 -04:00
Slava Pestov
7b0ad4a6c8 Sema: Add a type checker test that is now fast
release/6.2 chokes on this file. Nice work @xedin :)
2025-07-18 19:12:33 -04:00
Artem Chikin
cf50dd0c1e Merge pull request #82552 from artemcm/ScannerDiagnoseWrontTargetCandidate
[Dependency Scanning] Discard and diagnose discovered binary modules built for an incompatible target
2025-07-18 15:52:15 -07:00
Artem Chikin
8682ed3a74 Merge pull request #82934 from artemcm/DepScanExplicitInput
[Dependency Scanning] Consider `-swift-module-file` inputs when looking for dependencies
2025-07-18 15:30:12 -07:00
Michael Gottesman
e9c5542fab Merge pull request #83177 from gottesmm/rdar155905383-finished
[concurrency] Add fixes from rjmccall's review on 6.2 to main
2025-07-18 15:17:08 -07:00
Saleem Abdulrasool
21533c68f0 utils: add Distributed to the experimental Windows SDK
We now have distributed in the SDK set as well. This brings us closer to
having a complete static SDK on Windows.
2025-07-18 14:55:47 -07:00
Saleem Abdulrasool
b4b9311696 Merge pull request #83158 from compnerd/observation
utils: build the static Obversation module on Windows
2025-07-18 14:53:32 -07:00
Allan Shortlidge
5601e66a69 Sema: Generalize more-available-than-enclosing-decl diagnostics.
NFC.
2025-07-18 13:27:08 -07:00
Allan Shortlidge
034c62cf01 AST: Generalize availability fix-its to support custom availability domains.
Resolves rdar://156118254.
2025-07-18 13:27:08 -07:00
Allan Shortlidge
aeb5a46d9e AST: Emit warnings for redundant availability checks in custom domains. 2025-07-18 13:27:08 -07:00
Allan Shortlidge
a3fbe3d530 AST: Introduce queries on Decl for active @available attrs.
Use these queries to replace some duplicated code. Also, move the
`attr_inlinable_available.swift` test to the `Availability` sub-directory since
the test has more to do with availability checking than it has to do
specifically with the `@inlinable` attr.
2025-07-18 13:27:08 -07:00
Evan Wilde
b97df2645b Merge pull request #83159 from etcwilde/ewilde/freebsd-package-preset
Build-Script: FreeBSD Package Preset
2025-07-18 12:52:51 -07:00
Egor Zhdan
f0a32d104d [cxx-interop] Prevent protocol conformance table from being prematurely populated
We've started seeing build failures where the conformance of a `std::vector` instantiation to `CxxVector` is missing. This was because the LifetimeDependenceInfoRequest triggers the protocol conformance table for the instantiation to be built before the synthesized conformance gets added.

This works around the issue by preventing LifetimeDependenceInfoRequest from running for the synthesized default argument generator function, which was the culprit of this particular failure.

rdar://155977071
2025-07-18 20:19:30 +01:00
Allan Shortlidge
6b29700554 Merge pull request #83162 from tshortli/misc-availability-cleanups
Miscellaneous availability cleanups
swift-DEVELOPMENT-SNAPSHOT-2025-07-18-a
2025-07-18 12:03:46 -07:00