Skip to content

Commit 5fab3d1

Browse files
authored
Spelling stdlib/public/runtime (#42439)
* spelling: access Signed-off-by: Josh Soref <[email protected]> * spelling: bridgeable Signed-off-by: Josh Soref <[email protected]> * spelling: canonical Signed-off-by: Josh Soref <[email protected]> * spelling: clazz Signed-off-by: Josh Soref <[email protected]> * spelling: compatibility Signed-off-by: Josh Soref <[email protected]> * spelling: language Signed-off-by: Josh Soref <[email protected]> * spelling: necessary Signed-off-by: Josh Soref <[email protected]> * spelling: platform Signed-off-by: Josh Soref <[email protected]> * spelling: recursive Signed-off-by: Josh Soref <[email protected]> * spelling: related Signed-off-by: Josh Soref <[email protected]> * spelling: repeated Signed-off-by: Josh Soref <[email protected]> * spelling: satisfy Signed-off-by: Josh Soref <[email protected]> * spelling: that Signed-off-by: Josh Soref <[email protected]> * spelling: the Signed-off-by: Josh Soref <[email protected]> * spelling: verification Signed-off-by: Josh Soref <[email protected]> Co-authored-by: Josh Soref <[email protected]>
1 parent 644c18c commit 5fab3d1

13 files changed

+58
-58
lines changed

include/swift/ABI/Metadata.h

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3515,7 +3515,7 @@ class TargetTypeContextDescriptor
35153515
return getTypeContextDescriptorFlags().hasForeignMetadataInitialization();
35163516
}
35173517

3518-
bool hasCanonicicalMetadataPrespecializations() const {
3518+
bool hasCanonicalMetadataPrespecializations() const {
35193519
return getTypeContextDescriptorFlags().hasCanonicalMetadataPrespecializations();
35203520
}
35213521

@@ -3557,7 +3557,7 @@ class TargetTypeContextDescriptor
35573557
}
35583558

35593559
const llvm::ArrayRef<TargetRelativeDirectPointer<Runtime, TargetMetadata<Runtime>, /*Nullable*/ false>>
3560-
getCanonicicalMetadataPrespecializations() const;
3560+
getCanonicalMetadataPrespecializations() const;
35613561

35623562
swift_once_t *getCanonicalMetadataPrespecializationCachingOnceToken() const;
35633563

@@ -3868,25 +3868,25 @@ class TargetClassDescriptor final
38683868
}
38693869

38703870
size_t numTrailingObjects(OverloadToken<MetadataListCount>) const {
3871-
return this->hasCanonicicalMetadataPrespecializations() ?
3871+
return this->hasCanonicalMetadataPrespecializations() ?
38723872
1
38733873
: 0;
38743874
}
38753875

38763876
size_t numTrailingObjects(OverloadToken<MetadataListEntry>) const {
3877-
return this->hasCanonicicalMetadataPrespecializations() ?
3877+
return this->hasCanonicalMetadataPrespecializations() ?
38783878
this->template getTrailingObjects<MetadataListCount>()->count
38793879
: 0;
38803880
}
38813881

38823882
size_t numTrailingObjects(OverloadToken<MetadataAccessorListEntry>) const {
3883-
return this->hasCanonicicalMetadataPrespecializations() ?
3883+
return this->hasCanonicalMetadataPrespecializations() ?
38843884
this->template getTrailingObjects<MetadataListCount>()->count
38853885
: 0;
38863886
}
38873887

38883888
size_t numTrailingObjects(OverloadToken<MetadataCachingOnceToken>) const {
3889-
return this->hasCanonicicalMetadataPrespecializations() ? 1 : 0;
3889+
return this->hasCanonicalMetadataPrespecializations() ? 1 : 0;
38903890
}
38913891

38923892
public:
@@ -4034,8 +4034,8 @@ class TargetClassDescriptor final
40344034
->Stub.get();
40354035
}
40364036

