]> Cypherpunks.ru repositories - gostls13.git/commitdiff
cmd/compile/internal: fix a few function names on comments
authorcui fliter <imcusg@gmail.com>
Sun, 2 Oct 2022 03:36:51 +0000 (03:36 +0000)
committerGopher Robot <gobot@golang.org>
Mon, 3 Oct 2022 17:47:02 +0000 (17:47 +0000)
Change-Id: If78c6d3c6183494f71f2857e496e172a789da39f
GitHub-Last-Rev: 58e0b75052a92cb720371d2b3c75e1de79d79bdc
GitHub-Pull-Request: golang/go#55992
Reviewed-on: https://go-review.googlesource.com/c/go/+/437517
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Keith Randall <khr@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
Auto-Submit: Keith Randall <khr@golang.org>

15 files changed:
src/cmd/compile/internal/base/mapfile_mmap.go
src/cmd/compile/internal/base/print.go
src/cmd/compile/internal/importer/iimport.go
src/cmd/compile/internal/ir/abi.go
src/cmd/compile/internal/ir/fmt.go
src/cmd/compile/internal/logopt/log_opts.go
src/cmd/compile/internal/noder/stencil.go
src/cmd/compile/internal/objw/objw.go
src/cmd/compile/internal/ssa/expand_calls.go
src/cmd/compile/internal/ssa/op.go
src/cmd/compile/internal/ssa/shortcircuit.go
src/cmd/compile/internal/typecheck/subr.go
src/cmd/compile/internal/types/type.go
src/cmd/compile/internal/walk/expr.go
src/cmd/compile/internal/walk/order.go

