]> Cypherpunks repositories - gostls13.git/commitdiff
all: fix misprints in comments
authorAinar Garipov <gugl.zadolbal@gmail.com>
Thu, 11 Jun 2015 13:49:38 +0000 (16:49 +0300)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 11 Jun 2015 14:18:57 +0000 (14:18 +0000)
These were found by grepping the comments from the go code and feeding
the output to aspell.

Change-Id: Id734d6c8d1938ec3c36bd94a4dbbad577e3ad395
Reviewed-on: https://go-review.googlesource.com/10941
Reviewed-by: Aamir Khan <syst3m.w0rm@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
47 files changed:
doc/devel/weekly.html
doc/go1.1.html
src/cmd/asm/internal/asm/parse.go
src/cmd/compile/internal/gc/inl.go
src/cmd/compile/internal/gc/order.go
src/cmd/compile/internal/gc/plive.go
src/cmd/compile/internal/gc/reflect.go
src/cmd/compile/internal/gc/typecheck.go
src/cmd/go/build.go
src/cmd/internal/obj/arm/asm5.go
src/cmd/internal/rsc.io/arm/armasm/ext_test.go
src/cmd/internal/rsc.io/x86/x86asm/ext_test.go
src/cmd/link/internal/arm/asm.go
src/cmd/objdump/objdump_test.go
src/cmd/pprof/internal/profile/encode.go
src/cmd/pprof/internal/svg/svg.go
src/cmd/yacc/testdata/expr/main.go
src/crypto/rsa/rsa.go
src/crypto/tls/key_agreement.go
src/debug/dwarf/entry.go
src/encoding/csv/writer.go
src/internal/trace/parser.go
src/net/file_test.go
src/net/http/client_test.go
src/net/http/transport_test.go
src/net/internal/socktest/sys_windows.go
src/net/sock_posix.go
src/net/url/example_test.go
src/os/exec/lp_windows_test.go
src/runtime/lfstack_test.go
src/runtime/mbitmap.go
src/runtime/mgc.go
src/runtime/mgcmark.go
src/runtime/mgcwork.go
src/runtime/mheap.go
src/runtime/netpoll.go
src/runtime/netpoll_solaris.go
src/runtime/panic.go
src/runtime/proc1.go
src/runtime/race/testdata/select_test.go
src/runtime/runtime2.go
src/runtime/slice.go
src/runtime/sqrt_test.go
src/runtime/sys_nacl_386.s
src/syscall/dll_windows.go
src/syscall/mksyscall_windows.go
src/syscall/route_bsd.go

index 5a9c51ef1d54f737d0b435f4d21fcc00a3d39c0a..143727fb07509949b11a062ee94d8cb7ebae8978 100644 (file)
@@ -5971,7 +5971,7 @@ You can now check build status on various platforms at the Go Dashboard:
 * runtime: add SetFinalizer
 * time: Sleep through interruptions (thanks Chris Wedgwood)
        add RFC822 formats
-       experimental implemenation of Ticker using two goroutines for all tickers
+       experimental implementation of Ticker using two goroutines for all tickers
 * xml: allow underscores in XML element names (thanks Michael Hoisie)
        allow any scalar type in xml.Unmarshal
 </pre>
index 825867f44200d2556a523ab642b59ba7768fe3e0..f059fd7f1f9919613dc7cec7422815eee52ad72d 100644 (file)
@@ -160,7 +160,7 @@ The GCC release schedule does not coincide with the Go release schedule, so some
 The 4.8.0 version of GCC shipped in March, 2013 and includes a nearly-Go 1.1 version of <code>gccgo</code>.
 Its library is a little behind the release, but the biggest difference is that method values are not implemented.
 Sometime around July 2013, we expect 4.8.2 of GCC to ship with a <code>gccgo</code>
-providing a complete Go 1.1 implementaiton.
+providing a complete Go 1.1 implementation.
 </p>
 
 <h3 id="gc_flag">Command-line flag parsing</h3>
index 7d03c5c18064b8228954be4252a9cb53d7aad5ea..72e91b8e55aeb02d5acadf7b5e5156b1a6d7bee4 100644 (file)
@@ -736,7 +736,7 @@ func (p *Parser) registerNumber(name string) uint16 {
 }
 
 // Note: There are two changes in the expression handling here
