Skip to content

[Concurrency] Rename IsolatedDefaultArguments to IsolatedDefaultValues. #69030

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 1 commit into from
Oct 7, 2023
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
4 changes: 2 additions & 2 deletions include/swift/Basic/Features.def
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,8 @@ EXPERIMENTAL_FEATURE(SendNonSendable, false)
/// Within strict concurrency, narrow global variable isolation requirements.
EXPERIMENTAL_FEATURE(GlobalConcurrency, false)

/// Allow default arguments to require isolation at the call-site.
EXPERIMENTAL_FEATURE(IsolatedDefaultArguments, false)
/// Allow default values to require isolation at the call-site.
EXPERIMENTAL_FEATURE(IsolatedDefaultValues, false)

/// Enable extended callbacks (with additional parameters) to be used when the
/// "playground transform" is enabled.
Expand Down
2 changes: 1 addition & 1 deletion lib/AST/ASTPrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3551,7 +3551,7 @@ static bool usesFeatureSendNonSendable(Decl *decl) {

static bool usesFeatureGlobalConcurrency(Decl *decl) { return false; }

static bool usesFeatureIsolatedDefaultArguments(Decl *decl) {
static bool usesFeatureIsolatedDefaultValues(Decl *decl) {
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/AST/Decl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10472,7 +10472,7 @@ ActorIsolation swift::getActorIsolationOfContext(
// that meet the required isolation.
if (auto *var = dcToUse->getNonLocalVarDecl()) {
auto &ctx = dc->getASTContext();
if (ctx.LangOpts.hasFeature(Feature::IsolatedDefaultArguments) &&
if (ctx.LangOpts.hasFeature(Feature::IsolatedDefaultValues) &&
var->isInstanceMember() &&
!var->getAttrs().hasAttribute<LazyAttr>()) {
return ActorIsolation::forNonisolated();
Expand Down
2 changes: 1 addition & 1 deletion lib/Sema/TypeCheckConcurrency.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2277,7 +2277,7 @@ namespace {
ActorIsolation computeRequiredIsolation(Expr *expr) {
auto &ctx = getDeclContext()->getASTContext();

if (ctx.LangOpts.hasFeature(Feature::IsolatedDefaultArguments))
if (ctx.LangOpts.hasFeature(Feature::IsolatedDefaultValues))
requiredIsolationLoc = expr->getLoc();

expr->walk(*this);
Expand Down
4 changes: 2 additions & 2 deletions test/Concurrency/isolated_default_arguments.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

// RUN: %target-swift-frontend -emit-module -emit-module-path %t/OtherActors.swiftmodule -module-name OtherActors %S/Inputs/OtherActors.swift -disable-availability-checking

// RUN: %target-swift-frontend -I %t -disable-availability-checking -strict-concurrency=complete -enable-experimental-feature IsolatedDefaultArguments -parse-as-library -emit-sil -o /dev/null -verify %s
// RUN: %target-swift-frontend -I %t -disable-availability-checking -strict-concurrency=complete -parse-as-library -emit-sil -o /dev/null -verify -enable-experimental-feature IsolatedDefaultArguments -enable-experimental-feature SendNonSendable %s
// RUN: %target-swift-frontend -I %t -disable-availability-checking -strict-concurrency=complete -enable-experimental-feature IsolatedDefaultValues -parse-as-library -emit-sil -o /dev/null -verify %s
// RUN: %target-swift-frontend -I %t -disable-availability-checking -strict-concurrency=complete -parse-as-library -emit-sil -o /dev/null -verify -enable-experimental-feature IsolatedDefaultValues -enable-experimental-feature SendNonSendable %s

// REQUIRES: concurrency
// REQUIRES: asserts
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -emit-module -swift-version 5 -emit-module-path %t/SerializedDefaultArguments.swiftmodule -module-name SerializedDefaultArguments -enable-experimental-feature IsolatedDefaultArguments %S/Inputs/serialized_default_arguments.swift
// RUN: %target-swift-frontend -emit-module -swift-version 5 -emit-module-path %t/SerializedDefaultArguments.swiftmodule -module-name SerializedDefaultArguments -enable-experimental-feature IsolatedDefaultValues %S/Inputs/serialized_default_arguments.swift

// RUN: %target-swift-frontend %s -emit-sil -o /dev/null -verify -disable-availability-checking -swift-version 6 -I %t
// RUN: %target-swift-frontend %s -emit-sil -o /dev/null -verify -disable-availability-checking -swift-version 6 -I %t -enable-experimental-feature SendNonSendable -enable-experimental-feature IsolatedDefaultArguments
// RUN: %target-swift-frontend %s -emit-sil -o /dev/null -verify -disable-availability-checking -swift-version 6 -I %t -enable-experimental-feature SendNonSendable -enable-experimental-feature IsolatedDefaultValues

// REQUIRES: concurrency
// REQUIRES: asserts
Expand Down
4 changes: 2 additions & 2 deletions test/Concurrency/isolated_default_property_inits.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

// RUN: %target-swift-frontend -emit-module -emit-module-path %t/OtherActors.swiftmodule -module-name OtherActors %S/Inputs/OtherActors.swift -disable-availability-checking

// RUN: %target-swift-frontend -I %t -disable-availability-checking -strict-concurrency=complete -enable-experimental-feature IsolatedDefaultArguments -parse-as-library -emit-sil -o /dev/null -verify %s
// RUN: %target-swift-frontend -I %t -disable-availability-checking -strict-concurrency=complete -parse-as-library -emit-sil -o /dev/null -verify -enable-experimental-feature IsolatedDefaultArguments -enable-experimental-feature SendNonSendable %s
// RUN: %target-swift-frontend -I %t -disable-availability-checking -strict-concurrency=complete -enable-experimental-feature IsolatedDefaultValues -parse-as-library -emit-sil -o /dev/null -verify %s
// RUN: %target-swift-frontend -I %t -disable-availability-checking -strict-concurrency=complete -parse-as-library -emit-sil -o /dev/null -verify -enable-experimental-feature IsolatedDefaultValues -enable-experimental-feature SendNonSendable %s

// REQUIRES: concurrency
// REQUIRES: asserts
Expand Down