@@ -40,11 +40,11 @@ void *swift_distributed_getGenericEnvironment(const char *targetNameStart,
40
40
return accessor ? accessor->GenericEnvironment .get () : nullptr ;
41
41
}
42
42
43
- // / func _executeDistributedTarget(
43
+ // / func _executeDistributedTarget<D: DistributedTargetInvocationDecoder> (
44
44
// / on: AnyObject,
45
45
// / _ targetName: UnsafePointer<UInt8>,
46
46
// / _ targetNameLength: UInt,
47
- // / argumentDecoder: AnyObject ,
47
+ // / argumentDecoder: inout D ,
48
48
// / argumentTypes: UnsafeBufferPointer<Any.Type>,
49
49
// / resultBuffer: Builtin.RawPointer,
50
50
// / substitutions: UnsafeRawPointer?,
@@ -59,7 +59,9 @@ using TargetExecutorSignature =
59
59
/* resultBuffer=*/ void *,
60
60
/* substitutions=*/ void *,
61
61
/* witnessTables=*/ void **,
62
- /* numWitnessTables=*/ size_t ),
62
+ /* numWitnessTables=*/ size_t ,
63
+ /* decoderType=*/ Metadata *,
64
+ /* decoderWitnessTable=*/ void **),
63
65
/* throws=*/ true >;
64
66
65
67
SWIFT_CC (swiftasync)
@@ -75,14 +77,18 @@ TargetExecutorSignature::FunctionType swift_distributed_execute_target;
75
77
// / - a list of witness tables
76
78
// / - a number of witness tables in the buffer
77
79
// / - a reference to an actor to execute method on.
80
+ // / - a type of the argument decoder
81
+ // / - a witness table associated with argument decoder value
78
82
using DistributedAccessorSignature =
79
83
AsyncSignature<void (/* argumentDecoder=*/ HeapObject *,
80
84
/* argumentTypes=*/ const Metadata *const *,
81
85
/* resultBuffer=*/ void *,
82
86
/* substitutions=*/ void *,
83
87
/* witnessTables=*/ void **,
84
88
/* numWitnessTables=*/ size_t ,
85
- /* actor=*/ HeapObject *),
89
+ /* actor=*/ HeapObject *,
90
+ /* decoderType=*/ Metadata *,
91
+ /* decoderWitnessTable=*/ void **),
86
92
/* throws=*/ true >;
87
93
88
94
SWIFT_CC (swiftasync)
@@ -113,7 +119,9 @@ void ::swift_distributed_execute_target(
113
119
void *resultBuffer,
114
120
void *substitutions,
115
121
void **witnessTables,
116
- size_t numWitnessTables) {
122
+ size_t numWitnessTables,
123
+ Metadata *decoderType,
124
+ void **decoderWitnessTable) {
117
125
auto *accessor = findDistributedAccessor (targetNameStart, targetNameLength);
118
126
if (!accessor) {
119
127
assert (false && " no distributed accessor" );
@@ -136,10 +144,13 @@ void ::swift_distributed_execute_target(
136
144
swift_distributed_execute_target_resume);
137
145
138
146
accessorEntry (calleeContext,
139
- argumentDecoder, argumentTypes,
147
+ argumentDecoder,
148
+ argumentTypes,
140
149
resultBuffer,
141
150
substitutions,
142
151
witnessTables,
143
152
numWitnessTables,
144
- actor);
153
+ actor,
154
+ decoderType,
155
+ decoderWitnessTable);
145
156
}
0 commit comments