@@ -144,6 +144,17 @@ static CanSILFunctionType getAccessorType(IRGenModule &IGM,
144
144
SILFunction *Target) {
145
145
auto &Context = IGM.Context ;
146
146
147
+ auto getInvocationDecoderParameter = [&]() {
148
+ auto *actor = Target->getDeclContext ()
149
+ ->getInnermostTypeContext ()
150
+ ->getSelfNominalTypeDecl ();
151
+ auto *decoder = Context.getDistributedActorInvocationDecoder (actor);
152
+ auto decoderTy = decoder->getInterfaceType ()->getMetatypeInstanceType ();
153
+ auto paramType = IGM.getLoweredType (decoderTy);
154
+ return SILParameterInfo (paramType.getASTType (),
155
+ ParameterConvention::Direct_Guaranteed);
156
+ };
157
+
147
158
auto getRawPointerParameter = [&]() {
148
159
auto ptrType = Context.getUnsafeRawPointerType ();
149
160
return SILParameterInfo (ptrType->getCanonicalType (),
@@ -173,7 +184,7 @@ static CanSILFunctionType getAccessorType(IRGenModule &IGM,
173
184
return SILFunctionType::get (
174
185
/* genericSignature=*/ nullptr , extInfo, SILCoroutineKind::None,
175
186
ParameterConvention::Direct_Guaranteed,
176
- {/* argumentBuffer =*/ getRawPointerParameter (),
187
+ {/* argumentDecoder =*/ getInvocationDecoderParameter (),
177
188
/* argumentTypes=*/ getRawPointerParameter (),
178
189
/* resultBuffer=*/ getRawPointerParameter (),
179
190
/* substitutions=*/ getRawPointerParameter (),
@@ -497,8 +508,9 @@ void DistributedAccessor::emit() {
497
508
(unsigned )AsyncFunctionArgumentIndex::Context + 1 ;
498
509
(void )params.claim (numAsyncContextParams);
499
510
500
- // UnsafeRawPointer that holds all of the argument values.
501
- auto *argBuffer = params.claimNext ();
511
+ // A container that produces argument values based on the given set of
512
+ // argument types (supplied as a next argument).
513
+ auto *argDecoder = params.claimNext ();
502
514
// `swift.type**` that holds the argument types that correspond to values.
503
515
auto *argTypes = params.claimNext ();
504
516
// UnsafeRawPointer that is used to store the result.
0 commit comments