Skip to content

Commit 69cb1f8

Browse files
Merge pull request #2116 from practicalswift/gardening-20160409
[gardening] Fix typos.
2 parents 8811731 + fa40ad2 commit 69cb1f8

File tree

15 files changed

+31
-31
lines changed

15 files changed

+31
-31
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2722,7 +2722,7 @@ Swift 2.2
27222722

27232723
In many common cases, this will just work. Unfortunately, values
27242724
are returned from `CF`-style APIs in a wide variety of ways, and
2725-
unlike Objective C methods, there simply isn't enough consistency
2725+
unlike Objective-C methods, there simply isn't enough consistency
27262726
for Swift to be able to safely apply the documented conventions
27272727
universally. The framework teams have already audited many of the
27282728
most important `CF`-style APIs, and those APIs should be imported

apinotes/CoreGraphics.apinotes

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,9 @@ Functions:
224224
- Name: CGContextSetAllowsFontSubpixelQuantization
225225
SwiftName: CGContextRef.setAllowsFontSubpixelQuantization(self:_:)
226226
- Name: CGContextBeginTransparencyLayer
227-
SwiftName: CGContextRef.beginTransparencyLayer(self:withAuxilaryInfo:)
227+
SwiftName: CGContextRef.beginTransparencyLayer(self:withAuxiliaryInfo:)
228228
- Name: CGContextBeginTransparencyLayerWithRect
229-
SwiftName: CGContextRef.beginTransparencyLayer(self:in:auxilaryInfo:)
229+
SwiftName: CGContextRef.beginTransparencyLayer(self:in:auxiliaryInfo:)
230230
# CGEvent
231231
- Name: CGEventCreateFromData
232232
SwiftName: CGEventRef.init(withDataAllocator:data:)

docs/proposals/ObjCInteroperation.rst

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
:Authors: John McCall
88

99
I propose some elementary semantics and limitations when exposing
10-
Swift code to Objective C and vice-versa.
10+
Swift code to Objective-C and vice-versa.
1111

1212
Dynamism in Objective-C
1313
=======================
1414

15-
Objective C intentionally defines its semantics almost entirely around
15+
Objective-C intentionally defines its semantics almost entirely around
1616
its implementation model. The implementation supports two basic
1717
operations that you can perform on any object:
1818

@@ -142,13 +142,13 @@ Method devirtualization [2]_ is likely to be a critically important
142142
optimization in Swift.
143143

144144
.. [2] In contrast to generic or existential devirtualization, which
145-
are also important, but which aren't affected by the Objective C
145+
are also important, but which aren't affected by the Objective-C
146146
interoperation model.
147147
148148
A Missing Optimization
149149
----------------------
150150

151-
For one, it is an important missing optimization even in Objective C.
151+
For one, it is an important missing optimization even in Objective-C.
152152
Any program that tries to separate its concerns will usually introduce
153153
some extra abstraction in its formal model. For example:
154154

@@ -165,15 +165,15 @@ some extra abstraction in its formal model. For example:
165165

166166
In each of the examples, the user has made a totally reasonable
167167
decision about code organization and reserved flexibility, and
168-
Objective C proceeds to introduce unnecessary runtime costs which
168+
Objective-C proceeds to introduce unnecessary runtime costs which
169169
might force a performance-sensitive programmer to choose a different
170170
path.
171171

172172
Swift-Specific Concerns
173173
-----------------------
174174

175175
The lack of devirtualization would hit Swift much harder because of
176-
its property model. With a synthesized property, Objective C provides
176+
its property model. With a synthesized property, Objective-C provides
177177
a way to either call the getter/setter (with dot syntax) or directly
178178
access the underlying ivar (with arrow syntax). By design, Swift
179179
hides that difference, and the abstract language model is that all
@@ -195,9 +195,9 @@ for now) and determine whether we can access the property directly.
195195
But for properties of a class type, polymorphism requires us to
196196
defensively handle the possibility that a subclass might add arbitrary
197197
logic to either the getter or setter. If our implementation model
198-
is as unrestricted as Objective C's, that's a serious problem.
198+
is as unrestricted as Objective-C's, that's a serious problem.
199199

