aboutsummaryrefslogtreecommitdiff
path: root/src/cmd
diff options
context:
space:
mode:
authorJes Cok <xigua67damn@gmail.com>2025-10-16 01:16:02 +0000
committerGopher Robot <gobot@golang.org>2025-10-17 09:52:21 -0700
commitdbbb1bfc912457abcd99eec1ffae74d52ecb55a5 (patch)
tree159996f26af8b27e6b11fba488d69c007ca67a37 /src/cmd
parent09830901714d8b3a2cc5fb33e87a81886b21ea24 (diff)
downloadgo-dbbb1bfc912457abcd99eec1ffae74d52ecb55a5.tar.xz
all: correct name for comments
Change-Id: I390c380349e99ad421264b673ad7734eddb639d3 GitHub-Last-Rev: 32e849a6420574b0d878b9a449a8c044fd6ebdd1 GitHub-Pull-Request: golang/go#75905 Reviewed-on: https://go-review.googlesource.com/c/go/+/711941 Reviewed-by: Jorropo <jorropo.pgm@gmail.com> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com> Auto-Submit: Jorropo <jorropo.pgm@gmail.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Keith Randall <khr@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Diffstat (limited to 'src/cmd')
-rw-r--r--src/cmd/compile/internal/bitvec/bv.go2
-rw-r--r--src/cmd/compile/internal/ir/expr.go4
-rw-r--r--src/cmd/compile/internal/s390x/ggen.go2
-rw-r--r--src/cmd/compile/internal/types/type.go2
-rw-r--r--src/cmd/compile/internal/types2/object.go2
-rw-r--r--src/cmd/go/internal/vet/vet.go4
-rw-r--r--src/cmd/internal/obj/x86/evex.go2
-rw-r--r--src/cmd/internal/objfile/goobj.go2
-rw-r--r--src/cmd/link/internal/loader/symbolbuilder.go2
9 files changed, 11 insertions, 11 deletions
diff --git a/src/cmd/compile/internal/bitvec/bv.go b/src/cmd/compile/internal/bitvec/bv.go
index d3133dcd2d..9214aa6cd0 100644
--- a/src/cmd/compile/internal/bitvec/bv.go
+++ b/src/cmd/compile/internal/bitvec/bv.go
@@ -93,7 +93,7 @@ func (bv BitVec) Unset(i int32) {
bv.B[i/wordBits] &^= mask
}
-// bvnext returns the smallest index >= i for which bvget(bv, i) == 1.
+// Next returns the smallest index >= i for which bvget(bv, i) == 1.
// If there is no such index, bvnext returns -1.
func (bv BitVec) Next(i int32) int32 {
if i >= bv.N {
diff --git a/src/cmd/compile/internal/ir/expr.go b/src/cmd/compile/internal/ir/expr.go
index 037957b676..7a75ff40f2 100644
--- a/src/cmd/compile/internal/ir/expr.go
+++ b/src/cmd/compile/internal/ir/expr.go
@@ -617,7 +617,7 @@ func (o Op) IsSlice3() bool {
return false
}
-// A SliceHeader expression constructs a slice header from its parts.
+// A SliceHeaderExpr constructs a slice header from its parts.
type SliceHeaderExpr struct {
miniExpr
Ptr Node
@@ -665,7 +665,7 @@ func NewStarExpr(pos src.XPos, x Node) *StarExpr {
func (n *StarExpr) Implicit() bool { return n.flags&miniExprImplicit != 0 }
func (n *StarExpr) SetImplicit(b bool) { n.flags.set(miniExprImplicit, b) }
-// A TypeAssertionExpr is a selector expression X.(Type).
+// A TypeAssertExpr is a selector expression X.(Type).
// Before type-checking, the type is Ntype.
type TypeAssertExpr struct {
miniExpr
diff --git a/src/cmd/compile/internal/s390x/ggen.go b/src/cmd/compile/internal/s390x/ggen.go
index 70e4031224..c4f88e7826 100644
--- a/src/cmd/compile/internal/s390x/ggen.go
+++ b/src/cmd/compile/internal/s390x/ggen.go
@@ -11,7 +11,7 @@ import (
"cmd/internal/obj/s390x"
)
-// clearLoopCutOff is the (somewhat arbitrary) value above which it is better
+// clearLoopCutoff is the (somewhat arbitrary) value above which it is better
// to have a loop of clear instructions (e.g. XCs) rather than just generating
// multiple instructions (i.e. loop unrolling).
// Must be between 256 and 4096.
diff --git a/src/cmd/compile/internal/types/type.go b/src/cmd/compile/internal/types/type.go
index 6a3e9b512e..da859290f7 100644
--- a/src/cmd/compile/internal/types/type.go
+++ b/src/cmd/compile/internal/types/type.go
@@ -328,7 +328,7 @@ func (t *Type) funcType() *Func {
return t.extra.(*Func)
}
-// StructType contains Type fields specific to struct types.
+// Struct contains Type fields specific to struct types.
type Struct struct {
fields fields
diff --git a/src/cmd/compile/internal/types2/object.go b/src/cmd/compile/internal/types2/object.go
index 463ed30308..096b5653e5 100644
--- a/src/cmd/compile/internal/types2/object.go
+++ b/src/cmd/compile/internal/types2/object.go
@@ -328,7 +328,7 @@ func (obj *TypeName) IsAlias() bool {
}
}
-// A Variable represents a declared variable (including function parameters and results, and struct fields).
+// A Var represents a declared variable (including function parameters and results, and struct fields).
type Var struct {
object
origin *Var // if non-nil, the Var from which this one was instantiated
diff --git a/src/cmd/go/internal/vet/vet.go b/src/cmd/go/internal/vet/vet.go
index e274348bd6..f9579d498f 100644
--- a/src/cmd/go/internal/vet/vet.go
+++ b/src/cmd/go/internal/vet/vet.go
@@ -396,7 +396,7 @@ type jsonError struct {
Err string `json:"error"`
}
-// A TextEdit describes the replacement of a portion of a file.
+// A jsonTextEdit describes the replacement of a portion of a file.
// Start and End are zero-based half-open indices into the original byte
// sequence of the file, and New is the new text.
type jsonTextEdit struct {
@@ -424,7 +424,7 @@ type jsonDiagnostic struct {
Related []jsonRelatedInformation `json:"related,omitempty"`
}
-// A jsonRelated describes a secondary position and message related to
+// A jsonRelatedInformation describes a secondary position and message related to
// a primary diagnostic.
type jsonRelatedInformation struct {
Posn string `json:"posn"` // e.g. "file.go:line:column"
diff --git a/src/cmd/internal/obj/x86/evex.go b/src/cmd/internal/obj/x86/evex.go
index aa93cd8819..12fe034704 100644
--- a/src/cmd/internal/obj/x86/evex.go
+++ b/src/cmd/internal/obj/x86/evex.go
@@ -165,7 +165,7 @@ func evexZcase(zcase uint8) bool {
return zcase > Zevex_first && zcase < Zevex_last
}
-// evexSuffixBits carries instruction EVEX suffix set flags.
+// evexSuffix carries instruction EVEX suffix set flags.
//
// Examples:
//
diff --git a/src/cmd/internal/objfile/goobj.go b/src/cmd/internal/objfile/goobj.go
index e8b8b52251..c428e29c9b 100644
--- a/src/cmd/internal/objfile/goobj.go
+++ b/src/cmd/internal/objfile/goobj.go
@@ -227,7 +227,7 @@ func (f *goobjFile) pcln() (textStart uint64, symtab, pclntab []byte, err error)
return 0, nil, nil, fmt.Errorf("pcln not available in go object file")
}
-// Find returns the file name, line, and function data for the given pc.
+// PCToLine returns the file name, line, and function data for the given pc.
// Returns "",0,nil if unknown.
// This function implements the Liner interface in preference to pcln() above.
func (f *goobjFile) PCToLine(pc uint64) (string, int, *gosym.Func) {
diff --git a/src/cmd/link/internal/loader/symbolbuilder.go b/src/cmd/link/internal/loader/symbolbuilder.go
index 35749f9ea9..d385dec94a 100644
--- a/src/cmd/link/internal/loader/symbolbuilder.go
+++ b/src/cmd/link/internal/loader/symbolbuilder.go
@@ -139,7 +139,7 @@ func (sb *SymbolBuilder) SetRelocAdd(i int, a int64) {
sb.relocs[i].SetAdd(a)
}
-// SetRelocAdd sets the size of the 'i'-th relocation on this sym to 'sz'
+// SetRelocSiz sets the size of the 'i'-th relocation on this sym to 'sz'
func (sb *SymbolBuilder) SetRelocSiz(i int, sz uint8) {
sb.relocs[i].SetSiz(sz)
}