Skip to content

Fix typos in docs / comments / method name #227

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from Dec 5, 2015
Merged
4 changes: 2 additions & 2 deletions docs/proposals/OptimizerEffects.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Introduction
This document formalizes the effects that functions have on program
state for the purpose of facilitating compiler optimization. By
modeling more precise function effects, the optimizer can make more
assumptions leading to more agressive transformation of the program.
assumptions leading to more aggressive transformation of the program.

Function effects may be deduced by the compiler during program
analyis. However, in certain situations it is helpful to directly
Expand Down Expand Up @@ -919,5 +919,5 @@ Generally, a default-safe policy provides a much better user model
from some effects. For example, we could decide that functions cannot
affect unspecified state by default. If the user accesses globals,
they then need to annotate their function. However, default safety
dictates that any neccessary annotations should be introduced before
dictates that any necessary annotations should be introduced before
declaring API stability.
2 changes: 1 addition & 1 deletion docs/proposals/containers_value_type.html
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ <h2>
<code>archives</code> is an in-out argument. And <i>just as importantly</i>,
that <code>archivePath</code> is <b>not</b> to be modified within
<code>_checkPathForArchiveAndAddToArray</code>. However if
<code>archivePath</code> is a mutable object with reference semantics, we loose
<code>archivePath</code> is a mutable object with reference semantics, we lose
that ability to locally reason about this code, even in Swift.
</p>

Expand Down
2 changes: 1 addition & 1 deletion docs/proposals/valref.rst
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ Instance variables can be explicitly declared ``val`` or ``ref``::
When a value is copied, all of its instance variables declared ``val``
(implicitly or explicitly) are copied. Instance variables declared
``ref`` merely have their reference counts incremented (i.e. the
refrence is copied). Therefore, when the defaults are in play, the
reference is copied). Therefore, when the defaults are in play, the
semantic rules already defined for Swift are preserved.

The new rules are as follows:
Expand Down
2 changes: 1 addition & 1 deletion include/swift/Parse/Lexer.h
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ class Lexer {
}

