Skip to content

Commit 485965a

Browse files
Reviewed code comments. Fixed typos and addressed some TODOs
1 parent 72cad34 commit 485965a

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

lib/SIL/IR/SILFunctionType.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2873,8 +2873,8 @@ static CanSILFunctionType getNativeSILFunctionType(
28732873
// with runtime function. The latter expects 'work' argument to be
28742874
// SWIFT_CC(swift) aka @convention(thin). But the 'self' parameter must
28752875
// remain owned.
2876-
return getSILFunctionTypeForConventions(DeallocatorConventions())
2877-
->getWithExtInfo(SILFunctionType::ExtInfo::getThin());
2876+
return getSILFunctionTypeForConventions(
2877+
DefaultConventions(NormalParameterConvention::Owned));
28782878
}
28792879

28802880
case SILDeclRef::Kind::AsyncEntryPoint:
@@ -4091,6 +4091,7 @@ TypeConverter::getDeclRefRepresentation(SILDeclRef c) {
40914091
case SILDeclRef::Kind::StoredPropertyInitializer:
40924092
case SILDeclRef::Kind::PropertyWrapperBackingInitializer:
40934093
case SILDeclRef::Kind::PropertyWrapperInitFromProjectedValue:
4094+
case SILDeclRef::Kind::IsolatedDeallocator:
40944095
return SILFunctionTypeRepresentation::Thin;
40954096

40964097
case SILDeclRef::Kind::Func:
@@ -4102,7 +4103,6 @@ TypeConverter::getDeclRefRepresentation(SILDeclRef c) {
41024103

41034104
case SILDeclRef::Kind::Destroyer:
41044105
case SILDeclRef::Kind::Deallocator:
4105-
case SILDeclRef::Kind::IsolatedDeallocator: // TODO: Double-check this
41064106
case SILDeclRef::Kind::Allocator:
41074107
case SILDeclRef::Kind::Initializer:
41084108
case SILDeclRef::Kind::EnumElement:

lib/SILGen/SILGenDestructor.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,6 @@ void SILGenFunction::emitIsolatingDestructor(DestructorDecl *dd) {
373373
B.createConvertFunction(loc, dtx, workFuncType, false);
374374

375375
// Schedule isolated execution
376-
// TODO: Make sure it is a tail call
377376
auto result = B.createApply(loc, swiftPerformOnExecutorFunc, {},
378377
{castedSelf, castedDeallocator, executor});
379378
B.createReturn(loc, result);

lib/Sema/TypeCheckConcurrency.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4954,7 +4954,7 @@ static OverrideIsolationResult validOverrideIsolation(
49544954
auto &ctx = declContext->getASTContext();
49554955

49564956
// Normally we are checking if overriding declaration can be called by calling
4957-
// overriden declaration But in case of destructors, overriden declaration is
4957+
// overriden declaration. But in case of destructors, overriden declaration is
49584958
// always callable by definition and we are checking that subclas deinit can
49594959
// call super deinit.
49604960
bool isDtor = isa<DestructorDecl>(value);
@@ -5113,7 +5113,8 @@ ActorIsolation ActorIsolationRequest::evaluate(
51135113
assert(actor && "could not find the actor that 'self' is isolated to");
51145114

51155115
// Bootstrapping hack: force _Concurrency.MainActor.deinit() to be
5116-
// non-isolated
5116+
// non-isolated even when importing from SDK's swiftmodule without
5117+
// `nonisolated` attribute.
51175118
if (isa<DestructorDecl>(value) && actor->getName().is("MainActor") &&
51185119
actor->getDeclContext()->isModuleScopeContext() &&
51195120
actor->getDeclContext()->getParentModule()->getABIName().is("Swift")) {

0 commit comments

Comments
 (0)