aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal
diff options
context:
space:
mode:
authorcui fliter <imcusg@gmail.com>2023-03-31 00:00:19 +0800
committerGopher Robot <gobot@golang.org>2023-04-04 14:20:53 +0000
commitd8d22664c65b0054fc9ea6ba7e945481348fc8fc (patch)
tree4064f3dcc84f382816d6cb50437c6267a1c63f57 /src/cmd/compile/internal
parentf62c9701b4bc61da6a5f4db8ef81d816f112430e (diff)
downloadgo-d8d22664c65b0054fc9ea6ba7e945481348fc8fc.tar.xz
all: fix misuses of "a" vs "an"
Fixes the misuse of "a" vs "an", according to English grammatical expectations and using https://www.a-or-an.com/ Change-Id: I53ac724070e3ff3d33c304483fe72c023c7cda47 Reviewed-on: https://go-review.googlesource.com/c/go/+/480536 Run-TryBot: shuang cui <imcusg@gmail.com> Reviewed-by: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com>
Diffstat (limited to 'src/cmd/compile/internal')
-rw-r--r--src/cmd/compile/internal/abt/avlint32.go2
-rw-r--r--src/cmd/compile/internal/ir/expr.go2
-rw-r--r--src/cmd/compile/internal/ir/val.go2
-rw-r--r--src/cmd/compile/internal/ssa/loopbce.go6
-rw-r--r--src/cmd/compile/internal/ssa/op.go2
-rw-r--r--src/cmd/compile/internal/ssa/poset.go2
-rw-r--r--src/cmd/compile/internal/types/type.go2
-rw-r--r--src/cmd/compile/internal/walk/assign.go4
8 files changed, 11 insertions, 11 deletions
diff --git a/src/cmd/compile/internal/abt/avlint32.go b/src/cmd/compile/internal/abt/avlint32.go
index 9800e03ac0..28c1642c6e 100644
--- a/src/cmd/compile/internal/abt/avlint32.go
+++ b/src/cmd/compile/internal/abt/avlint32.go
@@ -570,7 +570,7 @@ func (t *node32) lub(key int32, allow_eq bool) *node32 {
// t is too small, lub is to right.
t = t.right
} else {
- // t is a upper bound, record it and seek a better one.
+ // t is an upper bound, record it and seek a better one.
best = t
t = t.left
}
diff --git a/src/cmd/compile/internal/ir/expr.go b/src/cmd/compile/internal/ir/expr.go
index 5d82788008..39ebc37634 100644
--- a/src/cmd/compile/internal/ir/expr.go
+++ b/src/cmd/compile/internal/ir/expr.go
@@ -380,7 +380,7 @@ func (n *InlinedCallExpr) SingleResult() Node {
return n.ReturnVars[0]
}
-// A LogicalExpr is a expression X Op Y where Op is && or ||.
+// A LogicalExpr is an expression X Op Y where Op is && or ||.
// It is separate from BinaryExpr to make room for statements
// that must be executed before Y but after X.
type LogicalExpr struct {
diff --git a/src/cmd/compile/internal/ir/val.go b/src/cmd/compile/internal/ir/val.go
index b62174b141..75da5a1462 100644
--- a/src/cmd/compile/internal/ir/val.go
+++ b/src/cmd/compile/internal/ir/val.go
@@ -92,7 +92,7 @@ func Int64Val(n Node) int64 {
return x
}
-// Uint64Val returns n as an uint64.
+// Uint64Val returns n as a uint64.
// n must be an integer or rune constant.
func Uint64Val(n Node) uint64 {
if !IsConst(n, constant.Int) {
diff --git a/src/cmd/compile/internal/ssa/loopbce.go b/src/cmd/compile/internal/ssa/loopbce.go
index 273ead4942..b7dfaa33e3 100644
--- a/src/cmd/compile/internal/ssa/loopbce.go
+++ b/src/cmd/compile/internal/ssa/loopbce.go
@@ -93,7 +93,7 @@ func findIndVar(f *Func) []indVar {
var init *Value // starting value
var limit *Value // ending value
- // Check thet the control if it either ind </<= limit or limit </<= ind.
+ // Check that the control if it either ind </<= limit or limit </<= ind.
// TODO: Handle unsigned comparisons?
c := b.Controls[0]
inclusive := false
@@ -117,12 +117,12 @@ func findIndVar(f *Func) []indVar {
// for i := len(n)-1; i >= 0; i--
init, inc, nxt = parseIndVar(limit)
if init == nil {
- // No recognied induction variable on either operand
+ // No recognized induction variable on either operand
continue
}
// Ok, the arguments were reversed. Swap them, and remember that we're
- // looking at a ind >/>= loop (so the induction must be decrementing).
+ // looking at an ind >/>= loop (so the induction must be decrementing).
ind, limit = limit, ind
less = false
}
diff --git a/src/cmd/compile/internal/ssa/op.go b/src/cmd/compile/internal/ssa/op.go
index 9434c0ef16..e2319d78d6 100644
--- a/src/cmd/compile/internal/ssa/op.go
+++ b/src/cmd/compile/internal/ssa/op.go
@@ -372,7 +372,7 @@ const (
auxARM64BitField // aux is an arm64 bitfield lsb and width packed into auxInt
auxS390XRotateParams // aux is a s390x rotate parameters object encoding start bit, end bit and rotate amount
auxS390XCCMask // aux is a s390x 4-bit condition code mask
- auxS390XCCMaskInt8 // aux is a s390x 4-bit condition code mask, auxInt is a int8 immediate
+ auxS390XCCMaskInt8 // aux is a s390x 4-bit condition code mask, auxInt is an int8 immediate
auxS390XCCMaskUint8 // aux is a s390x 4-bit condition code mask, auxInt is a uint8 immediate
)
diff --git a/src/cmd/compile/internal/ssa/poset.go b/src/cmd/compile/internal/ssa/poset.go
index ad89de3f13..19d9f9004d 100644
--- a/src/cmd/compile/internal/ssa/poset.go
+++ b/src/cmd/compile/internal/ssa/poset.go
@@ -56,7 +56,7 @@ const (
)
// posetUndo represents an undo pass to be performed.
-// It's an union of fields that can be used to store information,
+// It's a union of fields that can be used to store information,
// and typ is the discriminant, that specifies which kind
// of operation must be performed. Not all fields are always used.
type posetUndo struct {
diff --git a/src/cmd/compile/internal/types/type.go b/src/cmd/compile/internal/types/type.go
index 513ce51b2c..9775d37b39 100644
--- a/src/cmd/compile/internal/types/type.go
+++ b/src/cmd/compile/internal/types/type.go
@@ -1345,7 +1345,7 @@ func (t *Type) IsUnsafePtr() bool {
return t.kind == TUNSAFEPTR
}
-// IsUintptr reports whether t is an uintptr.
+// IsUintptr reports whether t is a uintptr.
func (t *Type) IsUintptr() bool {
return t.kind == TUINTPTR
}
diff --git a/src/cmd/compile/internal/walk/assign.go b/src/cmd/compile/internal/walk/assign.go
index 8f27329da8..4207b487a7 100644
--- a/src/cmd/compile/internal/walk/assign.go
+++ b/src/cmd/compile/internal/walk/assign.go
@@ -609,7 +609,7 @@ func isAppendOfMake(n ir.Node) bool {
}
// y must be either an integer constant or the largest possible positive value
- // of variable y needs to fit into an uint.
+ // of variable y needs to fit into a uint.
// typecheck made sure that constant arguments to make are not negative and fit into an int.
@@ -652,7 +652,7 @@ func isAppendOfMake(n ir.Node) bool {
// growslice will have done the clearing for us.
func extendSlice(n *ir.CallExpr, init *ir.Nodes) ir.Node {
- // isAppendOfMake made sure all possible positive values of l2 fit into an uint.
+ // isAppendOfMake made sure all possible positive values of l2 fit into a uint.
// The case of l2 overflow when converting from e.g. uint to int is handled by an explicit
// check of l2 < 0 at runtime which is generated below.
l2 := typecheck.Conv(n.Args[1].(*ir.MakeExpr).Len, types.Types[types.TINT])