Skip to content

Fully remove distributed checks #42008

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
merged 2 commits into from
Mar 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions include/swift/AST/Attr.def
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,6 @@ SIMPLE_DECL_ATTR(_inheritActorContext, InheritActorContext,

CONTEXTUAL_SIMPLE_DECL_ATTR(distributed, DistributedActor,
DeclModifier | OnClass | OnFunc | OnVar |
DistributedOnly |
ABIBreakingToAdd | ABIBreakingToRemove |
APIBreakingToAdd | APIBreakingToRemove,
118)
Expand Down Expand Up @@ -723,7 +722,6 @@ DECL_ATTR(_backDeploy, BackDeploy,

CONTEXTUAL_SIMPLE_DECL_ATTR(_local, KnownToBeLocal,
DeclModifier | OnFunc | OnParam | OnVar |
DistributedOnly |
ABIBreakingToAdd | ABIBreakingToRemove |
APIBreakingToAdd | APIBreakingToRemove,
130)
Expand Down
9 changes: 1 addition & 8 deletions include/swift/AST/Attr.h
Original file line number Diff line number Diff line change
Expand Up @@ -287,11 +287,8 @@ class DeclAttribute : public AttributeBase {
/// Whether this attribute is only valid when concurrency is enabled.
ConcurrencyOnly = 1ull << (unsigned(DeclKindIndex::Last_Decl) + 16),

/// Whether this attribute is only valid when distributed is enabled.
DistributedOnly = 1ull << (unsigned(DeclKindIndex::Last_Decl) + 17),

/// Whether this attribute is valid on additional decls in ClangImporter.
OnAnyClangDecl = 1ull << (unsigned(DeclKindIndex::Last_Decl) + 18),
OnAnyClangDecl = 1ull << (unsigned(DeclKindIndex::Last_Decl) + 17),
};

LLVM_READNONE
Expand Down Expand Up @@ -386,10 +383,6 @@ class DeclAttribute : public AttributeBase {
return getOptions(DK) & ConcurrencyOnly;
}

static bool isDistributedOnly(DeclAttrKind DK) {
return getOptions(DK) & DistributedOnly;
}

static bool isUserInaccessible(DeclAttrKind DK) {
return getOptions(DK) & UserInaccessible;
}
Expand Down
3 changes: 0 additions & 3 deletions include/swift/Basic/LangOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -343,9 +343,6 @@ namespace swift {
/// Enable inference of Sendable conformances for public types.
bool EnableInferPublicSendable = false;

/// Enable experimental 'distributed' actors and functions.
bool EnableExperimentalDistributed = true;

/// Enable experimental 'move only' features.
bool EnableExperimentalMoveOnly = false;

Expand Down
9 changes: 0 additions & 9 deletions lib/Frontend/CompilerInvocation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -459,9 +459,6 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
Opts.EnableExperimentalVariadicGenerics |=
Args.hasArg(OPT_enable_experimental_variadic_generics);

Opts.EnableExperimentalDistributed |=
Args.hasArg(OPT_enable_experimental_distributed);

Opts.EnableExperimentalMoveOnly |=
Args.hasArg(OPT_enable_experimental_move_only);

Expand All @@ -485,12 +482,6 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
Opts.DisableImplicitConcurrencyModuleImport |=
Args.hasArg(OPT_disable_implicit_concurrency_module_import);

/// experimental distributed also implicitly enables experimental concurrency
Opts.EnableExperimentalDistributed |=
Args.hasArg(OPT_enable_experimental_distributed);
Opts.EnableExperimentalConcurrency |=
Args.hasArg(OPT_enable_experimental_distributed);

if (Args.hasArg(OPT_enable_experimental_async_top_level))
Diags.diagnose(SourceLoc(), diag::warn_flag_deprecated,
"-enable-experimental-async-top-level");
Expand Down
2 changes: 0 additions & 2 deletions tools/sil-opt/SILOpt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -559,8 +559,6 @@ int main(int argc, char **argv) {
}
Invocation.getLangOptions().EnableExperimentalConcurrency =
EnableExperimentalConcurrency;
Invocation.getLangOptions().EnableExperimentalDistributed =
EnableExperimentalDistributed;
Optional<bool> enableExperimentalMoveOnly =
toOptionalBool(EnableExperimentalMoveOnly);
if (enableExperimentalMoveOnly)
Expand Down
7 changes: 0 additions & 7 deletions tools/swift-ide-test/swift-ide-test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4271,13 +4271,6 @@ int main(int argc, char *argv[]) {
InitInvok.getLangOptions().EnableExperimentalNamedOpaqueTypes = true;
}

if (options::EnableExperimentalDistributed) {
// distributed implies concurrency features:
InitInvok.getLangOptions().EnableExperimentalConcurrency = true;
// enable 'distributed' parsing and features
InitInvok.getLangOptions().EnableExperimentalDistributed = true;
}

if (!options::Triple.empty())
InitInvok.setTargetTriple(options::Triple);
if (!options::SwiftVersion.empty()) {
Expand Down