We now report properties referencing types imported from
implementation-only dependencies in non-library-evolution mode as the
memory layouts of structs and enums may be exposed to clients. Here we
exempt non-open classes from this check as clients hold pointers to
classes which hides the class internal memory layouts. Keep forbidding
it for open classes in order to error early, a client trying to subclass
an open class with such a reference from their property would already
see an error about members not deserializable.
A previous commit introduced the usage of buildContextManglingForSymbol
in buildContextDescriptorMangling, which was not quite correct, since
type nodes needed extra handling, which was done in the other version of
buildContextDescriptorMangling. This patch factors out the handling of
building context descriptors mangling from symbols, and updates both
call sites to use the new function instead.
rdar://165950673
There is an existing cache which is built when looking up
FieldDescriptors. collectAllConformances ignored this cache and would
parse every FieldDescriptor again. Use the existing cache mechanism.
rdar://166098516
Exclude properties with initial values from the memberwise initializer
if they are less accessible than the most accessible property, up to
`internal`. Introduce a compatibility overload that continues to
include the same properties as before until the next language mode.
This is gated behind the `ExcludePrivateFromMemberwiseInit` feature.
rdar://122416579
If the property isn't memberwise initializable we need to emit its
initial value and call the init accessor. This currently isn't necessary
since all init accessor properties are included in the memberwise
initializer, but the following commit will change this.
Currently `init` accessors are always memberwise initialized, but I'm
planning on changing that. As such we need to make sure we record
the `init` accessor regardless of whether it is included in the memberwise
init.
This serves as the backing request for both InitAccessorPropertiesRequest
and MemberwiseInitPropertiesRequest, ensuring the former does not
care about the init accessor is included in the memberwise initializer.
Store the original VarDecl in the same map we use for tracking the
original wrapper var for property wrappers. This will allow us to
use the same logic to determine the original var for both.
rdar://163631865
Under certain circumstances the same symbol can be used for different implementations of the forwarders.
The forwarders themselves are already emitted with "internal" LLVM linkage, but some particularities in
the mapping from SILLinkage to LLVM linkage caused async function pointers to partial apply forwarders
to be emitted with linkonce_odr instead, which caused the wrong forwarder to be called at runtime, causing
unexpected behavior and crashes.
Ensure that we nativize the path and consider only the filename starting
prefix to account for file suffixes (e.g. `.exe` on Windows). This
ensures that we properly support other platforms.
If we didn't find an extension result, try again disregarding
invertible requirements since `demangleGenericSignature` won't
include them. This is just meant to be a quick low risk fix that we
can cherry-pick, the proper fix here is to delete all this logic and
just return the nominal along with the ABI module name to filter
lookup results.
rdar://165639044
After further thought, I realize that it makes more sense
to keep the public API in FloatingPointParsing.swift.gyb
(where we can consolidate the repetitive doc comments)
and have this as a purely internal set of service functions.
This reverts commit 7084ab8e6e.
We already had bookkeeping to track which statement in a multi-statement
closure we were looking at, but this was only used for the 'reasonable time'
diagnostic in the case that we hit the expression timer, which was almost
never hit, and is now off by default. The scope, memory, and trial limits
couldn't use this information, so they would always diagnose the entire
target being type checked.
Move it up from ExpressionTimer to ConstraintSystem, so that we get the
right source location there too. Also, factor out some code duplication
in BuilderTransform to ensure we get the same benefit for result builders
applied to function bodies too.
LLVM no longer tail-calls this on x86_64, so we do not need an autorelease pool. Remove it for i386 as well as that is no longer a target for ObjC interop builds.