Skip to content

Commit a8486a7

Browse files
committed
Enter actor isolation for a distributed witness via the distributed thunk
We cannot hop to a distributed actor directly, so call through the distributed thunk instead. (cherry picked from commit 840b7ea)
1 parent 89e5559 commit a8486a7

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

lib/SILGen/SILGenPoly.cpp

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4505,25 +4505,6 @@ void SILGenFunction::emitProtocolWitness(
45054505
witnessUnsubstTy->getSelfParameter());
45064506
}
45074507

4508-
// If we are supposed to hop to the actor, do so now.
4509-
if (enterIsolation) {
4510-
Optional<ManagedValue> actorSelf;
4511-
if (*enterIsolation == ActorIsolation::ActorInstance) {
4512-
auto actorSelfVal = origParams.back();
4513-
4514-
if (actorSelfVal.getType().isAddress()) {
4515-
auto &actorSelfTL = getTypeLowering(actorSelfVal.getType());
4516-
if (!actorSelfTL.isAddressOnly()) {
4517-
actorSelfVal = emitManagedLoad(*this, loc, actorSelfVal, actorSelfTL);
4518-
}
4519-
}
4520-
4521-
actorSelf = actorSelfVal;
4522-
}
4523-
4524-
emitHopToTargetActor(loc, enterIsolation, actorSelf);
4525-
}
4526-
45274508
// For static C++ methods and constructors, we need to drop the (metatype)
45284509
// "self" param. The "native" SIL representation will look like this:
45294510
// @convention(method) (@thin Foo.Type) -> () but the "actual" SIL function

0 commit comments

Comments
 (0)