Commit Graph

197436 Commits

Author SHA1 Message Date
Jonathan Grynspan
6951ac4a63 Merge branch 'main' into jgrynspan/executablePath 2026-02-06 17:44:24 -05:00
Slava Pestov
aa62cfdcbb Merge pull request #87037 from slavapestov/prune-disjunctions-toll-free-bridge
Sema: Teach disjunction pruning about CF toll-free bridging
2026-02-06 17:38:31 -05:00
Aidan Hall
88b2c1c056 Merge pull request #86846 from aidan-hall/disable-lifetime-indices
LifetimeDependence: Disable parameter indices in Swift lifetime dependence annotations
2026-02-06 22:34:52 +00:00
Andrew Trick
16699e8110 Merge pull request #87015 from atrick/fix-ossa-rauw
Another fix for the OSSA RAUW utility for unowned phis
2026-02-06 14:13:26 -08:00
Hamish Knight
2ddadb6a0c Merge pull request #87028 from hamishknight/privy
[Sema] SE-0502: Enable `ExcludePrivateFromMemberwiseInit` by default
2026-02-06 21:40:03 +00:00
Slava Pestov
21abe01557 Sema: Teach canPossiblyConvertTo() about CF toll-free bridging 2026-02-06 12:47:33 -05:00
Slava Pestov
22fdb62e51 Sema: Add a couple of type checker performance tests 2026-02-06 12:47:33 -05:00
Henrik G. Olsson
0a744979ca Merge pull request #86927 from ramonasuncion/remove-shell-index-compress
[Test] Replace REQUIRES: shell with UNSUPPORTED: OS=windows-msvc
2026-02-06 09:39:29 -08:00
Meghana Gupta
a0664a938a Merge pull request #87019 from meg-gupta/assertconf
Add -assert-config DisableReplacement to the private oslog library
2026-02-06 09:13:21 -08:00
Meghana Gupta
617deca5ea Merge pull request #87011 from meg-gupta/oslogopt
Fix OSLogOptimization for complete lifetimes in SIL
2026-02-06 09:12:58 -08:00
Alastair Houghton
e38c0652b6 Merge pull request #84906 from al45tair/eng/PR-101623384
[Backtracing] Add initial support for Windows.
2026-02-06 14:53:16 +00:00
John Hui
27f970af5e Merge pull request #86995 from j-hui/all-star
[cxx-interop] Fix confusion between multiply and dereference operators
2026-02-06 06:04:14 -08:00
Hamish Knight
bc65846be2 [Sema] SE-0502: Enable ExcludePrivateFromMemberwiseInit by default
Enable the feature by default, and add an experimental feature
`DeprecateCompatMemberwiseInit` to control the deprecation behavior
which was deferred from the proposal.
2026-02-06 11:50:40 +00:00
Egor Zhdan
bdb500d5e8 Merge pull request #86988 from egorzhdan/egorzhdan/only-valid-operators
[cxx-interop] Do not emit invalid C++ operator declarations
2026-02-06 11:39:10 +00:00
Kavon Farvardin
ae77ba81e3 Merge pull request #87013 from kavon/revert-84789
Back out #84789 after additional testing
2026-02-06 02:58:00 -08:00
Aidan Hall
63da6499eb LifetimeDependence: Disable indices in Swift lifetime dependencies
Lifetime indices are never necessary in Swift, they unnecessarily expose
implementation details, and they make lifetime annotations more error-prone,
since they may need to be updated if a function's parameter list changes.

The Swift Syntax parser also cannot handle lifetime annotations where the target
is an index. The main reason the C++ parser supports them is because it is also
used for SIL.
2026-02-06 10:27:01 +00:00
Aidan Hall
e98a7a6bf8 Merge pull request #86842 from aidan-hall/just-func-type-lifetimes-try-print
LifetimeDependence: Support function types
2026-02-06 10:09:25 +00:00
Alastair Houghton
079c1657ae [Backtracing] Fix the new build system for Windows.
We needed to add the `Runtime` module to the new build system, but
when I tried doing that, various things broke.

Firstly, we ended up with two targets with the name `swiftRuntime`,
but only in the static build (because in that build, everything
gets pulled in together, so CMake sees both of them).  Rename the
one that's part of `swiftCore` to `swiftRuntimeCore`.

