Skip to content

Commit 0417ee9

Browse files
Removed some dead code
1 parent 83e39b0 commit 0417ee9

File tree

2 files changed

+0
-113
lines changed

2 files changed

+0
-113
lines changed

lib/SILGen/SILGenDistributed.cpp

Lines changed: 0 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -506,100 +506,3 @@ void SILGenFunction::emitDistributedActorSystemResignIDCall(
506506
SILType(),
507507
{ idRef });
508508
}
509-
510-
void
511-
SILGenFunction::emitConditionalResignIdentityCall(SILLocation loc,
512-
ClassDecl *actorDecl,
513-
ManagedValue actorSelf,
514-
SILBasicBlock *continueBB,
515-
SILBasicBlock *finishBB) {
516-
assert(actorDecl->isDistributedActor() &&
517-
"only distributed actors have actorSystem lifecycle hooks in deinit");
518-
assert(continueBB && finishBB &&
519-
"need valid continue and finish basic blocks");
520-
521-
auto selfTy = F.mapTypeIntoContext(actorDecl->getDeclaredInterfaceType());
522-
523-
// we only system.resignID if we are a local actor,
524-
// and thus the address was created by system.assignID.
525-
auto isRemoteBB = createBasicBlock("isRemoteBB");
526-
auto isLocalBB = createBasicBlock("isLocalBB");
527-
528-
// if __isRemoteActor(self) {
529-
// ...
530-
// } else {
531-
// ...
532-
// }
533-
emitDistributedIfRemoteBranch(loc,
534-
actorSelf, selfTy,
535-
/*if remote*/isRemoteBB,
536-
/*if local*/isLocalBB);
537-
538-
// if remote, return early; the user defined deinit should not run.
539-
{
540-
B.emitBlock(isRemoteBB);
541-
B.createBranch(loc, finishBB);
542-
}
543-
544-
// if local, resign identity.
545-
{
546-
B.emitBlock(isLocalBB);
547-
548-
emitDistributedActorSystemResignIDCall(loc, actorDecl, actorSelf);
549-
550-
B.createBranch(loc, continueBB);
551-
}
552-
}
553-
554-
/******************************************************************************/
555-
/******************* DISTRIBUTED DEINIT: class memberwise destruction *********/
556-
/******************************************************************************/
557-
558-
void SILGenFunction::emitDistributedActorClassMemberDestruction(
559-
SILLocation cleanupLoc, ManagedValue selfValue, ClassDecl *cd,
560-
SILBasicBlock *normalMemberDestroyBB,
561-
SILBasicBlock *remoteMemberDestroyBB,
562-
SILBasicBlock *finishBB) {
563-
auto selfTy = cd->getDeclaredInterfaceType();
564-
565-
Scope scope(Cleanups, CleanupLocation(cleanupLoc));
566-
567-
auto isLocalBB = createBasicBlock("isLocalBB");
568-
569-
// if __isRemoteActor(self) {
570-
// ...
571-
// } else {
572-
// ...
573-
// }
574-
emitDistributedIfRemoteBranch(cleanupLoc,
575-
selfValue, selfTy,
576-
/*if remote*/remoteMemberDestroyBB,
577-
/*if local*/isLocalBB);
578-
579-
// // if __isRemoteActor(self)
580-
// {
581-
// // destroy only self.id and self.actorSystem
582-
// }
583-
{
584-
B.emitBlock(remoteMemberDestroyBB);
585-
586-
for (VarDecl *vd : cd->getStoredProperties()) {
587-
if (getActorIsolation(vd) == ActorIsolation::ActorInstance)
588-
continue;
589-
590-
destroyClassMember(cleanupLoc, selfValue, vd);
591-
}
592-
593-
B.createBranch(cleanupLoc, finishBB);
594-
}
595-
596-
// // else (local distributed actor)
597-
// {
598-
// <continue normal deinit>
599-
// }
600-
{
601-
B.emitBlock(isLocalBB);
602-
603-
B.createBranch(cleanupLoc, normalMemberDestroyBB);
604-
}
605-
}

lib/SILGen/SILGenFunction.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2131,22 +2131,6 @@ class LLVM_LIBRARY_VISIBILITY SILGenFunction
21312131
/// \param actorSelf the SIL value representing the distributed actor instance
21322132
void emitDistributedActorSystemResignIDCall(SILLocation loc,
21332133
ClassDecl *actorDecl, ManagedValue actorSelf);
2134-
2135-
/// Emit code that tests whether the distributed actor is local, and if so,
2136-
/// resigns the distributed actor's identity.
2137-
/// \param continueBB the target block where execution will continue after
2138-
/// the conditional call, whether actor is local or remote.
2139-
void emitConditionalResignIdentityCall(SILLocation loc,
2140-
ClassDecl *actorDecl,
2141-
ManagedValue actorSelf,
2142-
SILBasicBlock *continueBB,
2143-
SILBasicBlock *finishBB);
2144-
2145-
void emitDistributedActorClassMemberDestruction(
2146-
SILLocation cleanupLoc, ManagedValue selfValue, ClassDecl *cd,
2147-
SILBasicBlock *normalMemberDestroyBB,
2148-
SILBasicBlock *remoteMemberDestroyBB,
2149-
SILBasicBlock *finishBB);
21502134

21512135
//===--------------------------------------------------------------------===//
21522136
// Declarations

0 commit comments

Comments
 (0)