@@ -154,7 +154,7 @@ extension DistributedActorSystem {
154
154
public func executeDistributedTarget< Act, ResultHandler> (
155
155
on actor : Act ,
156
156
mangledTargetName: String ,
157
- invocationDecoder: InvocationDecoder ,
157
+ invocationDecoder: inout InvocationDecoder ,
158
158
handler: ResultHandler
159
159
) async throws where Act: DistributedActor ,
160
160
// Act.ID == ActorID, // FIXME(distributed): can we bring this back?
@@ -289,7 +289,7 @@ extension DistributedActorSystem {
289
289
try await _executeDistributedTarget (
290
290
on: actor ,
291
291
mangledTargetName, UInt ( mangledTargetName. count) ,
292
- argumentDecoder: invocationDecoder,
292
+ argumentDecoder: & invocationDecoder,
293
293
argumentTypes: argumentTypesBuffer. baseAddress!. _rawValue,
294
294
resultBuffer: resultBuffer. _rawValue,
295
295
substitutions: UnsafeRawPointer ( substitutionsBuffer) ,
@@ -309,10 +309,10 @@ extension DistributedActorSystem {
309
309
310
310
@available ( SwiftStdlib 5 . 7 , * )
311
311
@_silgen_name ( " swift_distributed_execute_target " )
312
- func _executeDistributedTarget(
312
+ func _executeDistributedTarget< D : DistributedTargetInvocationDecoder > (
313
313
on actor : AnyObject , // DistributedActor
314
314
_ targetName: UnsafePointer < UInt8 > , _ targetNameLength: UInt ,
315
- argumentDecoder: AnyObject , // concrete type for `InvocationDecoder`
315
+ argumentDecoder: inout D ,
316
316
argumentTypes: Builtin . RawPointer ,
317
317
resultBuffer: Builtin . RawPointer ,
318
318
substitutions: UnsafeRawPointer ? ,
@@ -400,10 +400,10 @@ public protocol DistributedTargetInvocationEncoder {
400
400
401
401
/// Decoder that must be provided to `executeDistributedTarget` and is used
402
402
/// by the Swift runtime to decode arguments of the invocation.
403
- public protocol DistributedTargetInvocationDecoder : AnyObject {
403
+ public protocol DistributedTargetInvocationDecoder {
404
404
associatedtype SerializationRequirement
405
405
406
- func decodeGenericSubstitutions( ) throws -> [ Any . Type ]
406
+ mutating func decodeGenericSubstitutions( ) throws -> [ Any . Type ]
407
407
408
408
// /// Ad-hoc protocol requirement
409
409
// ///
@@ -420,9 +420,9 @@ public protocol DistributedTargetInvocationDecoder : AnyObject {
420
420
// /// performs the actual distributed (local) instance method invocation.
421
421
// mutating func decodeNextArgument<Argument: SerializationRequirement>() throws -> Argument
422
422
423
- func decodeErrorType( ) throws -> Any . Type ?
423
+ mutating func decodeErrorType( ) throws -> Any . Type ?
424
424
425
- func decodeReturnType( ) throws -> Any . Type ?
425
+ mutating func decodeReturnType( ) throws -> Any . Type ?
426
426
}
427
427
428
428
@available ( SwiftStdlib 5 . 7 , * )
0 commit comments