ResultConvention::Guaranteed will be used by borrow accessors when the storage type can be returned by value.
ResultConvention::GuaranteedAddress will be used by mutate accessors and borrow accessors when the storage type
cannot be returned by value.
This PR is another attempt at landing #76903. The changes compared to
the original PR:
* Instead of increasing the size of SILDeclRef, store the necessary type
information in a side channel using withClosureTypeInfo.
* Rely on SGFContext to get the right ClangType
* Extend BridgingConversion with an AbstractionPattern to store the
original clang type.
* The PR above introduced a crash during indexing system modules that
references foreign types coming from modules imported as
implementation only. These entities are implementation details so they
do not need to be included during serialization. This PR adds a test
and adds logic to exclude such clang types in the serialization
process.
rdar://131321096&141786724
Macro search paths are generally absolute paths which will cause
non-deterministic output for build systems that build remotely.
When the -prefix-serialized-debugging-options flag is set remap
the macro search paths as well as the other debug paths.
Introduce an experimental feature DeferredCodeGen, that defers the
generation of LLVM IR (and therefore object code) for all entities
within an Embedded Swift module unless they have explicitly requested
to not be emitted into the client (e.g., with
`@_neverEmitIntoClient`).
This feature is meant to generalize and subsume
-emit-empty-object-file, relying on lazy emission of entities rather
than abruptly ending the compilation pipeline before emitting any IR.
Part of rdar://158363967.
Conditionally available opaque return types should support availability
conditions that are evaluated in any availability domain. Update
`ConditionallyAvailableSubstitutions` to model its conditions with
`AvailabilityQuery` instead of assuming that conditions are always a single
version query for the current platform.
Gracefully handle `LocatableType` types if they show up during
serialization. This is a temporary fix until we can remove
`TransitivelyConformsTo` constraint from the solver which is
the underlying cause of the issue (see https://github.com/swiftlang/swift/pull/82541).
Resolves: rdar://153461854
While deserializing AST function types FunctionType and GenericFunctionType which include
lifetime dependencies and an implicit self parameter, we don't correctly populate
ASTExtInfoBuilder.lifetimeDependencies. We end up reading one dependency less due to
incorrect index calculation.
Unlike SILFunctionType, AST function types FunctionType and GenericFunctionType
do not include implicit self in their param list. They represent methods with
implicit self as like: `(Self) -> (Args...) -> Result` and don't have any information
to indicate they may have implicit self. Since we use number of parameters while
deserializing lifetime dependencies, we go wrong for such function types.
Serialize the length of parameter indices, so that lifetime dependencies can be
deserialized to that length.
rdar://151768216
Initially this declaration is going to be used to determine
per-file default actor isolation i.e. `using @MainActor` and
`using nonisolated` but it could be extended to support other
file-global settings in the future.
Implements SE-0460 -- the non-underscored version of @specialized.
It allows to specify "internal" (not abi affecting) specializations.
rdar://150033316
By default (currently) the closure passed to a parameter with `@_inheritActorContext`
would only inherit isolation from `nonisolated`, global actor isolated or actor
context when "self" is captured by the closure. `always` changes this behavior to
always inherit actor isolation from context regardless of whether it's captured
or not.
There are four attributes which serialize out a DeclNameRef, sometimes by dropping some of its components. Standardize them with a representation that can handle module selectors.
When serializing `@available` attributes, if the attribute applies to a custom
domain include enough information to deserialize the reference to that domain.
Resolves rdar://138441265.
For now the semantics provided by `@extensible` keyword on per-enum
basis. We might return this as an upcoming feature in the future with
a way to opt-out.