/// \brief Retrieve the source location that points just past the
/// end of the token refered to by \c Loc.
/// end of the token referred to by \c Loc.
///
/// \param SM The source manager in which the given source location
/// resides.
Expand Down
4 changes: 2 additions & 2 deletions include/swift/SIL/Dominance.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class DominanceInfo : public llvm::DominatorTreeBase<SILBasicBlock> {

/// Return true if the other dominator tree does not match this dominator
/// tree.
inline bool errorOccuredOnComparison(const DominanceInfo &Other) const {
inline bool errorOccurredOnComparison(const DominanceInfo &Other) const {
const auto *R = getRootNode();
const auto *OtherR = Other.getRootNode();

Expand Down Expand Up @@ -131,7 +131,7 @@ class PostDominanceInfo : public llvm::DominatorTreeBase<SILBasicBlock> {

/// Return true if the other dominator tree does not match this dominator
/// tree.
inline bool errorOccuredOnComparison(const PostDominanceInfo &Other) const {
inline bool errorOccurredOnComparison(const PostDominanceInfo &Other) const {
const auto *R = getRootNode();
const auto *OtherR = Other.getRootNode();

Expand Down
2 changes: 1 addition & 1 deletion include/swift/SILAnalysis/LoopRegionAnalysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ class LoopRegion {
llvm::SmallVector<SubregionID, 16> Subregions;

/// A map from RPO number of a subregion loop's preheader to a subloop
/// regions id. This is neccessary since we represent a loop in the
/// regions id. This is necessary since we represent a loop in the
/// Subregions array by the RPO number of its header.
llvm::SmallVector<std::pair<unsigned, unsigned>, 2> Subloops;

Expand Down
2 changes: 1 addition & 1 deletion lib/IRGen/GenDecl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ void IRGenModuleDispatcher::emitGlobalTopLevel() {
}

void IRGenModule::finishEmitAfterTopLevel() {
// Emit the implicit import of the swift standard libary.
// Emit the implicit import of the swift standard library.
if (DebugInfo) {
std::pair<swift::Identifier, swift::SourceLoc> AccessPath[] = {
{ Context.StdlibModuleName, swift::SourceLoc() }
Expand Down
2 changes: 1 addition & 1 deletion lib/IRGen/IRGenDebugInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class IRGenDebugInfo {

Location LastDebugLoc; /// The last location that was emitted.
const SILDebugScope *LastScope; /// The scope of that last location.
bool IsLibrary; /// Whether this is a libary or a top level module.
bool IsLibrary; /// Whether this is a library or a top level module.
#ifndef NDEBUG
/// The basic block where the location was last changed.
llvm::BasicBlock *LastBasicBlock;
Expand Down
4 changes: 2 additions & 2 deletions lib/SIL/Dominance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ void DominanceInfo::verify() const {
DominanceInfo OtherDT(F);

// And compare.
if (errorOccuredOnComparison(OtherDT)) {
if (errorOccurredOnComparison(OtherDT)) {
llvm::errs() << "DominatorTree is not up to date!\nComputed:\n";
print(llvm::errs());
llvm::errs() << "\nActual:\n";
Expand Down Expand Up @@ -102,7 +102,7 @@ void PostDominanceInfo::verify() const {
PostDominanceInfo OtherDT(F);

// And compare.
if (errorOccuredOnComparison(OtherDT)) {
if (errorOccurredOnComparison(OtherDT)) {
llvm::errs() << "PostDominatorTree is not up to date!\nComputed:\n";
print(llvm::errs());
llvm::errs() << "\nActual:\n";
Expand Down
2 changes: 1 addition & 1 deletion lib/SILPasses/ARC/GlobalARCPairingAnalysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ struct ARCMatchingSet {
llvm::SetVector<SILInstruction *> Increments;

/// An insertion point for an increment means the earliest point in the
/// program after the increment has occured that the increment can be moved to
/// program after the increment has occurred that the increment can be moved to
/// without moving the increment over an instruction that may decrement a
/// reference count.
llvm::SetVector<SILInstruction *> IncrementInsertPts;
Expand Down
2 changes: 1 addition & 1 deletion lib/SILPasses/IPO/CapturePromotion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ void ReachabilityInfo::compute() {
if (!Changed) {
// If we have not detected a change yet, then calculate new
// reachabilities into a new bit vector so we can determine if any
// change has occured.
// change has occurred.
NewSet = CurSet;
for (auto PI = BB.pred_begin(), PE = BB.pred_end(); PI != PE; ++PI) {
unsigned PredID = BlockMap[*PI];
Expand Down
2 changes: 1 addition & 1 deletion lib/SILPasses/Loop/ArrayBoundsCheckOpts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1069,7 +1069,7 @@ static bool hoistBoundsChecks(SILLoop *Loop, DominanceInfo *DT, SILLoopInfo *LI,

auto *Preheader = Loop->getLoopPreheader();
if (!Preheader) {
// TODO: create one if neccessary.
// TODO: create one if necessary.
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/SILPasses/Loop/COWArrayOpt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2235,7 +2235,7 @@ void ArrayPropertiesSpecializer::specializeLoopNest() {
auto *CheckBlock = splitBasicBlockAndBranch(B,
HoistableLoopPreheader->getTerminator(), DomTree, nullptr);

// Get the exit blocks of the orignal loop.
// Get the exit blocks of the original loop.
auto *Header = CheckBlock->getSingleSuccessor();
assert(Header);

Expand Down
2 changes: 1 addition & 1 deletion lib/Sema/CSDiag.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2252,7 +2252,7 @@ diagnoseUnviableLookupResults(MemberLookupResult &result, Type baseObjTy,
return;
}

// In the absense of a better conversion constraint failure, point out the
// In the absence of a better conversion constraint failure, point out the
// inability to find an appropriate overload.
bool FailureDiagnosis::diagnoseGeneralOverloadFailure(Constraint *constraint) {
Constraint *bindOverload = constraint;
Expand Down
2 changes: 1 addition & 1 deletion lib/Sema/ConstraintSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -1145,7 +1145,7 @@ class ConstraintSystem {

Constraint *failedConstraint = nullptr;

/// \brief Failures that occured while solving.
/// \brief Failures that occurred while solving.
///
/// FIXME: We really need to track overload sets and type variable bindings
/// to make any sense of this data. Also, it probably belongs within
Expand Down
2 changes: 1 addition & 1 deletion lib/Serialization/DeserializeSIL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ SILFunction *SILDeserializer::readSILFunction(DeclID FID,
// If CurrentBB is empty, just return fn. The code in readSILInstruction
// assumes that such a situation means that fn is a declaration. Thus it
// is using return false to mean two different things, error a failure
// occured and this is a declaration. Work around that for now.
// occurred and this is a declaration. Work around that for now.
if (!CurrentBB)
return fn;

Expand Down
2 changes: 1 addition & 1 deletion stdlib/public/stubs/Stubs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ extern "C" uint64_t swift_float80ToString(char *Buffer, size_t BufferLength,
/// line. Can be NULL if no characters were read.
///
/// \returns Size of character data returned in \c LinePtr, or -1
/// if an error occured, or EOF was reached.
/// if an error occurred, or EOF was reached.
extern "C" ssize_t swift_stdlib_readLine_stdin(char **LinePtr) {
size_t Capacity = 0;
return getline(LinePtr, &Capacity, stdin);
Expand Down
2 changes: 1 addition & 1 deletion utils/benchmark/Richards/richards.swift
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ struct Richards {
if v2.count == 0 {
return holdself()
}
// Orignal C impl masks with MAXINT. Why?
// Original C impl masks with MAXINT. Why?
if (v1.taskid & 1) == 0 {
v1 = Task.Val1.TaskID(v1.taskid >> 1)
return release(TIDevA)
Expand Down