]> Cypherpunks repositories - gostls13.git/commitdiff
all: remove some double spaces from comments
authorDaniel Martí <mvdan@mvdan.cc>
Sat, 19 Aug 2017 20:33:51 +0000 (22:33 +0200)
committerDaniel Martí <mvdan@mvdan.cc>
Sat, 26 Aug 2017 15:09:09 +0000 (15:09 +0000)
Went mainly for the ones that make no sense, such as the ones
mid-sentence or after commas.

Change-Id: Ie245d2c19cc7428a06295635cf6a9482ade25ff0
Reviewed-on: https://go-review.googlesource.com/57293
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>

26 files changed:
src/cmd/asm/internal/asm/asm.go
src/cmd/compile/fmt_test.go
src/cmd/compile/internal/amd64/ssa.go
src/cmd/compile/internal/gc/builtin/runtime.go
src/cmd/compile/internal/gc/const.go
src/cmd/compile/internal/gc/main.go
src/cmd/compile/internal/gc/ssa.go
src/cmd/compile/internal/ssa/copyelim.go
src/cmd/compile/internal/ssa/regalloc.go
src/cmd/compile/internal/x86/ssa.go
src/cmd/internal/obj/x86/obj6.go
src/cmd/internal/objfile/goobj.go
src/encoding/gob/decoder.go
src/encoding/json/decode.go
src/encoding/xml/read.go
src/flag/flag.go
src/fmt/print.go
src/net/http/server.go
src/runtime/cputicks.go
src/runtime/lock_sema.go
src/runtime/mgc.go
src/runtime/panic.go
src/strconv/quote.go
src/sync/atomic/atomic_test.go
src/syscall/mksyscall_windows.go
src/unsafe/unsafe.go

