Skip to content

Commit 9005e9b

Browse files
Removed some dead code
1 parent 485965a commit 9005e9b

File tree

2 files changed

+0
-113
lines changed

2 files changed

+0
-113
lines changed

lib/SILGen/SILGenDistributed.cpp

-97
Original file line numberDiff line numberDiff line change
@@ -541,100 +541,3 @@ void SILGenFunction::emitDistributedActorSystemResignIDCall(
541541
SILType(),
542542
{ idRef });
543543
}
544-
545-
void
546-
SILGenFunction::emitConditionalResignIdentityCall(SILLocation loc,
547-
ClassDecl *actorDecl,
548-
ManagedValue actorSelf,
549-
SILBasicBlock *continueBB,
550-
SILBasicBlock *finishBB) {
551-
assert(actorDecl->isDistributedActor() &&
552-
"only distributed actors have actorSystem lifecycle hooks in deinit");
553-
assert(continueBB && finishBB &&
554-
"need valid continue and finish basic blocks");
555-
556-
auto selfTy = F.mapTypeIntoContext(actorDecl->getDeclaredInterfaceType());
557-
558-
// we only system.resignID if we are a local actor,
559-
// and thus the address was created by system.assignID.
560-
auto isRemoteBB = createBasicBlock("isRemoteBB");
561-
auto isLocalBB = createBasicBlock("isLocalBB");
562-
563-
// if __isRemoteActor(self) {
564-
// ...
565-
// } else {
566-
// ...
567-
// }
568-
emitDistributedIfRemoteBranch(loc,
569-
actorSelf, selfTy,
570-
/*if remote*/isRemoteBB,
571-
/*if local*/isLocalBB);
572-
573-
// if remote, return early; the user defined deinit should not run.
574-
{
575-
B.emitBlock(isRemoteBB);
576-
B.createBranch(loc, finishBB);
577-
}
578-
579-
// if local, resign identity.
580-
{
581-
B.emitBlock(isLocalBB);
582-
583-
emitDistributedActorSystemResignIDCall(loc, actorDecl, actorSelf);
584-
585-
B.createBranch(loc, continueBB);
586-
}
587-
}
588-
589-
/******************************************************************************/
590-
/******************* DISTRIBUTED DEINIT: class memberwise destruction *********/
591-
/******************************************************************************/
592-
593-
void SILGenFunction::emitDistributedActorClassMemberDestruction(
594-
SILLocation cleanupLoc, ManagedValue selfValue, ClassDecl *cd,
595-
SILBasicBlock *normalMemberDestroyBB,
596-
SILBasicBlock *remoteMemberDestroyBB,
597-
SILBasicBlock *finishBB) {
598-
auto selfTy = cd->getDeclaredInterfaceType();
599-
600-
Scope scope(Cleanups, CleanupLocation(cleanupLoc));
601-
602-
auto isLocalBB = createBasicBlock("isLocalBB");
603-
604-
// if __isRemoteActor(self) {
605-
// ...
606-
// } else {
607-
// ...
608-
// }
609-
emitDistributedIfRemoteBranch(cleanupLoc,
610-
selfValue, selfTy,
611-
/*if remote*/remoteMemberDestroyBB,
612-
/*if local*/isLocalBB);
613-
614-
// // if __isRemoteActor(self)
615-
// {
616-
// // destroy only self.id and self.actorSystem
617-
// }
618-
{
619-
B.emitBlock(remoteMemberDestroyBB);
620-
621-
for (VarDecl *vd : cd->getStoredProperties()) {
622-
if (getActorIsolation(vd) == ActorIsolation::ActorInstance)
623-
continue;
624-
625-
destroyClassMember(cleanupLoc, selfValue, vd);
626-
}
627-
628-
B.createBranch(cleanupLoc, finishBB);
629-
}
630-
631-
// // else (local distributed actor)
632-
// {
633-
// <continue normal deinit>
634-
// }
635-
{
636-
B.emitBlock(isLocalBB);
637-
638-
B.createBranch(cleanupLoc, normalMemberDestroyBB);
639-
}
640-
}

lib/SILGen/SILGenFunction.h

-16
Original file line numberDiff line numberDiff line change
@@ -2530,22 +2530,6 @@ class LLVM_LIBRARY_VISIBILITY SILGenFunction
25302530
/// \param actorSelf the SIL value representing the distributed actor instance
25312531
void emitDistributedActorSystemResignIDCall(SILLocation loc,
25322532
ClassDecl *actorDecl, ManagedValue actorSelf);
2533-
2534-
/// Emit code that tests whether the distributed actor is local, and if so,
2535-
/// resigns the distributed actor's identity.
2536-
/// \param continueBB the target block where execution will continue after
2537-
/// the conditional call, whether actor is local or remote.
2538-
void emitConditionalResignIdentityCall(SILLocation loc,
2539-
ClassDecl *actorDecl,
2540-
ManagedValue actorSelf,
2541-
SILBasicBlock *continueBB,
2542-
SILBasicBlock *finishBB);
2543-
2544-
void emitDistributedActorClassMemberDestruction(
2545-
SILLocation cleanupLoc, ManagedValue selfValue, ClassDecl *cd,
2546-
SILBasicBlock *normalMemberDestroyBB,
2547-
SILBasicBlock *remoteMemberDestroyBB,
2548-
SILBasicBlock *finishBB);
25492533

25502534
//===--------------------------------------------------------------------===//
25512535
// Declarations

0 commit comments

Comments
 (0)