Skip to content

Commit 8d03ea1

Browse files
[gardening] Fix some recently introduced typos.
1 parent b45cdd3 commit 8d03ea1

File tree

13 files changed

+24
-24
lines changed

13 files changed

+24
-24
lines changed

lib/SILOptimizer/Transforms/DeadStoreElimination.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ namespace {
165165
constexpr unsigned MaxLSLocationBBMultiplicationNone = 256*256;
166166

167167
/// we could run optimistic DSE on functions with less than 64 basic blocks
168-
/// and 64 locations which is a sizeable function.
168+
/// and 64 locations which is a sizable function.
169169
constexpr unsigned MaxLSLocationBBMultiplicationPessimistic = 64*64;
170170

171171
/// forward declaration.

lib/SILOptimizer/Transforms/RedundantLoadElimination.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ namespace {
179179
constexpr unsigned MaxLSLocationBBMultiplicationNone = 128*128;
180180

181181
/// we could run optimistic RLE on functions with less than 64 basic blocks
182-
/// and 64 locations which is a sizeable function.
182+
/// and 64 locations which is a sizable function.
183183
constexpr unsigned MaxLSLocationBBMultiplicationPessimistic = 64*64;
184184

185185
/// forward declaration.

stdlib/public/SDK/Dispatch/Data.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ public struct DispatchData : RandomAccessCollection, _ObjectiveCBridgeable {
231231

232232
public struct DispatchDataIterator : IteratorProtocol, Sequence {
233233

234-
/// Create an iterator over the given DisaptchData
234+
/// Create an iterator over the given DispatchData
235235
public init(_data: DispatchData) {
236236
var ptr: UnsafePointer<Void>?
237237
self._count = 0

stdlib/public/SDK/Foundation/AffineTransform.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ extension AffineTransform : ReferenceConvertible, Hashable, CustomStringConverti
187187
}
188188

189189
/**
190-
Inverts the transformation matrix if possible. Matricies with a determinant that is less than
190+
Inverts the transformation matrix if possible. Matrices with a determinant that is less than
191191
the smallest valid representation of a double value greater than zero are considered to be
192192
invalid for representing as an inverse. If the input AffineTransform can potentially fall into
193193
this case then the inverted() method is suggested to be used instead since that will return

stdlib/public/SDK/Foundation/Boxing.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ internal protocol _MutablePairBoxing {
144144
extension _MutablePairBoxing {
145145
@inline(__always)
146146
func _mapUnmanaged<ReturnType>(_ whatToDo : @noescape (WrappedSwiftNSType.ImmutableType) throws -> ReturnType) rethrows -> ReturnType {
147-
// We are using Unmananged. Make sure that the owning container class
147+
// We are using Unmanaged. Make sure that the owning container class
148148
// 'self' is guaranteed to be alive by extending the lifetime of 'self'
149149
// to the end of the scope of this function.
150150
// Note: At the time of this writing using withExtendedLifetime here
@@ -169,7 +169,7 @@ extension _MutablePairBoxing {
169169

170170
@inline(__always)
171171
mutating func _applyUnmanagedMutation<ReturnType>(_ whatToDo : @noescape (WrappedSwiftNSType.MutableType) throws -> ReturnType) rethrows -> ReturnType {
172-
// We are using Unmananged. Make sure that the owning container class
172+
// We are using Unmanaged. Make sure that the owning container class
173173
// 'self' is guaranteed to be alive by extending the lifetime of 'self'
174174
// to the end of the scope of this function.
175175
// Note: At the time of this writing using withExtendedLifetime here
@@ -182,7 +182,7 @@ extension _MutablePairBoxing {
182182
let _unmanagedHandle = Unmanaged.passUnretained(_wrapped)
183183
let wrapper = _unmanagedHandle._withUnsafeGuaranteedRef { $0.__wrapped }
184184

185-
// This check is done twice becaue: <rdar://problem/24939065> Value kept live for too long causing uniqueness check to fail
185+
// This check is done twice because: <rdar://problem/24939065> Value kept live for too long causing uniqueness check to fail
186186
switch (wrapper) {
187187
case .Immutable(_):
188188
break

stdlib/public/SDK/Foundation/Date.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,15 +114,15 @@ public struct Date : ReferenceConvertible, Comparable, Equatable, CustomStringCo
114114
/// Return a new `Date` by adding a `TimeInterval` to this `Date`.
115115
///
116116
/// - parameter timeInterval: The value to add, in seconds.
117-
/// - warning: This only adjusts an absolute value. If you wish to add calendrical concepts like hours, days, months then you must use a `Calendar`. That will take into account complexites like daylight saving time, months with different numbers of days, and more.
117+
/// - warning: This only adjusts an absolute value. If you wish to add calendrical concepts like hours, days, months then you must use a `Calendar`. That will take into account complexities like daylight saving time, months with different numbers of days, and more.
118118
public func addingTimeInterval(_ timeInterval : TimeInterval) -> Date {
119119
return self + timeInterval
120120
}
121121

122122
/// Add a `TimeInterval` to this `Date`.
123123
///
124124
/// - parameter timeInterval: The value to add, in seconds.
125-
/// - warning: This only adjusts an absolute value. If you wish to add calendrical concepts like hours, days, months then you must use a `Calendar`. That will take into account complexites like daylight saving time, months with different numbers of days, and more.
125+
/// - warning: This only adjusts an absolute value. If you wish to add calendrical concepts like hours, days, months then you must use a `Calendar`. That will take into account complexities like daylight saving time, months with different numbers of days, and more.
126126
public mutating func addTimeInterval(_ timeInterval: TimeInterval) {
127127
self += timeInterval
128128
}
@@ -215,14 +215,14 @@ public func -(lhs: Date, rhs: TimeInterval) -> Date {
215215

216216
/// Add a `TimeInterval` to a `Date`.
217217
///
218-
/// - warning: This only adjusts an absolute value. If you wish to add calendrical concepts like hours, days, months then you must use a `Calendar`. That will take into account complexites like daylight saving time, months with different numbers of days, and more.
218+
/// - warning: This only adjusts an absolute value. If you wish to add calendrical concepts like hours, days, months then you must use a `Calendar`. That will take into account complexities like daylight saving time, months with different numbers of days, and more.
219219
public func +=(lhs: inout Date, rhs: TimeInterval) {
220220
lhs = lhs + rhs
221221
}
222222

223223
/// Subtract a `TimeInterval` from a `Date`.
224224
///
225-
/// - warning: This only adjusts an absolute value. If you wish to add calendrical concepts like hours, days, months then you must use a `Calendar`. That will take into account complexites like daylight saving time, months with different numbers of days, and more.
225+
/// - warning: This only adjusts an absolute value. If you wish to add calendrical concepts like hours, days, months then you must use a `Calendar`. That will take into account complexities like daylight saving time, months with different numbers of days, and more.
226226
public func -=(lhs: inout Date, rhs: TimeInterval) {
227227
lhs = lhs - rhs
228228
}

stdlib/public/SDK/Foundation/Measurement.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public func *<UnitType : Unit>(lhs: Measurement<UnitType>, rhs: Double) -> Measu
135135
return Measurement(value: lhs.value * rhs, unit: lhs.unit)
136136
}
137137

138-
/// Multiply a scalar value by a measurment.
138+
/// Multiply a scalar value by a measurement.
139139
/// - returns: A measurement of value `lhs * rhs.value` with the same unit as `rhs`.
140140
@available(OSX 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *)
141141
public func *<UnitType : Unit>(lhs: Double, rhs: Measurement<UnitType>) -> Measurement<UnitType> {
@@ -188,7 +188,7 @@ public func <<UnitType : Unit>(lhs: Measurement<UnitType>, rhs: Measurement<Unit
188188
/// Compare two measurements of the same `Dimension`.
189189
///
190190
/// If `lhs.unit == rhs.unit`, returns `lhs.value < rhs.value`. Otherwise, converts `rhs` to the same unit as `lhs` and then compares the resulting values.
191-
/// - returns: `true` if `lhs` is less than than `rhs`.
191+
/// - returns: `true` if `lhs` is less than `rhs`.
192192
@available(OSX 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *)
193193
public func <<UnitType : Dimension>(lhs: Measurement<UnitType>, rhs: Measurement<UnitType>) -> Bool {
194194
if lhs.unit == rhs.unit {
@@ -210,7 +210,7 @@ public func ><UnitType : Unit>(lhs: Measurement<UnitType>, rhs: Measurement<Unit
210210
/// Compare two measurements of the same `Dimension`.
211211
///
212212
/// If `lhs.unit == rhs.unit`, returns `lhs.value > rhs.value`. Otherwise, converts `rhs` to the same unit as `lhs` and then compares the resulting values.
213-
/// - returns: `true` if `lhs` is greater than than `rhs`.
213+
/// - returns: `true` if `lhs` is greater than `rhs`.
214214
@available(OSX 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *)
215215
public func ><UnitType : Dimension>(lhs: Measurement<UnitType>, rhs: Measurement<UnitType>) -> Bool {
216216
if lhs.unit == rhs.unit {

stdlib/public/SDK/Foundation/URLComponents.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ public struct URLComponents : ReferenceConvertible, Hashable, CustomStringConver
270270
///
271271
/// The setter combines an array containing any number of `URLQueryItem`s, each of which represents a single key-value pair, into a query string and sets the `URLComponents` query property. Passing an empty array sets the query component of the `URLComponents` to an empty string. Passing nil removes the query component of the `URLComponents`.
272272
///
273-
/// - note: If a name-value pair in a query is empty (i.e. the query string starts with '&', ends with '&', or has "&&" within it), you get a `URLQueryItem` with a zero-length name and and a nil value. If a query's name-value pair has nothing before the equals sign, you get a zero-length name. If a query's name-value pair has nothing after the equals sign, you get a zero-length value. If a query's name-value pair has no equals sign, the query name-value pair string is the name and you get a nil value.
273+
/// - note: If a name-value pair in a query is empty (i.e. the query string starts with '&', ends with '&', or has "&&" within it), you get a `URLQueryItem` with a zero-length name and a nil value. If a query's name-value pair has nothing before the equals sign, you get a zero-length name. If a query's name-value pair has nothing after the equals sign, you get a zero-length value. If a query's name-value pair has no equals sign, the query name-value pair string is the name and you get a nil value.
274274
@available(OSX 10.10, iOS 8.0, *)
275275
public var queryItems: [URLQueryItem]? {
276276
get { return _handle.map { $0.queryItems?.map { return $0 as URLQueryItem } } }

stdlib/public/SDK/Foundation/URLRequest.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public struct URLRequest : ReferenceConvertible, CustomStringConvertible, Equata
6767

6868
/// Returns the timeout interval of the receiver.
6969
/// - discussion: The timeout interval specifies the limit on the idle
70-
/// interval alloted to a request in the process of loading. The "idle
70+
/// interval allotted to a request in the process of loading. The "idle
7171
/// interval" is defined as the period of time that has passed since the
7272
/// last instance of load activity occurred for a request that is in the
7373
/// process of loading. Hence, when an instance of load activity occurs
@@ -111,7 +111,7 @@ public struct URLRequest : ReferenceConvertible, CustomStringConvertible, Equata
111111
}
112112

113113
/// `true` if the receiver is allowed to use the built in cellular radios to
114-
/// satify the request, `false` otherwise.
114+
/// satisfy the request, `false` otherwise.
115115
@available(OSX 10.8, iOS 6.0, *)
116116
public var allowsCellularAccess: Bool {
117117
get {

stdlib/public/SDK/Foundation/UUID.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public struct UUID : ReferenceConvertible, Hashable, Equatable, CustomStringConv
5252
self.uuid = uuid
5353
}
5454

55-
/// Returns a string created from the the UUID, such as "E621E1F8-C36C-495A-93FC-0C247A3E6E5F"
55+
/// Returns a string created from the UUID, such as "E621E1F8-C36C-495A-93FC-0C247A3E6E5F"
5656
public var uuidString: String {
5757
var bytes: uuid_string_t = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
5858
var localValue = uuid

test/1_stdlib/TestAffineTransform.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ class TestAffineTransform : TestAffineTransformSuper {
315315
}
316316

317317
func test_hashing_values() {
318-
// the transforms are made up and the values dont matter
318+
// the transforms are made up and the values don't matter
319319
let values = [
320320
AffineTransform(m11: 1.0, m12: 2.5, m21: 66.2, m22: 40.2, tX: -5.5, tY: 3.7),
321321
AffineTransform(m11: -55.66, m12: 22.7, m21: 1.5, m22: 0.0, tX: -22, tY: -33),

test/1_stdlib/TestData.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -625,8 +625,8 @@ class TestData : TestDataSuper {
625625
free(underlyingBuffer)
626626
}
627627

628-
func expectOverride<T: _ObjectiveCBridgeable>(_ convertable: T, _ selector: String) {
629-
expectNotEqual(class_getMethodImplementation(T._ObjectiveCType.self, sel_getUid(selector)), class_getMethodImplementation(object_getClass(convertable._bridgeToObjectiveC()), sel_getUid(selector)), "The bridge of \(T.self) should override \(selector)")
628+
func expectOverride<T: _ObjectiveCBridgeable>(_ convertible: T, _ selector: String) {
629+
expectNotEqual(class_getMethodImplementation(T._ObjectiveCType.self, sel_getUid(selector)), class_getMethodImplementation(object_getClass(convertible._bridgeToObjectiveC()), sel_getUid(selector)), "The bridge of \(T.self) should override \(selector)")
630630
}
631631

632632
func test_bridgeOverrides() {

test/1_stdlib/TestUserInfo.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ struct SomeStructure {
3333

3434
/*
3535
Notification and potentially other structures require a representation of a
36-
userInfo dictionary. The objective-c counterparts are represented via
36+
userInfo dictionary. The Objective-C counterparts are represented via
3737
NSDictionary which can only store a hashable key (actually
3838
NSObject<NSCopying> *) and a value of AnyObject (actually NSObject *). However
3939
it is desired in swift to store Any in the value. These structure expositions
4040
in swift have an adapter that allows them to pass a specialized NSDictionary
41-
subclass to the objective-c layer that can round trip the stored Any types back
42-
out into swift.
41+
subclass to the Objective-C layer that can round trip the stored Any types back
42+
out into Swift.
4343

4444
In this case NSNotification -> Notification bridging is suitable to verify that
4545
behavior.

0 commit comments

Comments
 (0)