Mike Ash
3869cb50ea
Fix integer type mismatches in swift-inspect when building 32-bit.
2025-10-07 14:00:01 -04:00
Egor Zhdan
62d388a09f
Merge pull request #84435 from egorzhdan/egorzhdan/do-not-generate-interface-twice
...
[cxx-interop] Avoid trying to generate module interfaces twice
2025-10-07 17:50:11 +01:00
Max Desiatov
1d4b451d24
Merge pull request #84589 from MaxDesiatov/for-expressions
...
AST/Sema: `ForExpressions` experimental feature
2025-10-07 17:48:24 +01:00
Pavel Yaskevich
b0a2bd6578
Merge pull request #84715 from xedin/rdar-159401910
...
[Diagnostics] Fix a few issues with existential type mismatches
2025-10-07 09:39:36 -07:00
Adrian Prantl
84cda6d523
Merge pull request #84681 from adrian-prantl/161923580
...
[DebugInfo] Properly nest types declared in extensions in the debug info
2025-10-07 08:26:32 -07:00
Tim Kientzle
c89a71a298
Merge pull request #83710 from tbkka/tbkka-value-generics-in-stdlib
...
Allow value generics within the stdlib
2025-10-07 07:09:45 -07:00
Eric Miotto
c23cc5f707
Merge pull request #84371 from edymtt/edymtt/harden-python-scripts
...
Reduce surface for command injection in some Python scripts
2025-10-07 06:46:38 -07:00
Michael Gottesman
4da340a30d
Merge pull request #84728 from gottesmm/pr-c10808b54e513cf6f212aa5f01ede2a97d5a32a6
...
[concurrency] Import getters with completion handlers as nonisolated(nonsending).
2025-10-07 04:57:53 -07:00
Max Desiatov
b545a28bd3
Add missing // REQUIRES: swift_feature_ForExpressions
2025-10-07 12:34:49 +01:00
Max Desiatov
8cddae2471
Make nested expr work, convert test to executable
2025-10-07 11:16:54 +01:00
Max Desiatov
b985f3a6be
Fix SILGen and make it work with all RangeReplaceableCollections
2025-10-07 11:16:54 +01:00
Max Desiatov
e7aac5df12
for expressions scaffolding, making constraints work
2025-10-07 11:16:54 +01:00
eeckstein
757de6e2a6
Merge pull request #84711 from eeckstein/fix-licm
...
LoopInvariantCodeMotion: fix check for hoisting `load_borrow` instructions
2025-10-07 11:40:29 +02:00
Michael Gottesman
e4fb8819d2
Merge pull request #84622 from gottesmm/pr-7065a633780e3a54b56563650e321ec0801bcb45
...
[sil-llvm-gen] Run Sema before we attempt to emit IR.
2025-10-07 00:57:05 -07:00
Ellis Hoag
4f254950c1
Merge pull request #84661 from ellishg/fix-objc-cstr-sections
...
[ObjC][Gen] Emit strs into __cstring if willBeRelativelyAddressed
2025-10-06 23:08:47 -07:00
Henrik G. Olsson
3bc17bdd2f
Merge pull request #84722 from hnrklssn/conditional-span-module-map
...
Move `span` to conditional header in libstdc++ module map
2025-10-06 22:09:07 -07:00
eeckstein
401a2ac2bc
Merge pull request #84704 from eeckstein/closure-specialization
...
ClosureSpecialization: support for OSSA and a big overhaul
2025-10-07 06:59:08 +02:00
Michael Gottesman
08f108c23b
[concurrency] Import getters with completion handlers as nonisolated(nonsending).
...
Specifically, this means importing getters defined via swift_async_name. This
just ensures that they are treated just like any other imported objc async
function with completion handler.
rdar://156985950
2025-10-06 19:57:01 -07:00
Hamish Knight
9883477c02
Merge pull request #84699 from hamishknight/meta-error
...
[CS] Improve diagnostics for non-metatype `type(of:)` contextual type
2025-10-07 02:49:10 +01:00
Henrik G. Olsson
d3214de950
Merge pull request #84685 from hnrklssn/verify-all
...
This adds the -verify-ignore-unrelated flag. When -verify is used without -verify-ignore-unrelated, diagnostics emitted in buffers other than the main file and those passed with -verify-additional-file (except diagnostics emitted at <unknown>:0) will now result in an error. They were previously ignored. The old behaviour is still available as opt-in using -verify-ignore-unrelated, but by being strict by default it should make it harder to accidentally miss diagnostics.
To avoid unnecessary performance overhead, -verify-additional-file is still required to parse the expected-* directives in files other than the main file.
2025-10-06 18:01:47 -07:00
Slava Pestov
fbad38093e
Merge pull request #84716 from slavapestov/fix-test-again
...
Add -target argument to type_checker_perf/fast/issue-54795.swift
2025-10-06 20:00:45 -04:00
Henrik G. Olsson
5519be8b7c
Move span to conditional header in libstdc++ module map
...
`span` is not available in all versions of libstd++, so make it a
conditional header. Also adds other missing c++20 headers.
Fixing this triggered an assert when importing a constant initialized
`wchar_t` variable, so that is also fixed. The reason is that `wchar_t`
is mapped to `Unicode.Scalar`, which cannot be directly initialized by
integer literals in Swift, triggering an assert when looking up the
protocol conformance for `_ExpressibleByBuiltinIntegerLiteral`.
rdar://162074714
2025-10-06 16:02:35 -07:00
Michael Gottesman
3a96e99bd8
[sil-llvm-gen] Run Sema before we attempt to emit IR.
2025-10-06 15:17:26 -07:00
Eric Miotto
1bc0056ea0
Merge pull request #84393 from edymtt/edymtt/add-runtime-to-new-build-system
...
Runtimes: add support for Runtime module
2025-10-06 14:40:42 -07:00
Eric Miotto
00f047dbbb
Merge pull request #84388 from edymtt/edymtt/split-find-swiftdarwin-from-find-swiftoverlay
...
Runtimes: provide a dedicated find module for Darwin overlay
2025-10-06 14:36:47 -07:00
Andrew Trick
7818b8c0df
Merge pull request #84702 from atrick/builtin-nonescapable
...
Allow Builtin.Load/Take -> ~Escapable
2025-10-06 14:27:59 -07:00
Pavel Yaskevich
15c56627b8
[CSSimplify] Remove all InstanceType at the end of a locator to diagnose mismatched existential conversion
2025-10-06 14:01:28 -07:00
Hamish Knight
d65f28984a
[CS] Improve diagnostics for non-metatype type(of:) contextual type
...
Emit a custom diagnostic for this case, and handle holes.
2025-10-06 21:45:48 +01:00
Philippe Hausler
229c36e476
Revert "[Observation] ensure event triggers on deinitialization passes as if all properties that are being observed have changed (for weak storage) ( #79823 )" ( #83436 )
...
This reverts commit 9d1d917091 .
2025-10-06 12:50:27 -07:00
Hamish Knight
5b4c5ebed4
Merge pull request #84707 from hamishknight/fuzzy
...
[test] Add some more known crashers
2025-10-06 20:44:31 +01:00
Andrew Trick
c2171ea9b0
Merge pull request #84703 from atrick/lifedep-diag-init
...
Lifetimes: add a diagnostic note for implicit accessors
2025-10-06 12:29:51 -07:00
Slava Pestov
3797dd910f
Add -target argument to type_checker_perf/fast/issue-54795.swift
...
Hopefully fixes rdar://161224041.
2025-10-06 14:52:17 -04:00
Daniil Kovalev
b46a095d66
[AutoDiff][Gardening] Use SILFunction::getSourceFile instead of dup logic ( #84709 )
...
In 025902fa99 ,
`SILFunction::getSourceFile()`
is introduced. This patch makes use of that to avoid duplicating the
logic in `static SourceFile &getSourceFile(SILFunction *f)` in
lib/SILOptimizer/Differentiation/ADContext.cpp.
2025-10-06 09:57:20 -07:00
Pavel Yaskevich
36fc1e6c43
[CSSimplify] Diagnose an attempt to match non-existential type to an existential one
...
Resolves: rdar://159401910
2025-10-06 09:51:34 -07:00
Hamish Knight
6d7d1d78d6
Merge pull request #84695 from hamishknight/typewriter
...
[AST] Canonicalize original type for ErrorType
2025-10-06 17:23:55 +01:00
Steven Wu
79ffee8993
Merge pull request #84683 from cachemeifyoucan/eng/PR-161854282
...
[Caching] Adjust the bridging header chaining rule
2025-10-06 09:09:04 -07:00
Erik Eckstein
55cdc31936
LoopInvariantCodeMotion: a small refactoring
...
which is now possible as we removed the "fallthrough" from the previous case
2025-10-06 17:57:12 +02:00
Erik Eckstein
e88096e971
LoopInvariantCodeMotion: fix check for hoisting load_borrow instructions
...
We need to check aliasing for all kind of side-effect instructions, not just stores and destroys
2025-10-06 17:57:12 +02:00
Bassam (Sam) Khouri
b985fc9948
Merge pull request #84686 from bkhouri/t/main/remove_versobe_when_building_swiftpm
...
build-script: remove `--verbose` when building swiftpm
2025-10-06 11:15:16 -04:00
Mishal Shah
ee04cb84b2
Merge pull request #84696 from valeriyvan/Generics-typos
2025-10-06 07:57:15 -07:00
Hamish Knight
74fcee3982
[test] Add some more known crashers
2025-10-06 11:50:39 +01:00
Hamish Knight
1186721fd3
[test] Update a couple of crasher signatures
2025-10-06 11:50:39 +01:00
Egor Zhdan
c6a9226ef2
Merge pull request #84665 from egorzhdan/egorzhdan/frt-objc-class
...
[cxx-interop] Avoid spurious references to `_OBJC_CLASS` symbols for C++ foreign reference types
2025-10-06 11:48:30 +01:00
Hamish Knight
99f6f60e8f
[test] Fix availability in import-as-instance-method.swift
...
This test can run with non-macOS targets, update the availability
condition to be platform agnostic.
2025-10-06 11:47:16 +01:00
Erik Eckstein
8efafc7e3b
Optimizer: remove the -experimental-swift-based-closure-specialization option
2025-10-06 12:02:48 +02:00
Erik Eckstein
259bf65fc9
SIL: remove the now unused SILFunctionType_isTrivialNoescape bridging function
2025-10-06 12:02:48 +02:00
Erik Eckstein
df20d36255
ClosureSpecialization: support for OSSA and a big overhaul
...
Beside supporting OSSA, this change significantly simplifies the pass.
The main change is that instead of starting at a closure (e.g. `partial_apply`) and finding all call sites, we now start at a call site and look for closures for all arguments. This makes a lot of things much simpler, e.g. not so many intermediate data structures are required to track all the states.
I needed to remove the 3 unit tests because the things those tests were testing are not there anymore. However, the pass is tested with a lot of sil tests (and I added quite a few), which should give good test coverage.
The old ClosureSpecializer pass is still kept in place, because at that point in the pipeline we don't have OSSA, yet. Once we have that, we can replace the old pass withe the new one.
However, the autodiff closure specializer already runs in the OSSA pipeline and there the new changes take effect.
2025-10-06 12:02:48 +02:00
Erik Eckstein
89bba668e2
Mangling: add a closure specialization mangling for arguments which specialize for the same closure as a previous argument
...
For example:
```
%1 = partial_apply %closure
apply %f(%1, %1) // first argument: `.closure(%1)`
// second argument: `.previousArgumentIndex(0)`
```
2025-10-06 09:47:41 +02:00
Erik Eckstein
ea6e3c9b4d
ASTMangler: make sure to mangle canonical replacement types of substitution maps
...
When mangling types, it's expected that the type is canonical. Except if mangling for debug info.
Fixes a crash.
2025-10-06 09:47:41 +02:00
Erik Eckstein
272fd224b2
SILCloner: support cloning the whole function if the client already provided the cloned entry block
2025-10-06 09:47:41 +02:00