diff options
| author | Martin Möhrmann <martisch@uos.de> | 2016-02-24 11:55:20 +0100 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2016-02-24 18:42:29 +0000 |
| commit | fdd0179bb1fdd70d405929b78c7d2fb6b61369b0 (patch) | |
| tree | 5dadc692c0e8ec767846f9dfc0fee73338d0b5b8 /src/cmd | |
| parent | 4feb47bc765d2cd7d774b0a28b06e8d81a1affe7 (diff) | |
| download | go-fdd0179bb1fdd70d405929b78c7d2fb6b61369b0.tar.xz | |
all: fix typos and spelling
Change-Id: Icd06d99c42b8299fd931c7da821e1f418684d913
Reviewed-on: https://go-review.googlesource.com/19829
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/cmd')
26 files changed, 29 insertions, 29 deletions
diff --git a/src/cmd/asm/doc.go b/src/cmd/asm/doc.go index a9c8bfb7db..aa62147957 100644 --- a/src/cmd/asm/doc.go +++ b/src/cmd/asm/doc.go @@ -20,7 +20,7 @@ The GOOS and GOARCH environment variables set the desired target. Flags: -D value - predefined symbol with optional simple value -D=identifer=value; + predefined symbol with optional simple value -D=identifier=value; can be set multiple times -I value include directory; can be set multiple times diff --git a/src/cmd/asm/internal/asm/testdata/arm64.s b/src/cmd/asm/internal/asm/testdata/arm64.s index 22d430631c..6466da7190 100644 --- a/src/cmd/asm/internal/asm/testdata/arm64.s +++ b/src/cmd/asm/internal/asm/testdata/arm64.s @@ -237,7 +237,7 @@ again: // // LSTXR reg ',' addr ',' reg // { -// outtcode($1, &$2, &$4, &$6); +// outcode($1, &$2, &$4, &$6); // } LDAXRW (R0), R2 STLXRW R1, (R0), R3 diff --git a/src/cmd/asm/internal/flags/flags.go b/src/cmd/asm/internal/flags/flags.go index fd42e8443b..4557c2a7f9 100644 --- a/src/cmd/asm/internal/flags/flags.go +++ b/src/cmd/asm/internal/flags/flags.go @@ -20,7 +20,7 @@ var ( TrimPath = flag.String("trimpath", "", "remove prefix from recorded source file paths") Shared = flag.Bool("shared", false, "generate code that can be linked into a shared library") Dynlink = flag.Bool("dynlink", false, "support references to Go symbols defined in other shared libraries") - AllErrors = flag.Bool("e", false, "no limit on number of errors reported") + AllErrors = flag.Bool("e", false, "no limit on number of errors reported") ) var ( @@ -29,7 +29,7 @@ var ( ) func init() { - flag.Var(&D, "D", "predefined symbol with optional simple value -D=identifer=value; can be set multiple times") + flag.Var(&D, "D", "predefined symbol with optional simple value -D=identifier=value; can be set multiple times") flag.Var(&I, "I", "include directory; can be set multiple times") } diff --git a/src/cmd/compile/internal/amd64/peep.go b/src/cmd/compile/internal/amd64/peep.go index 452f954bd8..810214504f 100644 --- a/src/cmd/compile/internal/amd64/peep.go +++ b/src/cmd/compile/internal/amd64/peep.go @@ -427,7 +427,7 @@ func elimshortmov(g *gc.Graph) { } if regtyp(&p.From) || p.From.Type == obj.TYPE_CONST { - // move or artihmetic into partial register. + // move or arithmetic into partial register. // from another register or constant can be movl. // we don't switch to 64-bit arithmetic if it can // change how the carry bit is set (and the carry bit is needed). diff --git a/src/cmd/compile/internal/arm64/ggen.go b/src/cmd/compile/internal/arm64/ggen.go index c495bbc77f..99ffd5acd5 100644 --- a/src/cmd/compile/internal/arm64/ggen.go +++ b/src/cmd/compile/internal/arm64/ggen.go @@ -146,7 +146,7 @@ func dodiv(op gc.Op, nl *gc.Node, nr *gc.Node, res *gc.Node) { // The hardware will generate undefined result. // Also need to explicitly trap on division on zero, // the hardware will silently generate undefined result. - // DIVW will leave unpredicable result in higher 32-bit, + // DIVW will leave unpredictable result in higher 32-bit, // so always use DIVD/DIVDU. t := nl.Type diff --git a/src/cmd/compile/internal/gc/bexport.go b/src/cmd/compile/internal/gc/bexport.go index ff0465f64c..dc55bb023e 100644 --- a/src/cmd/compile/internal/gc/bexport.go +++ b/src/cmd/compile/internal/gc/bexport.go @@ -72,7 +72,7 @@ amount of space to hold the list without the need to grow it later. All integer values use a variable-length encoding for compact representation. -If debugFormat is set, each integer and string value is preceeded by a marker +If debugFormat is set, each integer and string value is preceded by a marker and position information in the encoding. This mechanism permits an importer to recognize immediately when it is out of sync. The importer recognizes this mode automatically (i.e., it can import export data produced with debugging diff --git a/src/cmd/compile/internal/gc/mparith3.go b/src/cmd/compile/internal/gc/mparith3.go index 9bcfda7c0d..5b61a9e17f 100644 --- a/src/cmd/compile/internal/gc/mparith3.go +++ b/src/cmd/compile/internal/gc/mparith3.go @@ -11,7 +11,7 @@ import ( "math" ) -/// implements float arihmetic +// implements float arithmetic func newMpflt() *Mpflt { var a Mpflt diff --git a/src/cmd/compile/internal/gc/order.go b/src/cmd/compile/internal/gc/order.go index ddd6cb9719..a3a8441f50 100644 --- a/src/cmd/compile/internal/gc/order.go +++ b/src/cmd/compile/internal/gc/order.go @@ -386,7 +386,7 @@ func ordercall(n *Node, order *Order) { // Ordermapassign appends n to order->out, introducing temporaries // to make sure that all map assignments have the form m[k] = x, -// where x is adressable. +// where x is addressable. // (Orderexpr has already been called on n, so we know k is addressable.) // // If n is m[k] = x where x is not addressable, the rewrite is: diff --git a/src/cmd/compile/internal/gc/plive.go b/src/cmd/compile/internal/gc/plive.go index feb66f625a..8719029c91 100644 --- a/src/cmd/compile/internal/gc/plive.go +++ b/src/cmd/compile/internal/gc/plive.go @@ -121,7 +121,7 @@ func addedge(from *BasicBlock, to *BasicBlock) { } // Inserts prev before curr in the instruction -// stream. Any control flow, such as branches or fall throughs, that target the +// stream. Any control flow, such as branches or fall-throughs, that target the // existing instruction are adjusted to target the new instruction. func splicebefore(lv *Liveness, bb *BasicBlock, prev *obj.Prog, curr *obj.Prog) { // There may be other instructions pointing at curr, diff --git a/src/cmd/compile/internal/gc/reflect.go b/src/cmd/compile/internal/gc/reflect.go index 04e94f18eb..d2f00d0a05 100644 --- a/src/cmd/compile/internal/gc/reflect.go +++ b/src/cmd/compile/internal/gc/reflect.go @@ -1380,7 +1380,7 @@ func dalgsym(t *Type) *Sym { // be multiples of four words. On 32-bit systems that's 16 bytes, and // all size classes >= 16 bytes are 16-byte aligned, so no real constraint. // On 64-bit systems, that's 32 bytes, and 32-byte alignment is guaranteed -// for size classes >= 256 bytes. On a 64-bit sytem, 256 bytes allocated +// for size classes >= 256 bytes. On a 64-bit system, 256 bytes allocated // is 32 pointers, the bits for which fit in 4 bytes. So maxPtrmaskBytes // must be >= 4. // diff --git a/src/cmd/compile/internal/ppc64/ggen.go b/src/cmd/compile/internal/ppc64/ggen.go index 28fcecf8f4..00fcdb8443 100644 --- a/src/cmd/compile/internal/ppc64/ggen.go +++ b/src/cmd/compile/internal/ppc64/ggen.go @@ -133,7 +133,7 @@ func dodiv(op gc.Op, nl *gc.Node, nr *gc.Node, res *gc.Node) { // The hardware will generate undefined result. // Also need to explicitly trap on division on zero, // the hardware will silently generate undefined result. - // DIVW will leave unpredicable result in higher 32-bit, + // DIVW will leave unpredictable result in higher 32-bit, // so always use DIVD/DIVDU. t := nl.Type diff --git a/src/cmd/compile/internal/x86/peep.go b/src/cmd/compile/internal/x86/peep.go index 63e64cb77c..239e9cc35f 100644 --- a/src/cmd/compile/internal/x86/peep.go +++ b/src/cmd/compile/internal/x86/peep.go @@ -284,7 +284,7 @@ func elimshortmov(g *gc.Graph) { } if regtyp(&p.From) || p.From.Type == obj.TYPE_CONST { - // move or artihmetic into partial register. + // move or arithmetic into partial register. // from another register or constant can be movl. // we don't switch to 32-bit arithmetic if it can // change how the carry bit is set (and the carry bit is needed). diff --git a/src/cmd/dist/build.go b/src/cmd/dist/build.go index 1b3df333d6..0b2ce271dc 100644 --- a/src/cmd/dist/build.go +++ b/src/cmd/dist/build.go @@ -1150,7 +1150,7 @@ func defaulttarg() string { fatal("current directory %s is not under %s", pwd, real_src) } pwd = pwd[len(real_src):] - // guard againt xrealwd return the directory without the trailing / + // guard against xrealwd returning the directory without the trailing / pwd = strings.TrimPrefix(pwd, "/") return pwd diff --git a/src/cmd/go/go_test.go b/src/cmd/go/go_test.go index 51931769d5..b43a786727 100644 --- a/src/cmd/go/go_test.go +++ b/src/cmd/go/go_test.go @@ -2122,7 +2122,7 @@ func TestIssue7108(t *testing.T) { // cmd/go: go test -a foo does not rebuild regexp. func TestIssue6844(t *testing.T) { if testing.Short() { - t.Skip("don't rebuild the standard libary in short mode") + t.Skip("don't rebuild the standard library in short mode") } tg := testgo(t) diff --git a/src/cmd/go/pkg.go b/src/cmd/go/pkg.go index f9988bf2d7..ccff783c29 100644 --- a/src/cmd/go/pkg.go +++ b/src/cmd/go/pkg.go @@ -1220,7 +1220,7 @@ var isGoRelease = strings.HasPrefix(runtime.Version(), "go1") // an explicit data comparison. Specifically, we build a list of the // inputs to the build, compute its SHA1 hash, and record that as the // ``build ID'' in the generated object. At the next build, we can -// recompute the buid ID and compare it to the one in the generated +// recompute the build ID and compare it to the one in the generated // object. If they differ, the list of inputs has changed, so the object // is out of date and must be rebuilt. // diff --git a/src/cmd/internal/obj/arm/obj5.go b/src/cmd/internal/obj/arm/obj5.go index 1a51dc3b88..c5af929b14 100644 --- a/src/cmd/internal/obj/arm/obj5.go +++ b/src/cmd/internal/obj/arm/obj5.go @@ -55,7 +55,7 @@ func progedit(ctxt *obj.Link, p *obj.Prog) { } } - // Replace TLS register fetches on older ARM procesors. + // Replace TLS register fetches on older ARM processors. switch p.As { // Treat MRC 15, 0, <reg>, C13, C0, 3 specially. case AMRC: diff --git a/src/cmd/internal/obj/mips/obj0.go b/src/cmd/internal/obj/mips/obj0.go index a3ccad2764..fccff707be 100644 --- a/src/cmd/internal/obj/mips/obj0.go +++ b/src/cmd/internal/obj/mips/obj0.go @@ -1234,7 +1234,7 @@ func markregused(ctxt *obj.Link, s *Sch) { } /* - * test to see if 2 instrictions can be + * test to see if two instructions can be * interchanged without changing semantics */ func depend(ctxt *obj.Link, sa, sb *Sch) bool { diff --git a/src/cmd/internal/obj/x86/obj6.go b/src/cmd/internal/obj/x86/obj6.go index 55ddfe108c..6332b7e4d9 100644 --- a/src/cmd/internal/obj/x86/obj6.go +++ b/src/cmd/internal/obj/x86/obj6.go @@ -189,7 +189,7 @@ func progedit(ctxt *obj.Link, p *obj.Prog) { } } - // Rewrite 0 to $0 in 3rd argment to CMPPS etc. + // Rewrite 0 to $0 in 3rd argument to CMPPS etc. // That's what the tables expect. switch p.As { case ACMPPD, ACMPPS, ACMPSD, ACMPSS: diff --git a/src/cmd/link/internal/arm/asm.go b/src/cmd/link/internal/arm/asm.go index 74c2249702..ca55512575 100644 --- a/src/cmd/link/internal/arm/asm.go +++ b/src/cmd/link/internal/arm/asm.go @@ -109,7 +109,7 @@ func gentext() { } // Preserve highest 8 bits of a, and do addition to lower 24-bit -// of a and b; used to adjust ARM branch intruction's target +// of a and b; used to adjust ARM branch instruction's target func braddoff(a int32, b int32) int32 { return int32((uint32(a))&0xff000000 | 0x00ffffff&uint32(a+b)) } diff --git a/src/cmd/link/internal/arm/obj.go b/src/cmd/link/internal/arm/obj.go index 10eb723bb9..29a58c6fd2 100644 --- a/src/cmd/link/internal/arm/obj.go +++ b/src/cmd/link/internal/arm/obj.go @@ -156,7 +156,7 @@ func archinit() { } case obj.Hdarwin: /* apple MACH */ - ld.Debug['w'] = 1 // disable DWARF generataion + ld.Debug['w'] = 1 // disable DWARF generation ld.Machoinit() ld.HEADR = ld.INITIAL_MACHO_HEADR if ld.INITTEXT == -1 { diff --git a/src/cmd/link/internal/arm64/asm.go b/src/cmd/link/internal/arm64/asm.go index 0e5a2d0a63..be8afa5d26 100644 --- a/src/cmd/link/internal/arm64/asm.go +++ b/src/cmd/link/internal/arm64/asm.go @@ -162,7 +162,7 @@ func machoreloc1(r *ld.Reloc, sectoff int64) int { rs := r.Xsym // ld64 has a bug handling MACHO_ARM64_RELOC_UNSIGNED with !extern relocation. - // see cmd/internal/ld/data.go for details. The workarond is that don't use !extern + // see cmd/internal/ld/data.go for details. The workaround is that don't use !extern // UNSIGNED relocation at all. if rs.Type == obj.SHOSTOBJ || r.Type == obj.R_CALLARM64 || r.Type == obj.R_ADDRARM64 || r.Type == obj.R_ADDR { if rs.Dynid < 0 { diff --git a/src/cmd/link/internal/ld/dwarf_defs.go b/src/cmd/link/internal/ld/dwarf_defs.go index 61389d9218..c52879cbbe 100644 --- a/src/cmd/link/internal/ld/dwarf_defs.go +++ b/src/cmd/link/internal/ld/dwarf_defs.go @@ -116,7 +116,7 @@ const ( DW_CHILDREN_yes = 0x01 ) -// Not from the spec, but logicaly belongs here +// Not from the spec, but logically belongs here const ( DW_CLS_ADDRESS = 0x01 + iota DW_CLS_BLOCK diff --git a/src/cmd/link/internal/ld/ldelf.go b/src/cmd/link/internal/ld/ldelf.go index bea3f2dcc3..9eeca218d3 100644 --- a/src/cmd/link/internal/ld/ldelf.go +++ b/src/cmd/link/internal/ld/ldelf.go @@ -1066,9 +1066,9 @@ func readelfsym(elfobj *ElfObj, i int, sym *ElfSym, needSym int) (err error) { } if needSym != 0 { - // local names and hidden visiblity global names are unique - // and should only reference by its index, not name, so we - // don't bother to add them into hash table + // local names and hidden global names are unique + // and should only be referenced by their index, not name, so we + // don't bother to add them into the hash table s = linknewsym(Ctxt, sym.name, Ctxt.Version) s.Type |= obj.SHIDDEN diff --git a/src/cmd/link/internal/ld/macho.go b/src/cmd/link/internal/ld/macho.go index 1c7f3a0d82..010e7da0ee 100644 --- a/src/cmd/link/internal/ld/macho.go +++ b/src/cmd/link/internal/ld/macho.go @@ -569,7 +569,7 @@ func Asmbmacho() { if Linkmode == LinkInternal { // For lldb, must say LC_VERSION_MIN_MACOSX or else // it won't know that this Mach-O binary is from OS X - // (could be iOS or WatchOS intead). + // (could be iOS or WatchOS instead). // Go on iOS uses linkmode=external, and linkmode=external // adds this itself. So we only need this code for linkmode=internal // and we can assume OS X. diff --git a/src/cmd/pprof/internal/report/report.go b/src/cmd/pprof/internal/report/report.go index 0265e2384c..b6694f559f 100644 --- a/src/cmd/pprof/internal/report/report.go +++ b/src/cmd/pprof/internal/report/report.go @@ -1340,7 +1340,7 @@ const ( addressOrder ) -// sort reoders the entries in a report based on the specified +// sort reorders the entries in a report based on the specified // ordering criteria. The result is sorted in decreasing order for // numeric quantities, alphabetically for text, and increasing for // addresses. diff --git a/src/cmd/pprof/internal/report/source.go b/src/cmd/pprof/internal/report/source.go index 73ae1b4ea2..908be21424 100644 --- a/src/cmd/pprof/internal/report/source.go +++ b/src/cmd/pprof/internal/report/source.go @@ -408,7 +408,7 @@ func getMissingFunctionSource(filename string, asm map[int]nodes, start, end int return fnodes, filename } -// adjustSourcePath adjusts the pathe for a source file by trimmming +// adjustSourcePath adjusts the path for a source file by trimming // known prefixes and searching for the file on all parents of the // current working dir. func adjustSourcePath(path string) (*os.File, string, error) { |
