Rename "suppressible protocols" to "invertible protocols".

We've decided to use the "invertible protocols" terminology throughout
the runtime and compiler, so move over to that terminology
consistently.
This commit is contained in:
Doug Gregor
2024-03-29 10:09:48 -07:00
parent 79b78acdf6
commit b84f8ab080
16 changed files with 330 additions and 332 deletions

View File

@@ -1417,21 +1417,21 @@ getFunctionTypeFlags(CanFunctionType type) {
}
// Compute the set of suppressed protocols.
SuppressibleProtocolSet suppressedProtocols;
for (auto suppressibleKind : SuppressibleProtocolSet::allKnown()) {
switch (suppressibleKind) {
case SuppressibleProtocolKind::Copyable: {
InvertibleProtocolSet InvertedProtocols;
for (auto invertibleKind : InvertibleProtocolSet::allKnown()) {
switch (invertibleKind) {
case InvertibleProtocolKind::Copyable: {
// If the function type is noncopyable, note that in the suppressed
// protocols.
auto proto =
type->getASTContext().getProtocol(KnownProtocolKind::Copyable);
if (proto &&
proto->getParentModule()->lookupConformance(type, proto).isInvalid())
suppressedProtocols.insert(suppressibleKind);
InvertedProtocols.insert(invertibleKind);
break;
}
case SuppressibleProtocolKind::Escapable:
case InvertibleProtocolKind::Escapable:
// We intentionally do not record the "escapable" bit here, because it's
// already in the normal function type flags. The runtime will
// introduce it as necessary.
@@ -1444,7 +1444,7 @@ getFunctionTypeFlags(CanFunctionType type) {
auto extFlags = ExtendedFunctionTypeFlags()
.withTypedThrows(!type->getThrownError().isNull())
.withTransferringResult(type->hasTransferringResult())
.withSuppressedProtocols(suppressedProtocols);
.withInvertedProtocols(InvertedProtocols);
if (isolation.isErased())
extFlags = extFlags.withIsolatedAny();