@@ -4759,9 +4759,8 @@ getIsolationFromAttributes(const Decl *decl, bool shouldDiagnose = true,
47594759 // NOTE: This needs to occur before we handle an explicit nonisolated attr,
47604760 // since if @execution and nonisolated are used together, we want to ensure
47614761 // 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.
47654764 if (concurrentExecutionAttr) {
47664765 switch (concurrentExecutionAttr->getBehavior ()) {
47674766 case ExecutionKind::Concurrent:
@@ -4777,7 +4776,7 @@ getIsolationFromAttributes(const Decl *decl, bool shouldDiagnose = true,
47774776 // If the nonisolated async inherits isolation from context is set, return
47784777 // caller isolation inheriting.
47794778 if (decl->getASTContext ().LangOpts .hasFeature (
4780- Feature::NonIsolatedAsyncInheritsIsolationFromContext )) {
4779+ Feature::AsyncCallerExecution )) {
47814780 if (auto *func = dyn_cast<AbstractFunctionDecl>(decl);
47824781 func && func->hasAsync () &&
47834782 func->getModuleContext () == decl->getASTContext ().MainModule ) {
@@ -5612,8 +5611,7 @@ computeDefaultInferredActorIsolation(ValueDecl *value) {
56125611 }
56135612
56145613 // 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)) {
56175615 if (auto *func = dyn_cast<AbstractFunctionDecl>(value);
56185616 func && func->hasAsync () &&
56195617 func->getModuleContext () == ctx.MainModule ) {
@@ -5702,8 +5700,8 @@ InferredActorIsolation ActorIsolationRequest::evaluate(
57025700 // did not have an ExecutionKind::Caller attached to it.
57035701 //
57045702 // 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.
57075705 if (isolationFromAttr && isolationFromAttr->getKind () ==
57085706 ActorIsolation::CallerIsolationInheriting &&
57095707 !value->getAttrs ().hasAttribute <ExecutionAttr>()) {
@@ -6001,7 +5999,7 @@ InferredActorIsolation ActorIsolationRequest::evaluate(
60015999
60026000 if (auto *func = dyn_cast<AbstractFunctionDecl>(value);
60036001 ctx.LangOpts .hasFeature (
6004- Feature::NonIsolatedAsyncInheritsIsolationFromContext ) &&
6002+ Feature::AsyncCallerExecution ) &&
60056003 func && func->hasAsync () &&
60066004 func->getModuleContext () == ctx.MainModule &&
60076005 isolation.isNonisolated ()) {
0 commit comments