Skip to content

Commit d84048e

Browse files
committedFeb 11, 2019
Fix typos
1 parent f1327be commit d84048e

16 files changed

+27
-27
lines changed
 

‎docs/ABI/TypeMetadata.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ Protocol Descriptor
410410
~~~~~~~~~~~~~~~~~~~
411411

412412
Protocol descriptors describe the requirements of a protocol, and act as a
413-
handle for the protocol itself. The are referenced by `Protocol metadata`_, as
413+
handle for the protocol itself. They are referenced by `Protocol metadata`_, as
414414
well as `Protocol Conformance Records`_ and generic requirements. Protocol
415415
descriptors are only created for non-`@objc` Swift protocols: `@objc` protocols
416416
are emitted as Objective-C metadata. The layout of Swift protocol descriptors is
@@ -433,7 +433,7 @@ as follows:
433433
the protocol. The generic requirements themselves follow the fixed part
434434
of the protocol descriptor.
435435
- The number of **protocol requirements** in the protocol. The protocol
436-
requirements follow the generic reuqirements that form the **requirement
436+
requirements follow the generic requirements that form the **requirement
437437
signature**.
438438
- A string containing the **associated type names**, a C string comprising the
439439
names of all of the associated types in this protocol, separated by spaces,

‎docs/ABIStabilityManifesto.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ Every existing runtime function will need to be audited for its desirability and
388388

