Revert "Isolated synchronous deinit"

This commit is contained in:
Alex Hoppen
2024-09-03 18:11:26 -07:00
committed by GitHub
parent de963486d0
commit c5aa49ba64
88 changed files with 509 additions and 4226 deletions

View File

@@ -992,25 +992,3 @@ bool Lowering::usesObjCAllocator(ClassDecl *theClass) {
// allocation methods because they may have been overridden.
return theClass->getObjectModel() == ReferenceCounting::ObjC;
}
bool Lowering::needsIsolatingDestructor(DestructorDecl *dd) {
auto ai = swift::getActorIsolation(dd);
if (!ai.isActorIsolated()) {
return false;
}
DestructorDecl *firstIsolated = dd;
while (true) {
DestructorDecl *next = firstIsolated->getSuperDeinit();
if (!next)
break;
auto ai = swift::getActorIsolation(next);
if (!ai.isActorIsolated())
break;
firstIsolated = next;
}
// If isolation was introduced in ObjC code, then we assume that ObjC code
// also overrides retain/release to make sure that dealloc is called on the
// correct executor in the first place.
return firstIsolated->getClangNode().isNull();
}