@@ -125,14 +125,14 @@ void SILGenFunction::injectDistributedActorDestructorLifecycleCall(
125
125
auto selfManagedValue = ManagedValue::forUnmanaged (selfValue);
126
126
auto selfType = selfDecl->getType ();
127
127
128
- // ==== locate: self.actorAddress
129
- auto addressVarDeclRefs = cd->lookupDirect (ctx.Id_actorAddress );
130
- assert (addressVarDeclRefs .size () == 1 );
131
- auto *addressVarDeclRef = dyn_cast<VarDecl>(addressVarDeclRefs .front ());
132
- assert (addressVarDeclRef );
133
- auto addressRef =
134
- B.createRefElementAddr (Loc, selfValue, addressVarDeclRef ,
135
- getLoweredType (addressVarDeclRef ->getType ()));
128
+ // ==== locate: self.id
129
+ auto idVarDeclRefs = cd->lookupDirect (ctx.Id_id );
130
+ assert (idVarDeclRefs .size () == 1 );
131
+ auto *idVarDeclRef = dyn_cast<VarDecl>(idVarDeclRefs .front ());
132
+ assert (idVarDeclRef );
133
+ auto idRef =
134
+ B.createRefElementAddr (Loc, selfValue, idVarDeclRef ,
135
+ getLoweredType (idVarDeclRef ->getType ()));
136
136
137
137
// ==== locate: self.actorTransport
138
138
auto transportVarDeclRefs = cd->lookupDirect (ctx.Id_actorTransport );
@@ -142,15 +142,15 @@ void SILGenFunction::injectDistributedActorDestructorLifecycleCall(
142
142
B.createRefElementAddr (Loc, selfValue, transportVarDeclRef,
143
143
getLoweredType (transportVarDeclRef->getType ()));
144
144
145
- // locate: self.transport.resignAddress (...)
145
+ // locate: self.transport.resignIdentity (...)
146
146
auto *transportDecl = ctx.getActorTransportDecl ();
147
- auto resignFnDecls = transportDecl->lookupDirect (ctx.Id_resignAddress );
147
+ auto resignFnDecls = transportDecl->lookupDirect (ctx.Id_resignIdentity );
148
148
assert (resignFnDecls.size () == 1 );
149
149
auto *resignFnDecl = resignFnDecls.front ();
150
150
auto resignFnRef = SILDeclRef (resignFnDecl);
151
151
152
- // we only transport.resignAddress if we are a local actor,
153
- // and thus the address was created by transport.assignAddress .
152
+ // we only transport.resignIdentity if we are a local actor,
153
+ // and thus the address was created by transport.assignIdentity .
154
154
auto isRemoteBB = createBasicBlock ();
155
155
auto isLocalBB = createBasicBlock ();
156
156
@@ -187,7 +187,7 @@ void SILGenFunction::injectDistributedActorDestructorLifecycleCall(
187
187
}
188
188
189
189
// if local
190
- // === self.transport.resignAddress (self.address)
190
+ // === self.transport.resignIdentity (self.address)
191
191
{
192
192
B.emitBlock (isLocalBB);
193
193
@@ -208,7 +208,7 @@ void SILGenFunction::injectDistributedActorDestructorLifecycleCall(
208
208
transportDecl, openedTransport, ProtocolConformanceRef (transportDecl));
209
209
210
210
SmallVector<SILValue, 2 > params;
211
- params.push_back (addressRef );
211
+ params.push_back (idRef );
212
212
params.push_back (transportAddr); // self for the call, as last param
213
213
214
214
B.createApply (Loc, witness, subs, params);
0 commit comments