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(
79087908 (isa<AbstractFunctionDecl>(decl) &&
79097909 cast<AbstractFunctionDecl>(decl)->hasImplicitSelfDecl ()));
79107910 if (!hasImplicitSelfDecl) {
7911+ // Fast path.
7912+ if (fnType->getExtInfo ().getIsolation () == *funcIsolation)
7913+ return fnType;
7914+
79117915 return fnType->withExtInfo (
79127916 fnType->getExtInfo ().withIsolation (*funcIsolation));
79137917 }
@@ -7917,6 +7921,10 @@ AnyFunctionType *swift::adjustFunctionTypeForConcurrency(
79177921 if (!innerFnType)
79187922 return fnType;
79197923
7924+ // Fast path.
7925+ if (innerFnType->getExtInfo ().getIsolation () == *funcIsolation)
7926+ return fnType;
7927+
79207928 // Update the inner function type with the isolation.
79217929 innerFnType = innerFnType->withExtInfo (
79227930 innerFnType->getExtInfo ().withIsolation (*funcIsolation));
You can’t perform that action at this time.
0 commit comments