Skip to content

Commit 332c602

Browse files
committed
cleanup
1 parent 756fe0d commit 332c602

File tree

5 files changed

+2
-48
lines changed

5 files changed

+2
-48
lines changed

include/swift/AST/Decl.h

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ class alignas(1 << DeclAlignInBits) Decl {
502502
IsDebuggerAlias : 1
503503
);
504504

505-
SWIFT_INLINE_BITFIELD(NominalTypeDecl, GenericTypeDecl, 1+1+1+1,
505+
SWIFT_INLINE_BITFIELD(NominalTypeDecl, GenericTypeDecl, 1+1+1,
506506
/// Whether we have already added implicitly-defined initializers
507507
/// to this declaration.
508508
AddedImplicitInitializers : 1,
@@ -511,10 +511,7 @@ class alignas(1 << DeclAlignInBits) Decl {
511511
HasLazyConformances : 1,
512512

513513
/// Whether this nominal type is having its semantic members resolved.
514-
IsComputingSemanticMembers : 1,
515-
516-
/// Whether we have already added implicitly-defined distributed actor members.
517-
AddedImplicitDistributedActorMembers: 1
514+
IsComputingSemanticMembers : 1
518515
);
519516

520517
SWIFT_INLINE_BITFIELD_FULL(ProtocolDecl, NominalTypeDecl, 1+1+1+1+1+1+1+1+1+1+1+8+16,
@@ -3163,7 +3160,6 @@ class NominalTypeDecl : public GenericTypeDecl, public IterableDeclContext {
31633160
ExtensionGeneration = 0;
31643161
Bits.NominalTypeDecl.HasLazyConformances = false;
31653162
Bits.NominalTypeDecl.IsComputingSemanticMembers = false;
3166-
Bits.NominalTypeDecl.AddedImplicitDistributedActorMembers = false;
31673163
}
31683164

31693165
friend class ProtocolType;
@@ -3201,17 +3197,6 @@ class NominalTypeDecl : public GenericTypeDecl, public IterableDeclContext {
32013197
Bits.NominalTypeDecl.AddedImplicitInitializers = true;
32023198
}
32033199

3204-
/// Determine whether we have already attempted to add any
3205-
/// implicitly-defined distributed actor members to this declaration.
3206-
bool addedImplicitDistributedActorMembers() const {
3207-
return Bits.NominalTypeDecl.AddedImplicitInitializers;
3208-
}
3209-
3210-
/// Note that we have attempted to add implicit initializers.
3211-
void setAddedImplicitDistributedActorMembers() {
3212-
Bits.NominalTypeDecl.AddedImplicitInitializers = true;
3213-
}
3214-
32153200
/// getDeclaredType - Retrieve the type declared by this entity, without
32163201
/// any generic parameters bound if this is a generic type.
32173202
///

include/swift/AST/TypeCheckRequests.h

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -933,24 +933,6 @@ class IsDistributedActorRequest :
933933
bool isCached() const { return true; }
934934
};
935935

936-
/// Determine whether the given func is distributed.
937-
class IsDistributedFuncRequest :
938-
public SimpleRequest<IsDistributedFuncRequest,
939-
bool(FuncDecl *),
940-
RequestFlags::Cached> {
941-
public:
942-
using SimpleRequest::SimpleRequest;
943-
944-
private:
945-
friend SimpleRequest;
946-
947-
bool evaluate(Evaluator &evaluator, FuncDecl *func) const;
948-
949-
public:
950-
// Caching
951-
bool isCached() const { return true; }
952-
};
953-
954936
/// Obtain the 'remote' counterpart of a 'distributed func'.
955937
class GetDistributedRemoteFuncRequest :
956938
public SimpleRequest<GetDistributedRemoteFuncRequest,

include/swift/AST/TypeCheckerTypeIDZone.def

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,6 @@ SWIFT_REQUEST(TypeChecker, IsDefaultActorRequest,
100100
Cached, NoLocationInfo)
101101
SWIFT_REQUEST(TypeChecker, IsDistributedActorRequest, bool(NominalTypeDecl *),
102102
Cached, NoLocationInfo)
103-
SWIFT_REQUEST(TypeChecker, IsDistributedFuncRequest, bool(FuncDecl *),
104-
Cached, NoLocationInfo)
105103
SWIFT_REQUEST(TypeChecker, GetDistributedRemoteFuncRequest, AbstractFunctionDecl *(AbstractFunctionDecl *),
106104
Cached, NoLocationInfo)
107105
SWIFT_REQUEST(TypeChecker, GlobalActorInstanceRequest,

lib/AST/Decl.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7221,11 +7221,6 @@ bool AbstractFunctionDecl::isSendable() const {
72217221

72227222
bool AbstractFunctionDecl::isDistributed() const {
72237223
return this->getAttrs().hasAttribute<DistributedActorAttr>();
7224-
7225-
// auto mutableFunc = const_cast<FuncDecl *>(func);
7226-
// return evaluateOrDefault(getASTContext().evaluator,
7227-
// IsDistributedFuncRequest{mutableFunc},
7228-
// false);
72297224
}
72307225

72317226
AbstractFunctionDecl*

lib/Sema/TypeCheckDistributed.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,6 @@ bool IsDistributedActorRequest::evaluate(
7171
return classDecl->isExplicitDistributedActor();
7272
}
7373

74-
bool IsDistributedFuncRequest::evaluate(
75-
Evaluator &evaluator, FuncDecl *func) const {
76-
// Check whether the attribute was explicitly specified.
77-
return func->getAttrs().hasAttribute<DistributedActorAttr>();
78-
}
79-
8074
AbstractFunctionDecl *GetDistributedRemoteFuncRequest::evaluate(
8175
Evaluator &evaluator, AbstractFunctionDecl *func) const {
8276
if (!func->isDistributed())

0 commit comments

Comments
 (0)