Second, we need some extra paths for the `Cxx` module and its
submodules, and since those are part of the `INTERFACE`, we need
to make sure we `PUBLIC` link them into the `Cxx` module so that
they get passed through when building `swiftRuntime`.

rdar://101623384
2026-02-06 08:53:16 +00:00
Alastair Houghton
3e7647de2c [Backtracing] Fix silly mistake.
I really did mean `ret`.

rdar://101623384
2026-02-06 08:53:16 +00:00
Alastair Houghton
54385105a0 [Backtracing] We don't need to change the driver.
This change in the driver isn't necessary after all.

rdar://101623384
2026-02-06 08:53:16 +00:00
Alastair Houghton
ceaba82d6d [Backtracing] Updates after review.
Tweaked the comment in `Runtime/Config.h`.

Fixed a couple of incorrect ARM64 instruction mnemonics.  This still needs
testing on ARM64 Windows.

Fixed an out-of-date comment in `swift-backtrace`.

Use a macro in `Backtrace.cpp` to guarantee we don't overrun the buffer,
and in the process simplify the code slightly.

rdar://101623384
2026-02-06 08:53:16 +00:00
Alastair Houghton
5b4c428ec4 [Backtracing][Tests] We might not have more frames here.
Test for `}` rather than `},`, since we may or may not have extra
frames after the ones we expect, depending.

rdar://101623384
2026-02-06 08:53:16 +00:00
Alastair Houghton
e47788232c [Backtracing][Test] Use !, not not.
`not` works on Windows, but not on Linux or Darwin.

rdar://101623384
2026-02-06 08:53:16 +00:00
Alastair Houghton
ae71bd8d65 [Backtracing] Fix tests up for Windows.
We can't use `|| true` on Windows, so use `not` instead.

Also, on Windows, program names get downcased because `lit` uses
`os.path.normcase()`, so if we have program names in the output,
make sure the programs are already lower-case.

Fix up the stack overflow test to match the expected output.

Plus fix the macOS build to always build for macOS 26.0 or above.

rdar://101623384
2026-02-06 08:53:16 +00:00
Alastair Houghton
d9b0031f09 [Backtracing] Build and test fixes.
Tweak things to build on Linux and macOS again.

Also fix a few things in the tests.

rdar://101623384
2026-02-06 08:53:15 +00:00
Alastair Houghton
58a6470ac3 [Backtracing] Fix build failures for places Runtime doesn't build.
We should only add the assembly files if we're actually going
to build the `Runtime` module.  This was tripping up iOS/tvOS/
watchOS builds.

rdar://101623384
2026-02-06 08:53:15 +00:00
Alastair Houghton
f6af22c402 [Backtracing] Don't pull in windows.h unnecessarily.
Also, fix two files that managed to use Windows API without
importing `WinSDK` as a result of the leakage caused by including
`windows.h` from `codeview.h`.

rdar://101623384
2026-02-06 08:53:15 +00:00
Alastair Houghton
38c4848b12 [Backtracing] Remember to emit end instruction.
We were omitting the `end` instruction, the upshot of which was
that the compact backtrace was always being decoded as truncated.

rdar://101623384
2026-02-06 08:53:15 +00:00
Alastair Houghton
add83b4d22 [Backtracing] Don't build backtracing code when it's disabled.
Don't even bother building the backtracing code if the backtracing
code is disabled.