200-
I think that this is such a massive regression from Objective C that
200+
I think that this is such a massive regression from Objective-C that
201201
we have to address it.
202202

203203
Requirements for Devirtualization
@@ -211,13 +211,13 @@ add and replace method implementations.
211211
Restricting Method Replacement
212212
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
213213

214-
There are two supported ways to add or replace methods in Objective C.
214+
There are two supported ways to add or replace methods in Objective-C.
215215

216216
The first is via the runtime API. If we do have to support doing this
217217
to replace Swift methods --- and we should try to avoid that --- then
218218
I think restricting it to require a ``@dynamic`` annotation on the
219219
replaceable method (or its lexical context) is reasonable. We should
220-
try to get the Objective C runtime to complain about attempts to
220+
try to get the Objective-C runtime to complain about attempts to
221221
replace non-dynamic methods.
222222

223223
The second is via categories. It's generally understood that a
@@ -289,7 +289,7 @@ We can reason forward from the point of allocation.
289289
Access Control
290290
--------------
291291

292-
Swift does give us one big tool for devirtualization that Objective C
292+
Swift does give us one big tool for devirtualization that Objective-C
293293
lacks: access control. In Swift, access control determines
294294
visibility, and it doesn't make sense to override something that you
295295
can't see. Therefore:
@@ -309,13 +309,13 @@ can't see. Therefore:
309309
This means that a private stored property can always be
310310
"devirtualized" into a direct access [4]_. Unfortunately, ``private``
311311
is not the default access control: module-private is. And if the
312-
current module can contain Objective C code, then even that raises the
312+
current module can contain Objective-C code, then even that raises the
313313
question of what ObjC interop actually means.
314314

315315
.. [4] Assuming we don't introduce a supported way of dynamically
316316
replacing the implementation of a private Swift method!
317317
318-
Using Swift Classes from Objective C
318+
Using Swift Classes from Objective-C
319319
====================================
320320

321321

@@ -331,7 +331,7 @@ For another example, code
331331
class might access
332332

333333
In both cases, t makes sense to organize the code that way,
334-
but Objective C punishes the performance of that code in order to
334+
but Objective-C punishes the performance of that code in order to
335335
reserve the language's
336336

337337

docs/proposals/rejected/ClassConstruction.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Exceptions to the Rule
7878

7979
I exaggerated a little in the previous section: because overriding
8080
*every* superclass initializer in *every* subclass is so tedious, the
81-
Objective C community has identified some situations where you don't
81+
Objective-C community has identified some situations where you don't
8282
really need to override every ``init`` method:
8383

8484
1. When you know the default zero-initialization of a class' instance

lib/IRGen/GenDecl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ class CategoryInitializerVisitor
117117
metaclassMetadata = llvm::ConstantExpr::getBitCast(metaclassMetadata,
118118
IGM.ObjCClassPtrTy);
119119

120-
// We need to make sure the Objective C runtime has initialized our
120+
// We need to make sure the Objective-C runtime has initialized our
121121
// class. If you try to add or replace a method to a class that isn't
122-
// initialized yet, the Objective C runtime will crash in the calls
122+
// initialized yet, the Objective-C runtime will crash in the calls
123123
// to class_replaceMethod or class_addProtocol.
124124
Builder.CreateCall(IGM.getGetInitializedObjCClassFn(), classMetadata);
125125

