File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -7908,6 +7908,10 @@ AnyFunctionType *swift::adjustFunctionTypeForConcurrency(
7908
7908
(isa<AbstractFunctionDecl>(decl) &&
7909
7909
cast<AbstractFunctionDecl>(decl)->hasImplicitSelfDecl ()));
7910
7910
if (!hasImplicitSelfDecl) {
7911
+ // Fast path.
7912
+ if (fnType->getExtInfo ().getIsolation () == *funcIsolation)
7913
+ return fnType;
7914
+
7911
7915
return fnType->withExtInfo (
7912
7916
fnType->getExtInfo ().withIsolation (*funcIsolation));
7913
7917
}
@@ -7917,6 +7921,10 @@ AnyFunctionType *swift::adjustFunctionTypeForConcurrency(
7917
7921
if (!innerFnType)
7918
7922
return fnType;
7919
7923
7924
+ // Fast path.
7925
+ if (innerFnType->getExtInfo ().getIsolation () == *funcIsolation)
7926
+ return fnType;
7927
+
7920
7928
// Update the inner function type with the isolation.
7921
7929
innerFnType = innerFnType->withExtInfo (
7922
7930
innerFnType->getExtInfo ().withIsolation (*funcIsolation));
You can’t perform that action at this time.
0 commit comments