Erik Eckstein
85a6df30d6
SIL: add lookup(method:) in VTable and WitnessTable
2025-03-26 08:45:23 +01:00
Erik Eckstein
1844c14c44
SIL: add var ClassMethodInst.member
2025-03-26 08:45:07 +01:00
Erik Eckstein
67556cfbf4
SIL: add some Function APIs
...
* `var wasDeserializedCanonical`
* `var genericSignature`
* `func mapTypeIntoContext`
* `var forwardingSubstitutionMap`
2025-03-26 08:45:07 +01:00
Erik Eckstein
59ad8b6623
Optimizer: add var Context.currentModuleContext
2025-03-26 08:43:55 +01:00
Erik Eckstein
1ce545ba3d
SIL: add some DeclRef APIs
...
* `var decl`
* `func ==`
* `func calleesAreStaticallyKnowable`
2025-03-26 08:43:55 +01:00
Erik Eckstein
b39a6cdd22
AST: add var GenericSignature.genericParameters
2025-03-26 07:30:11 +01:00
Erik Eckstein
42bba8f484
AST: add some Declaration APIs
...
* `var Declaration.parentModule`
* `var AbstractFunctionDecl.isOverridden`
2025-03-26 07:30:11 +01:00
Erik Eckstein
d523e303c3
SIL/AST: move some SIL.Type APIs to the TypeProperties protocol which makes them also available for AST.Type and AST.CanonicalType
2025-03-26 07:30:10 +01:00
Andrew Trick
e7000e4668
SIL: Add mark_dependence_addr
2025-03-25 23:02:42 -07:00
Anthony Latsis
631a04e56c
Merge pull request #80159 from AnthonyLatsis/danaus-plexippus-5
...
Sema: Extend adoption mode for `AsyncCallerExecution` to storage declarations
2025-03-26 04:40:58 +00:00
John McCall
3fe70968cc
Remove the substitution map from zeroInitializer builtin in SIL.
...
This is a value operation that can work just fine on lowered types,
so there's no need to carry along a formal type. Make the value/address
duality clearer, and enforce it in the verifier.
2025-03-26 00:34:15 -04:00
Anthony Latsis
a75b63ab6d
Merge pull request #77920 from AnthonyLatsis/fissidens
...
AST: Rename debugger pretty printer `Type::dumpPrint` to `print`
2025-03-25 23:42:36 +00:00
Anthony Latsis
a95785c5b2
Merge pull request #80260 from AnthonyLatsis/eutrema-japonicum
...
DiagnosticEngine: Print the ID of the wrapped, not wrapper, diagnostic
2025-03-25 23:14:43 +00:00
Dave Lee
c51e10a827
RemoteInspection: Update DefaultActorImpl layout ( #80278 )
...
The definition of `DefautlActorImpl` changed in https://github.com/swiftlang/swift/pull/73998 . This change reflects those changes on to RemoteInspection's platform independent definition.
2025-03-25 15:42:46 -07:00
Mike Ash
5f5d1cfae6
Merge pull request #80119 from mikeash/allocation-failure-fatal-error
...
[Runtime] Include size/alignment in allocation failure fatal error message.
2025-03-25 18:32:21 -04:00
Kuba (Brecka) Mracek
1c395e24f6
Merge pull request #79923 from kubamracek/mracek/constinitialized
...
[Compile Time Values] Add parsing of @constInitialized attribute under CompileTimeValues experimental feature
2025-03-25 13:41:17 -07:00
nate-chandler
17952d4d6f
Merge pull request #80221 from nate-chandler/general-coro/20250320/1
...
[CoroutineAccessors] Default overrides of new symbols.
2025-03-25 12:22:40 -07:00
Pavel Yaskevich
5af7e0d09b
Merge pull request #80236 from xedin/is-self-recursive-cache
...
[SILOptimizer] Turn "is self-recursive" check into analysis
2025-03-25 10:37:07 -07:00
Michael Gottesman
7648bce91b
Merge pull request #80210 from gottesmm/pr-5cf03315e9a3442419b1bab18b46f755fdf0b405
...
[concurrency] Make sure that TypeLowering inserts the extra actor parameter for @execution(caller) parameters.
2025-03-25 10:09:44 -07:00
Nate Chandler
5534eb4043
[DefaultOverides] Install in vtables at runtime.
2025-03-25 07:22:44 -07:00
Nate Chandler
2cdbfa77bf
[DefaultOverrides] IRGen.
2025-03-25 07:22:43 -07:00
Nate Chandler
a3ba93609e
[DefaultOverrides] SIL de/serialization.
2025-03-25 07:22:40 -07:00
Nate Chandler
317a379693
[DefaultOverrides] SIL printing/parsing.
2025-03-25 07:22:14 -07:00
Nate Chandler
89e5e3dfca
[DefaultOverrides] SIL representation.
...
See the comment in SILDefaultOverrideTable.h for details.
2025-03-25 07:22:14 -07:00
Nate Chandler
5eacbfd9d9
[DefaultOverrides] Mangling.
2025-03-25 07:22:14 -07:00
Nate Chandler
d31718f7d4
[NFC] SIL: Replace two forward decls with imports.
...
The type layouts are required to use the type in a PointerUnion.
2025-03-25 07:22:13 -07:00
Nate Chandler
83192bc417
[NFC] SIL: Delete dead function.
2025-03-25 07:22:13 -07:00
Kuba (Brecka) Mracek
41ae31647a
Merge pull request #76045 from kubamracek/mergeable-traps
...
Add -Xfrontend -mergeable-traps as a way to emit mergeable traps
2025-03-25 07:13:18 -07:00
Slava Pestov
6463dcb9c9
Merge pull request #79703 from slavapestov/span-backward-deployment
...
Build CompatibilitySpan shim
2025-03-25 07:28:47 -04:00
Dylan Sturgeon
2c8e337f25
Merge pull request #80074 from dylansturg/objc_enum_refs
...
The Error enum synthesized declarations, e.g. the struct and its static accessors, should generally appear to be identical to the underlying Clang definitions. There are some specific use cases where the synthesized declarations are necessary though.
I've added an option for USR generation to override the Clang node and emit the USR of the synthesized Swift declaration. This is used by SwiftDocSupport so that the USRs of the synthesized declarations are emitted.
Fixes 79912
2025-03-25 11:21:21 +00:00
Hamish Knight
a84b53f6fd
Merge pull request #80248 from hamishknight/fix-error-type
...
[CS] Map caught error type into context
2025-03-25 06:42:38 +00:00
Anthony Latsis
77e673a723
DiagnosticEngine: Print the ID of the wrapped, not wrapper, diagnostic
2025-03-25 02:25:39 +00:00
Anthony Latsis
8ad2e02596
Sema: Allow @execution on storage declarations
2025-03-25 02:07:04 +00:00
Anthony Latsis
d73402af25
AST: Restrict @execution to func and init declarations
2025-03-25 02:07:04 +00:00
Anthony Latsis
6512aa1f5a
AST: Introduce and use ValueDecl::isAsync
2025-03-25 02:07:03 +00:00
Slava Pestov
0155b41b50
AST: Extend @_originallyDefinedIn to allow specifying module name for linker directive purposes
...
The module name changes the symbol mangling, and also causes
TBDGen to emit linker directives. To separate out these two
behaviors, introduce a terrible hack. If the module name
contains a semicolon (`;`), the part before the semicolon
is the module name for mangling, and the part after the
semicolon is the module name for linker directives.
If there is no semicolon, both module names are identical,
and the behavior is the same as before.
2025-03-24 17:56:45 -04:00
Hamish Knight
738c70e8c8
[AST] Always walk folded SequenceExpr if available
...
Expand the special-cased ASTWalker behavior for folded SequenceExprs
such that we always walk the folded expression when available. This
ensures that we don't attempt to add the same node multiple times
when expanding ASTScopes during pre-checking.
rdar://147751795
2025-03-24 20:18:34 +00:00
Hamish Knight
c597023d38
[CS] Map caught error type into context
...
Factor out `ConstraintSystem::getExplicitCaughtErrorType` from
`getCaughtErrorType`. Then use this for the contextual
type for a `throw` syntactic element.
rdar://139000351
2025-03-24 20:08:43 +00:00
Karoy Lorentey
4cd035182a
[AST] Temporarily turn off minor assert to avoid source compat regression
2025-03-24 12:16:21 -07:00
Karoy Lorentey
0cb4b1401e
[AST] Generalize is_same_metatype builtin to take unconstrained metatypes
...
The builtin’s current is signature is:
```
(Any.Type, Any.Type) -> Bool
```
This needs to be changed to this:
```
(any (~Copyable & ~Escapable).Type, any (~Copyable & ~Escapable).Type) -> Bool
```
This requires a bit of support work in AST synthesis.
rdar://145707064
Co-authored-by: Alejandro Alonso <alejandro_alonso@apple.com >
2025-03-24 12:16:11 -07:00
Artem Chikin
c36ae0d0d6
Merge pull request #79818 from artemcm/SeparateSDKExplicitModules
...
[Dependency Scanning] Add support for placing explicitly-built SDK modules into a separate module cache
2025-03-24 12:27:06 -06:00
Kuba Mracek
f402eb623c
[Compile Time Values] Add parsing of @constInitialized attribute under CompileTimeValues experimental feature
2025-03-24 09:31:57 -07:00
Pavel Yaskevich
8f4220c6fa
Merge pull request #80219 from xedin/rdar-145768557
...
[Concurrency] SE-0466: Replace `UnspecifiedMeansMainActorIsolated` flag with `-default-isolation`
2025-03-24 09:05:07 -07:00
Kuba Mracek
ed5e89a501
Also respect -mergeable-traps when merging cond_fails in SILOptimizer
2025-03-24 09:04:44 -07:00
Kuba Mracek
164b61c83d
Add -Xfrontend -mergeable-traps as a way to emit mergeable traps
2025-03-24 09:04:11 -07:00
Andrew Trick
d97a8cec64
Merge pull request #80223 from atrick/enable-addressable
...
LifetimeDependence: enable addressable dependencies
2025-03-24 08:30:01 -07:00
Egor Zhdan
689586f41b
Merge pull request #80204 from swiftlang/egorzhdan/symbolic-missing-lifetime
...
[cxx-interop] Avoid diagnosing missing lifetime operations in symbolic mode
2025-03-24 12:06:46 +00:00
Pavel Yaskevich
41c88f864a
[SILOptimizer] Turn "is self-recursive" check into analysis
...
The body of a function has to be re-analyzed for every call
site of the function, which is very expensive and if the
body is not changed would produce the same result.
This takes about ~10% from swift-syntax overall build time
in release configuration.
2025-03-24 00:25:13 -07:00
Pavel Yaskevich
e850f1708f
[Concurrency] SE-0466: Replace UnspecifiedMeansMainActorIsolated flag with -default-isolation
2025-03-23 22:04:39 -07:00
Pavel Yaskevich
2221c140d2
[Frontend] SE-0466: Add -default-isolation frontend that accepts MainActor and nonisolated
2025-03-23 22:04:32 -07:00