Skip to content

Commit f04f1de

Browse files
Fixed some typos
1 parent b4a1aab commit f04f1de

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

include/swift/AST/Decl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8762,7 +8762,7 @@ class DestructorDecl : public AbstractFunctionDecl {
87628762
/// Retrieve the Objective-C selector for destructors.
87638763
ObjCSelector getObjCSelector() const;
87648764

8765-
/// Retrives destructor decl from the superclass, or nil if there is no
8765+
/// Retrieves destructor decl from the superclass, or nil if there is no
87668766
/// superclass
87678767
DestructorDecl *getSuperDeinit() const;
87688768

lib/SILGen/SILGenDestructor.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,9 +299,9 @@ bool Lowering::needsIsolatingDestructor(DestructorDecl *dd) {
299299
firstIsolated = next;
300300
}
301301

302-
// If isolation was intoduced in ObjC code, then we assume that ObjC code also
303-
// overrides retain/release to make sure that dealloc is called on the correct
304-
// executor in the first place.
302+
// If isolation was introduced in ObjC code, then we assume that ObjC code
303+
// also overrides retain/release to make sure that dealloc is called on the
304+
// correct executor in the first place.
305305
return firstIsolated->getClangNode().isNull();
306306
}
307307

lib/Sema/TypeCheckConcurrency.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ bool swift::usesFlowSensitiveIsolation(AbstractFunctionDecl const *fn) {
122122
if (!fn)
123123
return false;
124124

125-
// Only designated constructors use this kind of isolation.
125+
// Only designated constructors or nonisolated destructors use this kind of
126+
// isolation.
126127
if (auto const* ctor = dyn_cast<ConstructorDecl>(fn)) {
127128
if (!ctor->isDesignatedInit())
128129
return false;
@@ -4955,7 +4956,7 @@ static OverrideIsolationResult validOverrideIsolation(
49554956

49564957
// Normally we are checking if overriding declaration can be called by calling
49574958
// overriden declaration. But in case of destructors, overriden declaration is
4958-
// always callable by definition and we are checking that subclas deinit can
4959+
// always callable by definition and we are checking that subclass deinit can
49594960
// call super deinit.
49604961
bool isDtor = isa<DestructorDecl>(value);
49614962

@@ -5095,7 +5096,7 @@ ActorIsolation ActorIsolationRequest::evaluate(
50955096
}
50965097

50975098
if (hasIsolatedSelf && isolation.isUnspecified()) {
5098-
// Don't use 'unspecified' for actors, use 'nonisolated' instead
5099+
// Don't use 'unspecified' for actors, use 'nonisolated' instead.
50995100
// To force generation of the 'nonisolated' attribute in SIL and
51005101
// .swiftmodule
51015102
isolation = ActorIsolation::forNonisolated(false);
@@ -5113,7 +5114,7 @@ ActorIsolation ActorIsolationRequest::evaluate(
51135114
assert(actor && "could not find the actor that 'self' is isolated to");
51145115

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

stdlib/public/Concurrency/Task.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1710,7 +1710,7 @@ static void swift_task_performOnExecutorImpl(void *context,
17101710
// we can just immediately continue running with the resume function
17111711
// we were passed in.
17121712
//
1713-
// Note that swift_task_isCurrentExecutor() return true for @MainActor
1713+
// Note that swift_task_isCurrentExecutor() returns true for @MainActor
17141714
// when running on the main thread without any executor
17151715
if (swift_task_isCurrentExecutor(newExecutor)) {
17161716
return work(context); // 'return' forces tail call

0 commit comments

Comments
 (0)