@@ -4759,9 +4759,8 @@ getIsolationFromAttributes(const Decl *decl, bool shouldDiagnose = true,
4759
4759
// NOTE: This needs to occur before we handle an explicit nonisolated attr,
4760
4760
// since if @execution and nonisolated are used together, we want to ensure
4761
4761
// that @execution takes priority. This ensures that if we import code from a
4762
- // module that was compiled with a different value for
4763
- // NonIsolatedAsyncInheritsIsolationFromContext, we get the semantics of the
4764
- // source module.
4762
+ // module that was compiled with a different value for AsyncCallerExecution,
4763
+ // we get the semantics of the source module.
4765
4764
if (concurrentExecutionAttr) {
4766
4765
switch (concurrentExecutionAttr->getBehavior ()) {
4767
4766
case ExecutionKind::Concurrent:
@@ -4777,7 +4776,7 @@ getIsolationFromAttributes(const Decl *decl, bool shouldDiagnose = true,
4777
4776
// If the nonisolated async inherits isolation from context is set, return
4778
4777
// caller isolation inheriting.
4779
4778
if (decl->getASTContext ().LangOpts .hasFeature (
4780
- Feature::NonIsolatedAsyncInheritsIsolationFromContext )) {
4779
+ Feature::AsyncCallerExecution )) {
4781
4780
if (auto *func = dyn_cast<AbstractFunctionDecl>(decl);
4782
4781
func && func->hasAsync () &&
4783
4782
func->getModuleContext () == decl->getASTContext ().MainModule ) {
@@ -5612,8 +5611,7 @@ computeDefaultInferredActorIsolation(ValueDecl *value) {
5612
5611
}
5613
5612
5614
5613
// If we have an async function... by default we inherit isolation.
5615
- if (ctx.LangOpts .hasFeature (
5616
- Feature::NonIsolatedAsyncInheritsIsolationFromContext)) {
5614
+ if (ctx.LangOpts .hasFeature (Feature::AsyncCallerExecution)) {
5617
5615
if (auto *func = dyn_cast<AbstractFunctionDecl>(value);
5618
5616
func && func->hasAsync () &&
5619
5617
func->getModuleContext () == ctx.MainModule ) {
@@ -5702,8 +5700,8 @@ InferredActorIsolation ActorIsolationRequest::evaluate(
5702
5700
// did not have an ExecutionKind::Caller attached to it.
5703
5701
//
5704
5702
// DISCUSSION: This occurs when we have a value decl that is explicitly marked
5705
- // as nonisolated but since NonIsolatedAsyncInheritsIsolationFromContext is
5706
- // enabled, we return CallerIsolationInheriting.
5703
+ // as nonisolated but since AsyncCallerExecution is enabled, we return
5704
+ // CallerIsolationInheriting.
5707
5705
if (isolationFromAttr && isolationFromAttr->getKind () ==
5708
5706
ActorIsolation::CallerIsolationInheriting &&
5709
5707
!value->getAttrs ().hasAttribute <ExecutionAttr>()) {
@@ -6001,7 +5999,7 @@ InferredActorIsolation ActorIsolationRequest::evaluate(
6001
5999
6002
6000
if (auto *func = dyn_cast<AbstractFunctionDecl>(value);
6003
6001
ctx.LangOpts .hasFeature (
6004
- Feature::NonIsolatedAsyncInheritsIsolationFromContext ) &&
6002
+ Feature::AsyncCallerExecution ) &&
6005
6003
func && func->hasAsync () &&
6006
6004
func->getModuleContext () == ctx.MainModule &&
6007
6005
isolation.isNonisolated ()) {
0 commit comments