]> Cypherpunks.ru repositories - gostls13.git/commitdiff
all: fix typos in go file comments
authorMarcel Meyer <mm.marcelmeyer@gmail.com>
Thu, 19 Jan 2023 22:26:15 +0000 (22:26 +0000)
committerGopher Robot <gobot@golang.org>
Fri, 20 Jan 2023 03:27:26 +0000 (03:27 +0000)
This is the second round to look for spelling mistakes. This time the
manual sifting of the result list was made easier by filtering out
capitalized and camelcase words.

grep -r --include '*.go' -E '^// .*$' . | aspell list | grep -E -x '[A-Za-z]{1}[a-z]*' | sort | uniq

This PR will be imported into Gerrit with the title and first
comment (this text) used to generate the subject and body of
the Gerrit change.

Change-Id: Ie8a2092aaa7e1f051aa90f03dbaf2b9aaf5664a9
GitHub-Last-Rev: fc2bd6e0c51652f13a7588980f1408af8e6080f5
GitHub-Pull-Request: golang/go#57737
Reviewed-on: https://go-review.googlesource.com/c/go/+/461595
Auto-Submit: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
22 files changed:
misc/cgo/testshared/shared_test.go
src/cmd/compile/internal/inline/inl.go
src/cmd/compile/internal/ir/func.go
src/cmd/compile/internal/noder/expr.go
src/cmd/compile/internal/pgo/irgraph.go
src/cmd/compile/internal/ssa/compile.go
src/cmd/compile/internal/ssa/debug.go
src/cmd/compile/internal/test/testdata/arith_test.go
src/cmd/compile/internal/typecheck/subr.go
src/cmd/go/internal/modindex/read.go
src/cmd/go/internal/script/state.go
src/cmd/go/internal/work/init.go
src/cmd/go/internal/workcmd/use.go
src/cmd/internal/goobj/objfile.go
src/cmd/internal/obj/arm64/asm7.go
src/cmd/internal/obj/objfile.go
src/crypto/internal/alias/alias.go
src/debug/pe/symbol.go
src/internal/types/testdata/check/typeinst0.go
src/internal/types/testdata/check/typeparams.go
src/runtime/metrics.go
src/runtime/print.go

