@@ -506,100 +506,3 @@ void SILGenFunction::emitDistributedActorSystemResignIDCall(
506
506
SILType (),
507
507
{ idRef });
508
508
}
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
- }
0 commit comments