Skip to content

[Distributed] Complete remote actor resolve() implementation in SIL #38823

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

ktoso
Copy link
Contributor

@ktoso ktoso commented Aug 10, 2021

This builds on #38822 [Distributed] Initializer and lifecycle call synthesis via SIL, and pulls in @kavon's work from #38739

I then continued completing the SIL impl to set properties -- almost there...

@ktoso ktoso changed the title Wip inject lifecycle ctors distributed 3 [WIP][Distributed] Complete remote actor resolve() implementation in SIL Aug 10, 2021
@ktoso ktoso marked this pull request as draft August 10, 2021 14:58
Copy link
Member

@kavon kavon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you delete the binary file lol from this PR? I think you added by mistake. 😆

@ktoso ktoso force-pushed the wip-inject-lifecycle-ctors-distributed-3 branch from d86175d to 25308f5 Compare August 12, 2021 01:44
ktoso and others added 11 commits August 12, 2021 14:04
1. We're no longer synthesizing the local
init. All designated inits of a dist actor
must have exactly one ActorTransport parameter.
This parameter is used in the init's prologue
to initialize some of its members.

2. We're synthesizing a factory function for
the resolve initialization, instead of an
actor-member named `init` to serve that
purpose.

As such, much of the earlier infrastructure
is no longer needed, etc.
We'd like to support factor initializers
for distributed actor types that are
synthesized by SILGen.

We already do something similar for
memberwise initializers for structs.
Thus, this patch generalizes that
concept into a new BodyKind for
AbstractFunctionDecls called
BodyKind::SILSynthesize.

In addition, to help differentiate the
kinds of AFDs that are SILSynthesized
into different families for SILGen to
recognize, we also have a new enum
SILSynthesizeKind to indicate whether it
is a memberwise init, etc.
@ktoso ktoso force-pushed the wip-inject-lifecycle-ctors-distributed-3 branch from 40fbea3 to a33f8cd Compare August 12, 2021 05:05
@ktoso ktoso force-pushed the wip-inject-lifecycle-ctors-distributed-3 branch from a33f8cd to 829a5d6 Compare August 12, 2021 05:09
@ktoso
Copy link
Contributor Author

ktoso commented Aug 12, 2021

@swift-ci please smoke test

@ktoso ktoso changed the title [WIP][Distributed] Complete remote actor resolve() implementation in SIL [Distributed] Complete remote actor resolve() implementation in SIL Aug 12, 2021
@ktoso ktoso added the distributed Feature → concurrency: distributed actor label Aug 12, 2021
@ktoso ktoso marked this pull request as ready for review August 12, 2021 05:11
@ktoso ktoso force-pushed the wip-inject-lifecycle-ctors-distributed-3 branch from 517512f to b4e8bbb Compare August 12, 2021 08:37
@ktoso ktoso force-pushed the wip-inject-lifecycle-ctors-distributed-3 branch from 1255661 to a721856 Compare August 12, 2021 09:22
@ktoso
Copy link
Contributor Author

ktoso commented Aug 12, 2021

@swift-ci please smoke test and merge

@ktoso
Copy link
Contributor Author

ktoso commented Aug 12, 2021

lol and removed the lol file as well! 😆

@ktoso ktoso force-pushed the wip-inject-lifecycle-ctors-distributed-3 branch from a721856 to bf37ba6 Compare August 12, 2021 10:35
@ktoso
Copy link
Contributor Author

ktoso commented Aug 12, 2021

Actually do need one of those extra ensureDistributedModuleLoaded.

@ktoso
Copy link
Contributor Author

ktoso commented Aug 12, 2021

@swift-ci please smoke test and merge

@swift-ci swift-ci merged commit 06686a9 into swiftlang:main Aug 12, 2021
@ktoso ktoso deleted the wip-inject-lifecycle-ctors-distributed-3 branch August 12, 2021 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
distributed Feature → concurrency: distributed actor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants