Commit Graph

195120 Commits

Author SHA1 Message Date
Dario Rexin
0502f0db57 Revert "[Runtime] Don't use write back in EIC retain/release" 2025-11-18 12:19:24 -08:00
Arnold Schwaighofer
17447a3378 Merge pull request #85551 from aschwaighofer/wip_embedded_exit
Preliminary support for existential in embedded Swift
2025-11-18 15:10:40 -05:00
Hamish Knight
4992c7ab8b Merge pull request #85538 from hamishknight/binding-fixes
[Sema] A couple of binding-related crasher fixes
2025-11-18 19:48:25 +00:00
Egor Zhdan
4234fb7358 Merge pull request #85340 from egorzhdan/egorzhdan/revert-cs-std-string
Revert "[ConstraintSystem] C++ Interop: Binding a string literal to `std.string` shouldn't increase the score"
2025-11-18 18:51:12 +00:00
Saleem Abdulrasool
158729c9db Merge pull request #85541 from compnerd/dependency
test: remove stdlib unittest dependency for tests
2025-11-18 09:56:46 -08:00
Steven Wu
e519e59acc Merge pull request #85547 from cachemeifyoucan/eng/PR-164903080
Revert "[Caching][NFC] Using llvm::cas::CASConfiguration"
2025-11-18 09:43:41 -08:00
Dave Lee
b6b477de58 [Debug] Add pointer based stringForPrintObject (#84742)
Adds an overload of `_DebuggerSupport.stringForPrintObject` which takes a pointer and mangled typename as arguments. This will be used to improve performance and resilience of `po` in lldb.

The pointer and mangled typename are used to construct an `Any` value, which is then passed into the primary implementation of `stringForPrintObject`.

This allows calling `stringForPrintObject` without having to first construct a context that contains all necessary Swift modules. This will improve speed, and also resilience when modules cannot be loaded for whatever reason.

rdar://158968103
2025-11-18 09:32:28 -08:00
Steven Wu
b56f541732 Merge pull request #85499 from cachemeifyoucan/eng/PR-164409895
[Caching] Fix multi-threaded WMO with MCCAS
2025-11-18 09:22:13 -08:00
Adrian Prantl
5c3a26633a Merge pull request #85519 from adrian-prantl/unregister-api
[LLDB] Add an API for unregistering MemoryBuffer modules (NFC)
2025-11-18 08:27:05 -08:00
Aidan Hall
d945dc4e0b Merge pull request #85491 from aidan-hall/disable-pack-specialization
SILOptimizer: Disable PackSpecialization pass until it has been properly fixed.

rdar://164515160
2025-11-18 15:34:22 +00:00
Anthony Latsis
e62153187a Merge pull request #85487 from swiftlang/jepa-main4
AST: Properly disallow isa/cast/dyn_cast on `Type`
2025-11-18 07:35:46 +00:00
AZero13
5c6f34163b Fix copy-paste error of calculation of suspending time in Clock.cpp (#85545)
We should be assigning the value to suspension, not continuous!
2025-11-17 22:11:35 -08:00
Tim Kientzle
a271eb2bb7 Merge pull request #85544 from tbkka/tbkka-Issue85539
Properly initialize buffer when called via legacy ABI
2025-11-17 19:50:07 -08:00
Saleem Abdulrasool
79c234b725 Merge pull request #85542 from swiftlang/revert-85534-revert-71422-docc
Revert "Revert "build: setup a CMake based build for DocC""
2025-11-17 19:48:24 -08:00
Kuba (Brecka) Mracek
5f578adb3d Merge pull request #85530 from kubamracek/section-closures
SE-0492: Add support for closures (with no captures) into @section expressions
2025-11-17 19:29:49 -08:00
Arnold Schwaighofer
a725de5ba6 Address review comments 2025-11-17 15:52:00 -08:00
Michael Gottesman
27dc291c88 Merge pull request #85520 from gottesmm/pr-3347fe62df76bb72f5f1bb27d446618b521580db
[irgen] Make AsyncLetBegin and AsyncLetFinish UNKNOWN_MEMEFFECTS instead of ArgMemOnly.
2025-11-17 15:47:43 -08:00
Slava Pestov
61e418c3e7 Merge pull request #85513 from slavapestov/refactor-csbindings
Refactor BindingSet a little bit
2025-11-17 17:52:16 -05:00
Evan Wilde
a3f9e0a766 SILOptimizer: Fix Int64 assumption for armv7 (#85512)
Fixing test failure on the armv7 Android builds.
2025-11-17 13:31:31 -08:00
John Hui
f830b1c665 [ClangImporter] Do not import enum when already imported via DeclContext (#85424)
If we try to import this in ObjC interop mode:

```objc
typedef CF_OPTIONS(uint32_t, MyFlags) {
  ...
} CF_SWIFT_NAME(MyCtx.Flags);

struct MyStruct {
  MyFlags flags;
  ...
} CF_SWIFT_NAME(MyCtx);
```

ClangImporter tries to import `MyCtx/MyStruct` before it imports
`MyFlags` (via `importDeclContextOf()`), which in turn tries to import
`MyFlags` again due to the `flags` field. The existing cycle-breaking
mechanism prevents us from looping infinitely, but leads us to import
two copies of the Swift `EnumDecl`, which can cause errors later during
CodeGen.

~~This patch adds an assertion to catch such issues earlier, and breaks
the cycle by checking the cache again.~~ This patch no longer does so
because that caused issues beyond the scope of this patch.

rdar://162317760
2025-11-17 13:18:59 -08:00
Arnold Schwaighofer
02d7fe5110 Document the difference of embedded swift's swift_allocBox 2025-11-17 12:48:48 -08:00
Arnold Schwaighofer
84501bd6e2 Also test in optimized mode 2025-11-17 12:48:48 -08:00
Arnold Schwaighofer
62ac48a17e Complete support for outline existential storage
... or so I believe
2025-11-17 12:48:45 -08:00
Arnold Schwaighofer
eda5eadfd4 Start outline storage support: Add swift_allocBox/deallocBox
Code using the outline heap storage path will crash and burn because
support is incomplete. But at least inline storage existential
inhabitants should compile and run.
2025-11-17 12:46:35 -08:00
Arnold Schwaighofer
93bc84e8e0 Start support for associated conformances
We need to add a version of swift_allocBox to the embedded runtime implementation for outline storage
2025-11-17 12:46:35 -08:00
Arnold Schwaighofer
f38ad4b09f Start support for protocol witness tables 2025-11-17 12:46:35 -08:00
Arnold Schwaighofer
4285a2169d IRGen: Start support for embedded existentials
Allow storing struct, enum, and tuple types in an any.
2025-11-17 12:46:35 -08:00
Steven Wu
8e68fab034 Revert "[Caching][NFC] Using llvm::cas::CASConfiguration"
This reverts commit 4f059033bb. The change
is actually not NFC since previously, there is a cache in the
CompilerInvocation that prevents the same CAS from the same CASOptions
from being initialized multiple times, which was relied upon when
running inside sub invocation. When switching to a non-caching simple
CASOption types, it causes every single sub instance will create its own
CAS, and it can consume too many file descriptors and causing errors
during dependency scanning.

rdar://164903080
2025-11-17 12:21:53 -08:00
Tim Kientzle
f65358521f Properly initialize buffer when called via legacy ABI
Resolves #85539
2025-11-17 10:56:10 -08:00
Hamish Knight
c337446464 Merge pull request #85537 from hamishknight/fuzzy
[test] Add some more known crashers
2025-11-17 18:17:07 +00:00
Saleem Abdulrasool
33a65430ce Revert "Revert "build: setup a CMake based build for DocC"" 2025-11-17 09:39:26 -08:00
Aidan Hall
305a5efaef SILOptimizer: Disable PackSpecialization pass to unblock SWBs
rdar://164515160
2025-11-17 17:38:13 +00:00
Saleem Abdulrasool
7ce2692371 test: remove stdlib unittest dependency for tests
When building without the standard library, we exclude the standard
library from the test dependencies. The unittest framework is dependency
on the standard library and cannot be built without it. Remove this
dependency in that case as well.
2025-11-17 09:35:28 -08:00
Slava Pestov
ce3b5eb8ae Sema: Bring back BindingSet::operator bool but call it BindingSet::isViable() 2025-11-17 11:16:37 -05:00
Slava Pestov
fb0e08408e Sema: Sema: Remove isViableForRanking() from determineBestBindings() 2025-11-17 11:16:37 -05:00
Slava Pestov
b7e0083478 Sema: Handle leading dot before calling isViableForRanking() 2025-11-17 11:16:37 -05:00
Slava Pestov
403a11f79d Sema: Infer key path bindings before calling isViableForRanking()
This allows us to remove the key path check from isViableForRanking().
2025-11-17 11:16:37 -05:00
Slava Pestov
c0238dbb4c Sema: Split up BindingSet::inferTransitiveBindings() into three methods 2025-11-17 11:16:37 -05:00
Slava Pestov
ab72c53103 Sema: Split off inferTransitiveKeyPathBindings() from BindingSet::inferTransitiveBindings() 2025-11-17 11:16:36 -05:00
Slava Pestov
19a2eeb322 Sema: Simplify BindingSet::isDirectHole() 2025-11-17 11:16:36 -05:00
Slava Pestov
45d03e152c Sema: Split up BindingSet::finalize() into finalizeKeyPathBindings() and finalizeUnresolvedMemberChain() 2025-11-17 11:16:33 -05:00
Slava Pestov
02129f2b1f Sema: Pull call to inferTransitiveBindings() out of BindingSet::finalize() 2025-11-17 11:16:32 -05:00
Slava Pestov
eede7e4bb0 Sema: Move some code from BindingSet::finalize() to BindingSet::inferTransitiveBindings() 2025-11-17 11:16:19 -05:00
Slava Pestov
53d802a239 Sema: Re-organize BindingSet::finalize() 2025-11-17 11:16:09 -05:00
Slava Pestov
5f2db0c96c Sema: Pull call to determineLiteralCoverage() out of BindingSet::finalize() 2025-11-17 11:15:52 -05:00
Yuta Saito
b4d2f8abd8 Merge pull request #85534 from swiftlang/revert-71422-docc
Revert "build: setup a CMake based build for DocC"
2025-11-18 00:42:34 +09:00
Hamish Knight
1f32f7f5ac Merge pull request #85525 from hamishknight/yeet
[CS] Remove `getImplicitValueConversionLocator` & `ImplicitConversion`
2025-11-17 14:03:13 +00:00
Hamish Knight
86f8e22494 [test] Add some more known crashers 2025-11-17 13:09:17 +00:00
Hamish Knight
4cc9ea5ed4 [test] Update some crasher signatures 2025-11-17 13:09:17 +00:00
Hamish Knight
ff833daab4 [ASTScopes] Remove ErrorExpr check from condition scope expansion
This appears unnecessary and incorrectly meant the ErrorExpr would
be placed outside the condition, meaning we could find the binding
in its own initializer.
2025-11-17 13:07:36 +00:00