index b14fb1cb3a7b79d7cfafa4e29bd59790b89866e9..0b589d023bb06ebc3476c11c06b254ca4e057ccd 100644 (file)
@@ -1100,7 +1100,7 @@ func TestIssue44031(t *testing.T) {
 
 // Test that we use a variable from shared libraries (which implement an
 // interface in shared libraries.). A weak reference is used in the itab
-// in main process. It can cause unreacheble panic. See issue 47873.
+// in main process. It can cause unreachable panic. See issue 47873.
 func TestIssue47873(t *testing.T) {
        goCmd(t, "install", "-buildmode=shared", "-linkshared", "./issue47837/a")
        goCmd(t, "run", "-linkshared", "./issue47837/main")
index 84e61f34a254667bc49a2e4e911b51deaad8badf..8620db2adb1e974fada7dea0fac280f10ac1e067 100644 (file)
@@ -1442,7 +1442,7 @@ func (subst *inlsubst) clovar(n *ir.Name) *ir.Name {
        return m
 }
 
-// closure does the necessary substitions for a ClosureExpr n and returns the new
+// closure does the necessary substitutions for a ClosureExpr n and returns the new
 // closure node.
 func (subst *inlsubst) closure(n *ir.ClosureExpr) ir.Node {
        // Prior to the subst edit, set a flag in the inlsubst to indicate
index b0b8da5d18a8f3a504894246b820a3b957d12357..8f56c6f2f6862c802001223917f8d745d70bfce0 100644 (file)
@@ -386,7 +386,7 @@ func NameClosure(clo *ClosureExpr, outerfn *Func) {
        MarkFunc(name)
 }
 
-// UseClosure checks that the ginen function literal has been setup
+// UseClosure checks that the given function literal has been setup
 // correctly, and then returns it as an expression.
 // It must be called after clo.Func.ClosureVars has been set.
 func UseClosure(clo *ClosureExpr, pkg *Package) Node {
index f391339c365047e6664baafb5c83b87119b00e6e..79b4b0b33c9038d78e3e78ac74310edbd514b91f 100644 (file)
@@ -167,7 +167,7 @@ func (g *irgen) expr0(typ types2.Type, expr syntax.Expr) ir.Node {
        }
 }
 
-// substType does a normal type substition, but tparams is in the form of a field
+// substType does a normal type substitution, but tparams is in the form of a field
 // list, and targs is in terms of a slice of type nodes. substType records any newly
 // instantiated types into g.instTypeList.
 func (g *irgen) substType(typ *types.Type, tparams *types.Type, targs []ir.Ntype) *types.Type {
index bf11e365f1042ac959199a12576771244df19557..8177cf855e749cc6d5dcea9af252f745cc6c632e 100644 (file)
@@ -53,7 +53,7 @@ import (
        "os"
 )
 
-// IRGraph is the key datastrcture that is built from profile. It is
+// IRGraph is the key data structure that is built from profile. It is
 // essentially a call graph with nodes pointing to IRs of functions and edges
 // carrying weights and callsite information. The graph is bidirectional that
 // helps in removing nodes efficiently.
@@ -223,7 +223,7 @@ func (p *Profile) processprofileGraph(g *Graph) bool {
        return true
 }
 
-// initializeIRGraph builds the IRGraph by visting all the ir.Func in decl list
+// initializeIRGraph builds the IRGraph by visiting all the ir.Func in decl list
 // of a package.
 func (p *Profile) initializeIRGraph() {
        // Bottomup walk over the function to create IRGraph.
index 769f225850db6499cc89cfd173f955923de45164..423564caf9a1ef2fc8ca603ca6a363b3971db02f 100644 (file)
@@ -328,7 +328,7 @@ commas. For example:
                switch flag {
                case "on":
                        checkEnabled = val != 0
-                       debugPoset = checkEnabled // also turn on advanced self-checking in prove's datastructure
+                       debugPoset = checkEnabled // also turn on advanced self-checking in prove's data structure
                        return ""
                case "off":
                        checkEnabled = val == 0
index 584aaef3bf1df6519de48bc1af7e5303c2730fc0..0cd006b21ccf66f6136381734d0a6ffa99e71d7a 100644 (file)
@@ -803,7 +803,7 @@ func (state *debugState) liveness() []*BlockDebug {
 // the first call, subsequent calls can only shrink startState.
 //
 // Passing forLocationLists=true enables additional side-effects that
-// are necessary for building location lists but superflous while still
+// are necessary for building location lists but superfluous while still
 // iterating to an answer.
 //
 // If previousBlock is non-nil, it registers changes vs. that block's
index 253142a0fbc512eb9c47694174a6f12bc1ea84f3..2b8cd9fad34b4824bf56fd2baea7ccf5b4d1bd74 100644 (file)
@@ -223,7 +223,7 @@ func testArithConstShift(t *testing.T) {
        }
 }
 
-// overflowConstShift_ssa verifes that constant folding for shift
+// overflowConstShift_ssa verifies that constant folding for shift
 // doesn't wrap (i.e. x << MAX_INT << 1 doesn't get folded to x << 0).
 //
 //go:noinline
index 9760e366b59ada709ec954de760ef953c9833c54..29d992f32431f275f0aedc3de6d891d60393b86a 100644 (file)
@@ -1524,7 +1524,7 @@ func Shapify(t *types.Type, index int, tparam *types.Type) *types.Type {
                // have these other shape types embedded in them. This may lead to
                // generating extra shape instantiations, and a mismatch between the
                // instantiations that we used in generating dictionaries and the
-               // instantations that are actually called. (#51303).
+               // instantiations that are actually called. (#51303).
                list := []*types.Type{}
                getShapes(t, &list)
                list2 := make([]*types.Type, len(list))
index 2d402014085e97ae9f07c8ff68759f2b9791a584..54567bee4166ecc26f65ddd0ae778141cc90c3e5 100644 (file)
@@ -128,7 +128,7 @@ var (
 
 // GetPackage returns the IndexPackage for the package at the given path.
 // It will return ErrNotIndexed if the directory should be read without
-// using the index, for instance because the index is disabled, or the packgae
+// using the index, for instance because the index is disabled, or the package
 // is not in a module.
 func GetPackage(modroot, pkgdir string) (*IndexPackage, error) {
        mi, err := GetModule(modroot)
@@ -146,7 +146,7 @@ func GetPackage(modroot, pkgdir string) (*IndexPackage, error) {
 
 // GetModule returns the Module for the given modroot.
 // It will return ErrNotIndexed if the directory should be read without
-// using the index, for instance because the index is disabled, or the packgae
+// using the index, for instance because the index is disabled, or the package
 // is not in a module.
 func GetModule(modroot string) (*Module, error) {
        if !enabled || cache.DefaultDir() == "off" {
index f40c4426da7966bafd169a8d3ad0d7a09146d9c4..a51c504ba518d6f4c2b4a892326e396718f5e378 100644 (file)
@@ -194,7 +194,7 @@ func (s *State) LookupEnv(key string) (string, bool) {
        return v, ok
 }
 
-// Path returns the absolute path in the host operaating system for a
+// Path returns the absolute path in the host operating system for a
 // script-based (generally slash-separated and relative) path.
 func (s *State) Path(path string) string {
        if filepath.IsAbs(path) {
index cd99a33a21216eb3242a7338a297f443723ade0d..93c068c528a40ef4dcaa162f183dd2a2282b8f12 100644 (file)
@@ -86,7 +86,7 @@ func BuildInit() {
        }
 }
 
-// fuzzInstrumentFlags returns compiler flags that enable fuzzing instrumation
+// fuzzInstrumentFlags returns compiler flags that enable fuzzing instrumentation
 // on supported platforms.
 //
 // On unsupported platforms, fuzzInstrumentFlags returns nil, meaning no
index be90989dddcf744ce21e0f22e5f9c6c53109ec6e..a306498d587b3c424e4f85ce09f6e48cfc6f0612 100644 (file)
@@ -186,7 +186,7 @@ func runUse(ctx context.Context, cmd *base.Command, args []string) {
 // pathRel returns the absolute and canonical forms of dir for use in a
 // go.work file located in directory workDir.
 //
-// If dir is relative, it is intepreted relative to base.Cwd()
+// If dir is relative, it is interpreted relative to base.Cwd()
 // and its canonical form is relative to workDir if possible.
 // If dir is absolute or cannot be made relative to workDir,
 // its canonical form is absolute.
index ae215dfef5e996a5df3217aab3d5ce4952c2e9f5..7b985fae53b89a89c7d89ffb1abe369447dd5b6a 100644 (file)
@@ -134,7 +134,7 @@ import (
 // - If PkgIdx is PkgIdxHashed, SymIdx is the index of the symbol in the
 //   HashedDefs array.
 // - If PkgIdx is PkgIdxNone, SymIdx is the index of the symbol in the
-//   NonPkgDefs array (could natually overflow to NonPkgRefs array).
+//   NonPkgDefs array (could naturally overflow to NonPkgRefs array).
 // - Otherwise, SymIdx is the index of the symbol in some other package's
 //   SymbolDefs array.
 //
index db18bc8e0ae3aa2d71d168f986f5e2bdc6844c22..b01ebb0928d1ea5cb2210f93825c8a9224b696bb 100644 (file)
@@ -1012,7 +1012,7 @@ var sysInstFields = map[SpecialOperand]struct {
        SPOP_CVADP:   {3, 7, 13, 1, true},
 }
 
-// Used for padinng NOOP instruction
+// Used for padding NOOP instruction
 const OP_NOOP = 0xd503201f
 
 // align code to a certain length by padding bytes.
index ff0968ecf4c2c061822da925b00a68792eaaa346..85e49e248c13bc375c19c0f53bc9324c04bf868e 100644 (file)
@@ -353,7 +353,7 @@ func (w *writer) Sym(s *LSym) {
                align = uint32(fn.Align)
        }
        if s.ContentAddressable() && s.Size != 0 {
-               // We generally assume data symbols are natually aligned
+               // We generally assume data symbols are naturally aligned
                // (e.g. integer constants), except for strings and a few
                // compiler-emitted funcdata. If we dedup a string symbol and
                // a non-string symbol with the same content, we should keep
@@ -421,7 +421,7 @@ func (w *writer) Hash(s *LSym) {
 // contentHashSection only distinguishes between sets of sections for which this matters.
 // Allowing flexibility increases the effectiveness of content-addressibility.
 // But in some cases, such as doing addressing based on a base symbol,
-// we need to ensure that a symbol is always in a prticular section.
+// we need to ensure that a symbol is always in a particular section.
 // Some of these conditions are duplicated in cmd/link/internal/ld.(*Link).symtab.
 // TODO: instead of duplicating them, have the compiler decide where symbols go.
 func contentHashSection(s *LSym) byte {
index 936cc253e31353a74617a7a4d485e8f690b4e9dd..daf3ebcc4dc77e16164957dc9c2a2d67159702ae 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// Package alias implements memory alaising tests.
+// Package alias implements memory aliasing tests.
 // This code also exists as golang.org/x/crypto/internal/alias.
 package alias
 
index b1654f8726b44e3672df994184f0ee06168edf79..c33a4fc87515af5a6dd1b85f1cb3a632a983f915 100644 (file)
@@ -180,7 +180,7 @@ const (
        IMAGE_COMDAT_SELECT_LARGEST      = 6
 )
 
-// COFFSymbolReadSectionDefAux returns a blob of axiliary information
+// COFFSymbolReadSectionDefAux returns a blob of auxiliary information
 // (including COMDAT info) for a section definition symbol. Here 'idx'
 // is the index of a section symbol in the main COFFSymbol array for
 // the File. Return value is a pointer to the appropriate aux symbol
index 0f62283f028beb1d4bf0027c3fb158dc3a02c518..bbcdaec04a8bd4ab696f2ae29907af8366af0351 100644 (file)
@@ -19,7 +19,7 @@ type T2[P any] struct {
 type List[P any] []P
 
 // Alias type declarations cannot have type parameters.
-// Issue #46477 proposses to change that.
+// Issue #46477 proposes to change that.
 type A1[P any] = /* ERROR "cannot be alias" */ struct{}
 
 // Pending clarification of #46477 we disallow aliases
index 9a570e7e664ef38c569c189e30b94626755cf354..9f06b0888daf2193f0d058fa03b62d743c9a990b 100644 (file)
@@ -354,7 +354,7 @@ func _[P any]() {
 }
 
 // corner case for type inference
-// (was bug: after instanting f11, the type-checker didn't mark f11 as non-generic)
+// (was bug: after instantiating f11, the type-checker didn't mark f11 as non-generic)
 
 func f11[T any]() {}
 
index d4f7196f9f7af2e64f5a29e959fa4cbf45fdc404..d0c0b831e5ca35e904dfbc1b63d5a7b713221e03 100644 (file)
@@ -485,7 +485,7 @@ func makeStatDepSet(deps ...statDep) statDepSet {
        return s
 }
 
-// differennce returns set difference of s from b as a new set.
+// difference returns set difference of s from b as a new set.
 func (s statDepSet) difference(b statDepSet) statDepSet {
        var c statDepSet
        for i := range s {
@@ -633,7 +633,7 @@ func nsToSec(ns int64) float64 {
 // statAggregate is the main driver of the metrics implementation.
 //
 // It contains multiple aggregates of runtime statistics, as well
-// as a set of these aggregates that it has populated. The aggergates
+// as a set of these aggregates that it has populated. The aggregates
 // are populated lazily by its ensure method.
 type statAggregate struct {
        ensured   statDepSet
index a1e0b8e134e94550941ce5a0d1f3e3e0d160a799..0b05aedad3ff48cba55d3ac3224a798a86f3e3c5 100644 (file)
@@ -35,7 +35,7 @@ var (
 //
 // The text written during a process crash (following "panic" or "fatal
 // error") is not saved, since the goroutine stacks will generally be readable
-// from the runtime datastructures in the core file.
+// from the runtime data structures in the core file.
 func recordForPanic(b []byte) {
        printlock()