index 7e9e59daf45d340e531681895e3221eb92a8226c..24aa0537ca61de4137858a350279a64e08d71cd5 100644 (file)
@@ -666,7 +666,7 @@ func (p *Parser) asmInstruction(op obj.As, cond string, a []obj.Addr) {
                        }
                }
                if p.arch.Family == sys.AMD64 {
-                       // 4 operand instruction have form  ymm1, ymm2, ymm3/m256, imm8
+                       // 4 operand instruction have form ymm1, ymm2, ymm3/m256, imm8
                        // So From3 is always just a register, so we store imm8 in Offset field,
                        // to avoid increasing size of Prog.
                        prog.From = a[1]
index 0e5a3192ce56dc0173e66d519225cf426a41bf82..dde80565b8e49e343de793ec178a56ebd560bed8 100644 (file)
@@ -419,7 +419,7 @@ func stringVal(tv types.TypeAndValue) (string, bool) {
 // formatIter iterates through the string s in increasing
 // index order and calls f for each format specifier '%..v'.
 // The arguments for f describe the specifier's index range.
-// If a format specifier contains a  "*", f is called with
+// If a format specifier contains a "*", f is called with
 // the index range for "*" alone, before being called for
 // the entire specifier. The result of f is the index of
 // the rune at which iteration continues.
index fbd0a9e46cf1309c8e97631c9280809f2b05142a..a0cfdd093ab38e61b0194af8bf5024ba17e41548 100644 (file)
@@ -878,7 +878,7 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
        case ssa.OpAMD64LoweredNilCheck:
                // Issue a load which will fault if the input is nil.
                // TODO: We currently use the 2-byte instruction TESTB AX, (reg).
-               // Should we use the 3-byte TESTB $0, (reg) instead?  It is larger
+               // Should we use the 3-byte TESTB $0, (reg) instead? It is larger
                // but it doesn't have false dependency on AX.
                // Or maybe allocate an output register and use MOVL (reg),reg2 ?
                // That trades clobbering flags for clobbering a register.
index 1fb42e72231a712d463984229eaeb90ab26dae38..03b853ecc50b0a73878da08aadb8585e96d50a8d 100644 (file)
@@ -77,7 +77,7 @@ func convT2Istring(tab *byte, elem *any) (ret any)
 func convT2Islice(tab *byte, elem *any) (ret any)
 func convT2Inoptr(tab *byte, elem *any) (ret any)
 
-// interface type assertions  x.(T)
+// interface type assertions x.(T)
 func assertE2I(typ *byte, iface any) (ret any)
 func assertE2I2(typ *byte, iface any) (ret any, b bool)
 func assertI2I(typ *byte, iface any) (ret any)
index c6a679ed783a4b975241f716f721f8ae249591ea..6fede5fd30155012661a17f3ba765970b134670b 100644 (file)
@@ -247,7 +247,7 @@ func convlit1(n *Node, t *types.Type, explicit bool, reuse canReuseNode) *Node {
 
                return n
 
-               // target is invalid type for a constant?  leave alone.
+               // target is invalid type for a constant? leave alone.
        case OLITERAL:
                if !okforconst[t.Etype] && n.Type.Etype != TNIL {
                        return defaultlitreuse(n, nil, reuse)
index a1f4767c8f0b9df96f6d47784f58b51a012dc0b5..6d5c15bd85b771c6f92d6b0cdf4e16d000599541 100644 (file)
@@ -769,7 +769,7 @@ func isDriveLetter(b byte) bool {
        return 'a' <= b && b <= 'z' || 'A' <= b && b <= 'Z'
 }
 
-// is this path a local name?  begins with ./ or ../ or /
+// is this path a local name? begins with ./ or ../ or /
 func islocalname(name string) bool {
        return strings.HasPrefix(name, "/") ||
                runtime.GOOS == "windows" && len(name) >= 3 && isDriveLetter(name[0]) && name[1] == ':' && name[2] == '/' ||
index 47fb6938a1862bf9235a1a6c0e508e20ba93df80..10886b94b84bb3711e97c2f779c72d42012edbfd 100644 (file)
@@ -3373,7 +3373,7 @@ func (s *state) canSSA(n *Node) bool {
                return false
        case PPARAMOUT:
                if s.hasdefer {
-                       // TODO: handle this case?  Named return values must be
+                       // TODO: handle this case? Named return values must be
                        // in memory so that the deferred function can see them.
                        // Maybe do: if !strings.HasPrefix(n.String(), "~") { return false }
                        // Or maybe not, see issue 18860.  Even unnamed return values
index 5cbb4486b29f44a97d5adffb0b29653fb8dafb60..44ccfe1bfec3920284a69c937ae8188475989d24 100644 (file)
@@ -45,7 +45,7 @@ func copySource(v *Value) *Value {
        // but we take some extra care to make sure we
        // don't get stuck in an infinite loop.
        // Infinite copy loops may happen in unreachable code.
-       // (TODO: or can they?  Needs a test.)
+       // (TODO: or can they? Needs a test.)
        slow := w
        var advance bool
        for w.Op == OpCopy {
index d509c6c0d372b471f8d1773e3ca4e4d346103f16..5d1fbf8e3f169a1623b26c2e09d9f913f5e8d7ff 100644 (file)
@@ -884,7 +884,7 @@ func (s *regAllocState) regalloc(f *Func) {
                        // Decide on registers for phi ops. Use the registers determined
                        // by the primary predecessor if we can.
                        // TODO: pick best of (already processed) predecessors?
-                       // Majority vote?  Deepest nesting level?
+                       // Majority vote? Deepest nesting level?
                        phiRegs = phiRegs[:0]
                        var phiUsed regMask
                        for _, v := range phis {
index a491599c582ec4cfe73efa0080f9e7856a911e14..ca430d681be834b8d4851b815a50b4d595927c17 100644 (file)
@@ -728,7 +728,7 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
        case ssa.Op386LoweredNilCheck:
                // Issue a load which will fault if the input is nil.
                // TODO: We currently use the 2-byte instruction TESTB AX, (reg).
-               // Should we use the 3-byte TESTB $0, (reg) instead?  It is larger
+               // Should we use the 3-byte TESTB $0, (reg) instead? It is larger
                // but it doesn't have false dependency on AX.
                // Or maybe allocate an output register and use MOVL (reg),reg2 ?
                // That trades clobbering flags for clobbering a register.
index 27873e0824b6f636608f4d396bebebba87543d13..52fbaa0156238fff71f6d16f262b36ad327276e2 100644 (file)
@@ -528,7 +528,7 @@ func rewriteToPcrel(ctxt *obj.Link, p *obj.Prog, newprog obj.ProgAlloc) {
        var dst int16 = REG_CX
        if (p.As == ALEAL || p.As == AMOVL) && p.To.Reg != p.From.Reg && p.To.Reg != p.From.Index {
                dst = p.To.Reg
-               // Why?  See the comment near the top of rewriteToUseGot above.
+               // Why? See the comment near the top of rewriteToUseGot above.
                // AMOVLs might be introduced by the GOT rewrites.
        }
        q := obj.Appendp(p, newprog)
index e075604abdfdcda2d618faba04dad529f4980aeb..c9e12a81a484750b19b70e1c09521996268e781c 100644 (file)
@@ -81,7 +81,7 @@ func (f *goobjFile) symbols() ([]Sym, error) {
 }
 
 func (f *goobjFile) pcln() (textStart uint64, symtab, pclntab []byte, err error) {
-       // Should never be called.  We implement Liner below, callers
+       // Should never be called. We implement Liner below, callers
        // should use that instead.
        return 0, nil, nil, fmt.Errorf("pcln not available in go object file")
 }
@@ -90,7 +90,7 @@ func (f *goobjFile) pcln() (textStart uint64, symtab, pclntab []byte, err error)
 // 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) {
-       // TODO: this is really inefficient.  Binary search?  Memoize last result?
+       // TODO: this is really inefficient. Binary search? Memoize last result?
        var arch *sys.Arch
        for _, a := range sys.Archs {
                if a.Name == f.goobj.Arch {
index 8e0b1dd375067b0e6ee6b161cb2c2f21f80e2a58..9398b8f243fae9aca20b12f816ad5a5051b7ce3d 100644 (file)
@@ -55,7 +55,7 @@ func NewDecoder(r io.Reader) *Decoder {
 
 // recvType loads the definition of a type.
 func (dec *Decoder) recvType(id typeId) {
-       // Have we already seen this type?  That's an error
+       // Have we already seen this type? That's an error
        if id < firstUserId || dec.wireType[id] != nil {
                dec.err = errors.New("gob: duplicate type received")
                return
index 420a07e1549c451bb2173cd3f00c3048ae6e9b26..bc3bd9733d3f54d10188a3fe65da949aebb3549f 100644 (file)
@@ -508,7 +508,7 @@ func (d *decodeState) array(v reflect.Value) {
        switch v.Kind() {
        case reflect.Interface:
                if v.NumMethod() == 0 {
-                       // Decoding into nil interface?  Switch to non-reflect code.
+                       // Decoding into nil interface? Switch to non-reflect code.
                        v.Set(reflect.ValueOf(d.arrayInterface()))
                        return
                }
@@ -612,7 +612,7 @@ func (d *decodeState) object(v reflect.Value) {
        }
        v = pv
 
-       // Decoding into nil interface?  Switch to non-reflect code.
+       // Decoding into nil interface? Switch to non-reflect code.
        if v.Kind() == reflect.Interface && v.NumMethod() == 0 {
                v.Set(reflect.ValueOf(d.objectInterface()))
                return
@@ -1190,7 +1190,7 @@ func unquoteBytes(s []byte) (t []byte, ok bool) {
        b := make([]byte, len(s)+2*utf8.UTFMax)
        w := copy(b, s[0:r])
        for r < len(s) {
-               // Out of room?  Can only happen if s is full of
+               // Out of room? Can only happen if s is full of
                // malformed UTF-8 and we're replacing each
                // byte with RuneError.
                if w >= len(b)-2*utf8.UTFMax {
index dffb95d77a4097631126151dd4a94da7e3df2116..2fd6e06688ae29be5d9949d6ea8656583d719cf3 100644 (file)
@@ -160,7 +160,7 @@ func (e UnmarshalError) Error() string { return string(e) }
 // UnmarshalXML must consume exactly one XML element.
 // One common implementation strategy is to unmarshal into
 // a separate value with a layout matching the expected XML
-// using d.DecodeElement,  and then to copy the data from
+// using d.DecodeElement, and then to copy the data from
 // that value into the receiver.
 // Another common strategy is to use d.Token to process the
 // XML object one token at a time.
index be47f0714dbeaec24ca0eb68bd9630c84881aeda..6bc8e96e209769a9e9dd75e954fc10a4f2d875e6 100644 (file)
@@ -646,13 +646,13 @@ func (f *FlagSet) UintVar(p *uint, name string, value uint, usage string) {
 }
 
 // UintVar defines a uint flag with specified name, default value, and usage string.
-// The argument p points to a uint  variable in which to store the value of the flag.
+// The argument p points to a uint variable in which to store the value of the flag.
 func UintVar(p *uint, name string, value uint, usage string) {
        CommandLine.Var(newUintValue(value, p), name, usage)
 }
 
 // Uint defines a uint flag with specified name, default value, and usage string.
-// The return value is the address of a uint  variable that stores the value of the flag.
+// The return value is the address of a uint variable that stores the value of the flag.
 func (f *FlagSet) Uint(name string, value uint, usage string) *uint {
        p := new(uint)
        f.UintVar(p, name, value, usage)
@@ -660,7 +660,7 @@ func (f *FlagSet) Uint(name string, value uint, usage string) *uint {
 }
 
 // Uint defines a uint flag with specified name, default value, and usage string.
-// The return value is the address of a uint  variable that stores the value of the flag.
+// The return value is the address of a uint variable that stores the value of the flag.
 func Uint(name string, value uint, usage string) *uint {
        return CommandLine.Uint(name, value, usage)
 }
@@ -935,7 +935,7 @@ func (f *FlagSet) Parsed() bool {
        return f.parsed
 }
 
-// Parse parses the command-line flags from os.Args[1:].  Must be called
+// Parse parses the command-line flags from os.Args[1:]. Must be called
 // after all flags are defined and before flags are accessed by the program.
 func Parse() {
        // Ignore errors; CommandLine is set for ExitOnError.
index d1c99c1cd3e64c11603726f03c8b089e2421d58b..38ce928fc0fe00a5c819111d3b3f85913a929a1f 100644 (file)
@@ -837,7 +837,7 @@ func (p *pp) printValue(value reflect.Value, verb rune, depth int) {
                        p.buf.WriteByte(']')
                }
        case reflect.Ptr:
-               // pointer to array or slice or struct?  ok at top level
+               // pointer to array or slice or struct? ok at top level
                // but not embedded (avoid loops)
                if depth == 0 && f.Pointer() != 0 {
                        switch a := f.Elem(); a.Kind() {
index 8af4438262ef1e19034bad1c256dd379294149cc..7312f4850f13a070215b702043d4a5b094a8cc22 100644 (file)
@@ -1337,7 +1337,7 @@ func (cw *chunkWriter) writeHeader(p []byte) {
        } else if hasCL {
                delHeader("Transfer-Encoding")
        } else if w.req.ProtoAtLeast(1, 1) {
-               // HTTP/1.1 or greater: Transfer-Encoding has been set to identity,  and no
+               // HTTP/1.1 or greater: Transfer-Encoding has been set to identity, and no
                // content-length has been provided. The connection must be closed after the
                // reply is written, and no chunking is to be done. This is the setup
                // recommended in the Server-Sent Events candidate recommendation 11,
index ccc3947bb2ffecdf30ccef003e3ffadb69658718..de97d5b6fad45d938299f0d16183ef91db8b3ffc 100644 (file)
@@ -11,6 +11,6 @@
 
 package runtime
 
-// careful: cputicks is not guaranteed to be monotonic!  In particular, we have
+// careful: cputicks is not guaranteed to be monotonic! In particular, we have
 // noticed drift between cpus on certain os/arch combinations. See issue 8976.
 func cputicks() int64
index 5b0169d572564097e4f2e15b0293ed72092f0492..68fcb564af8bc0ee025832693719bbeb7af1fe73 100644 (file)
@@ -140,7 +140,7 @@ func notewakeup(n *note) {
        case v == 0:
                // Nothing was waiting. Done.
        case v == locked:
-               // Two notewakeups!  Not allowed.
+               // Two notewakeups! Not allowed.
                throw("notewakeup - double wakeup")
        default:
                // Must be the waiting m. Wake it up.
index 0e57d960c402b2d7239850461fbf13ade360fd83..5708d4afa63b0b677e54d879370c76f2f54e7f56 100644 (file)
@@ -1235,7 +1235,7 @@ func gcStart(mode gcMode, trigger gcTrigger) {
                }
        }
 
-       // Ok, we're doing it!  Stop everybody else
+       // Ok, we're doing it! Stop everybody else
        semacquire(&worldsema)
 
        if trace.enabled {
index 2a7acb7797ed103f9f3cb15058392c8fc930e745..1f8e37e14f46cc1dd707e681d5d2c757403a412b 100644 (file)
@@ -680,7 +680,7 @@ func startpanic_m() {
                exit(4)
                fallthrough
        default:
-               // Can't even print!  Just exit.
+               // Can't even print! Just exit.
                exit(5)
        }
 }
index db57065cac1c3ab651c63d0785a8c73d7c029bc5..156a510d213b274cb6487e62c6b3ba9b4243db42 100644 (file)
@@ -381,7 +381,7 @@ func Unquote(s string) (string, error) {
                return "", ErrSyntax
        }
 
-       // Is it trivial?  Avoid allocation.
+       // Is it trivial? Avoid allocation.
        if !contains(s, '\\') && !contains(s, quote) {
                switch quote {
                case '"':
index 753def62b5534d4d8a4dfd632a9016823700bea9..39c40c6aaf556edfe0af5d818660df0331ad2162 100644 (file)
@@ -30,7 +30,7 @@ const (
        magic64 = 0xdeddeadbeefbeef
 )
 
-// Do the 64-bit functions panic?  If so, don't bother testing.
+// Do the 64-bit functions panic? If so, don't bother testing.
 var test64err = func() (err interface{}) {
        defer func() {
                err = recover()
index 37e4a070cd99909c0af6c219f1cb53d3251f0b0d..e7c8664ee04db4f8415c059ede33bf9b37214c17 100644 (file)
@@ -614,7 +614,7 @@ func (src *Source) ExternalImport(pkg string) {
 }
 
 // ParseFiles parses files listed in fs and extracts all syscall
-// functions listed in  sys comments. It returns source files
+// functions listed in sys comments. It returns source files
 // and functions collection *Source if successful.
 func ParseFiles(fs []string) (*Source, error) {
        src := &Source{
index 859ca4fa3b7c44a0973823f87bab516a260e5f4d..ffe406e1ce657648603fcc028235f552bbc7b3aa 100644 (file)
@@ -176,7 +176,7 @@ type Pointer *ArbitraryType
 // Sizeof takes an expression x of any type and returns the size in bytes
 // of a hypothetical variable v as if v was declared via var v = x.
 // The size does not include any memory possibly referenced by x.
-// For instance, if x is a slice,  Sizeof returns the size of the slice
+// For instance, if x is a slice, Sizeof returns the size of the slice
 // descriptor, not the size of the memory referenced by the slice.
 func Sizeof(x ArbitraryType) uintptr