From 5ca6ad9d5e6ae6090a0720ecfa2f722d8a5ea7e5 Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Mon, 19 May 2025 12:30:17 -0700 Subject: [PATCH] SILGen: Emit property descriptors for conditionally Copyable and Escapable types. Key paths can't reference non-escapable or non-copyable storage declarations, so we don't need to refer to them resiliently, and can elide their property descriptors. However, declarations may still be conditionally Copyable and Escapable, and if so, then they still need a property descriptor for resilient key path references. When a property or subscript can be used in a context where it is fully Copyable and Escapable, emit the property descriptor in a generic environment constrained by the necessary conditional constraints. Fixes rdar://151628396. --- include/swift/AST/Decl.h | 9 +- include/swift/AST/GenericSignature.h | 17 ++ include/swift/IRGen/Linking.h | 2 +- lib/AST/GenericEnvironment.cpp | 3 +- lib/AST/GenericSignature.cpp | 31 +-- lib/SIL/IR/SIL.cpp | 176 +++++++++++++---- lib/SIL/IR/SILSymbolVisitor.cpp | 2 +- lib/SILGen/SILGen.cpp | 22 ++- ...ally_copyable_conformance_descriptor.swift | 180 ++++++++++++++++++ .../verify_library_diagnostics.swift | 13 +- test/abi/macOS/arm64/stdlib.swift | 66 ++----- test/abi/macOS/x86_64/stdlib.swift | 66 ++----- 12 files changed, 408 insertions(+), 179 deletions(-) create mode 100644 test/SILGen/conditionally_copyable_conformance_descriptor.swift diff --git a/include/swift/AST/Decl.h b/include/swift/AST/Decl.h index dc727939de6dd..849d827f73665 100644 --- a/include/swift/AST/Decl.h +++ b/include/swift/AST/Decl.h @@ -6281,9 +6281,12 @@ class AbstractStorageDecl : public ValueDecl { /// Otherwise, its override must be referenced. bool isValidKeyPathComponent() const; - /// True if the storage exports a property descriptor for key paths in - /// other modules. - bool exportsPropertyDescriptor() const; + /// If the storage exports a property descriptor for key paths in other + /// modules, this returns the generic signature in which its member methods + /// are emitted. If the storage does not export a property descriptor, + /// returns `std::nullopt`. + std::optional + getPropertyDescriptorGenericSignature() const; /// True if any of the accessors to the storage is private or fileprivate. bool hasPrivateAccessor() const; diff --git a/include/swift/AST/GenericSignature.h b/include/swift/AST/GenericSignature.h index 3264037628808..8e8dbfb86b513 100644 --- a/include/swift/AST/GenericSignature.h +++ b/include/swift/AST/GenericSignature.h @@ -617,6 +617,23 @@ using GenericSignatureErrors = OptionSet; using GenericSignatureWithError = llvm::PointerIntPair; +/// Build a generic signature from the given requirements, which are not +/// required to be minimal or canonical, and may contain unresolved +/// DependentMemberTypes. The generic signature is returned with the +/// error flags (if any) that were raised while building the signature. +/// +/// \param baseSignature if non-null, the new parameters and requirements +///// are added on; existing requirements of the base signature might become +///// redundant. Otherwise if null, build a new signature from scratch. +/// \param allowInverses if true, default requirements to Copyable/Escapable are +/// expanded for generic parameters. +GenericSignatureWithError buildGenericSignatureWithError( + ASTContext &ctx, + GenericSignature baseSignature, + SmallVector addedParameters, + SmallVector addedRequirements, + bool allowInverses); + } // end namespace swift namespace llvm { diff --git a/include/swift/IRGen/Linking.h b/include/swift/IRGen/Linking.h index 78ac19c0c8817..c8d06aa301bca 100644 --- a/include/swift/IRGen/Linking.h +++ b/include/swift/IRGen/Linking.h @@ -1043,7 +1043,7 @@ class LinkEntity { } static LinkEntity forPropertyDescriptor(AbstractStorageDecl *decl) { - assert(decl->exportsPropertyDescriptor()); + assert((bool)decl->getPropertyDescriptorGenericSignature()); LinkEntity entity; entity.setForDecl(Kind::PropertyDescriptor, decl); return entity; diff --git a/lib/AST/GenericEnvironment.cpp b/lib/AST/GenericEnvironment.cpp index 4cda36c2512e2..f5da5f1e25218 100644 --- a/lib/AST/GenericEnvironment.cpp +++ b/lib/AST/GenericEnvironment.cpp @@ -749,7 +749,8 @@ Type BuildForwardingSubstitutions::operator()(SubstitutableType *type) const { return Type(); } -SubstitutionMap GenericEnvironment::getForwardingSubstitutionMap() const { +SubstitutionMap +GenericEnvironment::getForwardingSubstitutionMap() const { auto genericSig = getGenericSignature(); return SubstitutionMap::get(genericSig, BuildForwardingSubstitutions(this), diff --git a/lib/AST/GenericSignature.cpp b/lib/AST/GenericSignature.cpp index 3ac5bc6f80b37..c6955724d3e4d 100644 --- a/lib/AST/GenericSignature.cpp +++ b/lib/AST/GenericSignature.cpp @@ -1168,15 +1168,11 @@ void swift::validateGenericSignature(ASTContext &context, { PrettyStackTraceGenericSignature debugStack("verifying", sig); - auto newSigWithError = evaluateOrDefault( - context.evaluator, - AbstractGenericSignatureRequest{ - nullptr, - genericParams, - requirements, - /*allowInverses=*/false}, - GenericSignatureWithError()); - + auto newSigWithError = buildGenericSignatureWithError(context, + GenericSignature(), + genericParams, + requirements, + /*allowInverses*/ false); // If there were any errors, the signature was invalid. auto errorFlags = newSigWithError.getInt(); if (errorFlags.contains(GenericSignatureErrorFlags::HasInvalidRequirements) || @@ -1296,8 +1292,8 @@ void swift::validateGenericSignaturesInModule(ModuleDecl *module) { } } -GenericSignature -swift::buildGenericSignature(ASTContext &ctx, +GenericSignatureWithError +swift::buildGenericSignatureWithError(ASTContext &ctx, GenericSignature baseSignature, SmallVector addedParameters, SmallVector addedRequirements, @@ -1309,7 +1305,18 @@ swift::buildGenericSignature(ASTContext &ctx, addedParameters, addedRequirements, allowInverses}, - GenericSignatureWithError()).getPointer(); + GenericSignatureWithError()); +} + +GenericSignature +swift::buildGenericSignature(ASTContext &ctx, + GenericSignature baseSignature, + SmallVector addedParameters, + SmallVector addedRequirements, + bool allowInverses) { + return buildGenericSignatureWithError(ctx, baseSignature, + addedParameters, addedRequirements, + allowInverses).getPointer(); } GenericSignature GenericSignature::withoutMarkerProtocols() const { diff --git a/lib/SIL/IR/SIL.cpp b/lib/SIL/IR/SIL.cpp index 27f4cca661ee2..8e7e3965a61ca 100644 --- a/lib/SIL/IR/SIL.cpp +++ b/lib/SIL/IR/SIL.cpp @@ -18,6 +18,7 @@ #include "swift/SIL/SILUndef.h" #include "swift/AST/ASTContext.h" #include "swift/AST/AnyFunctionRef.h" +#include "swift/AST/ConformanceLookup.h" #include "swift/AST/Decl.h" #include "swift/AST/GenericEnvironment.h" #include "swift/AST/Pattern.h" @@ -307,18 +308,106 @@ bool SILModule::isTypeMetadataForLayoutAccessible(SILType type) { return ::isTypeMetadataForLayoutAccessible(*this, type); } -static bool isUnsupportedKeyPathValueType(Type ty) { +// Given the type `ty`, which should be in the generic environment of the signature +// `sig`, return a generic signature with all of the requirements of `sig`, +// combined with all of the requirements necessary for `ty` to be both +// `Copyable` and `Escapable`, if possible. Returns `nullopt` if the type +// can never be both Copyable and Escapable. +static std::optional +getKeyPathSupportingGenericSignature(Type ty, GenericSignature contextSig) { + auto &C = ty->getASTContext(); + + // If the type is already unconditionally Copyable and Escapable, we don't + // need any further requirements. + if (!ty->isNoncopyable() && ty->isEscapable()) { + return contextSig; + } + + ProtocolConformanceRef copyable, escapable; + auto copyableProtocol = C.getProtocol(KnownProtocolKind::Copyable); + auto escapableProtocol = C.getProtocol(KnownProtocolKind::Escapable); + + // If the type is an archetype, then it just needs Copyable and Escapable + // constraints imposed. + if (ty->is()) { + copyable = ProtocolConformanceRef::forAbstract(ty->mapTypeOutOfContext(), + copyableProtocol); + escapable = ProtocolConformanceRef::forAbstract(ty->mapTypeOutOfContext(), + escapableProtocol); + } else { + // Look for any conditional conformances. + copyable = lookupConformance(ty, copyableProtocol); + escapable = lookupConformance(ty, escapableProtocol); + } + + // If the type is never copyable or escapable, that's it. + if (copyable.isInvalid() || escapable.isInvalid()) { + return std::nullopt; + } + + // Otherwise, let's see if we get a viable generic signature combining the + // requirements for those conformances with the requirements of the + // declaration context. + SmallVector ceRequirements; + + auto getRequirementsFromConformance = [&](ProtocolConformanceRef ref) { + if (ref.isAbstract()) { + // The only requirements are that the abstract type itself be copyable + // and escapable. + ceRequirements.push_back(Requirement(RequirementKind::Conformance, + ty->mapTypeOutOfContext(), copyableProtocol->getDeclaredType())); + ceRequirements.push_back(Requirement(RequirementKind::Conformance, + ty->mapTypeOutOfContext(), escapableProtocol->getDeclaredType())); + return; + } + + if (!ref.isConcrete()) { + return; + } + auto conformance = ref.getConcrete(); + + for (auto reqt : conformance->getRootConformance() + ->getConditionalRequirements()) { + ceRequirements.push_back(reqt); + } + }; + getRequirementsFromConformance(copyable); + getRequirementsFromConformance(escapable); + + auto regularSignature = buildGenericSignatureWithError(C, + contextSig, + {}, + std::move(ceRequirements), + /*allowInverses*/ false); + + // If the resulting signature has conflicting requirements, then it is + // impossible for the type to be copyable and equatable. + if (regularSignature.getInt()) { + return std::nullopt; + } + + // Otherwise, we have the signature we're looking for. + return regularSignature.getPointer(); +} + +static std::optional +getKeyPathSupportingGenericSignatureForValueType(Type ty, + GenericSignature sig) { + std::optional contextSig = sig; + // Visit lowered positions. if (auto tupleTy = ty->getAs()) { for (auto eltTy : tupleTy->getElementTypes()) { if (eltTy->is()) - return true; + return std::nullopt; - if (isUnsupportedKeyPathValueType(eltTy)) - return true; + contextSig = getKeyPathSupportingGenericSignatureForValueType( + eltTy, *contextSig); + if (!contextSig) + return std::nullopt; } - return false; + return contextSig; } if (auto objTy = ty->getOptionalObjectType()) @@ -330,66 +419,78 @@ static bool isUnsupportedKeyPathValueType(Type ty) { for (auto param : funcTy->getParams()) { auto paramTy = param.getPlainType(); if (paramTy->is()) - return true; + return std::nullopt; - if (isUnsupportedKeyPathValueType(paramTy)) - return true; + contextSig = getKeyPathSupportingGenericSignatureForValueType(paramTy, + *contextSig); + if (!contextSig) { + return std::nullopt; + } } - if (isUnsupportedKeyPathValueType(funcTy->getResult())) - return true; + contextSig = getKeyPathSupportingGenericSignatureForValueType(funcTy->getResult(), + *contextSig); + + if (!contextSig) { + return std::nullopt; + } } // Noncopyable types aren't supported by key paths in their current form. // They would also need a new ABI that's yet to be implemented in order to // be properly supported, so let's suppress the descriptor for now if either // the container or storage type of the declaration is non-copyable. - if (ty->isNoncopyable()) - return true; - - return false; + return getKeyPathSupportingGenericSignature(ty, *contextSig); } -bool AbstractStorageDecl::exportsPropertyDescriptor() const { +std::optional +AbstractStorageDecl::getPropertyDescriptorGenericSignature() const { // The storage needs a descriptor if it sits at a module's ABI boundary, - // meaning it has public linkage. + // meaning it has public linkage, and it is eligible to be part of a key path. - if (!isStatic()) { - if (auto contextTy = getDeclContext()->getDeclaredTypeInContext()) { - if (contextTy->isNoncopyable()) { - return false; - } + auto contextTy = getDeclContext()->getDeclaredTypeInContext(); + auto contextSig = getInnermostDeclContext()->getGenericSignatureOfContext(); + + // If the root type is never `Copyable` or `Escapable`, then instance + // members can't be used in key paths, at least as they are implemented + // today. + if (!isStatic() && contextTy) { + auto ceContextSig = getKeyPathSupportingGenericSignature(contextTy, + contextSig); + if (!ceContextSig) { + return std::nullopt; } + contextSig = *ceContextSig; } // TODO: Global properties ought to eventually be referenceable // as key paths from (). if (!getDeclContext()->isTypeContext()) - return false; + return std::nullopt; // Protocol requirements do not need property descriptors. if (isa(getDeclContext())) - return false; + return std::nullopt; // Static properties declared directly in protocol do not need // descriptors as existential Any.Type will not resolve to a value. if (isStatic() && isa(getDeclContext())) - return false; + return std::nullopt; // FIXME: We should support properties and subscripts with '_read' accessors; // 'get' is not part of the opaque accessor set there. auto *getter = getOpaqueAccessor(AccessorKind::Get); if (!getter) - return false; + return std::nullopt; // If the getter is mutating, we cannot form a keypath to it at all. if (isGetterMutating()) - return false; + return std::nullopt; // If the storage is an ABI-compatible override of another declaration, we're // not going to be emitting a property descriptor either. if (!isValidKeyPathComponent()) - return false; + return std::nullopt; // TODO: If previous versions of an ABI-stable binary needed the descriptor, // then we still do. @@ -409,7 +510,7 @@ bool AbstractStorageDecl::exportsPropertyDescriptor() const { case SILLinkage::Private: case SILLinkage::Hidden: // Don't need a public descriptor. - return false; + return std::nullopt; case SILLinkage::HiddenExternal: case SILLinkage::PublicExternal: @@ -417,19 +518,22 @@ bool AbstractStorageDecl::exportsPropertyDescriptor() const { llvm_unreachable("should be definition linkage?"); } - auto typeInContext = getInnermostDeclContext()->mapTypeIntoContext( + auto typeInContext = contextSig.getGenericEnvironment()->mapTypeIntoContext( getValueInterfaceType()); - if (isUnsupportedKeyPathValueType(typeInContext)) { - return false; + auto valueTypeSig = getKeyPathSupportingGenericSignatureForValueType(typeInContext, contextSig); + if (!valueTypeSig) { + return std::nullopt; } + contextSig = *valueTypeSig; // Subscripts with inout arguments (FIXME)and reabstracted arguments(/FIXME) // don't have descriptors either. if (auto sub = dyn_cast(this)) { for (auto *index : *sub->getIndices()) { // Keypaths can't capture inout indices. - if (index->isInOut()) - return false; + if (index->isInOut()) { + return std::nullopt; + } auto indexTy = index->getInterfaceType() ->getReducedType(sub->getGenericSignatureOfContext()); @@ -439,7 +543,7 @@ bool AbstractStorageDecl::exportsPropertyDescriptor() const { // had only one abstraction level and no explosion. if (isa(indexTy)) - return false; + return std::nullopt; auto indexObjTy = indexTy; if (auto objTy = indexObjTy.getOptionalObjectType()) @@ -447,9 +551,9 @@ bool AbstractStorageDecl::exportsPropertyDescriptor() const { if (isa(indexObjTy) || isa(indexObjTy)) - return false; + return std::nullopt; } } - return true; + return contextSig; } diff --git a/lib/SIL/IR/SILSymbolVisitor.cpp b/lib/SIL/IR/SILSymbolVisitor.cpp index 0aa9e5c0e4614..e1a2452ca6398 100644 --- a/lib/SIL/IR/SILSymbolVisitor.cpp +++ b/lib/SIL/IR/SILSymbolVisitor.cpp @@ -569,7 +569,7 @@ class SILSymbolVisitorImpl : public ASTVisitor { void visitAbstractStorageDecl(AbstractStorageDecl *ASD) { // Add the property descriptor if the decl needs it. - if (ASD->exportsPropertyDescriptor()) { + if (ASD->getPropertyDescriptorGenericSignature()) { Visitor.addPropertyDescriptor(ASD); } diff --git a/lib/SILGen/SILGen.cpp b/lib/SILGen/SILGen.cpp index f0d201afab947..8a31aba04d960 100644 --- a/lib/SILGen/SILGen.cpp +++ b/lib/SILGen/SILGen.cpp @@ -2070,17 +2070,16 @@ void SILGenModule::tryEmitPropertyDescriptor(AbstractStorageDecl *decl) { if (!SILModuleConventions(M).useLoweredAddresses()) return; - if (!decl->exportsPropertyDescriptor()) + auto descriptorContext = decl->getPropertyDescriptorGenericSignature(); + if (!descriptorContext) return; PrettyStackTraceDecl stackTrace("emitting property descriptor for", decl); Type baseTy; if (decl->getDeclContext()->isTypeContext()) { - baseTy = decl->getDeclContext()->getSelfInterfaceType() - ->getReducedType(decl->getInnermostDeclContext() - ->getGenericSignatureOfContext()); + ->getReducedType(*descriptorContext); if (decl->isStatic()) { baseTy = MetatypeType::get(baseTy); @@ -2091,8 +2090,7 @@ void SILGenModule::tryEmitPropertyDescriptor(AbstractStorageDecl *decl) { llvm_unreachable("should not export a property descriptor yet"); } - auto genericEnv = decl->getInnermostDeclContext() - ->getGenericEnvironmentOfContext(); + auto genericEnv = descriptorContext->getGenericEnvironment(); unsigned baseOperand = 0; bool needsGenericContext = true; @@ -2102,8 +2100,16 @@ void SILGenModule::tryEmitPropertyDescriptor(AbstractStorageDecl *decl) { } SubstitutionMap subs; - if (genericEnv) - subs = genericEnv->getForwardingSubstitutionMap(); + if (genericEnv) { + // The substitutions are used when invoking the underlying accessors, so + // we get these from the original declaration generic environment, even if + // `getPropertyDescriptorGenericSignature` computed a different generic + // environment, since the accessors will not need the extra Copyable or + // Escapable requirements. + subs = SubstitutionMap::get(decl->getInnermostDeclContext() + ->getGenericSignatureOfContext(), + genericEnv->getForwardingSubstitutionMap()); + } auto component = emitKeyPathComponentForDecl(SILLocation(decl), genericEnv, diff --git a/test/SILGen/conditionally_copyable_conformance_descriptor.swift b/test/SILGen/conditionally_copyable_conformance_descriptor.swift new file mode 100644 index 0000000000000..8138071a01a20 --- /dev/null +++ b/test/SILGen/conditionally_copyable_conformance_descriptor.swift @@ -0,0 +1,180 @@ +// RUN: %target-swift-emit-silgen -enable-library-evolution %s | %FileCheck %s + +public struct ConditionallyCopyable: ~Copyable { +} + +extension ConditionallyCopyable: Copyable where T: Copyable {} + +public struct NeverCopyable: ~Copyable {} + +public struct Index: Hashable { } + +extension ConditionallyCopyable where T: ~Copyable { + // CHECK-LABEL: sil_property #ConditionallyCopyable.sometimesCopyableBase_sometimesCopyableValue + // CHECK-SAME: getter @{{[^ ]*}} : $@convention(keypath_accessor_getter) <τ_0_0> (@in_guaranteed ConditionallyCopyable<τ_0_0>) -> @out τ_0_0 + // CHECK-SAME: setter @{{[^ ]*}} : $@convention(keypath_accessor_setter) <τ_0_0> (@in_guaranteed τ_0_0, @inout ConditionallyCopyable<τ_0_0>) -> () + public private(set) var sometimesCopyableBase_sometimesCopyableValue: T { + get { } + set { } + } + + // CHECK-LABEL: sil_property #ConditionallyCopyable.sometimesCopyableBase_alwaysCopyableValue + // CHECK-SAME: getter @{{[^ ]*}} : $@convention(keypath_accessor_getter) <τ_0_0> (@in_guaranteed ConditionallyCopyable<τ_0_0>) -> @out Int + // CHECK-SAME: setter @{{[^ ]*}} : $@convention(keypath_accessor_setter) <τ_0_0> (@in_guaranteed Int, @inout ConditionallyCopyable<τ_0_0>) -> () + public private(set) var sometimesCopyableBase_alwaysCopyableValue: Int { + get { } + set { } + } + + // CHECK-NOT: sil_property #ConditionallyCopyable.neverCopyableBase_alwaysCopyableValue + public private(set) var sometimesCopyableBase_neverCopyableValue: NeverCopyable { + get { } + set { } + } + + // CHECK-LABEL: sil_property #ConditionallyCopyable.subscript{{.*}}, id @$s45conditionally_copyable_conformance_descriptor21ConditionallyCopyableVAARi_zrlE09sometimesf5Base_gF10IndexValueqd__AA0I0Vyqd__G_tcRi_d__luir + // CHECK-SAME: getter @{{[^ ]*}} : $@convention(keypath_accessor_getter) <τ_0_0><τ_1_0> (@in_guaranteed ConditionallyCopyable<τ_0_0>, @in_guaranteed Index<τ_1_0>) -> @out τ_1_0 + // CHECK-SAME: setter @{{[^ ]*}} : $@convention(keypath_accessor_setter) <τ_0_0><τ_1_0> (@in_guaranteed τ_1_0, @inout ConditionallyCopyable<τ_0_0>, @in_guaranteed Index<τ_1_0>) -> () + public private(set) subscript( + sometimesCopyableBase_sometimesCopyableIndexValue _: Index + ) -> U { + get { } + set { } + } + + // CHECK-LABEL: sil_property #ConditionallyCopyable.subscript{{.*}}, id @$s45conditionally_copyable_conformance_descriptor21ConditionallyCopyableVAARi_zrlE09sometimesf5Base_gF5ValuexAA5IndexVyqd__G_tcRi_d__luir + // CHECK-SAME: getter @{{[^ ]*}} : $@convention(keypath_accessor_getter) <τ_0_0><τ_1_0 where τ_1_0 : ~Copyable> (@in_guaranteed ConditionallyCopyable<τ_0_0>, @in_guaranteed Index<τ_1_0>) -> @out τ_0_0 + // CHECK-SAME: setter @{{[^ ]*}} : $@convention(keypath_accessor_setter) <τ_0_0><τ_1_0 where τ_1_0 : ~Copyable> (@in_guaranteed τ_0_0, @inout ConditionallyCopyable<τ_0_0>, @in_guaranteed Index<τ_1_0>) -> () + public private(set) subscript( + sometimesCopyableBase_sometimesCopyableValue _: Index + ) -> T { + get { } + set { } + } + + // CHECK-LABEL: sil_property #ConditionallyCopyable.subscript{{.*}}, id @$s45conditionally_copyable_conformance_descriptor21ConditionallyCopyableVAARi_zrlE09sometimesf11Base_alwaysF5ValueSiAA5IndexVyqd__G_tcRi_d__luig + // CHECK-SAME: getter @{{[^ ]*}} : $@convention(keypath_accessor_getter) <τ_0_0><τ_1_0 where τ_1_0 : ~Copyable> (@in_guaranteed ConditionallyCopyable<τ_0_0>, @in_guaranteed Index<τ_1_0>) -> @out Int + // CHECK-SAME: setter @{{[^ ]*}} : $@convention(keypath_accessor_setter) <τ_0_0><τ_1_0 where τ_1_0 : ~Copyable> (@in_guaranteed Int, @inout ConditionallyCopyable<τ_0_0>, @in_guaranteed Index<τ_1_0>) -> () + public private(set) subscript( + sometimesCopyableBase_alwaysCopyableValue _: Index + ) -> Int { + get { } + set { } + } + + // CHECK-NOT: sil_property #ConditionallyCopyable.subscript{{.*}}never + public private(set) subscript( + sometimesCopyableBase_neverCopyableValue _: Index + ) -> NeverCopyable { + get { } + set { } + } +} + +extension ConditionallyCopyable where T == NeverCopyable, T: ~Copyable { + // CHECK-NOT: sil_property #ConditionallyCopyable.neverCopyableBase_sometimesCopyableValue + public private(set) var neverCopyableBase_sometimesCopyableValue: T { + get { } + set { } + } + + // CHECK-NOT: sil_property #ConditionallyCopyable.neverCopyableBase_alwaysCopyableValue + public private(set) var neverCopyableBase_alwaysCopyableValue: Int { + get { } + set { } + } + + // CHECK-NOT: sil_property #ConditionallyCopyable.neverCopyableBase_neverCopyableValue + public private(set) var neverCopyableBase_neverCopyableValue: NeverCopyable { + get { } + set { } + } + + // CHECK-NOT: sil_property #ConditionallyCopyable.subscript{{.*}}never + public private(set) subscript( + neverCopyableBase_sometimesCopyableIndexValue _: Index + ) -> U { + get { } + set { } + } + public private(set) subscript( + neverCopyableBase_sometimesCopyableValue _: Index + ) -> T { + get { } + set { } + } + public private(set) subscript( + neverCopyableBase_alwaysCopyableValue _: Index + ) -> Int { + get { } + set { } + } + public private(set) subscript( + neverCopyableBase_neverCopyableValue _: Index + ) -> NeverCopyable { + get { } + set { } + } +} + +extension ConditionallyCopyable where T: Copyable { + // CHECK-LABEL: sil_property #ConditionallyCopyable.alwaysCopyableBase_sometimesCopyableValue + // CHECK-SAME: getter {{[^ ]*}} : $@convention(keypath_accessor_getter) <τ_0_0> (@in_guaranteed ConditionallyCopyable<τ_0_0>) -> @out τ_0_0 + // CHECK-SAME: setter {{[^ ]*}} : $@convention(keypath_accessor_setter) <τ_0_0> (@in_guaranteed τ_0_0, @inout ConditionallyCopyable<τ_0_0>) -> () + public private(set) var alwaysCopyableBase_sometimesCopyableValue: T { + get { } + set { } + } + + // CHECK-LABEL: sil_property #ConditionallyCopyable.alwaysCopyableBase_alwaysCopyableValue + // CHECK-SAME: getter {{[^ ]*}} : $@convention(keypath_accessor_getter) <τ_0_0> (@in_guaranteed ConditionallyCopyable<τ_0_0>) -> @out Int + // CHECK-SAME: setter {{[^ ]*}} : $@convention(keypath_accessor_setter) <τ_0_0> (@in_guaranteed Int, @inout ConditionallyCopyable<τ_0_0>) -> () + public private(set) var alwaysCopyableBase_alwaysCopyableValue: Int { + get { } + set { } + } + + // CHECK-NOT: sil_property alwaysCopyableBase_neverCopyableValue + public private(set) var alwaysCopyableBase_neverCopyableValue: NeverCopyable { + get { } + set { } + } + + // CHECK-LABEL: sil_property #ConditionallyCopyable.subscript{{.*}}, id @$s45conditionally_copyable_conformance_descriptor21ConditionallyCopyableV06alwaysf14Base_sometimesF10IndexValueqd__AA0J0Vyqd__G_tcRi_d__luir + // CHECK-SAME: getter {{[^ ]*}} : $@convention(keypath_accessor_getter) <τ_0_0><τ_1_0> (@in_guaranteed ConditionallyCopyable<τ_0_0>, @in_guaranteed Index<τ_1_0>) -> @out τ_1_0 + // CHECK-SAME: setter {{[^ ]*}} : $@convention(keypath_accessor_setter) <τ_0_0><τ_1_0> (@in_guaranteed τ_1_0, @inout ConditionallyCopyable<τ_0_0>, @in_guaranteed Index<τ_1_0>) -> ()) + public private(set) subscript( + alwaysCopyableBase_sometimesCopyableIndexValue _: Index + ) -> U { + get { } + set { } + } + + // CHECK-LABEL: sil_property #ConditionallyCopyable.subscript{{.*}}, id @$s45conditionally_copyable_conformance_descriptor21ConditionallyCopyableV06alwaysf14Base_sometimesF5ValuexAA5IndexVyqd__G_tcRi_d__luig + // CHECK-SAME: getter {{[^ ]*}} : $@convention(keypath_accessor_getter) <τ_0_0><τ_1_0 where τ_1_0 : ~Copyable> (@in_guaranteed ConditionallyCopyable<τ_0_0>, @in_guaranteed Index<τ_1_0>) -> @out τ_0_0 + // CHECK-SAME: setter {{[^ ]*}} : $@convention(keypath_accessor_setter) <τ_0_0><τ_1_0 where τ_1_0 : ~Copyable> (@in_guaranteed τ_0_0, @inout ConditionallyCopyable<τ_0_0>, @in_guaranteed Index<τ_1_0>) -> () + public private(set) subscript( + alwaysCopyableBase_sometimesCopyableValue _: Index + ) -> T { + get { } + set { } + } + + // CHECK-LABEL: sil_property #ConditionallyCopyable.subscript{{.*}}, id @$s45conditionally_copyable_conformance_descriptor21ConditionallyCopyableV06alwaysf5Base_gF5ValueSiAA5IndexVyqd__G_tcRi_d__luig + // CHECK-SAME: getter {{[^ ]*}} : $@convention(keypath_accessor_getter) <τ_0_0><τ_1_0 where τ_1_0 : ~Copyable> (@in_guaranteed ConditionallyCopyable<τ_0_0>, @in_guaranteed Index<τ_1_0>) -> @out Int + // CHECK-SAME: setter {{[^ ]*}} : $@convention(keypath_accessor_setter) <τ_0_0><τ_1_0 where τ_1_0 : ~Copyable> (@in_guaranteed Int, @inout ConditionallyCopyable<τ_0_0>, @in_guaranteed Index<τ_1_0>) -> () + public private(set) subscript( + alwaysCopyableBase_alwaysCopyableValue _: Index + ) -> Int { + get { } + set { } + } + + // CHECK-NOT: sil_property #ConditionallyCopyable.subscript{{.*}}never + public private(set) subscript( + alwaysCopyableBase_neverCopyableValue _: Index + ) -> NeverCopyable { + get { } + set { } + } +} diff --git a/test/SILOptimizer/lifetime_dependence/verify_library_diagnostics.swift b/test/SILOptimizer/lifetime_dependence/verify_library_diagnostics.swift index 7024e85472ff6..0fb4eece6b064 100644 --- a/test/SILOptimizer/lifetime_dependence/verify_library_diagnostics.swift +++ b/test/SILOptimizer/lifetime_dependence/verify_library_diagnostics.swift @@ -29,16 +29,8 @@ public struct NEImmortal: ~Escapable { class C {} -// Test diagnostics on keypath getter. -// -// rdar://150073405 ([SILGen] support synthesized _modify on top of borrowed getters with library evolution) -// -// This produces the error: -// :0: error: unexpected error produced: lifetime-dependent value returned by generated thunk -// '$s4test17ImplicitAccessorsV10neComputedAA10NEImmortalVvpACTK' -// -// Since this error has no source file, we can't verify the diagnostic! -/* +// Test that we don't implicitly try to create a keypath getter, since +// ~Escapable types are not yet supported by keypaths. public struct ImplicitAccessors { let c: C @@ -50,7 +42,6 @@ public struct ImplicitAccessors { } } } - */ public struct NoncopyableImplicitAccessors : ~Copyable & ~Escapable { public var ne: NE diff --git a/test/abi/macOS/arm64/stdlib.swift b/test/abi/macOS/arm64/stdlib.swift index 1e8c39edcaa35..7d664d6aa201c 100644 --- a/test/abi/macOS/arm64/stdlib.swift +++ b/test/abi/macOS/arm64/stdlib.swift @@ -795,21 +795,9 @@ Added: _$sSS5IndexVs28CustomDebugStringConvertiblesWP Added: _$ss4SpanVMa Added: _$ss4SpanVMn Added: _$ss4SpanVsRi_zrlE6_countSivg -Added: _$ss4SpanVsRi_zrlE6_countSivpMV Added: _$ss4SpanVsRi_zrlE8_pointerSVSgvg -Added: _$ss4SpanVsRi_zrlE8_pointerSVSgvpMV -Added: _$ss4SpanVsRi_zrlE5countSivpMV -Added: _$ss4SpanVsRi_zrlE7indicesSnySiGvpMV -Added: _$ss4SpanVsRi_zrlE7isEmptySbvpMV -Added: _$ss4SpanVss15BitwiseCopyableRzlE9uncheckedxSi_tcipMV -Added: _$ss4SpanVss15BitwiseCopyableRzlEyxSicipMV -Added: _$ss7RawSpanV11byteOffsetsSnySiGvpMV Added: _$ss7RawSpanV6_countSivg -Added: _$ss7RawSpanV6_countSivpMV -Added: _$ss7RawSpanV7isEmptySbvpMV Added: _$ss7RawSpanV8_pointerSVSgvg -Added: _$ss7RawSpanV8_pointerSVSgvpMV -Added: _$ss7RawSpanV9byteCountSivpMV Added: _$ss7RawSpanVMa Added: _$ss7RawSpanVMn Added: _$ss7RawSpanVN @@ -817,9 +805,7 @@ Added: _$ss7RawSpanVN // SE-0464 UTF8Span Added: _$sSS7copyingSSs8UTF8SpanV_tcfC Added: _$sSS8utf8Spans04UTF8B0Vvg -Added: _$sSS8utf8Spans04UTF8B0VvpMV Added: _$sSs8utf8Spans04UTF8B0Vvg -Added: _$sSs8utf8Spans04UTF8B0VvpMV Added: _$ss7UnicodeO4UTF8O15ValidationErrorV11byteOffsetsSnySiGvM Added: _$ss7UnicodeO4UTF8O15ValidationErrorV11byteOffsetsSnySiGvg Added: _$ss7UnicodeO4UTF8O15ValidationErrorV11byteOffsetsSnySiGvpMV @@ -872,21 +858,15 @@ Added: _$ss7UnicodeO4UTF8O15ValidationErrorVs23CustomStringConvertiblesMc Added: _$ss7UnicodeO4UTF8O15ValidationErrorVs23CustomStringConvertiblesWP Added: _$ss7UnicodeO4UTF8O15_checkAllErrorsySayAD15ValidationErrorVGxSTRzs5UInt8V7ElementRtzlFZ Added: _$ss8UTF8SpanV9unchecked12isKnownASCIIABs0B0Vys5UInt8VG_SbtcfC -Added: _$ss8UTF8SpanV10_countMasks6UInt64VvpZMV -Added: _$ss8UTF8SpanV10_flagsMasks6UInt64VvpZMV -Added: _$ss8UTF8SpanV10isKnownNFCSbvpMV Added: _$ss8UTF8SpanV10validatingABs0B0Vys5UInt8VG_ts7UnicodeO0A0O15ValidationErrorVYKcfC Added: _$ss8UTF8SpanV11checkForNFC10quickCheckS2b_tF -Added: _$ss8UTF8SpanV12isKnownASCIISbvpMV Added: _$ss8UTF8SpanV13checkForASCIISbyF Added: _$ss8UTF8SpanV14_countAndFlagss6UInt64VvM Added: _$ss8UTF8SpanV14_countAndFlagss6UInt64Vvg -Added: _$ss8UTF8SpanV14_countAndFlagss6UInt64VvpMV Added: _$ss8UTF8SpanV14_countAndFlagss6UInt64Vvs Added: _$ss8UTF8SpanV17CharacterIteratorV11skipForward2byS2i_tF Added: _$ss8UTF8SpanV17CharacterIteratorV11skipForwardSiyF Added: _$ss8UTF8SpanV17CharacterIteratorV21currentCodeUnitOffsetSivg -Added: _$ss8UTF8SpanV17CharacterIteratorV21currentCodeUnitOffsetSivpMV Added: _$ss8UTF8SpanV17CharacterIteratorV4nextSJSgyF Added: _$ss8UTF8SpanV17CharacterIteratorV5reset20roundingForwardsFromySi_tF Added: _$ss8UTF8SpanV17CharacterIteratorV5reset21roundingBackwardsFromySi_tF @@ -897,19 +877,16 @@ Added: _$ss8UTF8SpanV17CharacterIteratorV8previousSJSgyF Added: _$ss8UTF8SpanV17CharacterIteratorV8skipBack2byS2i_tF Added: _$ss8UTF8SpanV17CharacterIteratorV8skipBackSiyF Added: _$ss8UTF8SpanV17CharacterIteratorV9codeUnitsABvg -Added: _$ss8UTF8SpanV17CharacterIteratorV9codeUnitsABvpMV Added: _$ss8UTF8SpanV17CharacterIteratorVMa Added: _$ss8UTF8SpanV17CharacterIteratorVMn Added: _$ss8UTF8SpanV17CharacterIteratorVN Added: _$ss8UTF8SpanV17CharacterIteratorVyAdBcfC Added: _$ss8UTF8SpanV18_unsafeBaseAddressSVSgvM Added: _$ss8UTF8SpanV18_unsafeBaseAddressSVSgvg -Added: _$ss8UTF8SpanV18_unsafeBaseAddressSVSgvpMV Added: _$ss8UTF8SpanV18_unsafeBaseAddressSVSgvs Added: _$ss8UTF8SpanV21UnicodeScalarIteratorV11skipForward2byS2i_tF Added: _$ss8UTF8SpanV21UnicodeScalarIteratorV11skipForwardSiyF Added: _$ss8UTF8SpanV21UnicodeScalarIteratorV21currentCodeUnitOffsetSivg -Added: _$ss8UTF8SpanV21UnicodeScalarIteratorV21currentCodeUnitOffsetSivpMV Added: _$ss8UTF8SpanV21UnicodeScalarIteratorV4nexts0C0O0D0VSgyF Added: _$ss8UTF8SpanV21UnicodeScalarIteratorV5reset20roundingForwardsFromySi_tF Added: _$ss8UTF8SpanV21UnicodeScalarIteratorV5reset21roundingBackwardsFromySi_tF @@ -920,7 +897,6 @@ Added: _$ss8UTF8SpanV21UnicodeScalarIteratorV8previouss0C0O0D0VSgyF Added: _$ss8UTF8SpanV21UnicodeScalarIteratorV8skipBack2byS2i_tF Added: _$ss8UTF8SpanV21UnicodeScalarIteratorV8skipBackSiyF Added: _$ss8UTF8SpanV21UnicodeScalarIteratorV9codeUnitsABvg -Added: _$ss8UTF8SpanV21UnicodeScalarIteratorV9codeUnitsABvpMV Added: _$ss8UTF8SpanV21UnicodeScalarIteratorVMa Added: _$ss8UTF8SpanV21UnicodeScalarIteratorVMn Added: _$ss8UTF8SpanV21UnicodeScalarIteratorVN @@ -930,12 +906,7 @@ Added: _$ss8UTF8SpanV21makeCharacterIteratorAB0dE0VyF Added: _$ss8UTF8SpanV23isCanonicallyEquivalent2toSbAB_tF Added: _$ss8UTF8SpanV25makeUnicodeScalarIteratorAB0deF0VyF Added: _$ss8UTF8SpanV4spans0B0Vys5UInt8VGvg -Added: _$ss8UTF8SpanV4spans0B0Vys5UInt8VGvpMV -Added: _$ss8UTF8SpanV5countSivpMV -Added: _$ss8UTF8SpanV7_nfcBits6UInt64VvpZMV Added: _$ss8UTF8SpanV7isEmptySbvg -Added: _$ss8UTF8SpanV7isEmptySbvpMV -Added: _$ss8UTF8SpanV9_asciiBits6UInt64VvpZMV Added: _$ss8UTF8SpanVMa Added: _$ss8UTF8SpanVMn Added: _$ss8UTF8SpanVN @@ -954,20 +925,8 @@ Added: _$ss14MutableRawSpanVMn Added: _$ss14MutableRawSpanVN // SE-0456 Span-providing properties -Added: _$sSRsRi_zrlE4spans4SpanVyxGvpMV -Added: _$sSW5bytess7RawSpanVvpMV -Added: _$sSa4spans4SpanVyxGvpMV -Added: _$sSrsRi_zrlE4spans4SpanVyxGvpMV -Added: _$sSw5bytess7RawSpanVvpMV -Added: _$ss10ArraySliceV4spans4SpanVyxGvpMV -Added: _$ss13KeyValuePairsV4spans4SpanVyx3key_q_5valuetGvpMV -Added: _$ss15CollectionOfOneV4spans4SpanVyxGvpMV -Added: _$ss15ContiguousArrayV4spans4SpanVyxGvpMV -Added: _$ss4SpanVss15BitwiseCopyableRzlE5bytess03RawA0VvpMV Added: _$sSS8UTF8ViewV4spans4SpanVys5UInt8VGvg -Added: _$sSS8UTF8ViewV4spans4SpanVys5UInt8VGvpMV Added: _$sSs8UTF8ViewV4spans4SpanVys5UInt8VGvg -Added: _$sSs8UTF8ViewV4spans4SpanVys5UInt8VGvpMV // SE-0467 mutableSpan properties Added: _$sSa11mutableSpans07MutableB0VyxGvr @@ -1100,25 +1059,26 @@ Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss14M Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss14MutableRawSpanVN$ Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss4SpanVMa$ Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss4SpanVMn$ -Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss4SpanVsRi_zrlE5countSivpMV$ Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss4SpanVsRi_zrlE6_countSivg$ -Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss4SpanVsRi_zrlE6_countSivpMV$ -Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss4SpanVsRi_zrlE7indicesSnySiGvpMV$ -Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss4SpanVsRi_zrlE7isEmptySbvpMV$ Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss4SpanVsRi_zrlE8_pointerSVSgvg$ -Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss4SpanVsRi_zrlE8_pointerSVSgvpMV$ -Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss4SpanVss15BitwiseCopyableRzlE9uncheckedxSi_tcipMV$ -Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss4SpanVss15BitwiseCopyableRzlEyxSicipMV$ -Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss7RawSpanV11byteOffsetsSnySiGvpMV$ Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss7RawSpanV6_countSivg$ -Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss7RawSpanV6_countSivpMV$ -Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss7RawSpanV7isEmptySbvpMV$ Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss7RawSpanV8_pointerSVSgvg$ -Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss7RawSpanV8_pointerSVSgvpMV$ -Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss7RawSpanV9byteCountSivpMV$ Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss7RawSpanVMa$ Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss7RawSpanVMn$ Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss7RawSpanVN$ // Duration.nanoseconds(_:) Added: _$ss8DurationV11nanosecondsyABSdFZ + +// rdar://151628396: Retroactively give property descriptors to conditionally-copyable/escapable properties +Added: _$ss11InlineArrayVsRi__rlE10startIndexSivpMV +Added: _$ss11InlineArrayVsRi__rlE5countSivpMV +Added: _$ss11InlineArrayVsRi__rlE7_bufferSRyq_GvpMV +Added: _$ss11InlineArrayVsRi__rlE7indicesSnySiGvpMV +Added: _$ss11InlineArrayVsRi__rlE7isEmptySbvpMV +Added: _$ss11InlineArrayVsRi__rlE8_addressSPyq_GvpMV +Added: _$ss11InlineArrayVsRi__rlE8endIndexSivpMV +Added: _$ss8UTF8SpanV10_countMasks6UInt64VvpZMV +Added: _$ss8UTF8SpanV10_flagsMasks6UInt64VvpZMV +Added: _$ss8UTF8SpanV7_nfcBits6UInt64VvpZMV +Added: _$ss8UTF8SpanV9_asciiBits6UInt64VvpZMV diff --git a/test/abi/macOS/x86_64/stdlib.swift b/test/abi/macOS/x86_64/stdlib.swift index ea0cdc82b5da4..8af6f38ae6594 100644 --- a/test/abi/macOS/x86_64/stdlib.swift +++ b/test/abi/macOS/x86_64/stdlib.swift @@ -796,21 +796,9 @@ Added: _$sSS5IndexVs28CustomDebugStringConvertiblesWP Added: _$ss4SpanVMa Added: _$ss4SpanVMn Added: _$ss4SpanVsRi_zrlE6_countSivg -Added: _$ss4SpanVsRi_zrlE6_countSivpMV Added: _$ss4SpanVsRi_zrlE8_pointerSVSgvg -Added: _$ss4SpanVsRi_zrlE8_pointerSVSgvpMV -Added: _$ss4SpanVsRi_zrlE5countSivpMV -Added: _$ss4SpanVsRi_zrlE7indicesSnySiGvpMV -Added: _$ss4SpanVsRi_zrlE7isEmptySbvpMV -Added: _$ss4SpanVss15BitwiseCopyableRzlE9uncheckedxSi_tcipMV -Added: _$ss4SpanVss15BitwiseCopyableRzlEyxSicipMV -Added: _$ss7RawSpanV11byteOffsetsSnySiGvpMV Added: _$ss7RawSpanV6_countSivg -Added: _$ss7RawSpanV6_countSivpMV -Added: _$ss7RawSpanV7isEmptySbvpMV Added: _$ss7RawSpanV8_pointerSVSgvg -Added: _$ss7RawSpanV8_pointerSVSgvpMV -Added: _$ss7RawSpanV9byteCountSivpMV Added: _$ss7RawSpanVMa Added: _$ss7RawSpanVMn Added: _$ss7RawSpanVN @@ -818,9 +806,7 @@ Added: _$ss7RawSpanVN // SE-0464 UTF8Span Added: _$sSS7copyingSSs8UTF8SpanV_tcfC Added: _$sSS8utf8Spans04UTF8B0Vvg -Added: _$sSS8utf8Spans04UTF8B0VvpMV Added: _$sSs8utf8Spans04UTF8B0Vvg -Added: _$sSs8utf8Spans04UTF8B0VvpMV Added: _$ss7UnicodeO4UTF8O15ValidationErrorV11byteOffsetsSnySiGvM Added: _$ss7UnicodeO4UTF8O15ValidationErrorV11byteOffsetsSnySiGvg Added: _$ss7UnicodeO4UTF8O15ValidationErrorV11byteOffsetsSnySiGvpMV @@ -873,21 +859,15 @@ Added: _$ss7UnicodeO4UTF8O15ValidationErrorVs23CustomStringConvertiblesMc Added: _$ss7UnicodeO4UTF8O15ValidationErrorVs23CustomStringConvertiblesWP Added: _$ss7UnicodeO4UTF8O15_checkAllErrorsySayAD15ValidationErrorVGxSTRzs5UInt8V7ElementRtzlFZ Added: _$ss8UTF8SpanV9unchecked12isKnownASCIIABs0B0Vys5UInt8VG_SbtcfC -Added: _$ss8UTF8SpanV10_countMasks6UInt64VvpZMV -Added: _$ss8UTF8SpanV10_flagsMasks6UInt64VvpZMV -Added: _$ss8UTF8SpanV10isKnownNFCSbvpMV Added: _$ss8UTF8SpanV10validatingABs0B0Vys5UInt8VG_ts7UnicodeO0A0O15ValidationErrorVYKcfC Added: _$ss8UTF8SpanV11checkForNFC10quickCheckS2b_tF -Added: _$ss8UTF8SpanV12isKnownASCIISbvpMV Added: _$ss8UTF8SpanV13checkForASCIISbyF Added: _$ss8UTF8SpanV14_countAndFlagss6UInt64VvM Added: _$ss8UTF8SpanV14_countAndFlagss6UInt64Vvg -Added: _$ss8UTF8SpanV14_countAndFlagss6UInt64VvpMV Added: _$ss8UTF8SpanV14_countAndFlagss6UInt64Vvs Added: _$ss8UTF8SpanV17CharacterIteratorV11skipForward2byS2i_tF Added: _$ss8UTF8SpanV17CharacterIteratorV11skipForwardSiyF Added: _$ss8UTF8SpanV17CharacterIteratorV21currentCodeUnitOffsetSivg -Added: _$ss8UTF8SpanV17CharacterIteratorV21currentCodeUnitOffsetSivpMV Added: _$ss8UTF8SpanV17CharacterIteratorV4nextSJSgyF Added: _$ss8UTF8SpanV17CharacterIteratorV5reset20roundingForwardsFromySi_tF Added: _$ss8UTF8SpanV17CharacterIteratorV5reset21roundingBackwardsFromySi_tF @@ -898,19 +878,16 @@ Added: _$ss8UTF8SpanV17CharacterIteratorV8previousSJSgyF Added: _$ss8UTF8SpanV17CharacterIteratorV8skipBack2byS2i_tF Added: _$ss8UTF8SpanV17CharacterIteratorV8skipBackSiyF Added: _$ss8UTF8SpanV17CharacterIteratorV9codeUnitsABvg -Added: _$ss8UTF8SpanV17CharacterIteratorV9codeUnitsABvpMV Added: _$ss8UTF8SpanV17CharacterIteratorVMa Added: _$ss8UTF8SpanV17CharacterIteratorVMn Added: _$ss8UTF8SpanV17CharacterIteratorVN Added: _$ss8UTF8SpanV17CharacterIteratorVyAdBcfC Added: _$ss8UTF8SpanV18_unsafeBaseAddressSVSgvM Added: _$ss8UTF8SpanV18_unsafeBaseAddressSVSgvg -Added: _$ss8UTF8SpanV18_unsafeBaseAddressSVSgvpMV Added: _$ss8UTF8SpanV18_unsafeBaseAddressSVSgvs Added: _$ss8UTF8SpanV21UnicodeScalarIteratorV11skipForward2byS2i_tF Added: _$ss8UTF8SpanV21UnicodeScalarIteratorV11skipForwardSiyF Added: _$ss8UTF8SpanV21UnicodeScalarIteratorV21currentCodeUnitOffsetSivg -Added: _$ss8UTF8SpanV21UnicodeScalarIteratorV21currentCodeUnitOffsetSivpMV Added: _$ss8UTF8SpanV21UnicodeScalarIteratorV4nexts0C0O0D0VSgyF Added: _$ss8UTF8SpanV21UnicodeScalarIteratorV5reset20roundingForwardsFromySi_tF Added: _$ss8UTF8SpanV21UnicodeScalarIteratorV5reset21roundingBackwardsFromySi_tF @@ -921,7 +898,6 @@ Added: _$ss8UTF8SpanV21UnicodeScalarIteratorV8previouss0C0O0D0VSgyF Added: _$ss8UTF8SpanV21UnicodeScalarIteratorV8skipBack2byS2i_tF Added: _$ss8UTF8SpanV21UnicodeScalarIteratorV8skipBackSiyF Added: _$ss8UTF8SpanV21UnicodeScalarIteratorV9codeUnitsABvg -Added: _$ss8UTF8SpanV21UnicodeScalarIteratorV9codeUnitsABvpMV Added: _$ss8UTF8SpanV21UnicodeScalarIteratorVMa Added: _$ss8UTF8SpanV21UnicodeScalarIteratorVMn Added: _$ss8UTF8SpanV21UnicodeScalarIteratorVN @@ -931,12 +907,7 @@ Added: _$ss8UTF8SpanV21makeCharacterIteratorAB0dE0VyF Added: _$ss8UTF8SpanV23isCanonicallyEquivalent2toSbAB_tF Added: _$ss8UTF8SpanV25makeUnicodeScalarIteratorAB0deF0VyF Added: _$ss8UTF8SpanV4spans0B0Vys5UInt8VGvg -Added: _$ss8UTF8SpanV4spans0B0Vys5UInt8VGvpMV -Added: _$ss8UTF8SpanV5countSivpMV -Added: _$ss8UTF8SpanV7_nfcBits6UInt64VvpZMV Added: _$ss8UTF8SpanV7isEmptySbvg -Added: _$ss8UTF8SpanV7isEmptySbvpMV -Added: _$ss8UTF8SpanV9_asciiBits6UInt64VvpZMV Added: _$ss8UTF8SpanVMa Added: _$ss8UTF8SpanVMn Added: _$ss8UTF8SpanVN @@ -955,20 +926,8 @@ Added: _$ss14MutableRawSpanVMn Added: _$ss14MutableRawSpanVN // SE-0456 Span-providing properties -Added: _$sSRsRi_zrlE4spans4SpanVyxGvpMV -Added: _$sSW5bytess7RawSpanVvpMV -Added: _$sSa4spans4SpanVyxGvpMV -Added: _$sSrsRi_zrlE4spans4SpanVyxGvpMV -Added: _$sSw5bytess7RawSpanVvpMV -Added: _$ss10ArraySliceV4spans4SpanVyxGvpMV -Added: _$ss13KeyValuePairsV4spans4SpanVyx3key_q_5valuetGvpMV -Added: _$ss15CollectionOfOneV4spans4SpanVyxGvpMV -Added: _$ss15ContiguousArrayV4spans4SpanVyxGvpMV -Added: _$ss4SpanVss15BitwiseCopyableRzlE5bytess03RawA0VvpMV Added: _$sSS8UTF8ViewV4spans4SpanVys5UInt8VGvg -Added: _$sSS8UTF8ViewV4spans4SpanVys5UInt8VGvpMV Added: _$sSs8UTF8ViewV4spans4SpanVys5UInt8VGvg -Added: _$sSs8UTF8ViewV4spans4SpanVys5UInt8VGvpMV // SE-0467 mutableSpan properties Added: _$sSa11mutableSpans07MutableB0VyxGvr @@ -1101,25 +1060,26 @@ Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss14M Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss14MutableRawSpanVN$ Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss4SpanVMa$ Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss4SpanVMn$ -Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss4SpanVsRi_zrlE5countSivpMV$ Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss4SpanVsRi_zrlE6_countSivg$ -Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss4SpanVsRi_zrlE6_countSivpMV$ -Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss4SpanVsRi_zrlE7indicesSnySiGvpMV$ -Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss4SpanVsRi_zrlE7isEmptySbvpMV$ Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss4SpanVsRi_zrlE8_pointerSVSgvg$ -Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss4SpanVsRi_zrlE8_pointerSVSgvpMV$ -Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss4SpanVss15BitwiseCopyableRzlE9uncheckedxSi_tcipMV$ -Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss4SpanVss15BitwiseCopyableRzlEyxSicipMV$ -Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss7RawSpanV11byteOffsetsSnySiGvpMV$ Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss7RawSpanV6_countSivg$ -Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss7RawSpanV6_countSivpMV$ -Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss7RawSpanV7isEmptySbvpMV$ Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss7RawSpanV8_pointerSVSgvg$ -Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss7RawSpanV8_pointerSVSgvpMV$ -Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss7RawSpanV9byteCountSivpMV$ Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss7RawSpanVMa$ Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss7RawSpanVMn$ Added: $ld$previous$@rpath/libswiftCompatibilitySpan.dylib$$1$10.14$15.0$_$ss7RawSpanVN$ // Duration.nanoseconds(_:) Added: _$ss8DurationV11nanosecondsyABSdFZ + +// rdar://151628396: Retroactively give property descriptors to conditionally-copyable/escapable properties +Added: _$ss11InlineArrayVsRi__rlE10startIndexSivpMV +Added: _$ss11InlineArrayVsRi__rlE5countSivpMV +Added: _$ss11InlineArrayVsRi__rlE7_bufferSRyq_GvpMV +Added: _$ss11InlineArrayVsRi__rlE7indicesSnySiGvpMV +Added: _$ss11InlineArrayVsRi__rlE7isEmptySbvpMV +Added: _$ss11InlineArrayVsRi__rlE8_addressSPyq_GvpMV +Added: _$ss11InlineArrayVsRi__rlE8endIndexSivpMV +Added: _$ss8UTF8SpanV10_countMasks6UInt64VvpZMV +Added: _$ss8UTF8SpanV10_flagsMasks6UInt64VvpZMV +Added: _$ss8UTF8SpanV7_nfcBits6UInt64VvpZMV +Added: _$ss8UTF8SpanV9_asciiBits6UInt64VvpZMV