aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile
diff options
context:
space:
mode:
authorOleksandr Redko <oleksandr.red+github@gmail.com>2024-08-19 00:07:37 +0300
committerGopher Robot <gobot@golang.org>2024-08-19 19:09:04 +0000
commitd5f7da79870800ac2f7c2a68501f73a83d481d16 (patch)
treea55ef726fd71e6a9ebe82ecd42966f8832378515 /src/cmd/compile
parent433c1d3b4ab41fa4272bd61f8ad2918ccd1e390d (diff)
downloadgo-d5f7da79870800ac2f7c2a68501f73a83d481d16.tar.xz
all: remove duplicated words in comments
Change-Id: Id991ec0826a4e2857f00330b4b7ff2b71907b789 Reviewed-on: https://go-review.googlesource.com/c/go/+/606615 Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Robert Griesemer <gri@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Robert Griesemer <gri@google.com> Commit-Queue: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/cmd/compile')
-rw-r--r--src/cmd/compile/internal/devirtualize/devirtualize.go2
-rw-r--r--src/cmd/compile/internal/devirtualize/pgo.go2
-rw-r--r--src/cmd/compile/internal/ir/reassignment.go2
-rw-r--r--src/cmd/compile/internal/liveness/intervals.go2
-rw-r--r--src/cmd/compile/internal/liveness/mergelocals.go2
-rw-r--r--src/cmd/compile/internal/ssa/prove.go2
-rw-r--r--src/cmd/compile/internal/types2/signature.go2
-rw-r--r--src/cmd/compile/internal/types2/typeset.go2
8 files changed, 8 insertions, 8 deletions
diff --git a/src/cmd/compile/internal/devirtualize/devirtualize.go b/src/cmd/compile/internal/devirtualize/devirtualize.go
index 5d1b952627..372d058094 100644
--- a/src/cmd/compile/internal/devirtualize/devirtualize.go
+++ b/src/cmd/compile/internal/devirtualize/devirtualize.go
@@ -63,7 +63,7 @@ func StaticCall(call *ir.CallExpr) {
// dictionary parameter. We could devirtualize this call if we
// could derive an appropriate dictionary argument.
//
- // TODO(mdempsky): If typ has has a promoted non-generic method,
+ // TODO(mdempsky): If typ has a promoted non-generic method,
// then that method won't require a dictionary argument. We could
// still devirtualize those calls.
//
diff --git a/src/cmd/compile/internal/devirtualize/pgo.go b/src/cmd/compile/internal/devirtualize/pgo.go
index 783940cbc2..01677d82b6 100644
--- a/src/cmd/compile/internal/devirtualize/pgo.go
+++ b/src/cmd/compile/internal/devirtualize/pgo.go
@@ -242,7 +242,7 @@ func maybeDevirtualizeFunctionCall(p *pgoir.Profile, fn *ir.Func, call *ir.CallE
}
// runtime.memhash_varlen does not look like a closure, but it uses
// runtime.getclosureptr to access data encoded by callers, which are
- // are generated by cmd/compile/internal/reflectdata.genhash.
+ // generated by cmd/compile/internal/reflectdata.genhash.
if callee.Sym().Pkg.Path == "runtime" && callee.Sym().Name == "memhash_varlen" {
if base.Debug.PGODebug >= 3 {
fmt.Printf("callee %s is a closure (runtime.memhash_varlen), skipping\n", ir.FuncName(callee))
diff --git a/src/cmd/compile/internal/ir/reassignment.go b/src/cmd/compile/internal/ir/reassignment.go
index 9974292471..ff54f708c2 100644
--- a/src/cmd/compile/internal/ir/reassignment.go
+++ b/src/cmd/compile/internal/ir/reassignment.go
@@ -18,7 +18,7 @@ import (
// opposed to a new walk on every call).
type ReassignOracle struct {
fn *Func
- // maps candidate name to its defining assignment (or for
+ // maps candidate name to its defining assignment (or
// for params, defining func).
singleDef map[*Name]Node
}
diff --git a/src/cmd/compile/internal/liveness/intervals.go b/src/cmd/compile/internal/liveness/intervals.go
index 4757cca3ce..feca35b306 100644
--- a/src/cmd/compile/internal/liveness/intervals.go
+++ b/src/cmd/compile/internal/liveness/intervals.go
@@ -168,7 +168,7 @@ func (c *IntervalsBuilder) Live(pos int) error {
}
// Kill method should be invoked on instruction at position p if instr
-// should be treated as as having a kill (lifetime end) for the
+// should be treated as having a kill (lifetime end) for the
// resource. See the example in the comment at the beginning of this
// file for an example. Note that if we see a kill at position K for a
// resource currently live since J, this will result in a lifetime
diff --git a/src/cmd/compile/internal/liveness/mergelocals.go b/src/cmd/compile/internal/liveness/mergelocals.go
index 017c4d1dbb..f33ebd0d81 100644
--- a/src/cmd/compile/internal/liveness/mergelocals.go
+++ b/src/cmd/compile/internal/liveness/mergelocals.go
@@ -682,7 +682,7 @@ func nextRegion(cands []*ir.Name, idx int) int {
// given subrange of cands described by st and en (indices into our
// candidate var list), where the variables within this range have
// already been determined to be compatible with respect to type,
-// size, etc. Overlapping is done in a a greedy fashion: we select the
+// size, etc. Overlapping is done in a greedy fashion: we select the
// first element in the st->en range, then walk the rest of the
// elements adding in vars whose lifetimes don't overlap with the
// first element, then repeat the process until we run out of work.
diff --git a/src/cmd/compile/internal/ssa/prove.go b/src/cmd/compile/internal/ssa/prove.go
index 8acd38aa69..87d83ba762 100644
--- a/src/cmd/compile/internal/ssa/prove.go
+++ b/src/cmd/compile/internal/ssa/prove.go
@@ -618,7 +618,7 @@ func (ft *factsTable) newLimit(v *Value, newLim limit) bool {
// extract relation between its args. For example, if
// We learn v is false, and v is defined as a<b, then we learn a>=b.
if v.Type.IsBoolean() {
- // If we reach here, is is because we have a more restrictive
+ // If we reach here, it is because we have a more restrictive
// value for v than the default. The only two such values
// are constant true or constant false.
if lim.min != lim.max {
diff --git a/src/cmd/compile/internal/types2/signature.go b/src/cmd/compile/internal/types2/signature.go
index 8754f5492c..71d6032c07 100644
--- a/src/cmd/compile/internal/types2/signature.go
+++ b/src/cmd/compile/internal/types2/signature.go
@@ -134,7 +134,7 @@ func (check *Checker) funcType(sig *Signature, recvPar *syntax.Field, tparams []
}
// collectRecv extracts the method receiver and its type parameters (if any) from rparam.
-// It declares the type parameters (but not the receiver) in the the current scope, and
+// It declares the type parameters (but not the receiver) in the current scope, and
// returns the receiver variable and its type parameter list (if any).
func (check *Checker) collectRecv(rparam *syntax.Field, scopePos syntax.Pos) (recv *Var, recvTParamsList *TypeParamList) {
// Unpack the receiver parameter which is of the form
diff --git a/src/cmd/compile/internal/types2/typeset.go b/src/cmd/compile/internal/types2/typeset.go
index 9ea0a3e8f9..2577631a53 100644
--- a/src/cmd/compile/internal/types2/typeset.go
+++ b/src/cmd/compile/internal/types2/typeset.go
@@ -163,7 +163,7 @@ func computeInterfaceTypeSet(check *Checker, pos syntax.Pos, ityp *Interface) *_
// let any follow-on errors play out.
//
// TODO(gri) Consider recording when this happens and reporting
- // it as an error (but only if there were no other errors so to
+ // it as an error (but only if there were no other errors so
// to not have unnecessary follow-on errors).
if !ityp.complete {
return &topTypeSet