lib/SILGen/SILGenPoly.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2740,7 +2740,7 @@ getWitnessDispatchKind(Type selfType, SILDeclRef witness, bool isFree) {
27402740
bool isExtension = isa<ExtensionDecl>(decl->getDeclContext());
27412741

27422742
// If we have a final method or a method from an extension that is not
2743-
// objective c, emit a static reference.
2743+
// Objective-C, emit a static reference.
27442744
// A natively ObjC method witness referenced this way will end up going
27452745
// through its native thunk, which will redispatch the method after doing
27462746
// bridging just like we want.

lib/SILOptimizer/Transforms/StackPromotion.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ class StackPromoter {
6262
// unreachable bb2
6363
// \
6464
//
65-
// We want to get bb2 as immediate post-domiator of bb1. This is not the case
66-
// with the regualar post-dominator tree.
65+
// We want to get bb2 as immediate post-dominator of bb1. This is not the case
66+
// with the regular post-dominator tree.
6767
llvm::DominatorTreeBase<SILBasicBlock> PostDomTree;
6868

6969
bool PostDomTreeValid;

lib/Sema/TypeCheckDecl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2047,7 +2047,7 @@ static void checkAccessibility(TypeChecker &TC, const Decl *D) {
20472047
}
20482048
}
20492049

2050-
/// Figure out if a declaration should be exported to Objective C.
2050+
/// Figure out if a declaration should be exported to Objective-C.
20512051
static Optional<ObjCReason> shouldMarkAsObjC(TypeChecker &TC,
20522052
const ValueDecl *VD,
20532053
bool allowImplicit = false){

stdlib/public/core/Arrays.swift.gyb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ public struct ${Self}<Element>
318318
if _isClassOrObjCExistential(Element.self) {
319319
// We are hiding the access to '_buffer.owner' behind
320320
// _getOwner() to help the compiler hoist uniqueness checks in
321-
// the case of class or objective c existential typed array
321+
// the case of class or Objective-C existential typed array
322322
// elements.
323323
return _getOwnerWithSemanticLabel_native()
324324
}

stdlib/public/runtime/SwiftObject.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1324,7 +1324,7 @@ static void doWeakDestroy(WeakReference *addr, bool valueIsNative) {
13241324
extern "C" Class swift_getInitializedObjCClass(Class c)
13251325
SWIFT_CC(RegisterPreservingCC_IMPL) {
13261326
// Used when we have class metadata and we want to ensure a class has been
1327-
// initialized by the Objective C runtime. We need to do this because the
1327+
// initialized by the Objective-C runtime. We need to do this because the
13281328
// class "c" might be valid metadata, but it hasn't been initialized yet.
13291329
return [c class];
13301330
}

test/Inputs/clang-importer-sdk/swift-modules-without-ns/ObjectiveC.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@_exported import ObjectiveC // Clang module
22

3-
// The iOS/arm64 target uses _Bool for Objective C's BOOL. We include
3+
// The iOS/arm64 target uses _Bool for Objective-C's BOOL. We include
44
// x86_64 here as well because the iOS simulator also uses _Bool.
55
#if ((os(iOS) || os(tvOS)) && (arch(arm64) || arch(x86_64))) || os(watchOS)
66
public struct ObjCBool : Boolean {

test/Inputs/clang-importer-sdk/swift-modules/ObjectiveC.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@_exported import ObjectiveC // Clang module
22

3-
// The iOS/arm64 target uses _Bool for Objective C's BOOL. We include
3+
// The iOS/arm64 target uses _Bool for Objective-C's BOOL. We include
44
// x86_64 here as well because the iOS simulator also uses _Bool.
55
#if ((os(iOS) || os(tvOS)) && (arch(arm64) || arch(x86_64))) || os(watchOS)
66
public struct ObjCBool : Boolean {

test/SIL/Serialization/deserialize_objectivec.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Make sure that we can deserialize objective c.
1+
// Make sure that we can deserialize Objective-C.
22
// RUN: %target-sil-opt %platform-sdk-overlay-dir/ObjectiveC.swiftmodule > /dev/null
33
// RUN: llvm-bcanalyzer %platform-sdk-overlay-dir/ObjectiveC.swiftmodule | FileCheck %s
44

test/SILOptimizer/typed-access-tb-aa.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ bb0:
142142
// Now check that a native object address may:
143143
//
144144
// 1. May alias raw pointer addresses.
145-
// 2. Not alias an unknown object. Objective C objects are allocated differently
145+
// 2. Not alias an unknown object. Objective-C objects are allocated differently
146146
// than Swift objects and may not alias.
147147
// 3. Does not alias scalar addresses. This can only occur via inttoptr and the
148148
// like. Since we are using type oracles we are allowed to make the assumption

tools/swift-ide-test/KnownObjCMethods.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
//
5353
// OBJC_PROPERTY(ContextName, PropertyName, OptionalTypeKind)
5454
//
55-
// Describes the optionality if the type of the Objective C property.
55+
// Describes the optionality if the type of the Objective-C property.
5656
//
5757

5858
#ifndef INSTANCE_METHOD

0 commit comments

Comments
 (0)