Skip to content

Commit d1ec089

Browse files
authored
Merge pull request swiftlang#72088 from language-core/main
chore: fix some comments
2 parents 4d78345 + 127077b commit d1ec089

33 files changed

+33
-33
lines changed

SwiftCompilerSources/Sources/Optimizer/Analysis/AliasAnalysis.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ struct AliasAnalysis {
6363
let path = SmallProjectionPath(.anyValueFields)
6464
if let apply = inst as? ApplySite {
6565
// Workaround for quadratic complexity in ARCSequenceOpts.
66-
// We need to use an ever lower budget to not get into noticable compile time troubles.
66+
// We need to use an ever lower budget to not get into noticeable compile time troubles.
6767
let budget = complexityBudget / 10
6868
let effect = getOwnershipEffect(of: apply, for: obj, path: path, complexityBudget: budget, context)
6969
return effect.destroy

SwiftCompilerSources/Sources/Optimizer/Utilities/EscapeUtils.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ struct EscapeUtilityTypes {
225225
/// store %other to %2 // 4. ignore (followStores == false): %other doesn't impact the "escapeness" of %1
226226
/// \endcode
227227
///
228-
/// But once the the up-walk sees a load, it has to follow stores from that point on.
228+
/// But once the up-walk sees a load, it has to follow stores from that point on.
229229
/// Example:
230230
/// \code
231231
/// bb0(%function_arg): // 7. escaping! %1 escapes through %function_arg

SwiftCompilerSources/Sources/Optimizer/Utilities/OwnershipLiveness.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ struct InteriorUseWalker {
476476
///
477477
/// .escaping may either be a non-address operand with
478478
/// .pointerEscape ownership, or and address operand that escapes
479-
/// the adderss (address_to_pointer).
479+
/// the address (address_to_pointer).
480480
///
481481
/// .unknown is an address operand whose user is unrecognized.
482482
enum InteriorPointerStatus {

SwiftCompilerSources/Sources/SIL/Argument.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ public struct ArgumentConventions : Collection, CustomStringConvertible {
244244
/// The SIL argument index of the function type's first parameter.
245245
public var firstParameterIndex: Int { indirectSILResultCount }
246246

247-
/// The SIL argument index of the 'self' paramter.
247+
/// The SIL argument index of the 'self' parameter.
248248
var selfIndex: Int? {
249249
guard convention.hasSelfParameter else { return nil }
250250
// self is the last parameter

benchmark/utils/ArgParse.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class ArgumentParser<U> {
8383
/// Argument holds the name of the command line parameter, its help
8484
/// description and a rule that's applied to process it.
8585
///
86-
/// The the rule is typically a value processing closure used to convert it
86+
/// The rule is typically a value processing closure used to convert it
8787
/// into given type and storing it in the parsing result.
8888
///
8989
/// See also: addArgument, parseArgument

docs/EmbeddedSwift/UserManual.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ A typical setup and build + run cycle for an embedded development board involves
2626
- (5) Uploading the flashable binary to the board over a USB cable using some vendor-provided JTAG/SWD tool or by copying it to a fake USB Mass Storage volume presented by the board.
2727
- (6) Restarting the board, observing physical effects of the firmware (LEDs light up) or UART output over USB, or presence on network, etc.
2828

29-
Most of these steps are out of scope for this document, instead refer to the vendor provided documentation and get familiar with the details of firmware development for your board without Swift in the mix first. Even if you want to build a completely pure Swift firmware, you are still very likely going to need the the vendor provided tooling for linking, post-processing, uploading, etc.
29+
Most of these steps are out of scope for this document, instead refer to the vendor provided documentation and get familiar with the details of firmware development for your board without Swift in the mix first. Even if you want to build a completely pure Swift firmware, you are still very likely going to need the vendor provided tooling for linking, post-processing, uploading, etc.
3030

3131
## Building code using Embedded Swift
3232

docs/Generics/chapters/basic-operation.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ \section{Protocol Components}\label{protocol component}
528528
\item (Check) If the worklist is empty, go to Step~8.
529529
\item (Next) Otherwise, remove the next protocol $p$ from the worklist. If $p\in\texttt{S}$, go back to Step~2, otherwise set $\texttt{S}\leftarrow\texttt{S}\cup\{p\}$.
530530
\item (Component) Use Algorithm~\ref{tarjan} to compute the component ID for $p$.
531-
\item (Machine) Let $m$ be the the requirement machine for this component, creating it first if necessary. If $m\not\in\texttt{M}$, set $\texttt{M}\leftarrow\texttt{M}\cup\{m\}$.
531+
\item (Machine) Let $m$ be the requirement machine for this component, creating it first if necessary. If $m\not\in\texttt{M}$, set $\texttt{M}\leftarrow\texttt{M}\cup\{m\}$.
532532
\item (Successors) Add each successor of $p$ to the worklist.
533533
\item (Loop) Go back to Step~1.
534534
\item (Collect) Return the concatenation of the local rules from each $m\in\texttt{M}$.

docs/Generics/chapters/completion.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ \chapter{Completion}\label{completion}
351351
This new kind of trie lookup can be thought of as a \index{coroutine}coroutine or an iterator, yielding zero or more results as the search proceeds. We implement it as a higher-order function taking a callback.
352352

353353
\begin{algorithm}[Overlap lookup in rule trie]\label{overlap trie lookup}
354-
Takes a term $t$, position $i$ with $0\leq i<|t|$, and a callback. For each rule $u\Rightarrow v$ where $t[i:]$ is a prefix of $u$ or $u$ is a prefix of $t[i:]$, invokes the the callback with the rule $u\Rightarrow v$.
354+
Takes a term $t$, position $i$ with $0\leq i<|t|$, and a callback. For each rule $u\Rightarrow v$ where $t[i:]$ is a prefix of $u$ or $u$ is a prefix of $t[i:]$, invokes the callback with the rule $u\Rightarrow v$.
355355
\begin{enumerate}
356356
\item (Initialize) Set \texttt{N} to the root node of the trie.
357357
\item (End) If $i=|t|$, we've reached the end of the term. Perform a pre-order traversal of all child nodes of \texttt{N}, and for those children that have an associated rewrite rule, invoke the callback with that rule (this is the case where $t[i:]$ is a prefix of each $u$).

docs/ReferenceGuides/UnderscoredAttributes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1135,7 +1135,7 @@ doing a textual search.
11351135

11361136
Like `@available`, this attribute indicates a decl is available only as an SPI.
11371137
This implies several behavioral changes comparing to regular `@available`:
1138-
1. Type checker diagnoses when a client accidently exposes such a symbol in library APIs.
1138+
1. Type checker diagnoses when a client accidentally exposes such a symbol in library APIs.
11391139
2. When emitting public interfaces, `@_spi_available` is printed as `@available(platform, unavailable)`.
11401140
3. ClangImporter imports ObjC macros `SPI_AVAILABLE` and `__SPI_AVAILABLE` to this attribute.
11411141

include/swift/AST/Expr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4716,7 +4716,7 @@ class ApplyExpr : public Expr {
47164716
/// complete type-checking.
47174717
///
47184718
/// Returns the thrown error destination, which includes both the type
4719-
/// thrown from this application as well as the the context's error type,
4719+
/// thrown from this application as well as the context's error type,
47204720
/// which may be different.
47214721
ThrownErrorDestination throws() const {
47224722
assert(Bits.ApplyExpr.ThrowsIsSet);

0 commit comments

Comments
 (0)