Skip to content

Commit 551b07b

Browse files
authored
[Distributed] Fix _executeDistributedTarget ABI (#71725)
1 parent d4c54af commit 551b07b

File tree

5 files changed

+30
-66
lines changed

5 files changed

+30
-66
lines changed

lib/IRGen/GenDistributed.cpp

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -230,14 +230,9 @@ static CanSILFunctionType getAccessorType(IRGenModule &IGM,
230230

231231
// actor
232232

233-
auto actorTypeParam =
234-
GenericTypeParamType::get(/*isParameterPack=*/false,
235-
/*depth=*/0, /*index=*/1, Context);
233+
auto actorTypeParam = Context.getAnyObjectType();
236234
parameters.push_back(
237235
GenericFunctionType::Param(actorTypeParam));
238-
auto distributedActorTy =
239-
Context.getDistributedActorDecl()
240-
->getDeclaredInterfaceType();
241236

242237
auto decoderProtocolTy =
243238
Context
@@ -250,21 +245,13 @@ static CanSILFunctionType getAccessorType(IRGenModule &IGM,
250245
SmallVector<GenericTypeParamType *, 4> genericParams;
251246
SmallVector<Requirement, 4> genericRequirements;
252247

253-
assert(getDistributedActorOf(Target) &&
254-
"target must be declared inside distributed actor");
255-
256248
// Add a generic parameter `D` which stands for decoder type in the
257249
// accessor signature - `inout D`.
258250
genericParams.push_back(decoderType);
259251
// Add a requirement that decoder conforms to the expected protocol.
260252
genericRequirements.push_back(
261253
{RequirementKind::Conformance, decoderType, decoderProtocolTy});
262254

263-
genericRequirements.push_back(
264-
{RequirementKind::Conformance, actorTypeParam, distributedActorTy});
265-
266-
genericParams.push_back(actorTypeParam);
267-
268255
signature = buildGenericSignature(Context, GenericSignature(),
269256
std::move(genericParams),
270257
std::move(genericRequirements),
@@ -604,14 +591,8 @@ void DistributedAccessor::emit() {
604591
// Metadata that represents passed in the invocation decoder.
605592
auto *decoderType = params.claimNext();
606593

607-
// Metadata that represents the actor the invocation is on.
608-
auto *actorType = params.claimNext();
609-
(void)actorType;
610-
611594
// Witness table for decoder conformance to DistributedTargetInvocationDecoder
612595
auto *decoderProtocolWitness = params.claimNext();
613-
auto *distributedActorWitness = params.claimNext();
614-
(void)distributedActorWitness;
615596

616597
// Preliminary: Setup async context for this accessor.
617598
{

stdlib/public/Distributed/DistributedActor.cpp

Lines changed: 15 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,7 @@ using TargetExecutorSignature =
152152
/*witnessTables=*/void **,
153153
/*numWitnessTables=*/size_t,
154154
/*decoderType=*/Metadata *,
155-
/*actorType=*/Metadata *,
156-
/*decoderWitnessTable=*/void **,
157-
/*distributedActorWitnessTable=*/void **),
155+
/*decoderWitnessTable=*/void **),
158156
/*throws=*/true>;
159157

160158
SWIFT_CC(swiftasync)
@@ -181,9 +179,7 @@ using DistributedAccessorSignature =
181179
/*numWitnessTables=*/size_t,
182180
/*actor=*/HeapObject *,
183181
/*decoderType=*/Metadata *,
184-
/*actorType=*/Metadata *,
185-
/*decoderWitnessTable=*/void **,
186-
/*actorWitnessTable=*/void **),
182+
/*decoderWitnessTable=*/void **),
187183
/*throws=*/true>;
188184

189185
SWIFT_CC(swiftasync)
@@ -211,20 +207,16 @@ SWIFT_CC(swiftasync)
211207
void swift_distributed_execute_target(
212208
SWIFT_ASYNC_CONTEXT AsyncContext *callerContext, DefaultActor *actor,
213209
const char *targetNameStart, size_t targetNameLength,
214-
HeapObject *argumentDecoder, const Metadata *const *argumentTypes,
215-
void *resultBuffer, void *substitutions, void **witnessTables,
216-
size_t numWitnessTables, Metadata *decoderType, Metadata *actorType,
217-
void **decoderWitnessTable, void **actorWitnessTable) {
218-
std::string targetName(targetNameStart, targetNameLength);
219-
220-
auto actorTy = swift_getObjectType(actor);
221-
auto actorTyNamePair = swift_getMangledTypeName(actorTy);
222-
223-
auto *accessor = findDistributedProtocolMethodAccessor(
224-
/*findConcreteWitness=*/false,
225-
actorTyNamePair.data, actorTyNamePair.length,
226-
targetNameStart, targetNameLength);
227-
210+
HeapObject *argumentDecoder,
211+
const Metadata *const *argumentTypes,
212+
void *resultBuffer,
213+
void *substitutions,
214+
void **witnessTables,
215+
size_t numWitnessTables,
216+
Metadata *decoderType,
217+
void **decoderWitnessTable
218+
) {
219+
auto *accessor = findDistributedAccessor(targetNameStart, targetNameLength);
228220
if (!accessor) {
229221
SwiftError *error =
230222
swift_distributed_makeDistributedTargetAccessorNotFoundError();
@@ -250,16 +242,7 @@ void swift_distributed_execute_target(
250242
calleeContext->ResumeParent = reinterpret_cast<TaskContinuationFunction *>(
251243
swift_distributed_execute_target_resume);
252244

253-
accessorEntry(calleeContext,
254-
argumentDecoder,
255-
argumentTypes,
256-
resultBuffer,
257-
substitutions,
258-
witnessTables,
259-
numWitnessTables,
260-
actor,
261-
decoderType,
262-
actorType,
263-
decoderWitnessTable,
264-
actorWitnessTable);
245+
accessorEntry(calleeContext, argumentDecoder, argumentTypes, resultBuffer,
246+
substitutions, witnessTables, numWitnessTables, actor,
247+
decoderType, decoderWitnessTable);
265248
}

stdlib/public/Distributed/DistributedActorSystem.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -702,8 +702,8 @@ public struct RemoteCallTarget: CustomStringConvertible, Hashable {
702702

703703
@available(SwiftStdlib 5.7, *)
704704
@_silgen_name("swift_distributed_execute_target")
705-
func _executeDistributedTarget<D: DistributedTargetInvocationDecoder, DA: DistributedActor>(
706-
on actor: DA, // DistributedActor
705+
func _executeDistributedTarget<D: DistributedTargetInvocationDecoder>(
706+
on actor: AnyObject, // : DistributedActor
707707
_ targetName: UnsafePointer<UInt8>, _ targetNameLength: UInt,
708708
argumentDecoder: inout D,
709709
argumentTypes: Builtin.RawPointer,

test/Distributed/distributed_actor_accessor_thunks_32bit.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public distributed actor MyOtherActor {
9494

9595
// CHECK: define hidden swift{{(tail)?}}cc void @"$s27distributed_actor_accessors7MyActorC7simple1yySiYaKFTE"
9696

97-
// CHECK: define linkonce_odr hidden swift{{(tail)?}}cc void @"$s27distributed_actor_accessors7MyActorC7simple1yySiYaKFTETF"(%swift.context* swiftasync %0, %swift.opaque* nocapture %1, i8* %2, i8* %3, {{.*}}, %T27distributed_actor_accessors7MyActorC* [[ACTOR:%.*]], %swift.type* [[DECODER_TYPE:%.*]], %swift.type* [[ACTOR_TYPE:%.*]], i8** [[DECODER_PROTOCOL_WITNESS:%.*]], i8** [[ACTOR_WITNESS:%.*]])
97+
// CHECK: define linkonce_odr hidden swift{{(tail)?}}cc void @"$s27distributed_actor_accessors7MyActorC7simple1yySiYaKFTETF"(%swift.context* swiftasync %0, %swift.opaque* nocapture %1, i8* %2, i8* %3, {{.*}}, %T27distributed_actor_accessors7MyActorC* [[ACTOR:%.*]], %swift.type* [[DECODER_TYPE:%.*]], i8** [[DECODER_PROTOCOL_WITNESS:%.*]])
9898

9999
/// Read the current offset and cast an element to `Int`
100100

@@ -194,7 +194,7 @@ public distributed actor MyOtherActor {
194194
// CHECK: define hidden swift{{(tail)?}}cc void @"$s27distributed_actor_accessors7MyActorC7simple3ySiSSYaKFTE"
195195

196196
/// !!! in `simple3` interesting bits are: argument value extraction (because string is exploded into N arguments) and call to distributed thunk
197-
// CHECK: define linkonce_odr hidden swift{{(tail)?}}cc void @"$s27distributed_actor_accessors7MyActorC7simple3ySiSSYaKFTETF"(%swift.context* swiftasync %0, %swift.opaque* nocapture [[ARG_DECODER:%.*]], i8* [[ARG_TYPES:%.*]], i8* [[RESULT_BUFF:%.*]], i8* [[SUBS:%.*]], i8* [[WITNESS_TABLES:%.*]], i32 [[NUM_WITNESS_TABLES:%.*]], %T27distributed_actor_accessors7MyActorC* [[ACTOR]], %swift.type* [[DECODER_TYPE:%.*]], %swift.type* [[ACTOR_TYPE:%.*]], i8** [[DECODER_PROTOCOL_WITNESS:%.*]], i8** [[ACTOR_WITNESS:%.*]])
197+
// CHECK: define linkonce_odr hidden swift{{(tail)?}}cc void @"$s27distributed_actor_accessors7MyActorC7simple3ySiSSYaKFTETF"(%swift.context* swiftasync %0, %swift.opaque* nocapture [[ARG_DECODER:%.*]], i8* [[ARG_TYPES:%.*]], i8* [[RESULT_BUFF:%.*]], i8* [[SUBS:%.*]], i8* [[WITNESS_TABLES:%.*]], i32 [[NUM_WITNESS_TABLES:%.*]], %T27distributed_actor_accessors7MyActorC* [[ACTOR]], %swift.type* [[DECODER_TYPE:%.*]], i8** [[DECODER_PROTOCOL_WITNESS:%.*]])
198198

199199

200200
// CHECK: [[TYPED_RESULT_BUFF:%.*]] = bitcast i8* [[RESULT_BUFF]] to %TSi*
@@ -257,7 +257,7 @@ public distributed actor MyOtherActor {
257257

258258
// CHECK: define hidden swift{{(tail)?}}cc void @"$s27distributed_actor_accessors7MyActorC16single_case_enumyAA7SimpleEOAFYaKFTE"
259259

260-
// CHECK: define linkonce_odr hidden swift{{(tail)?}}cc void @"$s27distributed_actor_accessors7MyActorC16single_case_enumyAA7SimpleEOAFYaKFTETF"(%swift.context* swiftasync %0, %swift.opaque* nocapture [[ARG_DECODER:%.*]], i8* [[ARG_TYPES:%.*]], i8* [[RESULT_BUFF:%.*]], i8* [[SUBS:%.*]], i8* [[WITNESS_TABLES:%.*]], i32 [[NUM_WITNESS_TABLES:%.*]], %T27distributed_actor_accessors7MyActorC* [[ACTOR]], %swift.type* [[DECODER_TYPE]], %swift.type* [[ACTOR_TYPE]], i8** [[DECODER_PROTOCOL_WITNESS:%.*]], i8** [[ACTOR_WITNESS:%.*]])
260+
// CHECK: define linkonce_odr hidden swift{{(tail)?}}cc void @"$s27distributed_actor_accessors7MyActorC16single_case_enumyAA7SimpleEOAFYaKFTETF"(%swift.context* swiftasync %0, %swift.opaque* nocapture [[ARG_DECODER:%.*]], i8* [[ARG_TYPES:%.*]], i8* [[RESULT_BUFF:%.*]], i8* [[SUBS:%.*]], i8* [[WITNESS_TABLES:%.*]], i32 [[NUM_WITNESS_TABLES:%.*]], %T27distributed_actor_accessors7MyActorC* [[ACTOR]], %swift.type* [[DECODER_TYPE]], %swift.type* [[ACTOR_TYPE]], i8** [[DECODER_PROTOCOL_WITNESS:%.*]])
261261

262262
/// Let's check that the call doesn't have any arguments and returns nothing.
263263

@@ -303,7 +303,7 @@ public distributed actor MyOtherActor {
303303

304304
// CHECK: define hidden swift{{(tail)?}}cc void @"$s27distributed_actor_accessors7MyActorC7complexyAA11LargeStructVSaySiG_AA3ObjCSSSgAFtYaKFTE"
305305

306-
// CHECK: define linkonce_odr hidden swift{{(tail)?}}cc void @"$s27distributed_actor_accessors7MyActorC7complexyAA11LargeStructVSaySiG_AA3ObjCSSSgAFtYaKFTETF"(%swift.context* swiftasync {{.*}}, %swift.opaque* nocapture [[ARG_DECODER:%.*]], i8* [[ARG_TYPES:%.*]], i8* [[RESULT_BUFF:%.*]], i8* [[SUBS:%.*]], i8* [[WITNESS_TABLES:%.*]], i32 [[NUM_WITNESS_TABLES:%.*]], %T27distributed_actor_accessors7MyActorC* [[ACTOR]], %swift.type* [[DECODER_TYPE:%.*]], %swift.type* [[ACTOR_TYPE]], i8** [[DECODER_PROTOCOL_WITNESS:%.*]], i8** [[ACTOR_WITNESS:%.*]])
306+
// CHECK: define linkonce_odr hidden swift{{(tail)?}}cc void @"$s27distributed_actor_accessors7MyActorC7complexyAA11LargeStructVSaySiG_AA3ObjCSSSgAFtYaKFTETF"(%swift.context* swiftasync {{.*}}, %swift.opaque* nocapture [[ARG_DECODER:%.*]], i8* [[ARG_TYPES:%.*]], i8* [[RESULT_BUFF:%.*]], i8* [[SUBS:%.*]], i8* [[WITNESS_TABLES:%.*]], i32 [[NUM_WITNESS_TABLES:%.*]], %T27distributed_actor_accessors7MyActorC* [[ACTOR]], %swift.type* [[DECODER_TYPE:%.*]], %swift.type* [[ACTOR_TYPE]], i8** [[DECODER_PROTOCOL_WITNESS:%.*]])
307307

308308
/// First, let's check that all of the different argument types here are loaded correctly.
309309

@@ -362,7 +362,7 @@ public distributed actor MyOtherActor {
362362

363363
/// ---> Accessor for `genericArgs`
364364

365-
// CHECK: define linkonce_odr hidden swift{{(tail)?}}cc void @"$s27distributed_actor_accessors7MyActorC11genericArgsyyx_Sayq_GtYaKSeRzSERzSeR_SER_r0_lFTETF"(%swift.context* swiftasync %0, %swift.opaque* nocapture [[ARG_DECODER:%.*]], i8* [[ARG_TYPES:%.*]], i8* [[RESULT_BUF:%.*]], i8* [[GENERIC_SUBS:%.*]], i8* [[WITNESS_TABLES:%.*]], i32 [[NUM_WITNESS_TABLES:%.*]], %T27distributed_actor_accessors7MyActorC* [[ACTOR:%.*]], %swift.type* [[DECODER_TYPE:%.*]], %swift.type* [[ACTOR_TYPE]], i8** [[DECODER_PROTOCOL_WITNESS:%.*]], i8** [[ACTOR_WITNESS:%.*]])
365+
// CHECK: define linkonce_odr hidden swift{{(tail)?}}cc void @"$s27distributed_actor_accessors7MyActorC11genericArgsyyx_Sayq_GtYaKSeRzSERzSeR_SER_r0_lFTETF"(%swift.context* swiftasync %0, %swift.opaque* nocapture [[ARG_DECODER:%.*]], i8* [[ARG_TYPES:%.*]], i8* [[RESULT_BUF:%.*]], i8* [[GENERIC_SUBS:%.*]], i8* [[WITNESS_TABLES:%.*]], i32 [[NUM_WITNESS_TABLES:%.*]], %T27distributed_actor_accessors7MyActorC* [[ACTOR:%.*]], %swift.type* [[DECODER_TYPE:%.*]], %swift.type* [[ACTOR_TYPE]], i8** [[DECODER_PROTOCOL_WITNESS:%.*]])
366366

367367
/// ---> Load `T`
368368

@@ -418,7 +418,7 @@ public distributed actor MyOtherActor {
418418

419419
/// Let's check that there is argument decoding since parameter list is empty
420420

421-
// CHECK: define linkonce_odr hidden swift{{(tail)?}}cc void @"$s27distributed_actor_accessors12MyOtherActorC5emptyyyYaKFTETF"(%swift.context* swiftasync {{.*}}, %swift.opaque* nocapture [[ARG_DECODER:%.*]], i8* [[ARG_TYPES:%.*]], i8* [[RESULT_BUFF:%.*]], i8* [[SUBS:%.*]], i8* [[WITNESS_TABLES:%.*]], i32 [[NUM_WITNESS_TABLES:%.*]], %T27distributed_actor_accessors12MyOtherActorC* {{.*}}, %swift.type* [[DECODER_TYPE:%.*]], %swift.type* [[ACTOR_TYPE]], i8** [[DECODER_PROTOCOL_WITNESS:%.*]], i8** [[ACTOR_WITNESS:%.*]])
421+
// CHECK: define linkonce_odr hidden swift{{(tail)?}}cc void @"$s27distributed_actor_accessors12MyOtherActorC5emptyyyYaKFTETF"(%swift.context* swiftasync {{.*}}, %swift.opaque* nocapture [[ARG_DECODER:%.*]], i8* [[ARG_TYPES:%.*]], i8* [[RESULT_BUFF:%.*]], i8* [[SUBS:%.*]], i8* [[WITNESS_TABLES:%.*]], i32 [[NUM_WITNESS_TABLES:%.*]], %T27distributed_actor_accessors12MyOtherActorC* {{.*}}, %swift.type* [[DECODER_TYPE:%.*]], %swift.type* [[ACTOR_TYPE]], i8** [[DECODER_PROTOCOL_WITNESS:%.*]])
422422
// CHECK-NEXT: entry:
423423
// CHECK-NEXT: {{.*}} = alloca %swift.context*
424424
// CHECK-NEXT: %swifterror = alloca %swift.error*

test/Distributed/distributed_actor_accessor_thunks_64bit.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public distributed actor MyOtherActor {
9494

9595
// CHECK: define hidden swift{{(tail)?}}cc void @"$s27distributed_actor_accessors7MyActorC7simple1yySiYaKFTE"
9696

97-
// CHECK: define linkonce_odr hidden swift{{(tail)?}}cc void @"$s27distributed_actor_accessors7MyActorC7simple1yySiYaKFTETF"(ptr swiftasync %0, ptr %1, ptr %2, ptr %3, {{.*}}, ptr [[ACTOR:%.*]], ptr [[DECODER_TYPE:%.*]], ptr [[ACTOR_TYPE:%.*]], ptr [[DECODER_PROTOCOL_WITNESS:%.*]], ptr [[ACTOR_PROTOCOL_WITNESS:%.*]])
97+
// CHECK: define linkonce_odr hidden swift{{(tail)?}}cc void @"$s27distributed_actor_accessors7MyActorC7simple1yySiYaKFTETF"(ptr swiftasync %0, ptr %1, ptr %2, ptr %3, {{.*}}, ptr [[ACTOR:%.*]], ptr [[DECODER_TYPE:%.*]], ptr [[DECODER_PROTOCOL_WITNESS:%.*]])
9898

9999
/// Read the current offset and cast an element to `Int`
100100

@@ -177,7 +177,7 @@ public distributed actor MyOtherActor {
177177
// CHECK: define hidden swift{{(tail)?}}cc void @"$s27distributed_actor_accessors7MyActorC7simple3ySiSSYaKFTE"
178178

179179
/// !!! in `simple3` interesting bits are: argument value extraction (because string is exploded into N arguments) and call to distributed thunk
180-
// CHECK: define linkonce_odr hidden swift{{(tail)?}}cc void @"$s27distributed_actor_accessors7MyActorC7simple3ySiSSYaKFTETF"(ptr swiftasync %0, ptr [[ARG_DECODER:%.*]], ptr [[ARG_TYPES:%.*]], ptr [[RESULT_BUFF:%.*]], ptr [[SUBS:%.*]], ptr [[WITNESS_TABLES:%.*]], i64 [[NUM_WITNESS_TABLES:%.*]], ptr [[ACTOR]], ptr [[DECODER_TYPE:%.*]], ptr [[ACTOR_TYPE:%.*]], ptr [[DECODER_PROTOCOL_WITNESS:%.*]], ptr [[ACTOR_PROTOCOL_WITNESS:%.*]])
180+
// CHECK: define linkonce_odr hidden swift{{(tail)?}}cc void @"$s27distributed_actor_accessors7MyActorC7simple3ySiSSYaKFTETF"(ptr swiftasync %0, ptr [[ARG_DECODER:%.*]], ptr [[ARG_TYPES:%.*]], ptr [[RESULT_BUFF:%.*]], ptr [[SUBS:%.*]], ptr [[WITNESS_TABLES:%.*]], i64 [[NUM_WITNESS_TABLES:%.*]], ptr [[ACTOR]], ptr [[DECODER_TYPE:%.*]], ptr [[DECODER_PROTOCOL_WITNESS:%.*]])
181181

182182

183183
// CHECK: [[ARG_SIZE:%.*]] = and i64 {{.*}}, -16
@@ -217,7 +217,7 @@ public distributed actor MyOtherActor {
217217

218218
// CHECK: define hidden swift{{(tail)?}}cc void @"$s27distributed_actor_accessors7MyActorC16single_case_enumyAA7SimpleEOAFYaKFTE"
219219

220-
// CHECK: define linkonce_odr hidden swift{{(tail)?}}cc void @"$s27distributed_actor_accessors7MyActorC16single_case_enumyAA7SimpleEOAFYaKFTETF"(ptr swiftasync %0, ptr [[ARG_DECODER:%.*]], ptr [[ARG_TYPES:%.*]], ptr [[RESULT_BUFF:%.*]], ptr [[SUBS:%.*]], ptr [[WITNESS_TABLES:%.*]], i64 [[NUM_WITNESS_TABLES:%.*]], ptr [[ACTOR]], ptr [[DECODER_TYPE]], ptr [[ACTOR_TYPE]], ptr [[DECODER_PROTOCOL_WITNESS:%.*]], ptr [[ACTOR_PROTOCOL_WITNESS:%.*]])
220+
// CHECK: define linkonce_odr hidden swift{{(tail)?}}cc void @"$s27distributed_actor_accessors7MyActorC16single_case_enumyAA7SimpleEOAFYaKFTETF"(ptr swiftasync %0, ptr [[ARG_DECODER:%.*]], ptr [[ARG_TYPES:%.*]], ptr [[RESULT_BUFF:%.*]], ptr [[SUBS:%.*]], ptr [[WITNESS_TABLES:%.*]], i64 [[NUM_WITNESS_TABLES:%.*]], ptr [[ACTOR]], ptr [[DECODER_TYPE]], ptr [[DECODER_PROTOCOL_WITNESS:%.*]])
221221

222222
/// Let's check that the call doesn't have any arguments and returns nothing.
223223

@@ -257,7 +257,7 @@ public distributed actor MyOtherActor {
257257

258258
// CHECK: define hidden swift{{(tail)?}}cc void @"$s27distributed_actor_accessors7MyActorC7complexyAA11LargeStructVSaySiG_AA3ObjCSSSgAFtYaKFTE"
259259

260-
// CHECK: define linkonce_odr hidden swift{{(tail)?}}cc void @"$s27distributed_actor_accessors7MyActorC7complexyAA11LargeStructVSaySiG_AA3ObjCSSSgAFtYaKFTETF"(ptr swiftasync {{.*}}, ptr [[ARG_DECODER:%.*]], ptr [[ARG_TYPES:%.*]], ptr [[RESULT_BUFF:%.*]], ptr [[SUBS:%.*]], ptr [[WITNESS_TABLES:%.*]], i64 [[NUM_WITNESS_TABLES:%.*]], ptr [[ACTOR]], ptr [[DECODER_TYPE:%.*]], ptr [[ACTOR_TYPE]], ptr [[DECODER_PROTOCOL_WITNESS:%.*]], ptr [[ACTOR_PROTOCOL_WITNESS:%.*]])
260+
// CHECK: define linkonce_odr hidden swift{{(tail)?}}cc void @"$s27distributed_actor_accessors7MyActorC7complexyAA11LargeStructVSaySiG_AA3ObjCSSSgAFtYaKFTETF"(ptr swiftasync {{.*}}, ptr [[ARG_DECODER:%.*]], ptr [[ARG_TYPES:%.*]], ptr [[RESULT_BUFF:%.*]], ptr [[SUBS:%.*]], ptr [[WITNESS_TABLES:%.*]], i64 [[NUM_WITNESS_TABLES:%.*]], ptr [[DECODER_TYPE:%.*]], ptr [[DECODER_PROTOCOL_WITNESS:%.*]])
261261

262262
/// First, let's check that all of the different argument types here are loaded correctly.
263263

@@ -304,7 +304,7 @@ public distributed actor MyOtherActor {
304304

305305
/// ---> Accessor for `genericArgs`
306306

307-
// CHECK: define linkonce_odr hidden swift{{(tail)?}}cc void @"$s27distributed_actor_accessors7MyActorC11genericArgsyyx_Sayq_GtYaKSeRzSERzSeR_SER_r0_lFTETF"(ptr swiftasync %0, ptr [[ARG_DECODER:%.*]], ptr [[ARG_TYPES:%.*]], ptr [[RESULT_BUF:%.*]], ptr [[GENERIC_SUBS:%.*]], ptr [[WITNESS_TABLES:%.*]], i64 [[NUM_WITNESS_TABLES:%.*]], ptr [[ACTOR:%.*]], ptr [[DECODER_TYPE:%.*]], ptr [[ACTOR_TYPE]], ptr [[DECODER_PROTOCOL_WITNESS:%.*]], ptr [[ACTOR_PROTOCOL_WITNESS:%.*]])
307+
// CHECK: define linkonce_odr hidden swift{{(tail)?}}cc void @"$s27distributed_actor_accessors7MyActorC11genericArgsyyx_Sayq_GtYaKSeRzSERzSeR_SER_r0_lFTETF"(ptr swiftasync %0, ptr [[ARG_DECODER:%.*]], ptr [[ARG_TYPES:%.*]], ptr [[RESULT_BUF:%.*]], ptr [[GENERIC_SUBS:%.*]], ptr [[WITNESS_TABLES:%.*]], i64 [[NUM_WITNESS_TABLES:%.*]], ptr [[ACTOR:%.*]], ptr [[DECODER_TYPE:%.*]], ptr [[DECODER_PROTOCOL_WITNESS:%.*]])
308308

309309
/// ---> Load `T`
310310

@@ -353,7 +353,7 @@ public distributed actor MyOtherActor {
353353

354354
/// Let's check that there is argument decoding since parameter list is empty
355355

356-
// CHECK: define linkonce_odr hidden swift{{(tail)?}}cc void @"$s27distributed_actor_accessors12MyOtherActorC5emptyyyYaKFTETF"(ptr swiftasync {{.*}}, ptr [[ARG_DECODER:%.*]], ptr [[ARG_TYPES:%.*]], ptr [[RESULT_BUFF:%.*]], ptr [[SUBS:%.*]], ptr [[WITNESS_TABLES:%.*]], i64 [[NUM_WITNESS_TABLES:%.*]], ptr {{.*}}, ptr [[DECODER_TYPE:%.*]], ptr [[DECODER_PROTOCOL_WITNESS:%.*]], ptr [[ACTOR_PROTOCOL_WITNESS:%.*]])
356+
// CHECK: define linkonce_odr hidden swift{{(tail)?}}cc void @"$s27distributed_actor_accessors12MyOtherActorC5emptyyyYaKFTETF"(ptr swiftasync {{.*}}, ptr [[ARG_DECODER:%.*]], ptr [[ARG_TYPES:%.*]], ptr [[RESULT_BUFF:%.*]], ptr [[SUBS:%.*]], ptr [[WITNESS_TABLES:%.*]], i64 [[NUM_WITNESS_TABLES:%.*]], ptr {{.*}}, ptr [[DECODER_TYPE:%.*]], ptr [[DECODER_PROTOCOL_WITNESS:%.*]])
357357
// CHECK-NEXT: entry:
358358
// CHECK-NEXT: {{.*}} = alloca ptr
359359
// CHECK-NEXT: %swifterror = alloca swifterror ptr

0 commit comments

Comments
 (0)