-// compared to the old yacc/C implemenatations. Neither has
+// compared to the old yacc/C implementations. Neither has
 // much practical consequence because the expressions we
 // see in assembly code are simple, but for the record:
 //
index fc674a8d1c7956bbf17af38800d1e2f16d7a6343..ea11740c9a92374d0d0f321aed9a3052a6a23f1e 100644 (file)
@@ -772,7 +772,7 @@ func mkinlcall1(np **Node, fn *Node, isddd bool) {
        inlgen++
        body := inlsubstlist(fn.Func.Inl)
 
-       body = list(body, Nod(OGOTO, inlretlabel, nil)) // avoid 'not used' when function doesnt have return
+       body = list(body, Nod(OGOTO, inlretlabel, nil)) // avoid 'not used' when function doesn't have return
        body = list(body, Nod(OLABEL, inlretlabel, nil))
 
        typechecklist(body, Etop)
index b437142086591056d28f6ba0f4dc49a6a25f95f8..7d89a821bc07350c33466decde492731b8598d4f 100644 (file)
@@ -490,7 +490,7 @@ func orderstmt(n *Node, order *Order) {
 
        case OASOP:
                // Special: rewrite l op= r into l = l op r.
-               // This simplies quite a few operations;
+               // This simplifies quite a few operations;
                // most important is that it lets us separate
                // out map read from map write when l is
                // a map index expression.
index fa9c212844bf7d9226dd492ba5e3a9ddce7d7183..efaf69f550169e2c19a161f9e54689ef451eb1f4 100644 (file)
@@ -585,7 +585,7 @@ func progeffects(prog *obj.Prog, vars []*Node, uevar Bvec, varkill Bvec, avarini
                                // If the result had its address taken, it is being tracked
                        // by the avarinit code, which does not use uevar.
                        // If we added it to uevar too, we'd not see any kill
-                       // and decide that the varible was live entry, which it is not.
+                       // and decide that the variable was live entry, which it is not.
                        // So only use uevar in the non-addrtaken case.
                        // The p->to.type == thearch.D_NONE limits the bvset to
                        // non-tail-call return instructions; see note above
index 6c0962f2582743457dde83cf5de6eb500b9d6d1f..8ef2380e07dd84adc9cf75b5d6f522e8494a14cd 100644 (file)
@@ -105,7 +105,7 @@ func lsort(l *Sig, f func(*Sig, *Sig) int) *Sig {
        return l
 }
 
-// Builds a type respresenting a Bucket structure for
+// Builds a type representing a Bucket structure for
 // the given map type.  This type is not visible to users -
 // we include only enough information to generate a correct GC
 // program for it.
@@ -1234,7 +1234,7 @@ ok:
                        // a package that imports the first one and does use *T pointers.
                        // The second module will end up defining type data for *T and a
                        // type.*T symbol pointing at it. It's important that calling
-                       // .PtrTo() on the refect.Type for T returns this type data and
+                       // .PtrTo() on the reflect.Type for T returns this type data and
                        // not some synthesized object, so we need reflect to be able to
                        // find it!
                        if !Ctxt.Flag_dynlink {
index 006b5f98fad62f2cb178fb518d09f102d97a844c..9f4db270f6cf135c91e08c94f0c16da961b35533 100644 (file)
@@ -2829,7 +2829,7 @@ func keydup(n *Node, hash map[uint32][]*Node) {
        }
        evconst(n)
        if n.Op != OLITERAL {
-               return // we dont check variables
+               return // we don't check variables
        }
 
        var h uint32
index c83738237c11b344b6c94deea99fd7a9d557e1de..e0bf59f6d0c58ae20d7bb2f5a5ab18c4d5b6cd3e 100644 (file)
@@ -2453,7 +2453,7 @@ func (tools gccgoToolchain) ld(b *builder, p *Package, out string, allactions []
                                apackagesSeen[a.p] = true
                                if a.p.fake && a.p.external {
                                        // external _tests, if present must come before
-                                       // internal _tests. Store these on a seperate list
+                                       // internal _tests. Store these on a separate list
                                        // and place them at the head after this loop.
                                        xfiles = append(xfiles, a.target)
                                } else if a.p.fake {
index 75977ab45e95db4d698b22365b2a127ddb9e7593..f55357cd4b457f97e7d20911cff7e6d5769aa829 100644 (file)
@@ -503,7 +503,7 @@ func asmoutnacl(ctxt *obj.Link, origPC int32, p *obj.Prog, o *Optab, out []uint3
                                break
                        } else {
                                // if a load/store instruction takes more than 1 word to implement, then
-                               // we need to seperate the instruction into two:
+                               // we need to separate the instruction into two:
                                // 1. explicitly load the address into R11.
                                // 2. load/store from R11.
                                // This won't handle .W/.P, so we should reject such code.
index b0bd855970cee35b4f639c4fd50f9c710236069a..aa87cf930ad90743fbb1bbdf44a82c4c0221f13a 100644 (file)
@@ -216,7 +216,7 @@ func writeInst(generate func(func([]byte))) (file string, f *os.File, size int,
 
 var zeros = []byte{0, 0, 0, 0}
 
-// pad pads the code sequenc with pops.
+// pad pads the code sequence with pops.
 func pad(enc []byte) []byte {
        if len(enc) < 4 {
                enc = append(enc[:len(enc):len(enc)], zeros[:4-len(enc)]...)
index f65d6b2d52b114a2f16e216b9cf66197557b20de..bb56c0d9130be46a68757f1b19b5c1e173e487b8 100644 (file)
@@ -225,7 +225,7 @@ var pops = []byte{
        0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f,
 }
 
-// pad pads the code sequenc with pops.
+// pad pads the code sequence with pops.
 func pad(enc []byte) []byte {
        return append(enc[:len(enc):len(enc)], pops...)
 }
index 39d4550917b6a15a6172df53cfdf7153b7b87ce6..a0e31a3c49c77b51829def5c04f873987c6d1cc6 100644 (file)
@@ -179,7 +179,7 @@ func adddynrel(s *ld.LSym, r *ld.Reloc) {
                        ld.Adddynsym(ld.Ctxt, targ)
                        rel := ld.Linklookup(ld.Ctxt, ".rel", 0)
                        ld.Addaddrplus(ld.Ctxt, rel, s, int64(r.Off))
-                       ld.Adduint32(ld.Ctxt, rel, ld.ELF32_R_INFO(uint32(targ.Dynid), ld.R_ARM_GLOB_DAT)) // we need a nil + A dynmic reloc
+                       ld.Adduint32(ld.Ctxt, rel, ld.ELF32_R_INFO(uint32(targ.Dynid), ld.R_ARM_GLOB_DAT)) // we need a nil + A dynamic reloc
                        r.Type = obj.R_CONST                                                               // write r->add during relocsym
                        r.Sym = nil
                        return
index e0859b167e2f04b42949454cd98b0b0c7024a27a..9bd71495afb97e315a0e3cf1cd4c48636466e35e 100644 (file)
@@ -126,7 +126,7 @@ func TestDisasmExtld(t *testing.T) {
        case "arm64":
                t.Skipf("skipping on %s, issue 10106", runtime.GOARCH)
        }
-       // TODO(jsing): Renable once openbsd/arm has external linking support.
+       // TODO(jsing): Reenable once openbsd/arm has external linking support.
        if runtime.GOOS == "openbsd" && runtime.GOARCH == "arm" {
                t.Skip("skipping on openbsd/arm, no support for external linking, issue 10619")
        }
index 455aca29ff2797d45cc086a5aa3d8360dfbfa49a..9e669980a1fe153efcfdbae138ac1555c7095a13 100644 (file)
@@ -162,7 +162,7 @@ var profileDecoder = []decoder{
                pp.Location = append(pp.Location, x)
                return decodeMessage(b, x)
        },
-       // repeasted Function function = 5
+       // repeated Function function = 5
        func(b *buffer, m message) error {
                x := new(Function)
                pp := m.(*Profile)
index fbde103ef4fe881020763c0ff527ec0329356642..04f6ff187020a318258accf4f51487fa3fc28945 100644 (file)
@@ -17,7 +17,7 @@ var (
        svgClose = regexp.MustCompile(`</svg>`)
 )
 
-// Massage enhances the SVG output from DOT to provide bettern
+// Massage enhances the SVG output from DOT to provide better
 // panning inside a web browser. It uses the SVGPan library, which is
 // included directly.
 func Massage(in bytes.Buffer) string {
index 8d5b6911f02d04a7d1930fabbd0efe499f62f052..37f0023cff53c576da509e9ad003f76a0d9a03f3 100644 (file)
@@ -11,5 +11,5 @@
 //go:generate yacc -o expr.go -p "expr" expr.y
 
 // Expr is a simple expression evaluator that serves as a working example of
-// how to use Go's yacc implemenation.
+// how to use Go's yacc implementation.
 package main
index 99fa94e58a3da6f03637b331dba9107b24003464..8a6014a5dc778d600099593a56b4ff1f68c45afc 100644 (file)
@@ -129,7 +129,7 @@ type PrecomputedValues struct {
        CRTValues []CRTValue
 }
 
-// CRTValue contains the precomputed chinese remainder theorem values.
+// CRTValue contains the precomputed Chinese remainder theorem values.
 type CRTValue struct {
        Exp   *big.Int // D mod (prime-1).
        Coeff *big.Int // RĀ·Coeff ā‰” 1 mod Prime.
index b9f86d24d62d2d53e229d03bcfd421eaef3e4e1b..0e6a7c2262404ae6bf499a914855b48bda897535 100644 (file)
@@ -46,7 +46,7 @@ func (ka rsaKeyAgreement) processClientKeyExchange(config *Config, cert *Certifi
        if !ok {
                return nil, errors.New("tls: certificate private key does not implement crypto.Decrypter")
        }
-       // Perform contant time RSA PKCS#1 v1.5 decryption
+       // Perform constant time RSA PKCS#1 v1.5 decryption
        preMasterSecret, err := priv.Decrypt(config.rand(), ciphertext, &rsa.PKCS1v15DecryptOptions{SessionKeyLen: 48})
        if err != nil {
                return nil, err
index a94be32a21c37a7001bfbec49bcbbb3599271ecb..d607e5b4a38e498d04cb1d1208ee4a04d74baffd 100644 (file)
@@ -282,7 +282,7 @@ const (
        // into the "line" section.
        ClassLinePtr
 
-       // ClassLocListPtr repersents values that are an int64 offset
+       // ClassLocListPtr represents values that are an int64 offset
        // into the "loclist" section.
        ClassLocListPtr
 
index db2dc79a9e11b513542dcfa0f8cbb759db176940..353d91f238f80fa49dbb3fbebe37b28633f35fc0 100644 (file)
@@ -125,7 +125,7 @@ func (w *Writer) WriteAll(records [][]string) (err error) {
 // CSV with quoted empty strings strictly less useful.
 // Not quoting the empty string also makes this package match the behavior
 // of Microsoft Excel and Google Drive.
-// For Postgres, quote the data termating string `\.`.
+// For Postgres, quote the data terminating string `\.`.
 func (w *Writer) fieldNeedsQuotes(field string) bool {
        if field == "" {
                return false
index 8d48bfdfe66c16c2d582dbaf3118e02964a02d44..330671325d2d3b5a1a50f0d2f0e80a71fb7923c4 100644 (file)
@@ -454,7 +454,7 @@ func postProcessTrace(events []*Event) error {
                        g.evStart = ev
                        p.g = ev.G
                        if g.evCreate != nil {
-                               // +1 because symblizer expects return pc.
+                               // +1 because symbolizer expects return pc.
                                ev.Stk = []*Frame{&Frame{PC: g.evCreate.Args[1] + 1}}
                                g.evCreate = nil
                        }
@@ -701,7 +701,7 @@ const (
        EvHeapAlloc      = 33 // memstats.heap_alloc change [timestamp, heap_alloc]
        EvNextGC         = 34 // memstats.next_gc change [timestamp, next_gc]
        EvTimerGoroutine = 35 // denotes timer goroutine [timer goroutine id]
-       EvFutileWakeup   = 36 // denotes that the revious wakeup of this goroutine was futile [timestamp]
+       EvFutileWakeup   = 36 // denotes that the previous wakeup of this goroutine was futile [timestamp]
        EvCount          = 37
 )
 
index f358f709ace4f58167b33564e2f336791a68b44a..003dbb2ecb759212fec1b0e25f9bf2c36d6ebb98 100644 (file)
@@ -156,7 +156,7 @@ var filePacketConnTests = []struct {
 
        {net: "udp6", addr: "[::1]:0"},
 
-       // TODO(mikioh,bradfitz): renable once 10730 is fixed
+       // TODO(mikioh,bradfitz): reenable once 10730 is fixed
        // {net: "ip4:icmp", addr: "127.0.0.1"},
 
        {net: "unixgram", addr: "@gotest3/net"},
index b1d8799fa5cc18fabcdc79f8cf51879e73303423..12e165a5efaad39c84534e6782728ca909b92f47 100644 (file)
@@ -427,7 +427,7 @@ func TestJarCalls(t *testing.T) {
        ts := httptest.NewServer(HandlerFunc(func(w ResponseWriter, r *Request) {
                pathSuffix := r.RequestURI[1:]
                if r.RequestURI == "/nosetcookie" {
-                       return // dont set cookies for this path
+                       return // don't set cookies for this path
                }
                SetCookie(w, &Cookie{Name: "name" + pathSuffix, Value: "val" + pathSuffix})
                if r.RequestURI == "/" {
index ca1a3ab407fb7dc1ba56eec07c22436deab884c5..c2e7552b17da77b2bb2b9dcf17820db0048442a0 100644 (file)
@@ -510,7 +510,7 @@ func TestStressSurpriseServerCloses(t *testing.T) {
 
        // Do a bunch of traffic from different goroutines. Send to activityc
        // after each request completes, regardless of whether it failed.
-       // If these are too high, OS X exhausts its emphemeral ports
+       // If these are too high, OS X exhausts its ephemeral ports
        // and hangs waiting for them to transition TCP states. That's
        // not what we want to test.  TODO(bradfitz): use an io.Pipe
        // dialer for this test instead?
index 07af0e70468a87a87d29761081871cb2f1690659..e61bf2be605cfe6f866913fe5d7bbd54ca1b2a98 100644 (file)
@@ -68,7 +68,7 @@ func (sw *Switch) Closesocket(s syscall.Handle) (err error) {
        return nil
 }
 
-// Conenct wraps syscall.Connect.
+// Connect wraps syscall.Connect.
 func (sw *Switch) Connect(s syscall.Handle, sa syscall.Sockaddr) (err error) {
        so := sw.sockso(s)
        if so == nil {
@@ -97,7 +97,7 @@ func (sw *Switch) Connect(s syscall.Handle, sa syscall.Sockaddr) (err error) {
        return nil
 }
 
-// ConenctEx wraps syscall.ConnectEx.
+// ConnectEx wraps syscall.ConnectEx.
 func (sw *Switch) ConnectEx(s syscall.Handle, sa syscall.Sockaddr, b *byte, n uint32, nwr *uint32, o *syscall.Overlapped) (err error) {
        so := sw.sockso(s)
        if so == nil {
index 2634a6b6460937a2b7d8b602f3e3db800ce694d8..4d2cfde3f1c8832bd7a30817f3e1bd4f4010f53c 100644 (file)
@@ -52,7 +52,7 @@ func socket(net string, family, sotype, proto int, ipv6only bool, laddr, raddr s
        // following applications:
        //
        // - An endpoint holder that opens a passive stream
-       //   connenction, known as a stream listener
+       //   connection, known as a stream listener
        //
        // - An endpoint holder that opens a destination-unspecific
        //   datagram connection, known as a datagram listener
index e55c1aa166ea5ceab78004c87cae3fdb0f4f9816..af4ad0b5328028e899e41347f6772068341209c6 100644 (file)
@@ -47,7 +47,7 @@ func ExampleURL_opaque() {
        // Sending a literal '%' in an HTTP request's Path
        req := &http.Request{
                Method: "GET",
-               Host:   "example.com", // takes precendence over URL.Host
+               Host:   "example.com", // takes precedence over URL.Host
                URL: &url.URL{
                        Host:   "ignored",
                        Scheme: "https",
index 72df03ed2d3afc8493ea6ead00eda223dd7160a3..8e1d4239bf128c92035f477e4f93e5b6a33d313a 100644 (file)
@@ -422,7 +422,7 @@ var commandTests = []commandTest{
        },
        // tests commands, like `a.exe`, with c.Dir set
        {
-               // should not find a.exe in p, becasue LookPath(`a.exe`) will fail
+               // should not find a.exe in p, because LookPath(`a.exe`) will fail
                files: []string{`p\a.exe`},
                dir:   `p`,
                arg0:  `a.exe`,
index 4da4d88619ae65fad3bf27e63d112b3c61eeaf6d..fb4b45992d8f489ed7b4c9735af4b87e4f48199e 100644 (file)
@@ -30,7 +30,7 @@ func TestLFStack(t *testing.T) {
        stack := new(uint64)
        global = stack // force heap allocation
 
-       // Need to keep additional referenfces to nodes, the stack is not all that type-safe.
+       // Need to keep additional references to nodes, the stack is not all that type-safe.
        var nodes []*MyNode
 
        // Check the stack is initially empty.
index a4090b9a087dae81c9c33674e85453b3f0e38597..a1d5d8fc810e8697dea500e575ad2ed062656ac4 100644 (file)
@@ -355,7 +355,7 @@ func (h heapBits) setCheckmarked(size uintptr) {
 // Callers should call heapBitsBulkBarrier immediately after
 // calling memmove(p, src, size). This function is marked nosplit
 // to avoid being preempted; the GC must not stop the goroutine
-// betwen the memmove and the execution of the barriers.
+// between the memmove and the execution of the barriers.
 //
 // The heap bitmap is not maintained for allocations containing
 // no pointers at all; any caller of heapBitsBulkBarrier must first
index c2ee16383ec63fb8844240385af908f1a26f652b..53d6797c528b4918e8886abbbd6d8b89fcd02011 100644 (file)
@@ -322,7 +322,7 @@ type gcControllerState struct {
        fractionalMarkTime int64
 
        // idleMarkTime is the nanoseconds spent in idle marking
-       // during this cycle. This is udpated atomically throughout
+       // during this cycle. This is updated atomically throughout
        // the cycle.
        idleMarkTime int64
 
index 2c076734bdced11538fbc5111b9ad4361202b44d..dead22a3127f404cdd8dda86c64eef29988166c9 100644 (file)
@@ -954,7 +954,7 @@ func gcmarknewobject_m(obj, size uintptr) {
 // stopped ensuring that any object encountered has their normal
 // mark bit set. To do this we use an orthogonal bit
 // pattern to indicate the object is marked. The following pattern
-// uses the upper two bits in the object's bounday nibble.
+// uses the upper two bits in the object's boundary nibble.
 // 01: scalar  not marked
 // 10: pointer not marked
 // 11: pointer     marked
index b7feb847b4e3649495f2e75b686ef60f43c2294a..226c65635f1dd3c3995111d169022da0bd487f51 100644 (file)
@@ -308,7 +308,7 @@ func putfull(b *workbuf, entry int) {
 
 // getpartialorempty tries to return a partially empty
 // and if none are available returns an empty one.
-// entry is used to provide a brief histoy of ownership
+// entry is used to provide a brief history of ownership
 // using entry + xxx00000 to
 // indicating that two line numbers in the call chain.
 //go:nowritebarrier
@@ -328,7 +328,7 @@ func getpartialorempty(entry int) *workbuf {
 // putpartial puts empty buffers on the work.empty queue,
 // full buffers on the work.full queue and
 // others on the work.partial queue.
-// entry is used to provide a brief histoy of ownership
+// entry is used to provide a brief history of ownership
 // using entry + xxx00000 to
 // indicating that two call chain line numbers.
 //go:nowritebarrier
index 04fa050bc5ef54886242a6d106528e57c71fd00b..06d6fb15f75334aac9735a1e0cbcd2eb27e47f95 100644 (file)
@@ -58,7 +58,7 @@ type mheap struct {
        cachealloc            fixalloc // allocator for mcache*
        specialfinalizeralloc fixalloc // allocator for specialfinalizer*
        specialprofilealloc   fixalloc // allocator for specialprofile*
-       speciallock           mutex    // lock for sepcial record allocators.
+       speciallock           mutex    // lock for special record allocators.
 }
 
 var mheap_ mheap
index c06722fb98291cd19465d0a3743f73a139893352..7c6e3fa93e36f170cd398a688032b7ff59868086 100644 (file)
@@ -46,7 +46,7 @@ type pollDesc struct {
        // in a lock-free way by all operations.
        // NOTE(dvyukov): the following code uses uintptr to store *g (rg/wg),
        // that will blow up when GC starts moving objects.
-       lock    mutex // protectes the following fields
+       lock    mutex // protects the following fields
        fd      uintptr
        closing bool
        seq     uintptr // protects from stale timers and ready notifications
index 359fd47b2ac9212d89e3cc5c19b8352568f0672f..e4652d8ebd746b6afd0c94a6b62ec0cd54882eda 100644 (file)
@@ -32,7 +32,7 @@ import "unsafe"
 // Beside calling runtimeĀ·netpollopen, the networking code paths
 // will call runtimeĀ·netpollarm each time goroutines are interested
 // in doing network I/O. Because now we know what kind of I/O we
-// are interested in (reading/writting), we can call port_associate
+// are interested in (reading/writing), we can call port_associate
 // passing the correct type of event set (POLLIN/POLLOUT). As we made
 // sure to have already associated the file descriptor with the port,
 // when we now call port_associate, we will unblock the main poller
index 47563f450ea9bbd72a55356f7e6bb30d14a3c918..c8158b9decea4b254acb1c487f1e3c78ab4defd5 100644 (file)
@@ -411,7 +411,7 @@ func gopanic(e interface{}) {
 
                // Mark defer as started, but keep on list, so that traceback
                // can find and update the defer's argument frame if stack growth
-               // or a garbage collection hapens before reflectcall starts executing d.fn.
+               // or a garbage collection happens before reflectcall starts executing d.fn.
                d.started = true
 
                // Record the panic that is running the defer.
index 0f93ff7620b502214c6090ed54aa81d9ed4ab7ef..c179c5aea75387b3bba7c82811b68938560b1d46 100644 (file)
@@ -1960,7 +1960,7 @@ func exitsyscall(dummy int32) {
 
        var exitTicks int64
        if trace.enabled {
-               // Wait till traceGoSysBlock event is emited.
+               // Wait till traceGoSysBlock event is emitted.
                // This ensures consistency of the trace (the goroutine is started after it is blocked).
                for oldp != nil && oldp.syscalltick == _g_.m.syscalltick {
                        osyield()
@@ -2047,7 +2047,7 @@ func exitsyscallfast() bool {
                        ok = exitsyscallfast_pidle()
                        if ok && trace.enabled {
                                if oldp != nil {
-                                       // Wait till traceGoSysBlock event is emited.
+                                       // Wait till traceGoSysBlock event is emitted.
                                        // This ensures consistency of the trace (the goroutine is started after it is blocked).
                                        for oldp.syscalltick == _g_.m.syscalltick {
                                                osyield()
@@ -2695,7 +2695,7 @@ func procresize(nprocs int32) *p {
                                traceProcStop(p)
                        }
                }
-               // move all runable goroutines to the global queue
+               // move all runnable goroutines to the global queue
                for p.runqhead != p.runqtail {
                        // pop from tail of local queue
                        p.runqtail--
index 4a3a2364796ffb31611e5fb57af2ba778177cf7f..b4b19911554178ba97e31faff897e83cdfcde045 100644 (file)
@@ -236,7 +236,7 @@ func TestRaceSelect4(t *testing.T) {
 // there are two variables, access to one
 // of them is synchronized, access to the other
 // is not.
-// Select must (unconditionaly) choose the non-synchronized variable
+// Select must (unconditionally) choose the non-synchronized variable
 // thus causing exactly one race.
 // Currently this test doesn't look like it accomplishes
 // this goal.
index 81555af6af6f4b4336c5670acd6578b3bcd77514..55d153bc15aad2816faef02ad2fe2613c07ca673 100644 (file)
@@ -27,7 +27,7 @@ const (
        // the following encode that the GC is scanning the stack and what to do when it is done
        _Gscan = 0x1000 // atomicstatus&~Gscan = the non-scan state,
        // _Gscanidle =     _Gscan + _Gidle,      // Not used. Gidle only used with newly malloced gs
-       _Gscanrunnable = _Gscan + _Grunnable //  0x1001 When scanning complets make Grunnable (it is already on run queue)
+       _Gscanrunnable = _Gscan + _Grunnable //  0x1001 When scanning completes make Grunnable (it is already on run queue)
        _Gscanrunning  = _Gscan + _Grunning  //  0x1002 Used to tell preemption newstack routine to scan preempted stack.
        _Gscansyscall  = _Gscan + _Gsyscall  //  0x1003 When scanning completes make it Gsyscall
        _Gscanwaiting  = _Gscan + _Gwaiting  //  0x1004 When scanning completes make it Gwaiting
@@ -237,7 +237,7 @@ type g struct {
        preempt      bool // preemption signal, duplicates stackguard0 = stackpreempt
        paniconfault bool // panic (instead of crash) on unexpected fault address
        preemptscan  bool // preempted g does scan for gc
-       gcworkdone   bool // debug: cleared at begining of gc work phase cycle, set by gcphasework, tested at end of cycle
+       gcworkdone   bool // debug: cleared at beginning of gc work phase cycle, set by gcphasework, tested at end of cycle
        gcscanvalid  bool // false at start of gc cycle, true if G has not run since last scan
        throwsplit   bool // must not split stack
        raceignore   int8 // ignore race detection events
index 79b611839d49ac66240f81e01e736f4e971c6e32..15820a51811ea2083c8338ed68cf77f9518c971b 100644 (file)
@@ -83,7 +83,7 @@ func growslice(t *slicetype, old slice, n int) slice {
                memmove(p, old.array, lenmem)
                memclr(add(p, lenmem), capmem-lenmem)
        } else {
-               // Note: can't use rawmem (which avoids zeroing of memory), because then GC can scan unitialized memory.
+               // Note: can't use rawmem (which avoids zeroing of memory), because then GC can scan uninitialized memory.
                p = newarray(et, uintptr(newcap))
                if !writeBarrierEnabled {
                        memmove(p, old.array, lenmem)
index f1a6e8369d5a43f0f31ff3b0be081e0306fa5fd7..d5ccc7fb1d7e0496a81b0f672e24e69d5949afa3 100644 (file)
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // A copy of Sqrt tests from the math package to test the
-// purely integer arithmetic implementaiton in sqrt.go.
+// purely integer arithmetic implementation in sqrt.go.
 
 package runtime_test
 
index f8e7196bd32950c732bc74381bed83f66d33cbae..bf2d36ec8516c80c45f726db6870e73ec6b03352 100644 (file)
@@ -322,7 +322,7 @@ ret:
        // Enable exceptions again.
        NACL_SYSCALL(SYS_exception_clear_flag)
 
-       // NaCl has abidcated its traditional operating system responsibility
+       // NaCl has abdicated its traditional operating system responsibility
        // and declined to implement 'sigreturn'. Instead the only way to return
        // to the execution of our program is to restore the registers ourselves.
        // Unfortunately, that is impossible to do with strict fidelity, because
index 18663b486b46a900c30e574b616f9e83bef9c483..c157e6dd7b8ce20580915a48660611a6ef936a84 100644 (file)
@@ -55,7 +55,7 @@ func LoadDLL(name string) (dll *DLL, err error) {
        return d, nil
 }
 
-// MustLoadDLL is like LoadDLL but panics if load operation failes.
+// MustLoadDLL is like LoadDLL but panics if load operation fails.
 func MustLoadDLL(name string) *DLL {
        d, e := LoadDLL(name)
        if e != nil {
index d4c09273d68d54c77c0e122044563c8eda433ac0..622272ad50222b49a4f19db0f62d3f875f48b710 100644 (file)
@@ -627,7 +627,7 @@ func (src *Source) DLLs() []string {
        return r
 }
 
-// ParseFile adds adition file path to a source set src.
+// ParseFile adds additional file path to a source set src.
 func (src *Source) ParseFile(path string) error {
        file, err := os.Open(path)
        if err != nil {
index a55198b63488bc5a3eea2e735ab88df63c909e8f..c62fdc3c81dd5cc67f8d0be75c5c9c2f212a6ca6 100644 (file)
@@ -58,7 +58,7 @@ func parseSockaddrLink(b []byte) (*SockaddrDatalink, error) {
 // parseLinkLayerAddr parses b as a datalink socket address in
 // conventional BSD kernel form.
 func parseLinkLayerAddr(b []byte) (*SockaddrDatalink, int, error) {
-       // The encoding looks like the follwoing:
+       // The encoding looks like the following:
        // +----------------------------+
        // | Type             (1 octet) |
        // +----------------------------+