@@ -31,18 +31,21 @@ class DeclContext;
31
31
class FuncDecl ;
32
32
class NominalTypeDecl ;
33
33
34
- // / Determine the distributed actor transport type for the given actor.
34
+ // / Determine the `ActorSystem` type for the given actor.
35
35
Type getDistributedActorSystemType (NominalTypeDecl *actor);
36
36
37
- // / Determine the distributed actor identity type for the given actor.
37
+ // / Determine the `ID` type for the given actor.
38
38
Type getDistributedActorIDType (NominalTypeDecl *actor);
39
39
40
40
Type getDistributedActorSystemSerializationRequirementType (
41
41
NominalTypeDecl *system);
42
42
43
+ Type getDistributedActorSystemActorIDRequirementType (
44
+ NominalTypeDecl *system);
45
+
43
46
// / Determine the serialization requirement for the given actor, actor system
44
47
// / or other type that has the SerializationRequirement associated type.
45
- Type getDistributedSerializationRequirementType (NominalTypeDecl *nominal );
48
+ Type getDistributedSerializationRequirementType (NominalTypeDecl *actor );
46
49
47
50
// / Get the specific protocols that the `SerializationRequirement` specifies,
48
51
// / and all parameters / return types of distributed targets must conform to.
@@ -54,17 +57,29 @@ Type getDistributedSerializationRequirementType(NominalTypeDecl *nominal);
54
57
llvm::SmallPtrSet<ProtocolDecl *, 2 >
55
58
getDistributedSerializationRequirementProtocols (NominalTypeDecl *decl);
56
59
60
+ // / Desugar and flatten the `SerializationRequirement` type into a set of
61
+ // / specific protocol declarations.
57
62
llvm::SmallPtrSet<ProtocolDecl *, 2 >
58
63
flattenDistributedSerializationTypeToRequiredProtocols (
59
64
TypeBase *serializationRequirement);
60
65
61
66
// / Check if the `allRequirements` represent *exactly* the
62
67
// / `Encodable & Decodable` (also known as `Codable`) requirement.
68
+ // /
63
69
// / If so, we can emit slightly nicer diagnostics.
64
70
bool checkDistributedSerializationRequirementIsExactlyCodable (
65
71
ASTContext &C,
66
72
const llvm::SmallPtrSetImpl<ProtocolDecl *> &allRequirements);
67
73
74
+ // / Get the `SerializationRequirement`, explode it into the specific
75
+ // / protocol requirements and insert them into `requirements`.
76
+ // /
77
+ // / Returns false if failed to get the protocol decls.
78
+ bool
79
+ getDistributedActorSystemSerializationRequirements (
80
+ NominalTypeDecl *systemDecl,
81
+ llvm::SmallPtrSetImpl<ProtocolDecl *> &requirementProtos);
82
+
68
83
// / Given any set of generic requirements, locate those which are about the
69
84
// / `SerializationRequirement`. Those need to be applied in the parameter and
70
85
// / return type checking of distributed targets.
0 commit comments