Skip to content

Commit 87871d7

Browse files
committed
AST: Rename getOpenedArchetypeSignature() to getOpenedExistentialSignature()
1 parent 58f03af commit 87871d7

File tree

7 files changed

+14
-14
lines changed

7 files changed

+14
-14
lines changed

include/swift/AST/ASTContext.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1343,8 +1343,8 @@ class ASTContext final {
13431343
/// particular, the opened archetype signature does not have requirements for
13441344
/// conformances inherited from superclass constraints while existential
13451345
/// values do.
1346-
CanGenericSignature getOpenedArchetypeSignature(Type type,
1347-
GenericSignature parentSig);
1346+
CanGenericSignature getOpenedExistentialSignature(Type type,
1347+
GenericSignature parentSig);
13481348

13491349
GenericSignature getOverrideGenericSignature(const ValueDecl *base,
13501350
const ValueDecl *derived);

lib/AST/ASTContext.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4655,7 +4655,7 @@ GenericEnvironment *
46554655
GenericEnvironment::forOpenedExistential(
46564656
Type existential, GenericSignature parentSig, UUID uuid) {
46574657
auto &ctx = existential->getASTContext();
4658-
auto signature = ctx.getOpenedArchetypeSignature(existential, parentSig);
4658+
auto signature = ctx.getOpenedExistentialSignature(existential, parentSig);
46594659
return GenericEnvironment::forOpenedArchetypeSignature(existential, signature, uuid);
46604660
}
46614661

@@ -5199,7 +5199,7 @@ Type OpenedArchetypeType::getSelfInterfaceTypeFromContext(GenericSignature paren
51995199
}
52005200

52015201
CanGenericSignature
5202-
ASTContext::getOpenedArchetypeSignature(Type type, GenericSignature parentSig) {
5202+
ASTContext::getOpenedExistentialSignature(Type type, GenericSignature parentSig) {
52035203
assert(type->isExistentialType());
52045204

52055205
if (auto existential = type->getAs<ExistentialType>())

lib/AST/Decl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4168,7 +4168,7 @@ GenericParameterReferenceInfo ValueDecl::findExistentialSelfReferences(
41684168
// Note: a non-null GenericSignature would violate the invariant that
41694169
// the protocol 'Self' type referenced from the requirement's interface
41704170
// type is the same as the existential 'Self' type.
4171-
auto sig = getASTContext().getOpenedArchetypeSignature(baseTy,
4171+
auto sig = getASTContext().getOpenedExistentialSignature(baseTy,
41724172
GenericSignature());
41734173

41744174
auto genericParam = sig.getGenericParams().front();

lib/AST/Type.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ Type TypeBase::typeEraseOpenedArchetypesWithRoot(
511511
if (!hasOpenedExistential())
512512
return type;
513513

514-
const auto sig = root->getASTContext().getOpenedArchetypeSignature(
514+
const auto sig = root->getASTContext().getOpenedExistentialSignature(
515515
root->getExistentialType(), useDC->getGenericSignatureOfContext());
516516

517517
unsigned metatypeDepth = 0;
@@ -4163,7 +4163,7 @@ CanType ProtocolCompositionType::getMinimalCanonicalType(
41634163
// Use generic signature minimization: the requirements of the signature will
41644164
// represent the minimal composition.
41654165
auto sig = useDC->getGenericSignatureOfContext();
4166-
const auto Sig = Ctx.getOpenedArchetypeSignature(CanTy, sig);
4166+
const auto Sig = Ctx.getOpenedExistentialSignature(CanTy, sig);
41674167
const auto &Reqs = Sig.getRequirements();
41684168
if (Reqs.size() == 1) {
41694169
return Reqs.front().getSecondType()->getCanonicalType();

lib/IRGen/GenMeta.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6168,7 +6168,7 @@ irgen::emitExtendedExistentialTypeShape(IRGenModule &IGM,
61686168
}
61696169

61706170
CanGenericSignature reqSig =
6171-
IGM.Context.getOpenedArchetypeSignature(existentialType, genSig);
6171+
IGM.Context.getOpenedExistentialSignature(existentialType, genSig);
61726172

61736173
CanType typeExpression;
61746174
if (metatypeDepth > 0) {

lib/SILOptimizer/Utils/Existential.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,15 +249,15 @@ void ConcreteExistentialInfo::initializeSubstitutionMap(
249249
// Construct a single-generic-parameter substitution map directly to the
250250
// ConcreteType with this existential's full list of conformances.
251251
//
252-
// NOTE: getOpenedArchetypeSignature() generates the signature for passing an
252+
// NOTE: getOpenedExistentialSignature() generates the signature for passing an
253253
// opened existential as a generic parameter. No opened archetypes are
254254
// actually involved here--the API is only used as a convenient way to create
255255
// a substitution map. Since opened archetypes have different conformances
256256
// than their corresponding existential, ExistentialConformances needs to be
257257
// filtered when using it with this (phony) generic signature.
258258
CanGenericSignature ExistentialSig =
259-
M->getASTContext().getOpenedArchetypeSignature(ExistentialType,
260-
GenericSignature());
259+
M->getASTContext().getOpenedExistentialSignature(ExistentialType,
260+
GenericSignature());
261261
ExistentialSubs = SubstitutionMap::get(
262262
ExistentialSig, [&](SubstitutableType *type) { return ConcreteType; },
263263
[&](CanType /*depType*/, Type /*replaceType*/,

lib/Sema/ConstraintSystem.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1924,8 +1924,8 @@ typeEraseExistentialSelfReferences(
19241924
}
19251925

19261926
const auto existentialSig =
1927-
baseTy->getASTContext().getOpenedArchetypeSignature(baseTy,
1928-
GenericSignature());
1927+
baseTy->getASTContext().getOpenedExistentialSignature(baseTy,
1928+
GenericSignature());
19291929

19301930
unsigned metatypeDepth = 0;
19311931

@@ -6561,7 +6561,7 @@ static bool doesMemberHaveUnfulfillableConstraintsWithExistentialBase(
65616561

65626562
return Action::Stop;
65636563
}
6564-
} isDependentOnSelfWalker(member->getASTContext().getOpenedArchetypeSignature(
6564+
} isDependentOnSelfWalker(member->getASTContext().getOpenedExistentialSignature(
65656565
baseTy, GenericSignature()));
65666566

65676567
for (const auto &req : sig.getRequirements()) {

0 commit comments

Comments
 (0)