389389
The runtime is also responsible for lazily creating new type metadata entries at run time, either for generic type instantiations or for resilient constructs. Library evolution in general introduces a whole new category of needs from the runtime by making data and metadata more opaque, requiring interaction to be done through runtime APIs. Additionally, ownership semantics may require new runtime APIs or modifications to existing APIs. These new runtime needs are still under investigation [[SR-4352](https://bugs.swift.org/browse/SR-4352)].
390390

391-
There are many potential future directions to open up the ABI and operate on less-opaque data directly, as well a techniques such as call-site caching. These are ABI-additive, and will be interesting to explore in the future.
391+
There are many potential future directions to open up the ABI and operate on less-opaque data directly, as well as techniques such as call-site caching. These are ABI-additive, and will be interesting to explore in the future.
392392

393393
For a potentially-out-of-date listing of runtime symbols and some details, see the [Runtime docs](https://github.com/apple/swift/blob/master/docs/Runtime.md).
394394

‎docs/ARCOptimization.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ Contrasts with Alias Analysis
162162

163163
A common question is what is the difference in between RC Identity analysis and
164164
alias analysis. While alias analysis is attempting to determine if two memory
165-
location are the same, RC identity analysis is attempting to determine if
165+
locations are the same, RC identity analysis is attempting to determine if
166166
reference counting operations on different values would result in the same
167167
reference count being read or written to.
168168

@@ -544,7 +544,7 @@ optimization? We must consider three areas of concern:
544544
retain/release counts in the loop? Consider a set of retains and a set of
545545
releases that we wish to hoist out of a loop. We can only hoist the retain,
546546
release sets out of the loop if all paths in the given loop region from the
547-
entrance to the backedge. have exactly one retain or release from this set.
547+
entrance to the backedge have exactly one retain or release from this set.
548548

549549
4. Any early exits that we must move a retain past or a release by must be
550550
compensated appropriately. This will be discussed in the next section.
@@ -555,7 +555,7 @@ hoist with safety.
555555
Compensating Early Exits for Lost Dynamic Reference Counts
556556
----------------------------------------------------------
557557

558-
Lets say that we have the following loop canonicalized SIL::
558+
Let's say that we have the following loop canonicalized SIL::
559559

560560
bb0(%0 : $Builtin.NativeObject):
561561
br bb1
@@ -579,7 +579,7 @@ Lets say that we have the following loop canonicalized SIL::
579579
bb6:
580580
return ...
581581

582-
Can we hoist the retain/release pair here? Lets assume the loop is 3 iterations
582+
Can we hoist the retain/release pair here? Let's assume the loop is 3 iterations
583583
and we completely unroll it. Then we have::
584584

585585
bb0:
@@ -667,7 +667,7 @@ exit. Consider the following::
667667
bb6:
668668
return ...
669669

670-
Lets unroll this loop::
670+
Let's unroll this loop::
671671

672672
bb0(%0 : $Builtin.NativeObject):
673673
br bb1

‎docs/CallingConvention.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1048,7 +1048,7 @@ opaque range in the maximal aligned storage unit with a mapping from
10481048
that aligned storage unit to an integer of the aligned storage unit's
10491049
size. Remove any other opaque ranges in the maximal aligned storage
10501050
unit. Note that this can create overlapping ranges in some cases.
1051-
For this purposes of this calculation, the last maximal aligned
1051+
For the purposes of this calculation, the last maximal aligned
10521052
storage unit should be considered "full", as if the type had an
10531053
infinite amount of empty tail-padding.
10541054

‎docs/CompilerPerformance.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ higher-resolution, more-detailed profile, in practice Instruments will often
382382
stall out and become unresponsive trying to process the additional detail.
383383

384384
Similarly, be sure that as many applications as possible (especially those with
385-
debuginfo themselves!) are closed, so that Instruments has has little additional
385+
debuginfo themselves!) are closed, so that Instruments has little additional
386386
material to symbolicate as possible. It collects a _whole system profile_ at
387387
very high resolution, so you want to make its life easy by profiling on a quiet
388388
machine doing little beyond the task you're interested in.
@@ -645,7 +645,7 @@ compilers on hand while you're working.
645645
```
646646
647647
- `-Xfrontend -print-clang-stats`: prints counters associated with the clang
648-
AST reader, which is operated as a subsystem fo the swift compiler when
648+
AST reader, which is operated as a subsystem of the swift compiler when
649649
importing definitions from C/ObjC. Its output is added to the end of
650650
whatever output comes from `-print-stats`, and looks like this:
651651

‎docs/Generics.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@ protocols. A value of an existential type (say, Comparable) is a pair (value,
783783
vtable). 'value' stores the current value either directly (if it fits in the 3
784784
words allocated to the value) or as a pointer to the boxed representation (if
785785
the actual representation is larger than 3 words). By itself, this value cannot
786-
be interpreted, because it's type is not known statically, and may change due to
786+
be interpreted, because its type is not known statically, and may change due to
787787
assignment. The vtable provides the means to manipulate the value, because it
788788
provides a mapping between the protocols to which the existential type conforms
789789
(which is known statically) to the functions that implements that

‎docs/LibraryEvolution.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1135,7 +1135,7 @@ Operators and Precedence Groups
11351135
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11361136

11371137
Operator and precedence group declarations are entirely compile-time
1138-
constructs, so changing them does not have any affect on binary compatibility.
1138+
constructs, so changing them does not have any effect on binary compatibility.
11391139
However, they do affect *source* compatibility, so it is recommended that
11401140
existing operators are not changed at all except for the following:
11411141

‎docs/ObjectInitialization.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ Initialization proceeds in several steps:
117117
2. ``B``'s initializer initializes the stored property ``d`` to
118118
``17.0``.
119119
3. ``B``'s initializer chains to ``A``'s initializer.
120-
4. ``A``'s initializer initialize's the stored properties ``i`` and
120+
4. ``A``'s initializer initializes the stored properties ``i`` and
121121
``s``'.
122122
5. ``A``'s initializer calls ``completeInit()``, then returns.
123123
6. ``B``'s initializer calls ``completeInitForB()``, then returns.
@@ -191,7 +191,7 @@ Initialization proceeds as follows:
191191
``d`` to ``17.0``.
192192
5. ``B``'s designated initializer chains to ``A``'s designated
193193
initializer.
194-
6. ``A``'s designated initializer initialize's the stored properties
194+
6. ``A``'s designated initializer initializes the stored properties
195195
``i`` and ``s``'.
196196
7. ``A``'s designated initializer calls ``completeInit()``, then
197197
returns.

‎docs/OptimizationTips.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ that value types cannot be included inside an NSArray. Thus when using value
184184
types, the optimizer can remove most of the overhead in Array that is necessary
185185
to handle the possibility of the array being backed an NSArray.
186186

187-
Additionally, In contrast to reference types, value types only need reference
187+
Additionally, in contrast to reference types, value types only need reference
188188
counting if they contain, recursively, a reference type. By using value types
189189
without reference types, one can avoid additional retain, release traffic inside
190190
Array.

‎docs/OptimizerCountersAnalysis.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Optimizer Counter Analysis
22

3-
It is possible possible by means of providing some special command-line
3+
It is possible by means of providing some special command-line
44
options to ask the Swift compiler to produce different statistics about
55
the optimizer counters. Optimizer counters are most typically counters
66
representing different aspects of a SIL representation for a Swift module

‎docs/OwnershipManifesto.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ properties.
645645

646646
In some cases, where desired, the compiler may be able to
647647
preserve source compatibility and avoid an error by implicitly
648-
inserting a copy instead. This likely something we would only
648+
inserting a copy instead. This is likely something we would only
649649
do in a source-compatibility mode.
650650

651651
Static enforcement will be used for:

‎docs/SIL.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -2709,7 +2709,7 @@ strong reference type have ownership semantics for the referenced heap
27092709
object. Retain and release operations, however,
27102710
are never implicit in SIL and always must be explicitly performed where needed.
27112711
Retains and releases on the value may be freely moved, and balancing
2712-
retains and releases may deleted, so long as an owning retain count is
2712+
retains and releases may be deleted, so long as an owning retain count is
27132713
maintained for the uses of the value.
27142714

27152715
All reference-counting operations are defined to work correctly on
@@ -2991,7 +2991,7 @@ Asserts that there exists another reference of the value ``%0`` for the scope
29912991
delineated by the call of this builtin up to the first call of a ``builtin
29922992
"unsafeGuaranteedEnd"`` instruction that uses the second element ``%1.1`` of the
29932993
returned value. If no such instruction can be found nothing can be assumed. This
2994-
assertions holds for uses of the first tuple element of the returned value
2994+
assertion holds for uses of the first tuple element of the returned value
29952995
``%1.0`` within this scope. The returned reference value equals the input
29962996
``%0``.
29972997

@@ -3391,7 +3391,7 @@ separately before the ``partial_apply``. The closure does however take ownership
33913391
of the partially applied arguments; when the closure reference count reaches
33923392
zero, the contained values will be destroyed. If the ``partial_apply`` has a
33933393
``@noescape`` function type (``partial_apply [on_stack]``) the closure context
3394-
is allocated on the stack and intialized to contain the closed-over values. The
3394+
is allocated on the stack and initialized to contain the closed-over values. The
33953395
closed-over values are not retained, lifetime of the closed-over values must be
33963396
managed separately. The lifetime of the stack context of a ``partial_apply
33973397
[on_stack]`` must be terminated with a ``dealloc_stack``.

‎docs/SequencesAndCollections.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ stable indices, the element order within the collection itself is stable; the
285285
order sometimes does not have a meaning and is not chosen by the code that uses
286286
the collection, but by the implementation details of the collection itself.)
287287

288-
`MutableCollectionType` protocol allows the to replace a specific element,
288+
`MutableCollectionType` protocol allows the caller to replace a specific element,
289289
identified by an index, with another one in the same position. This capability
290290
essentially allows to rearrange the elements inside the collection in any
291291
order, thus types that conform to `MutableCollectionType` can represent

‎docs/StringManifesto.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ difficult to serialize.
895895

896896
The index translation problem has two aspects:
897897

898-
1. `String` views cannot consume one anothers' indices without a cumbersome
898+
1. `String` views cannot consume one another's indices without a cumbersome
899899
conversion step. An index into a `String`'s `characters` must be translated
900900
before it can be used as a position in its `unicodeScalars`. Although these
901901
translations are rarely needed, they add conceptual and API complexity.
@@ -1188,7 +1188,7 @@ typealias Substring = StringFacade<StringStorage.SubSequence>
11881188
This design would allow us to de-emphasize lower-level `String` APIs such as
11891189
access to the specific encoding, by putting them behind a `.unicode` property.
11901190
A similar effect in a facade-less design would require a new top-level
1191-
`StringProtocol` playing the role of the facade with an an `associatedtype
1191+
`StringProtocol` playing the role of the facade with an `associatedtype
11921192
Storage : Unicode`.
11931193

11941194
An interesting variation on this design is possible if defaulted generic

‎docs/WindowsBuild.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ mklink "%VCToolsInstallDir%\include\module.modulemap" S:\swift\stdlib\public\Pla
100100
mklink "%VCToolsInstallDir%\include\visualc.apinotes" S:\swift\stdlib\public\Platform\visualc.apinotes
101101
```
102102

103-
Warning: Creating the above links usually requires adminstrator privileges. The quick and easy way to do this is to open a second developer prompt by right clicking whatever shortcut you used to open the first one, choosing Run As Administrator, and pasting the above commands into the resulting window. You can then close the privileged prompt; this is the only step which requires elevation.
103+
Warning: Creating the above links usually requires administrator privileges. The quick and easy way to do this is to open a second developer prompt by right clicking whatever shortcut you used to open the first one, choosing Run As Administrator, and pasting the above commands into the resulting window. You can then close the privileged prompt; this is the only step which requires elevation.
104104

105105
### 5. Build CMark
106106
- This must be done from within a developer command prompt. CMark is a fairly

‎docs/weak.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ Looking at these use-cases, there are two main thrusts:
412412
Here it is reasonable to expect more user expertise, such that
413413
power and flexibility should take priority over ease of use.
414414

415-
The second set of use cases should addressed by library types working
415+
The second set of use cases should be addressed by library types working
416416
on top of basic runtime support.
417417

418418
The first set of use cases will require more direct language support.
@@ -436,7 +436,7 @@ also adds :code:`capture`, and we may later add more variants, such as
436436

437437
:code:`weak` is an attribute which may be applied to any
438438
variable-like declaration of reference type :code:`T`. For
439-
type-system purposes, the variables behaves like a normal
439+
type-system purposes, the variable behaves like a normal
440440
variable of type :code:`Optional<T>`, except:
441441

442442
- it does not maintain a +1 reference count invariant and

0 commit comments

Comments
 (0)