Skip to content

Commit 06b658c

Browse files
authored
Merge pull request #69030 from hborla/isolated-default-value-flag
[Concurrency] Rename `IsolatedDefaultArguments` to `IsolatedDefaultValues`.
2 parents 5a9807a + 5a81c00 commit 06b658c

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

include/swift/Basic/Features.def

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,8 @@ EXPERIMENTAL_FEATURE(SendNonSendable, false)
222222
/// Within strict concurrency, narrow global variable isolation requirements.
223223
EXPERIMENTAL_FEATURE(GlobalConcurrency, false)
224224

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

228228
/// Enable extended callbacks (with additional parameters) to be used when the
229229
/// "playground transform" is enabled.

lib/AST/ASTPrinter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3551,7 +3551,7 @@ static bool usesFeatureSendNonSendable(Decl *decl) {
35513551

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

3554-
static bool usesFeatureIsolatedDefaultArguments(Decl *decl) {
3554+
static bool usesFeatureIsolatedDefaultValues(Decl *decl) {
35553555
return false;
35563556
}
35573557

lib/AST/Decl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10472,7 +10472,7 @@ ActorIsolation swift::getActorIsolationOfContext(
1047210472
// that meet the required isolation.
1047310473
if (auto *var = dcToUse->getNonLocalVarDecl()) {
1047410474
auto &ctx = dc->getASTContext();
10475-
if (ctx.LangOpts.hasFeature(Feature::IsolatedDefaultArguments) &&
10475+
if (ctx.LangOpts.hasFeature(Feature::IsolatedDefaultValues) &&
1047610476
var->isInstanceMember() &&
1047710477
!var->getAttrs().hasAttribute<LazyAttr>()) {
1047810478
return ActorIsolation::forNonisolated();

lib/Sema/TypeCheckConcurrency.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2277,7 +2277,7 @@ namespace {
22772277
ActorIsolation computeRequiredIsolation(Expr *expr) {
22782278
auto &ctx = getDeclContext()->getASTContext();
22792279

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

22832283
expr->walk(*this);

test/Concurrency/isolated_default_arguments.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

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

5-
// 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
6-
// 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
5+
// 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
6+
// 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
77

88
// REQUIRES: concurrency
99
// REQUIRES: asserts

test/Concurrency/isolated_default_arguments_serialized.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// RUN: %empty-directory(%t)
2-
// 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
2+
// 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
33

44
// RUN: %target-swift-frontend %s -emit-sil -o /dev/null -verify -disable-availability-checking -swift-version 6 -I %t
5-
// 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
5+
// 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
66

77
// REQUIRES: concurrency
88
// REQUIRES: asserts

test/Concurrency/isolated_default_property_inits.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

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

5-
// 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
6-
// 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
5+
// 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
6+
// 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
77

88
// REQUIRES: concurrency
99
// REQUIRES: asserts

0 commit comments

Comments
 (0)