Hiroshi Yamauchi
34def0ea27
Merge pull request #76589 from hjyamauchi/issue74866-3
...
Ensure that bridged types are indirectly returned on Windows ARM64
2024-09-23 10:00:31 -07:00
Konrad `ktoso` Malawski
b9319d80f1
Merge branch 'main' into wip-experimental-isolated-deinit
2024-09-23 09:01:06 +09:00
Meghana Gupta
f8f043f585
Change @lifetime to always mean inherit lifetime dependence
2024-09-20 22:05:23 -07:00
Becca Royal-Gordon
d0a2564581
Make behavior change detection generic
...
Automatically detect when shouldMarkAsObjC() will behave differently based on the objcImpl early adopter flag and diagnose it. This works in either direction, although there isn’t anything yet that will emit diag:: objc_implementation_will_become_nonobjc.
NFC except for some minor changes to the wording of notes.
2024-09-20 13:39:44 -07:00
swift-ci
5e0b892e9e
Merge remote-tracking branch 'origin/main' into rebranch
2024-09-20 13:09:36 -07:00
Slava Pestov
885d221417
Merge pull request #76585 from slavapestov/small-subst-cleanups-2
...
More type substitution cleanups
2024-09-20 15:59:04 -04:00
swift-ci
ec742a3482
Merge remote-tracking branch 'origin/main' into rebranch
2024-09-20 10:54:04 -07:00
Arnold Schwaighofer
f1a64571fb
Merge pull request #76579 from aschwaighofer/async_frame_pointer_all_option
...
IRGen: Add an option to force emission of an async context pointer on the stack for leaf funclets
2024-09-20 10:43:59 -07:00
Konrad `ktoso` Malawski
d89347bed0
Merge branch 'main' into wip-experimental-isolated-deinit
2024-09-20 18:34:45 +09:00
swift-ci
56bd686ccf
Merge remote-tracking branch 'origin/main' into rebranch
2024-09-19 18:58:28 -07:00
Slava Pestov
4bb8f46d6d
Merge pull request #76536 from slavapestov/small-subst-cleanups
...
Tiny optimization and cleanups
2024-09-19 21:36:51 -04:00
Steven Wu
e0541b0357
[Macro][Dependencies] Properly model macro dependencies in the scanner
...
Add function to handle all macro dependencies kinds in the scanner,
including taking care of the macro definitions in the module interface
for its client to use. The change involves:
* Encode the macro definition inside the binary module
* Resolve macro modules in the dependencies scanners, including those
declared inside the dependency modules.
* Propagate the macro defined from the direct dependencies to track
all the potentially available modules inside a module compilation.
2024-09-19 16:41:53 -07:00
Hiroshi Yamauchi
dedfb9e0ab
Ensure that bridged types are indirectly returned on Windows ARM64
...
On Windows ARM64, how a struct value type is returned is sensitive to
conditions including whether a user-defined constructor exists,
etc. See
https://learn.microsoft.com/en-us/cpp/build/arm64-windows-abi-conventions?view=msvc-170#return-values
That caused a calling convention mismatch between the
non-USED_IN_CPP_SOURCE (Swift) side and the USE_IN_CPP_SOURCE (C++)
side and a crash.
Following https://github.com/swiftlang/swift/pull/76433 add
constructors to several bridged C++ struct/class types so that the
calling convention matches.
This is a partial fix for https://github.com/swiftlang/swift/issues/74866
2024-09-19 16:00:15 -07:00
swift-ci
9bd7daddb9
Merge remote-tracking branch 'origin/main' into rebranch
2024-09-19 15:14:52 -07:00
Sima Nerush
952ae45b3c
Merge pull request #76395 from simanerush/global-actor-cut-off-119628202
...
[Concurrency] Allow `nonisolated` to prevent global actor inference.
2024-09-19 14:58:15 -07:00
swift-ci
ae4fee5d4e
Merge remote-tracking branch 'origin/main' into rebranch
2024-09-19 13:54:31 -07:00
Doug Gregor
6039df3a34
Merge pull request #76565 from DougGregor/remove-if-config
...
Remove IfConfigDecl from the AST
2024-09-19 13:49:03 -07:00
Arnold Schwaighofer
b49e30c01b
IRGen: Add an option to force emission of an async context pointer on the stack for leaf funclets
...
`-Xfrontend -enable-async-frame-pointer-all`
rdar://135746607
2024-09-19 12:28:57 -07:00
Slava Pestov
a911693c8c
AST: PackConformance::getAssociatedType() => getTypeWitness()
2024-09-19 14:18:34 -04:00
Slava Pestov
26241a50f3
AST: Remove DependentMemberType::substBaseType()
2024-09-19 14:18:33 -04:00
Slava Pestov
508dacc3a2
AST: Add ProtocolConformanceRef::getTypeWitness()
2024-09-19 14:18:33 -04:00
Slava Pestov
532e048abb
AST: Remove DependentMemberType::substRootParam()
2024-09-19 14:18:32 -04:00
Sima Nerush
40185cce2a
[Concurrency] Allow nonisolated to be used on protocols, extensions, classes, structs, and enums.
2024-09-19 10:09:11 -07:00
swift-ci
df338c19a8
Merge remote-tracking branch 'origin/main' into rebranch
2024-09-19 09:34:45 -07:00
Michael Gottesman
fb281331b3
Merge pull request #76558 from gottesmm/pr-39b63781333d46b16f086a7c192efc67b26255db
...
[concurrency] Behind the flag UnspecifiedMeansMainActorIsolated, try inferring by default main actor isolation instead of nonisolated for unspecified.
2024-09-19 09:18:33 -07:00
Doug Gregor
5b2520e379
Remove IfConfigDecl from the AST
...
The swift-syntax tree retains information about the parsed #if
regions. Drop it from the semantic AST.
2024-09-18 20:51:54 -07:00
Michael Gottesman
3843899c19
[concurrency] Behind the flag UnspecifiedMeansMainActorIsolated, try inferring by default main actor isolation instead of nonisolated for unspecified.
...
Just to play with.
2024-09-18 13:23:23 -07:00
swift-ci
6964118e7e
Merge remote-tracking branch 'origin/main' into rebranch
2024-09-18 13:17:04 -07:00
Doug Gregor
3a570e060c
Merge pull request #76551 from DougGregor/one-loc-to-file-lookup
...
Reimplement ModuleDecl::getSourceFileContainingLocation() using SourceManager
2024-09-18 12:55:08 -07:00
swift-ci
5039a2d86c
Merge remote-tracking branch 'origin/main' into rebranch
2024-09-18 10:55:29 -07:00
Doug Gregor
da0c70f301
Merge pull request #76512 from DougGregor/sourcefile-nonopt-buffer
...
Ensure that SourceFiles always have a backing buffer in the SourceManager
2024-09-18 10:54:52 -07:00
swift-ci
ab164eab78
Merge remote-tracking branch 'origin/main' into rebranch
2024-09-18 09:36:24 -07:00
Pavel Yaskevich
43e19358d7
Merge pull request #76458 from xedin/rdar-131347583
...
[Concurrency] Allow global actor mismatches while overriding `@precon…
2024-09-18 09:16:57 -07:00
Doug Gregor
8febd3fb32
Reimplement ModuleDecl::getSourceFileContainingLocation() using SourceManager
...
ModuleDecl kept track of all of the source files in the module so that it
could find the source file containing a given location, which relied on
a sorted array all of these source files. SourceManager has its own
similar data structure for a similar query mapping the locations to
buffer IDs.
Replace ModuleDecl's dats structure with a use of the SourceManager's version
with the mapping from buffer IDs to source files.
2024-09-18 07:45:50 -07:00
swift-ci
72a4f929b0
Merge remote-tracking branch 'origin/main' into rebranch
2024-09-18 07:33:29 -07:00
Gábor Horváth
ffa1014c30
Merge pull request #76311 from swiftlang/gaborh/import-lifetimebound
...
[cxx-interop] Teach importer to interpret lifetimebound annotations
2024-09-18 15:24:32 +01:00
Gabor Horvath
16e012bb5e
[cxx-interop] Teach importer to interpret lifetimebound annotations
...
The lifetimebound annotations are now imported as lifetime dependencies.
This works for basic cases but there are still some parts missing:
* Support lifeitmebound annotations on constructors
* A way to represent immortal/static lifetimes on the C++ side
2024-09-18 10:51:05 +01:00
Konrad `ktoso` Malawski
a6bc0e6759
temporary -experimental flag for IsolatedDeinit
2024-09-18 12:52:37 +09:00
swift-ci
b1131702ec
Merge remote-tracking branch 'origin/main' into rebranch
2024-09-17 12:14:31 -07:00
Slava Pestov
ad68d22041
Merge pull request #76518 from slavapestov/fix-issue-76513
...
Concurrency: Reject nonisolated lazy properties
2024-09-17 15:11:39 -04:00
Slava Pestov
46b4983baf
Concurrency: Reject nonisolated lazy properties
...
We already banned nonisolated property wrappers, and 'lazy' is
conceptually similar, so it makes sense to disallow it also.
Fixes https://github.com/swiftlang/swift/issues/76513 .
2024-09-17 11:30:44 -04:00
swift-ci
3b6233212f
Merge remote-tracking branch 'origin/main' into rebranch
2024-09-17 02:55:30 -07:00
Saehej Kang
6c92f3fe1c
[Diag]: Result builder misplacement error message mentions subscript
2024-09-17 02:45:07 -07:00
Konrad `ktoso` Malawski
7d1ce789ad
Revert "Revert "Isolated synchronous deinit""
2024-09-17 17:35:38 +09:00
Doug Gregor
49aa0e966f
Ensure that SourceFiles always have a backing buffer in the SourceManager
...
The "buffer ID" in a SourceFile, which is used to find the source file's
contents in the SourceManager, has always been optional. However, the
effectively every SourceFile actually does have a buffer ID, and the
vast majority of accesses to this information dereference the optional
without checking.
Update the handful of call sites that provided `nullopt` as the buffer
ID to provide a proper buffer instead. These were mostly unit tests
and testing programs, with a few places that passed a never-empty
optional through to the SourceFile constructor.
Then, remove optionality from the representation and accessors. It is
now the case that every SourceFile has a buffer ID, simplying a bunch
of code.
2024-09-16 21:46:42 -07:00
swift-ci
22caa59910
Merge remote-tracking branch 'origin/main' into rebranch
2024-09-16 20:34:39 -07:00
Doug Gregor
05e8140c6d
Provide macro module name in MacroExpansionExpr creation
...
This properly passes the module name through from attached macros to
the freestanding macro that are used under-the-hood for type checking.
2024-09-16 16:44:17 -07:00
Ben Barham
a7b50f357f
Merge remote-tracking branch 'origin/main' into manual-main-merge
...
Conflicts:
- `lib/Driver/ToolChains.cpp` conflicting with the `addAllArgs` rename
for multiple options
2024-09-16 13:53:18 -07:00
Meghana Gupta
58c6a2fb31
Merge pull request #76455 from meg-gupta/enablestdlib
...
Enable NonEscapableTypes in standard library and make the feature suppressible
2024-09-16 11:52:41 -07:00
Slava Pestov
f35c90a6b7
Merge pull request #76445 from slavapestov/maptypeintocontext
...
Overhaul mapTypeIntoContext()
2024-09-14 08:45:20 -04:00