4037-
llvm::ArrayRef<Metadata> getCanonicicalMetadataPrespecializations() const {
4038-
if (!this->hasCanonicicalMetadataPrespecializations()) {
4037+
llvm::ArrayRef<Metadata> getCanonicalMetadataPrespecializations() const {
4038+
if (!this->hasCanonicalMetadataPrespecializations()) {
40394039
return {};
40404040
}
40414041

@@ -4048,7 +4048,7 @@ class TargetClassDescriptor final
40484048
}
40494049

40504050
llvm::ArrayRef<MetadataAccessor> getCanonicalMetadataPrespecializationAccessors() const {
4051-
if (!this->hasCanonicicalMetadataPrespecializations()) {
4051+
if (!this->hasCanonicalMetadataPrespecializations()) {
40524052
return {};
40534053
}
40544054

@@ -4061,7 +4061,7 @@ class TargetClassDescriptor final
40614061
}
40624062

40634063
swift_once_t *getCanonicalMetadataPrespecializationCachingOnceToken() const {
4064-
if (!this->hasCanonicicalMetadataPrespecializations()) {
4064+
if (!this->hasCanonicalMetadataPrespecializations()) {
40654065
return nullptr;
40664066
}
40674067
auto box = this->template getTrailingObjects<MetadataCachingOnceToken>();
@@ -4138,19 +4138,19 @@ class TargetStructDescriptor final
41384138
}
41394139

41404140
size_t numTrailingObjects(OverloadToken<MetadataListCount>) const {
4141-
return this->hasCanonicicalMetadataPrespecializations() ?
4141+
return this->hasCanonicalMetadataPrespecializations() ?
41424142
1
41434143
: 0;
41444144
}
41454145

41464146
size_t numTrailingObjects(OverloadToken<MetadataListEntry>) const {
4147-
return this->hasCanonicicalMetadataPrespecializations() ?
4147+
return this->hasCanonicalMetadataPrespecializations() ?
41484148
this->template getTrailingObjects<MetadataListCount>()->count
41494149
: 0;
41504150
}
41514151

41524152
size_t numTrailingObjects(OverloadToken<MetadataCachingOnceToken>) const {
4153-
return this->hasCanonicicalMetadataPrespecializations() ? 1 : 0;
4153+
return this->hasCanonicalMetadataPrespecializations() ? 1 : 0;
41544154
}
41554155

41564156
public:
@@ -4185,8 +4185,8 @@ class TargetStructDescriptor final
41854185
return TargetStructMetadata<Runtime>::getGenericArgumentOffset();
41864186
}
41874187

4188-
llvm::ArrayRef<Metadata> getCanonicicalMetadataPrespecializations() const {
4189-
if (!this->hasCanonicicalMetadataPrespecializations()) {
4188+
llvm::ArrayRef<Metadata> getCanonicalMetadataPrespecializations() const {
4189+
if (!this->hasCanonicalMetadataPrespecializations()) {
41904190
return {};
41914191
}
41924192

@@ -4199,7 +4199,7 @@ class TargetStructDescriptor final
41994199
}
42004200

42014201
swift_once_t *getCanonicalMetadataPrespecializationCachingOnceToken() const {
4202-
if (!this->hasCanonicicalMetadataPrespecializations()) {
4202+
if (!this->hasCanonicalMetadataPrespecializations()) {
42034203
return nullptr;
42044204
}
42054205
auto box = this->template getTrailingObjects<MetadataCachingOnceToken>();
@@ -4265,19 +4265,19 @@ class TargetEnumDescriptor final
42654265
}
42664266

42674267
size_t numTrailingObjects(OverloadToken<MetadataListCount>) const {
4268-
return this->hasCanonicicalMetadataPrespecializations() ?
4268+
return this->hasCanonicalMetadataPrespecializations() ?
42694269
1
42704270
: 0;
42714271
}
42724272

42734273
size_t numTrailingObjects(OverloadToken<MetadataListEntry>) const {
4274-
return this->hasCanonicicalMetadataPrespecializations() ?
4274+
return this->hasCanonicalMetadataPrespecializations() ?
42754275
this->template getTrailingObjects<MetadataListCount>()->count
42764276
: 0;
42774277
}
42784278

42794279
size_t numTrailingObjects(OverloadToken<MetadataCachingOnceToken>) const {
4280-
return this->hasCanonicicalMetadataPrespecializations() ? 1 : 0;
4280+
return this->hasCanonicalMetadataPrespecializations() ? 1 : 0;
42814281
}
42824282

42834283
public:
@@ -4326,8 +4326,8 @@ class TargetEnumDescriptor final
43264326
return *this->template getTrailingObjects<SingletonMetadataInitialization>();
43274327
}
43284328

4329-
llvm::ArrayRef<Metadata> getCanonicicalMetadataPrespecializations() const {
4330-
if (!this->hasCanonicicalMetadataPrespecializations()) {
4329+
llvm::ArrayRef<Metadata> getCanonicalMetadataPrespecializations() const {
4330+
if (!this->hasCanonicalMetadataPrespecializations()) {
43314331
return {};
43324332
}
43334333

@@ -4340,7 +4340,7 @@ class TargetEnumDescriptor final
43404340
}
43414341

43424342
swift_once_t *getCanonicalMetadataPrespecializationCachingOnceToken() const {
4343-
if (!this->hasCanonicicalMetadataPrespecializations()) {
4343+
if (!this->hasCanonicalMetadataPrespecializations()) {
43444344
return nullptr;
43454345
}
43464346
auto box = this->template getTrailingObjects<MetadataCachingOnceToken>();
@@ -4483,17 +4483,17 @@ TargetTypeContextDescriptor<Runtime>::getSingletonMetadataInitialization() const
44834483

44844484
template<typename Runtime>
44854485
inline const llvm::ArrayRef<TargetRelativeDirectPointer<Runtime, TargetMetadata<Runtime>, /*Nullable*/ false>>
4486-
TargetTypeContextDescriptor<Runtime>::getCanonicicalMetadataPrespecializations() const {
4486+
TargetTypeContextDescriptor<Runtime>::getCanonicalMetadataPrespecializations() const {
44874487
switch (this->getKind()) {
44884488
case ContextDescriptorKind::Enum:
44894489
return llvm::cast<TargetEnumDescriptor<Runtime>>(this)
4490-
->getCanonicicalMetadataPrespecializations();
4490+
->getCanonicalMetadataPrespecializations();
44914491
case ContextDescriptorKind::Struct:
44924492
return llvm::cast<TargetStructDescriptor<Runtime>>(this)
4493-
->getCanonicicalMetadataPrespecializations();
4493+
->getCanonicalMetadataPrespecializations();
44944494
case ContextDescriptorKind::Class:
44954495
return llvm::cast<TargetClassDescriptor<Runtime>>(this)
4496-
->getCanonicicalMetadataPrespecializations();
4496+
->getCanonicalMetadataPrespecializations();
44974497
default:
44984498
swift_unreachable("Not a type context descriptor.");
44994499
}

stdlib/public/runtime/AutoDiffSupport.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
namespace swift {
2121

2222
/// A data structure responsible for efficiently allocating closure contexts for
23-
/// linear maps such as pullbacks, including rescursive branching trace enum
23+
/// linear maps such as pullbacks, including recursive branching trace enum
2424
/// case payloads.
2525
class AutoDiffLinearMapContext : public HeapObject {
2626
private:

stdlib/public/runtime/Casting.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1248,7 +1248,7 @@ static id bridgeAnythingNonVerbatimToObjectiveC(OpaqueValue *src,
12481248
return objc_retain(protocolObj);
12491249
}
12501250
}
1251-
// Handle bridgable types.
1251+
// Handle bridgeable types.
12521252
} else if (auto srcBridgeWitness = findBridgeWitness(srcType)) {
12531253
// Bridge the source value to an object.
12541254
auto srcBridgedObject =

stdlib/public/runtime/ConcurrencyExclusivity.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ namespace {
146146
/// a task access set, those accesses must have completed while the task was
147147
/// running since the access set is empty when we pop.
148148
///
149-
/// Case 6: Task has initial accesses, sync does not have initial accesss, and
149+
/// Case 6: Task has initial accesses, sync does not have initial access, and
150150
/// Task access set is modified while running (T, F, T)
151151
///
152152
/// In this case, TBegin and TEnd are both initially set to non-null

stdlib/public/runtime/DynamicCast.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ bool _swift_dictionaryDownCastConditionalIndirect(OpaqueValue *destination,
673673
#if SWIFT_OBJC_INTEROP
674674
// Helper to memoize bridging conformance data for a particular
675675
// Swift struct type. This is used to speed up the most common
676-
// ObjC->Swift bridging conversions by eliminating repeeated
676+
// ObjC->Swift bridging conversions by eliminating repeated
677677
// protocol conformance lookups.
678678

679679
// Currently used only for String, which may be the only
@@ -2079,7 +2079,7 @@ tryCast(
20792079
|| srcKind == MetadataKind::ObjCClassWrapper
20802080
|| srcKind == MetadataKind::ForeignClass) {
20812081
auto srcObject = getNonNullSrcObject(srcValue, srcType, destType);
2082-
// If srcObject is null, we're in compability mode.
2082+
// If srcObject is null, we're in compatibility mode.
20832083
// But we can't lookup dynamic type for a null class reference, so
20842084
// just skip this in that case.
20852085
if (srcObject != nullptr) {

stdlib/public/runtime/Float16Support.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ SWIFT_RUNTIME_EXPORT unsigned short __truncdfhf2(double d) {
132132
// to fake it.
133133
float f = (float)d;
134134
// Double-rounding can only occur if the result of rounding to float is
135-
// an exact-halfway case for the the subsequent rounding to float16. We
135+
// an exact-halfway case for the subsequent rounding to float16. We
136136
// can check for that significand bit pattern quickly (though we need
137137
// to be careful about values that will result in a subnormal float16,
138138
// as those will round in a different position):

stdlib/public/runtime/ImageInspectionCommon.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ void swift_addNewDSOImage(struct swift::MetadataSections *sections);
7979
/// \param context An additional context pointer to pass to \a body.
8080
///
8181
/// On Mach-O-based platforms (i.e. Apple platforms), this function is
82-
/// unavailable. On those plaforms, use dyld API to enumerate loaded images and
82+
/// unavailable. On those platforms, use dyld API to enumerate loaded images and
8383
/// their corresponding metadata sections.
8484
SWIFT_RUNTIME_EXPORT SWIFT_WEAK_IMPORT
8585
void swift_enumerateAllMetadataSections(

stdlib/public/runtime/Metadata.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ _cacheCanonicalSpecializedMetadata(const TypeContextDescriptor *description) {
771771
assert(result.second.Value == canonicalMetadata);
772772
}
773773
} else {
774-
auto canonicalMetadatas = description->getCanonicicalMetadataPrespecializations();
774+
auto canonicalMetadatas = description->getCanonicalMetadataPrespecializations();
775775
for (auto &canonicalMetadataPtr : canonicalMetadatas) {
776776
Metadata *canonicalMetadata = canonicalMetadataPtr.get();
777777
const void *const *arguments =

stdlib/public/runtime/ObjCRuntimeGetImageNameFromClass.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ static BOOL callUnpatchedGetImageNameFromClass(
269269
/// implementation.
270270
///
271271
/// The Swift implementation is always set up to chain to another
272-
/// implementation, so on older OSs we just have to make sure that that chained
272+
/// implementation, so on older OSs we just have to make sure that chained
273273
/// implementation is the original system version. See
274274
/// callUnpatchedGetImageNameFromClass.
275275
static const char *patchedGetImageNameFromClassForOldOSs(Class _Nullable cls) {

stdlib/public/runtime/ReflectionMirror.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -607,20 +607,20 @@ struct ClassImpl : ReflectionMirrorImpl {
607607
}
608608

609609
bool hasSuperclassMirror() {
610-
auto *Clas = static_cast<const ClassMetadata*>(type);
611-
auto description = Clas->getDescription();
610+
auto *Clazz = static_cast<const ClassMetadata*>(type);
611+
auto description = Clazz->getDescription();
612612

613613
return ((description->SuperclassType)
614-
&& (Clas->Superclass)
615-
&& (Clas->Superclass->isTypeMetadata()));
614+
&& (Clazz->Superclass)
615+
&& (Clazz->Superclass->isTypeMetadata()));
616616
}
617617

618618
ClassImpl superclassMirror() {
619-
auto *Clas = static_cast<const ClassMetadata*>(type);
620-
auto description = Clas->getDescription();
619+
auto *Clazz = static_cast<const ClassMetadata*>(type);
620+
auto description = Clazz->getDescription();
621621

622622
if (description->SuperclassType) {
623-
if (auto theSuperclass = Clas->Superclass) {
623+
if (auto theSuperclass = Clazz->Superclass) {
624624
auto impl = ClassImpl();
625625
impl.type = (Metadata *)theSuperclass;
626626
impl.value = nullptr;
@@ -634,8 +634,8 @@ struct ClassImpl : ReflectionMirrorImpl {
634634
if (!isReflectable())
635635
return 0;
636636

637-
auto *Clas = static_cast<const ClassMetadata*>(type);
638-
auto description = Clas->getDescription();
637+
auto *Clazz = static_cast<const ClassMetadata*>(type);
638+
auto description = Clazz->getDescription();
639639
auto count = description->NumFields;
640640

641641
return count;
@@ -650,8 +650,8 @@ struct ClassImpl : ReflectionMirrorImpl {
650650
}
651651

652652
intptr_t childOffset(intptr_t i) override {
653-
auto *Clas = static_cast<const ClassMetadata*>(type);
654-
auto description = Clas->getDescription();
653+
auto *Clazz = static_cast<const ClassMetadata*>(type);
654+
auto description = Clazz->getDescription();
655655

656656
if (i < 0 || (size_t)i > description->NumFields)
657657
swift::crash("Swift mirror subscript bounds check failure");
@@ -660,12 +660,12 @@ struct ClassImpl : ReflectionMirrorImpl {
660660
// metadata, because we don't update the field offsets in the face of
661661
// resilient base classes.
662662
uintptr_t fieldOffset;
663-
if (usesNativeSwiftReferenceCounting(Clas)) {
664-
fieldOffset = Clas->getFieldOffsets()[i];
663+
if (usesNativeSwiftReferenceCounting(Clazz)) {
664+
fieldOffset = Clazz->getFieldOffsets()[i];
665665
} else {
666666
#if SWIFT_OBJC_INTEROP
667667
Ivar *ivars = class_copyIvarList(
668-
reinterpret_cast<Class>(const_cast<ClassMetadata *>(Clas)), nullptr);
668+
reinterpret_cast<Class>(const_cast<ClassMetadata *>(Clazz)), nullptr);
669669
fieldOffset = ivar_getOffset(ivars[i]);
670670
free(ivars);
671671
#else

stdlib/public/runtime/RuntimeInvocationsTracking.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ _swift_setGlobalRuntimeFunctionCountersUpdateHandler(
232232
return oldHandler;
233233
}
234234

235-
/// TODO: Provide an API to remove any counters releated to a specific object
235+
/// TODO: Provide an API to remove any counters related to a specific object
236236
/// or all objects.
237237
/// This is useful if you want to reset the stats for some/all objects.
238238

stdlib/public/runtime/SwiftDtoa.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -967,7 +967,7 @@ size_t swift_dtoa_optimal_binary64_p(const void *d, char *dest, size_t length)
967967
// Calculations above used an estimate for the power-of-ten scale.
968968
// Here, we compensate for any error in that estimate by testing
969969
// whether we have the expected number of digits in the integer
970-
// portion and correcting as necesssary. This also serves to
970+
// portion and correcting as necessary. This also serves to
971971
// prune leading zeros from subnormals.
972972

973973
// Except for subnormals, this loop should never run more than once.
@@ -2622,7 +2622,7 @@ static const uint64_t powersOf10_Binary128[] = {
26222622
// * 64-bit fractions `lower` and `upper`
26232623
// * integer `exponent`
26242624
//
2625-
// The returned values satisty the following:
2625+
// The returned values satisfy the following:
26262626
// ```
26272627
// lower * 2^exponent <= 10^p <= upper * 2^exponent
26282628
// ```
@@ -2656,7 +2656,7 @@ static void intervalContainingPowerOf10_Binary32(int p, uint64_t *lower, uint64_
26562656
// multiplications to accurately reconstruct the lower and upper
26572657
// bounds.
26582658
//
2659-
// The returned values satisty the following:
2659+
// The returned values satisfy the following:
26602660
// ```
26612661
// lower * 2^exponent <= 10^p <= upper * 2^exponent
26622662
// ```

stdlib/public/runtime/SwiftObject.mm

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -850,7 +850,7 @@ static bool isObjCForUnownedReference(void *value) {
850850
void *value) {
851851
// Note that LLDB also needs to know about the memory layout of unowned
852852
// references. The implementation here needs to be kept in sync with
853-
// lldb_private::SwiftLanguagueRuntime.
853+
// lldb_private::SwiftLanguageRuntime.
854854
if (!value) {
855855
dest->Value = nullptr;
856856
} else if (isObjCForUnownedReference(value)) {
@@ -1446,16 +1446,16 @@ static bool isUniquelyReferenced(id object) {
14461446
const unsigned char *filename,
14471447
int32_t filenameLength,
14481448
int32_t line, int32_t column,
1449-
unsigned verifcationType) {
1450-
assert((verifcationType == 0 || verifcationType == 1) &&
1451-
"Unknown verifcation type");
1449+
unsigned verificationType) {
1450+
assert((verificationType == 0 || verificationType == 1) &&
1451+
"Unknown verification type");
14521452

14531453
bool isEscaping =
14541454
object != nullptr && !object->refCounts.isUniquelyReferenced();
14551455

14561456
// Print a message if the closure escaped.
14571457
if (isEscaping) {
1458-
auto *message = (verifcationType == 0)
1458+
auto *message = (verificationType == 0)
14591459
? "closure argument was escaped in "
14601460
"withoutActuallyEscaping block"
14611461
: "closure argument passed as @noescape "

0 commit comments

Comments
 (0)