@@ -489,11 +489,11 @@ namespace {
489
489
SGFContext C);
490
490
491
491
// / Helper method for handling function conversion expr to
492
- // / @execution(caller ). Returns an empty RValue on failure.
492
+ // / nonisolated(nonsending ). Returns an empty RValue on failure.
493
493
RValue emitFunctionCvtToExecutionCaller (FunctionConversionExpr *E,
494
494
SGFContext C);
495
495
// / Helper method for handling function conversion expr to a global actor
496
- // / from an @execution(caller ) function.
496
+ // / from an nonisolated(nonsending ) function.
497
497
RValue
498
498
emitFunctionCvtFromExecutionCallerToGlobalActor (FunctionConversionExpr *E,
499
499
SGFContext C);
@@ -1968,17 +1968,17 @@ RValueEmitter::emitFunctionCvtToExecutionCaller(FunctionConversionExpr *e,
1968
1968
//
1969
1969
// Swift 6:
1970
1970
//
1971
- // (fn_cvt_expr type="@execution(caller ) () async -> ()"
1972
- // (fn_cvt_expr type="@execution(caller ) @Sendable () async -> ()"
1971
+ // (fn_cvt_expr type="nonisolated(nonsending ) () async -> ()"
1972
+ // (fn_cvt_expr type="nonisolated(nonsending ) @Sendable () async -> ()"
1973
1973
// (declref_expr type="() async -> ()"
1974
1974
//
1975
1975
// Swift 5:
1976
1976
//
1977
- // (fn_cvt_expr type="@execution(caller ) () async -> ()"
1977
+ // (fn_cvt_expr type="nonisolated(nonsending ) () async -> ()"
1978
1978
// (declref_expr type="() async -> ()"
1979
1979
//
1980
1980
// The @Sendable in Swift 6 mode is due to us not representing
1981
- // @execution(caller ) or @Sendable in the constraint evaluator.
1981
+ // nonisolated(nonsending ) or @Sendable in the constraint evaluator.
1982
1982
//
1983
1983
// The reason why we need to evaluate this especially is that otherwise we
1984
1984
// generate multiple
@@ -2038,7 +2038,7 @@ RValue RValueEmitter::emitFunctionCvtFromExecutionCallerToGlobalActor(
2038
2038
// We are pattern matching a conversion sequence like the following:
2039
2039
//
2040
2040
// (fn_cvt_expr implicit type="@GlobalActor @Sendable () async -> ()
2041
- // (fn_cvt_expr implicit type="@execution(caller ) @Sendable () async -> ()"
2041
+ // (fn_cvt_expr implicit type="nonisolated(nonsending ) @Sendable () async -> ()"
2042
2042
// (declref_expr type="() async -> ()"
2043
2043
//
2044
2044
// Where the declref referred to by the declref_expr has execution(caller)
@@ -2047,9 +2047,9 @@ RValue RValueEmitter::emitFunctionCvtFromExecutionCallerToGlobalActor(
2047
2047
// fix it up later.
2048
2048
//
2049
2049
// What we want to emit first a direct reference to the caller as an
2050
- // @execution(caller ) function, then we convert it to @execution(caller )
2051
- // @Sendable. Finally, we thunk @execution(caller ) to @GlobalActor. The
2052
- // thunking is important so that we can ensure that @execution(caller ) runs on
2050
+ // nonisolated(nonsending ) function, then we convert it to nonisolated(nonsending )
2051
+ // @Sendable. Finally, we thunk nonisolated(nonsending ) to @GlobalActor. The
2052
+ // thunking is important so that we can ensure that nonisolated(nonsending ) runs on
2053
2053
// that specific @GlobalActor.
2054
2054
2055
2055
CanAnyFunctionType destType =
@@ -2201,13 +2201,13 @@ RValue RValueEmitter::visitFunctionConversionExpr(FunctionConversionExpr *e,
2201
2201
}
2202
2202
}
2203
2203
2204
- // Check if we are converting a function to an @execution(caller ) from a
2205
- // declref that is also @execution(caller ). In such a case, this was a case
2204
+ // Check if we are converting a function to an nonisolated(nonsending ) from a
2205
+ // declref that is also nonisolated(nonsending ). In such a case, this was a case
2206
2206
// that was put in by Sema. We do not need a thunk, but just need to recognize
2207
2207
// this case and elide the conversion. The reason why we need to do this is
2208
- // that otherwise, we put in extra thunks that convert @execution(caller ) to
2209
- // @execution( concurrent) back to @execution(caller ). This is done b/c we do
2210
- // not represent @execution(caller ) in interface types, so the actual decl ref
2208
+ // that otherwise, we put in extra thunks that convert nonisolated(nonsending ) to
2209
+ // @concurrent back to nonisolated(nonsending ). This is done b/c we do
2210
+ // not represent nonisolated(nonsending ) in interface types, so the actual decl ref
2211
2211
// will be viewed as @async () -> ().
2212
2212
if (destType->getIsolation ().isNonIsolatedCaller ()) {
2213
2213
if (RValue rv = emitFunctionCvtToExecutionCaller (e, C))
0 commit comments