rdar://101623384
2026-02-06 08:53:12 +00:00
Ramon Asuncion
8c4371fe42 [Test] Add TODO to try making disabled tests work on Windows 2026-02-06 02:04:34 -05:00
Ramon Asuncion
b233c9ace6 Revert changes to index_compress.swift 2026-02-06 01:58:07 -05:00
Jonathan Grynspan
83d82a5af5 swift_slowAlloc() assumes malloc(0) returns non-NULL. (#86922)
`swift_slowAlloc()` and related functions assume that `malloc(0)` and `aligned_alloc(0)` return non-`NULL` pointers. The C standards allow implementations to return `NULL` when the allocation size is `0`.

This PR implements a check for `0` that instead allocates `1`. The cost of the check is negligible next to the cost of actually allocating, but we'll mark it `SWIFT_UNLIKELY` just in case.

Resolves rdar://169304909.
swift-DEVELOPMENT-SNAPSHOT-2026-02-06-a
2026-02-05 21:44:47 -08:00
Ian Anderson
4d89b9b0a5 Merge pull request #86945 from ian-twilightcoder/case-sensitive-test-fix
[test][NFC] ModuleInterface/canonicalized-os-version.swift fails on a case sensitive file system
2026-02-05 20:26:29 -08:00
Hiroshi Yamauchi
36be4d294e Remove Clang CASFS (#86973) 2026-02-05 19:32:08 -08:00
Kavon Farvardin
68f615a37c Merge pull request #86994 from kavon/retro-refinement-2
Reparenting: batch of fixes
2026-02-05 18:56:48 -08:00
Michael Gottesman
e63e4c7c08 Merge pull request #87012 from gottesmm/pr-086d30207a101fc2cc2c9428d35770baaebc36d7
[sil-mode] Fix syntax highlighting.
2026-02-05 18:04:26 -08:00
Kavon Farvardin
53426c5146 validation-test: update now non-crashing test 2026-02-05 17:41:52 -08:00
Meghana Gupta
280057b8d8 Fix OSLogOptimization for complete lifetimes in SIL 2026-02-05 17:01:40 -08:00
Meghana Gupta
114b782f22 Add @_alwaysEmitIntoClient to _osLogTestHelper 2026-02-05 16:56:16 -08:00
Alexis Laferrière
395f1227d5 Merge pull request #86964 from xymus/deser-diag-member
Serialization: Raise a proper error on type members broken by invalid modularization
2026-02-05 16:33:27 -08:00
Michael Gottesman
eec57ce8c7 Merge pull request #87008 from gottesmm/pr-85ea95f09d9dc99ec128e346f5f11cfcf0cd0e3b
[rbi] Remove old check lines that no longer are tested anymore.
2026-02-05 16:26:52 -08:00
Meghana Gupta
57ee2bd4f5 Add -assert-config DisableReplacement to the private oslog library
We have a private oslog library to test optimizations specific for oslog.
Add -assert-config DisableReplacement to this library similar to the real oslog library.
This prevents surprizing optimizer regressions.
2026-02-05 15:52:36 -08:00
Pavel Yaskevich
527ab6386a Merge pull request #86967 from xedin/rdar-164077275
[Concurrency] A few fixes for default isolation inference
2026-02-05 15:31:10 -08:00
Ian Anderson
61b0472662 [test][NFC] ModuleInterface/canonicalized-os-version.swift fails on a case sensitive file system
Fix a typo in the test
2026-02-05 15:29:45 -08:00
Andrew Trick
2120c0502a Another fix for the OSSA RAUW utility for unowned phis
Fixes rdar://169556118 (Assertion: (succ->getSinglePredecessorBlock() == predBB)
function visitInsertionPoints at ValueLifetime.cpp:37.)
2026-02-05 15:01:11 -08:00
John Hui
77e50e8ee1 [cxx-interop] Account for non-member deref operator*() (NFC)
Note that new code path doesn't actually seem to be taken, due to
NameImporter logic that renames non-member operators differently.

Adds some test case to at least document current behavior.
2026-02-05 14:13:03 -08:00
Slava Pestov
1b717b37d3 Merge pull request #86993 from slavapestov/move-code-around-in-solver
Sema: Move some code around
2026-02-05 16:16:20 -05:00
Michael Gottesman
ad8c6a0dfd [sil-mode] Fix syntax highlighting.
I noticed that my syntax highlighting started to fail. Turns out it was due to
not setting font-lock-mode to 1.
2026-02-05 13:13:13 -08:00
Kavon Farvardin
8b7a7b87e3 Test: add extra collection casting coverage
These examples caused crashes after PR #84789,
meaning they're not being exercised in CI already.
2026-02-05 13:09:25 -08:00
Felipe de Azevedo Piovezan
5ffbf92c1d Merge pull request #87000 from felipepiovezan/felipe/fix_test
[DebugInfo] Relax check-next in yielding_mutate.swift
2026-02-05 20:46:22 +00:00