index b01d0f4efc664718edffbacd760ef0e7bcd6ad59..ceeb3c82d073a2bd95a8abc70907fd2a731663e7 100644 (file)
@@ -18,7 +18,7 @@ import (
 // TODO(mdempsky): Is there a higher-level abstraction that still
 // works well for iimport?
 
-// mapFile returns length bytes from the file starting at the
+// MapFile returns length bytes from the file starting at the
 // specified offset as a string.
 func MapFile(f *os.File, offset, length int64) (string, error) {
        // POSIX mmap: "The implementation may require that off is a
index 955f9d207760d5f6fc9c170244605c2ebc24fc69..70a9e9fb74eb4d5dcc2a546bcc5abd7313ae8dfd 100644 (file)
@@ -161,7 +161,7 @@ func UpdateErrorDot(line string, name, expr string) {
        }
 }
 
-// Warnf reports a formatted warning at the current line.
+// Warn reports a formatted warning at the current line.
 // In general the Go compiler does NOT generate warnings,
 // so this should be used only when the user has opted in
 // to additional output by setting a particular flag.
index 82aff18335472b6e17107f0f68675018687d446b..24d3d4b6e78d17b7767de759ed81688e1617e89c 100644 (file)
@@ -79,7 +79,7 @@ const (
 
 const io_SeekCurrent = 1 // io.SeekCurrent (not defined in Go 1.4)
 
-// iImportData imports a package from the serialized package data
+// ImportData imports a package from the serialized package data
 // and returns the number of bytes consumed and a reference to the package.
 // If the export data version is not recognized or the format is otherwise
 // compromised, an error is returned.
index 938e5564aedfbab03ce18eb7978a54543abf4972..cf223ff395054d68c6987b45d808699abac04b75 100644 (file)
@@ -33,7 +33,7 @@ func InitLSym(f *Func, hasBody bool) {
        }
 }
 
-// setupTextLsym initializes the LSym for a with-body text symbol.
+// setupTextLSym initializes the LSym for a with-body text symbol.
 func setupTextLSym(f *Func, flag int) {
        if f.Dupok() {
                flag |= obj.DUPOK
index 7a0d8a62c1b87346d507d38840f3b05399a96f38..bac172dbbd540c1c1adeea83c419647d93b3abed 100644 (file)
@@ -123,8 +123,8 @@ func (o Op) Format(s fmt.State, verb rune) {
 
 // Node
 
-// FmtNode implements formatting for a Node n.
-// Every Node implementation must define a Format method that calls FmtNode.
+// fmtNode implements formatting for a Node n.
+// Every Node implementation must define a Format method that calls fmtNode.
 // The valid formats are:
 //
 //     %v      Go syntax
index 09825e8278fd4fec9975a64170f29230cec112a3..711b5b9d75c23f4a50c3b2d0e745cd5c4273fbc2 100644 (file)
@@ -329,7 +329,7 @@ func NewLoggedOpt(pos src.XPos, what, pass, funcName string, args ...interface{}
        return &LoggedOpt{pos, pass, funcName, what, args}
 }
 
-// Logopt logs information about a (usually missed) optimization performed by the compiler.
+// LogOpt logs information about a (usually missed) optimization performed by the compiler.
 // Pos is the source position (including inlining), what is the message, pass is which pass created the message,
 // funcName is the name of the function
 func LogOpt(pos src.XPos, what, pass, funcName string, args ...interface{}) {
index 8fd40fb9ba074a983bfbd4148051fa2b6939a199..26a088e3636ae388006a2c7c1a1c7fac98c3388f 100644 (file)
@@ -2265,7 +2265,7 @@ func parameterizedBy1(t *types.Type, params []*types.Type, visited map[*types.Ty
        }
 }
 
-// startClosures starts creation of a closure that has the function type typ. It
+// startClosure starts creation of a closure that has the function type typ. It
 // creates all the formal params and results according to the type typ. On return,
 // the body and closure variables of the closure must still be filled in, and
 // ir.UseClosure() called.
index a73ed286ae014c1cf71042b268342230760efb90..4189337b8f106ce976795773d5f6e17716d13108 100644 (file)
@@ -73,7 +73,7 @@ func Global(s *obj.LSym, width int32, flags int16) {
        base.Ctxt.Globl(s, int64(width), int(flags))
 }
 
-// Bitvec writes the contents of bv into s as sequence of bytes
+// BitVec writes the contents of bv into s as sequence of bytes
 // in little-endian order, and returns the next unused offset.
 func BitVec(s *obj.LSym, off int, bv bitvec.BitVec) int {
        // Runtime reads the bitmaps as byte arrays. Oblige.
index a85d763a30767c438dc56293f69db3a9cdca4451..949a8d3a2487ef8dac8c71f12988857df05289fe 100644 (file)
@@ -1786,7 +1786,7 @@ func (x *expandState) newArgToMemOrRegs(baseArg, toReplace *Value, offset int64,
 
 }
 
-// argOpAndRegisterFor converts an abi register index into an ssa Op and corresponding
+// ArgOpAndRegisterFor converts an abi register index into an ssa Op and corresponding
 // arg register index.
 func ArgOpAndRegisterFor(r abi.RegIndex, abiConfig *abi.ABIConfig) (Op, int64) {
        i := abiConfig.FloatIndexFor(r)
index a3e8dcd2f624f4581e468d9fea5148e847fbfda9..d1b88d9f0971cda434bafbbfdf451b5c5df78024 100644 (file)
@@ -478,7 +478,7 @@ const (
        BoundsKindCount
 )
 
-// boundsAPI determines which register arguments a bounds check call should use. For an [a:b:c] slice, we do:
+// boundsABI determines which register arguments a bounds check call should use. For an [a:b:c] slice, we do:
 //
 //     CMPQ c, cap
 //     JA   fail1
index 5f1f8921207a49a1fd92b0b49161d28c9d11d7af..d7d0b6fe3335b6218f1d0789fee680fb54e2906b 100644 (file)
@@ -4,7 +4,7 @@
 
 package ssa
 
-// Shortcircuit finds situations where branch directions
+// shortcircuit finds situations where branch directions
 // are always correlated and rewrites the CFG to take
 // advantage of that fact.
 // This optimization is useful for compiling && and || expressions.
index f616b13781c4d8f8d9b63ddcdff6f1e0b2cd3bef..419396d87eec2fcd513a4ea8687dcd9558bcbec4 100644 (file)
@@ -50,7 +50,7 @@ func NewFuncParams(tl *types.Type, mustname bool) []*ir.Field {
        return args
 }
 
-// newname returns a new ONAME Node associated with symbol s.
+// NewName returns a new ONAME Node associated with symbol s.
 func NewName(s *types.Sym) *ir.Name {
        n := ir.NewNameAt(base.Pos, s)
        n.Curfn = ir.CurFunc
@@ -62,7 +62,7 @@ func NodAddr(n ir.Node) *ir.AddrExpr {
        return NodAddrAt(base.Pos, n)
 }
 
-// nodAddrPos returns a node representing &n at position pos.
+// NodAddrAt returns a node representing &n at position pos.
 func NodAddrAt(pos src.XPos, n ir.Node) *ir.AddrExpr {
        n = markAddrOf(n)
        return ir.NewAddrExpr(pos, n)
@@ -1419,7 +1419,7 @@ func (ts *Tsubster) tinter(t *types.Type, force bool) *types.Type {
        return t
 }
 
-// genericSym returns the name of the base generic type for the type named by
+// genericTypeName returns the name of the base generic type for the type named by
 // sym. It simply returns the name obtained by removing everything after the
 // first bracket ("[").
 func genericTypeName(sym *types.Sym) string {
index a69245ea6967b764b781bafce4c8b9cc0a571387..f4e6b92bd641c2f8519cfb8249749d123381ee44 100644 (file)
@@ -1805,7 +1805,7 @@ func fieldsHasShape(fields []*Field) bool {
        return false
 }
 
-// NewBasic returns a new basic type of the given kind.
+// newBasic returns a new basic type of the given kind.
 func newBasic(kind Kind, obj Object) *Type {
        t := newType(kind)
        t.obj = obj
index ede904c8a37d93e554f310d3a939ccb27f8dfc26..7205107f6fa2af6503f0dcbbd8f755f87230e934 100644 (file)
@@ -712,7 +712,7 @@ func walkDotType(n *ir.TypeAssertExpr, init *ir.Nodes) ir.Node {
        return n
 }
 
-// walkDynamicdotType walks an ODYNAMICDOTTYPE or ODYNAMICDOTTYPE2 node.
+// walkDynamicDotType walks an ODYNAMICDOTTYPE or ODYNAMICDOTTYPE2 node.
 func walkDynamicDotType(n *ir.DynamicTypeAssertExpr, init *ir.Nodes) ir.Node {
        n.X = walkExpr(n.X, init)
        n.RType = walkExpr(n.RType, init)
index d4239347219d90e5c20a06504153298af9e14690..c7c3d97621f914c0dd929c726a2341b4a597e62c 100644 (file)
@@ -44,7 +44,7 @@ type orderState struct {
        edit func(ir.Node) ir.Node // cached closure of o.exprNoLHS
 }
 
-// Order rewrites fn.Nbody to apply the ordering constraints
+// order rewrites fn.Nbody to apply the ordering constraints
 // described in the comment at the top of the file.
 func order(fn *ir.Func) {
        if base.Flag.W > 1 {