@@ -560,34 +560,30 @@ void SILGenFunction::emitProlog(CaptureInfo captureInfo,
560560 dyn_cast_or_null<AbstractFunctionDecl>(FunctionDC->getAsDecl ())) {
561561 auto actorIsolation = getActorIsolation (funcDecl);
562562 switch (actorIsolation.getKind ()) {
563- case ActorIsolation::Unspecified:
564- case ActorIsolation::Independent:
565- // If this is an async function that has an isolated parameter, hop
566- // to it.
567- if (F.isAsync ()) {
568- for (auto param : *funcDecl->getParameters ()) {
569- if (param->isIsolated ()) {
570- auto loc = RegularLocation::getAutoGeneratedLocation (F.getLocation ());
571- Type actorType = param->getType ();
572- RValue actorInstanceRV = emitRValueForDecl (
573- loc, param, actorType, AccessSemantics::Ordinary);
574- ManagedValue actorInstance =
575- std::move (actorInstanceRV).getScalarValue ();
576- ExpectedExecutor = emitLoadActorExecutor (loc, actorInstance);
577- break ;
578- }
563+ case ActorIsolation::Unspecified:
564+ case ActorIsolation::Independent:
565+ // If this is an async function that has an isolated parameter, hop
566+ // to it.
567+ if (F.isAsync ()) {
568+ for (auto param : *funcDecl->getParameters ()) {
569+ if (param->isIsolated ()) {
570+ auto loc = RegularLocation::getAutoGeneratedLocation (F.getLocation ());
571+ Type actorType = param->getType ();
572+ RValue actorInstanceRV = emitRValueForDecl (
573+ loc, param, actorType, AccessSemantics::Ordinary);
574+ ManagedValue actorInstance =
575+ std::move (actorInstanceRV).getScalarValue ();
576+ ExpectedExecutor = emitLoadActorExecutor (loc, actorInstance);
577+ break ;
579578 }
580579 }
581-
582- break ;
583-
584- case ActorIsolation::GlobalActorUnsafe:
585- break ;
586-
587- case ActorIsolation::DistributedActorInstance: {
588- // TODO: perhaps here we can emit our special handling to make a message?
589- LLVM_FALLTHROUGH;
590580 }
581+ break ;
582+
583+ case ActorIsolation::DistributedActorInstance: {
584+ // TODO: perhaps here we can emit our special handling to make a message?
585+ LLVM_FALLTHROUGH;
586+ }
591587
592588 case ActorIsolation::ActorInstance: {
593589 assert (selfParam && " no self parameter for ActorInstance isolation" );
@@ -605,6 +601,7 @@ void SILGenFunction::emitProlog(CaptureInfo captureInfo,
605601 }
606602
607603 case ActorIsolation::GlobalActor:
604+ case ActorIsolation::GlobalActorUnsafe:
608605 if (F.isAsync () || wantDataRaceChecks) {
609606 ExpectedExecutor =
610607 emitLoadGlobalActorExecutor (actorIsolation.getGlobalActor ());
0 commit comments