mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Refactor and generalize distributed actor transport SIL generation.
Refactor the code that generates SIL to call into the distributed actor transport to eliminate duplication and better cope with concrete actor transports. Centralize the knowledge of which actor transport is used with a given distributed actor type.
This commit is contained in:
@@ -299,13 +299,11 @@ static ConstructorDecl *createImplicitConstructor(NominalTypeDecl *decl,
|
||||
// copy access level of distributed actor init from the nominal decl
|
||||
accessLevel = decl->getEffectiveAccess();
|
||||
|
||||
auto transportDecl = ctx.getActorTransportDecl();
|
||||
|
||||
// Create the parameter.
|
||||
auto *arg = new (ctx) ParamDecl(SourceLoc(), Loc, ctx.Id_transport, Loc,
|
||||
ctx.Id_transport, transportDecl);
|
||||
ctx.Id_transport, decl);
|
||||
arg->setSpecifier(ParamSpecifier::Default);
|
||||
arg->setInterfaceType(transportDecl->getDeclaredInterfaceType());
|
||||
arg->setInterfaceType(getDistributedActorTransportType(decl));
|
||||
arg->setImplicit();
|
||||
|
||||
params.push_back(arg);
|
||||
|
||||
Reference in New Issue
Block a user