]> Cypherpunks.ru repositories - gostls13.git/commitdiff
all: single space after period.
authorBrad Fitzpatrick <bradfitz@golang.org>
Tue, 1 Mar 2016 23:21:55 +0000 (23:21 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 2 Mar 2016 00:13:47 +0000 (00:13 +0000)
The tree's pretty inconsistent about single space vs double space
after a period in documentation. Make it consistently a single space,
per earlier decisions. This means contributors won't be confused by
misleading precedence.

This CL doesn't use go/doc to parse. It only addresses // comments.
It was generated with:

$ perl -i -npe 's,^(\s*// .+[a-z]\.)  +([A-Z]),$1 $2,' $(git grep -l -E '^\s*//(.+\.)  +([A-Z])')
$ go test go/doc -update

Change-Id: Iccdb99c37c797ef1f804a94b22ba5ee4b500c4f7
Reviewed-on: https://go-review.googlesource.com/20022
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Dave Day <djd@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

536 files changed:
src/archive/tar/writer.go
src/bufio/bufio.go
src/bytes/buffer.go
src/bytes/bytes.go
src/bytes/bytes_test.go
src/bytes/compare_test.go
src/bytes/equal_test.go
src/cmd/cgo/ast.go
src/cmd/cgo/gcc.go
src/cmd/cgo/main.go
src/cmd/cgo/out.go
src/cmd/cgo/util.go
src/cmd/compile/internal/amd64/peep.go
src/cmd/compile/internal/arm/cgen64.go
src/cmd/compile/internal/arm64/cgen.go
src/cmd/compile/internal/big/arith_test.go
src/cmd/compile/internal/big/nat.go
src/cmd/compile/internal/big/rat.go
src/cmd/compile/internal/big/ratconv_test.go
src/cmd/compile/internal/gc/alg.go
src/cmd/compile/internal/gc/align.go
src/cmd/compile/internal/gc/bimport.go
src/cmd/compile/internal/gc/builtin/runtime.go
src/cmd/compile/internal/gc/builtin/unsafe.go
src/cmd/compile/internal/gc/cgen.go
src/cmd/compile/internal/gc/dcl.go
src/cmd/compile/internal/gc/esc.go
src/cmd/compile/internal/gc/fmt.go
src/cmd/compile/internal/gc/global_test.go
src/cmd/compile/internal/gc/inl.go
src/cmd/compile/internal/gc/order.go
src/cmd/compile/internal/gc/parser.go
src/cmd/compile/internal/gc/plive.go
src/cmd/compile/internal/gc/reflect.go
src/cmd/compile/internal/gc/ssa.go
src/cmd/compile/internal/gc/subr.go
src/cmd/compile/internal/gc/testdata/addressed_ssa.go
src/cmd/compile/internal/gc/testdata/gen/arithBoundaryGen.go
src/cmd/compile/internal/gc/testdata/gen/arithConstGen.go
src/cmd/compile/internal/gc/testdata/loadstore_ssa.go
src/cmd/compile/internal/gc/testdata/phi_ssa.go
src/cmd/compile/internal/gc/testdata/unsafe_ssa.go
src/cmd/compile/internal/gc/type.go
src/cmd/compile/internal/gc/typecheck.go
src/cmd/compile/internal/gc/walk.go
src/cmd/compile/internal/mips64/cgen.go
src/cmd/compile/internal/mips64/peep.go
src/cmd/compile/internal/ppc64/cgen.go
src/cmd/compile/internal/ppc64/gsubr.go
src/cmd/compile/internal/ppc64/opt.go
src/cmd/compile/internal/ppc64/peep.go
src/cmd/compile/internal/ppc64/prog.go
src/cmd/compile/internal/ssa/block.go
src/cmd/compile/internal/ssa/check.go
src/cmd/compile/internal/ssa/compile.go
src/cmd/compile/internal/ssa/config.go
src/cmd/compile/internal/ssa/cse.go
src/cmd/compile/internal/ssa/deadcode.go
src/cmd/compile/internal/ssa/deadstore.go
src/cmd/compile/internal/ssa/deadstore_test.go
src/cmd/compile/internal/ssa/dom.go
src/cmd/compile/internal/ssa/flagalloc.go
src/cmd/compile/internal/ssa/func.go
src/cmd/compile/internal/ssa/gen/AMD64.rules
src/cmd/compile/internal/ssa/gen/AMD64Ops.go
src/cmd/compile/internal/ssa/gen/generic.rules
src/cmd/compile/internal/ssa/gen/genericOps.go
src/cmd/compile/internal/ssa/gen/main.go
src/cmd/compile/internal/ssa/gen/rulegen.go
src/cmd/compile/internal/ssa/likelyadjust.go
src/cmd/compile/internal/ssa/magic.go
src/cmd/compile/internal/ssa/nilcheck.go
src/cmd/compile/internal/ssa/op.go
src/cmd/compile/internal/ssa/phielim.go
src/cmd/compile/internal/ssa/regalloc.go
src/cmd/compile/internal/ssa/rewrite.go
src/cmd/compile/internal/ssa/schedule.go
src/cmd/compile/internal/ssa/sparsetree.go
src/cmd/compile/internal/ssa/stackalloc.go
src/cmd/compile/internal/ssa/value.go
src/cmd/compile/internal/x86/cgen64.go
src/cmd/compile/internal/x86/gsubr.go
src/cmd/compile/internal/x86/peep.go
src/cmd/cover/cover.go
src/cmd/dist/build.go
src/cmd/dist/buildruntime.go
src/cmd/dist/test.go
src/cmd/fix/main.go
src/cmd/fix/typecheck.go
src/cmd/go/build.go
src/cmd/go/get.go
src/cmd/go/go_test.go
src/cmd/go/main.go
src/cmd/go/note.go
src/cmd/go/pkg.go
src/cmd/go/run.go
src/cmd/go/test.go
src/cmd/go/vcs.go
src/cmd/gofmt/internal.go
src/cmd/gofmt/rewrite.go
src/cmd/internal/obj/arm/asm5.go
src/cmd/internal/obj/arm64/a.out.go
src/cmd/internal/obj/arm64/asm7.go
src/cmd/internal/obj/arm64/list7.go
src/cmd/internal/obj/arm64/obj7.go
src/cmd/internal/obj/link.go
src/cmd/internal/obj/objfile.go
src/cmd/internal/obj/ppc64/obj9.go
src/cmd/internal/obj/textflag.go
src/cmd/internal/obj/util.go
src/cmd/internal/obj/x86/asm6.go
src/cmd/internal/obj/x86/obj6.go
src/cmd/link/internal/amd64/asm.go
src/cmd/link/internal/ld/ar.go
src/cmd/link/internal/ld/data.go
src/cmd/link/internal/ld/dwarf.go
src/cmd/link/internal/ld/ldmacho.go
src/cmd/link/internal/ld/ldpe.go
src/cmd/link/internal/ld/lib.go
src/cmd/link/internal/ld/macho.go
src/cmd/link/internal/ld/pcln.go
src/cmd/link/internal/ld/symtab.go
src/cmd/link/internal/ppc64/asm.go
src/cmd/link/internal/x86/asm.go
src/cmd/pprof/internal/profile/encode.go
src/cmd/pprof/internal/profile/legacy_profile.go
src/cmd/pprof/internal/profile/profile.go
src/cmd/pprof/internal/profile/prune.go
src/cmd/pprof/internal/report/report.go
src/cmd/pprof/internal/symbolz/symbolz.go
src/cmd/vet/cgo.go
src/cmd/vet/main.go
src/cmd/vet/method.go
src/cmd/vet/print.go
src/cmd/yacc/testdata/expr/expr.y
src/compress/flate/deflate.go
src/compress/flate/deflate_test.go
src/compress/flate/huffman_bit_writer.go
src/compress/flate/huffman_code.go
src/compress/flate/inflate.go
src/compress/gzip/gunzip.go
src/container/heap/heap.go
src/crypto/aes/block.go
src/crypto/cipher/cipher.go
src/crypto/md5/md5.go
src/crypto/rand/rand_unix.go
src/crypto/rand/util.go
src/crypto/rc4/rc4.go
src/crypto/rsa/pss.go
src/crypto/sha1/sha1.go
src/crypto/sha1/sha1_test.go
src/crypto/sha256/sha256.go
src/crypto/sha256/sha256_test.go
src/crypto/sha512/sha512.go
src/crypto/sha512/sha512_test.go
src/crypto/tls/conn.go
src/crypto/tls/handshake_server.go
src/crypto/tls/handshake_server_test.go
src/crypto/tls/key_agreement.go
src/crypto/tls/tls_test.go
src/crypto/x509/pem_decrypt.go
src/crypto/x509/root_windows.go
src/crypto/x509/verify.go
src/database/sql/convert.go
src/database/sql/driver/driver.go
src/database/sql/driver/types.go
src/database/sql/fakedb_test.go
src/database/sql/sql.go
src/database/sql/sql_test.go
src/debug/dwarf/buf.go
src/debug/dwarf/entry.go
src/debug/dwarf/open.go
src/debug/dwarf/type.go
src/debug/dwarf/type_test.go
src/debug/dwarf/typeunit.go
src/debug/elf/elf.go
src/debug/gosym/pclntab.go
src/debug/gosym/symtab.go
src/encoding/ascii85/ascii85.go
src/encoding/asn1/marshal.go
src/encoding/base32/base32.go
src/encoding/base64/base64.go
src/encoding/binary/binary_test.go
src/encoding/csv/reader.go
src/encoding/csv/writer.go
src/encoding/gob/debug.go
src/encoding/gob/decode.go
src/encoding/gob/decoder.go
src/encoding/gob/encode.go
src/encoding/gob/encoder.go
src/encoding/gob/encoder_test.go
src/encoding/gob/error.go
src/encoding/gob/example_interface_test.go
src/encoding/gob/example_test.go
src/encoding/gob/gobencdec_test.go
src/encoding/gob/type.go
src/encoding/hex/hex.go
src/encoding/json/decode.go
src/encoding/json/encode.go
src/encoding/json/scanner.go
src/encoding/json/stream.go
src/encoding/pem/pem.go
src/encoding/xml/marshal.go
src/encoding/xml/read.go
src/encoding/xml/xml.go
src/expvar/expvar.go
src/flag/flag.go
src/fmt/fmt_test.go
src/fmt/format.go
src/fmt/scan.go
src/fmt/scan_test.go
src/go/ast/import.go
src/go/ast/resolve.go
src/go/build/build.go
src/go/build/deps_test.go
src/go/build/doc.go
src/go/doc/comment.go
src/go/doc/testdata/benchmark.go
src/go/doc/testdata/testing.0.golden
src/go/doc/testdata/testing.1.golden
src/go/doc/testdata/testing.2.golden
src/go/doc/testdata/testing.go
src/go/format/internal.go
src/go/scanner/scanner.go
src/go/types/initorder.go
src/go/types/object.go
src/go/types/package.go
src/go/types/scope.go
src/go/types/type.go
src/html/template/error.go
src/html/template/escape.go
src/image/color/color.go
src/image/gif/reader.go
src/io/io.go
src/io/ioutil/ioutil.go
src/io/ioutil/tempfile.go
src/io/multi.go
src/log/log.go
src/log/syslog/syslog.go
src/math/acosh.go
src/math/asinh.go
src/math/atanh.go
src/math/big/arith_test.go
src/math/big/nat.go
src/math/big/rat.go
src/math/big/ratconv_test.go
src/math/cmplx/sqrt.go
src/math/erf.go
src/math/exp.go
src/math/expm1.go
src/math/gamma.go
src/math/j0.go
src/math/j1.go
src/math/jn.go
src/math/lgamma.go
src/math/log.go
src/math/log1p.go
src/math/modf.go
src/math/remainder.go
src/math/sqrt.go
src/mime/mediatype.go
src/mime/multipart/multipart.go
src/mime/multipart/multipart_test.go
src/net/addrselect.go
src/net/conf.go
src/net/dial_test.go
src/net/dnsclient.go
src/net/dnsconfig_unix.go
src/net/dnsmsg.go
src/net/fd_unix.go
src/net/http/cgi/host.go
src/net/http/client.go
src/net/http/clientserver_test.go
src/net/http/filetransport.go
src/net/http/fs.go
src/net/http/h2_bundle.go
src/net/http/header.go
src/net/http/httptest/server.go
src/net/http/httputil/dump.go
src/net/http/httputil/persist.go
src/net/http/httputil/reverseproxy.go
src/net/http/pprof/pprof.go
src/net/http/request.go
src/net/http/requestwrite_test.go
src/net/http/response.go
src/net/http/serve_test.go
src/net/http/server.go
src/net/http/sniff.go
src/net/http/transfer.go
src/net/http/transport.go
src/net/http/transport_test.go
src/net/interface.go
src/net/interface_bsd.go
src/net/interface_linux.go
src/net/interface_stub.go
src/net/interface_test.go
src/net/interface_windows.go
src/net/ip.go
src/net/iprawsock_plan9.go
src/net/iprawsock_posix.go
src/net/ipsock.go
src/net/ipsock_plan9.go
src/net/ipsock_posix.go
src/net/lookup.go
src/net/net.go
src/net/rpc/client.go
src/net/rpc/jsonrpc/server.go
src/net/rpc/server.go
src/net/smtp/smtp.go
src/net/sockopt_bsd.go
src/net/sockopt_linux.go
src/net/sockopt_solaris.go
src/net/sockopt_windows.go
src/net/tcpsock_plan9.go
src/net/tcpsock_posix.go
src/net/textproto/header.go
src/net/textproto/pipeline.go
src/net/textproto/reader.go
src/net/textproto/textproto.go
src/net/textproto/writer.go
src/net/udpsock_plan9.go
src/net/udpsock_posix.go
src/net/unixsock_plan9.go
src/net/unixsock_posix.go
src/net/url/url.go
src/os/doc.go
src/os/env.go
src/os/exec.go
src/os/exec/exec_test.go
src/os/exec_posix.go
src/os/file.go
src/os/file_plan9.go
src/os/file_unix.go
src/os/file_windows.go
src/os/getwd.go
src/os/os_unix_test.go
src/os/path.go
src/os/path_test.go
src/os/pipe_test.go
src/os/signal/signal.go
src/os/stat_plan9.go
src/os/stat_windows.go
src/os/types.go
src/os/user/lookup_unix.go
src/path/filepath/path.go
src/path/filepath/path_test.go
src/path/path.go
src/reflect/all_test.go
src/reflect/deepequal.go
src/reflect/type.go
src/reflect/value.go
src/regexp/backtrack.go
src/regexp/exec.go
src/regexp/exec_test.go
src/regexp/onepass.go
src/regexp/regexp.go
src/regexp/syntax/compile.go
src/regexp/syntax/parse.go
src/regexp/syntax/prog.go
src/regexp/syntax/regexp.go
src/regexp/syntax/simplify.go
src/regexp/syntax/simplify_test.go
src/runtime/alg.go
src/runtime/asm_386.s
src/runtime/asm_amd64.s
src/runtime/asm_amd64p32.s
src/runtime/asm_arm.s
src/runtime/asm_arm64.s
src/runtime/asm_mips64x.s
src/runtime/asm_ppc64x.h
src/runtime/asm_ppc64x.s
src/runtime/cgo/callbacks.go
src/runtime/cgo/gcc_dragonfly_amd64.c
src/runtime/cgo/gcc_freebsd_arm.c
src/runtime/cgo/gcc_linux_386.c
src/runtime/cgo/gcc_linux_arm.c
src/runtime/cgo/gcc_linux_arm64.c
src/runtime/cgo/gcc_netbsd_386.c
src/runtime/cgo/gcc_netbsd_amd64.c
src/runtime/cgo/gcc_netbsd_arm.c
src/runtime/cgo/iscgo.go
src/runtime/cgo/mmap.go
src/runtime/cgo_mmap.go
src/runtime/cgocall.go
src/runtime/cgocheck.go
src/runtime/chan.go
src/runtime/compiler.go
src/runtime/cpuprof.go
src/runtime/cputicks.go
src/runtime/crash_test.go
src/runtime/debug.go
src/runtime/defs2_linux.go
src/runtime/extern.go
src/runtime/hash_test.go
src/runtime/hashmap.go
src/runtime/hashmap_fast.go
src/runtime/heapdump.go
src/runtime/iface.go
src/runtime/internal/atomic/asm_mips64x.s
src/runtime/internal/atomic/asm_ppc64x.s
src/runtime/internal/atomic/atomic_test.go
src/runtime/lock_futex.go
src/runtime/lock_sema.go
src/runtime/malloc.go
src/runtime/mcache.go
src/runtime/mcentral.go
src/runtime/mem_bsd.go
src/runtime/mem_linux.go
src/runtime/memclr_arm.s
src/runtime/memmove_386.s
src/runtime/memmove_amd64.s
src/runtime/memmove_arm.s
src/runtime/memmove_nacl_amd64p32.s
src/runtime/memmove_plan9_386.s
src/runtime/memmove_plan9_amd64.s
src/runtime/mfinal.go
src/runtime/mfixalloc.go
src/runtime/mgc.go
src/runtime/mgcmark.go
src/runtime/mgcwork.go
src/runtime/mheap.go
src/runtime/mmap.go
src/runtime/mprof.go
src/runtime/msan.go
src/runtime/msize.go
src/runtime/mstats.go
src/runtime/netpoll_kqueue.go
src/runtime/os1_darwin.go
src/runtime/os1_dragonfly.go
src/runtime/os1_freebsd.go
src/runtime/os1_linux.go
src/runtime/os1_nacl.go
src/runtime/os1_netbsd.go
src/runtime/os1_openbsd.go
src/runtime/os1_plan9.go
src/runtime/os3_solaris.go
src/runtime/os_nacl.go
src/runtime/os_windows.go
src/runtime/panic.go
src/runtime/pprof/pprof.go
src/runtime/proc.go
src/runtime/rt0_linux_arm.s
src/runtime/runtime1.go
src/runtime/runtime2.go
src/runtime/runtime_test.go
src/runtime/select.go
src/runtime/signal1_unix.go
src/runtime/signal2_unix.go
src/runtime/signal_386.go
src/runtime/signal_amd64x.go
src/runtime/signal_windows.go
src/runtime/sigqueue.go
src/runtime/sigqueue_plan9.go
src/runtime/sqrt.go
src/runtime/stack.go
src/runtime/stack_test.go
src/runtime/string_test.go
src/runtime/symtab.go
src/runtime/sys_darwin_386.s
src/runtime/sys_dragonfly_amd64.s
src/runtime/sys_linux_386.s
src/runtime/sys_linux_amd64.s
src/runtime/sys_linux_arm.s
src/runtime/sys_netbsd_386.s
src/runtime/sys_netbsd_amd64.s
src/runtime/sys_openbsd_386.s
src/runtime/sys_openbsd_amd64.s
src/runtime/sys_x86.go
src/runtime/textflag.h
src/runtime/time.go
src/runtime/traceback.go
src/runtime/vlop_386.s
src/runtime/vlop_arm.s
src/runtime/vlrt.go
src/sort/search.go
src/sort/search_test.go
src/sort/sort.go
src/strconv/atof_test.go
src/strconv/atoi.go
src/strconv/atoi_test.go
src/strconv/fp_test.go
src/strconv/ftoa.go
src/strconv/quote.go
src/strings/compare_test.go
src/strings/strings.go
src/strings/strings_test.go
src/sync/atomic/asm_arm.s
src/sync/atomic/atomic_test.go
src/sync/cond.go
src/sync/mutex.go
src/sync/once.go
src/sync/rwmutex.go
src/sync/waitgroup.go
src/syscall/exec_bsd.go
src/syscall/exec_linux.go
src/syscall/exec_plan9.go
src/syscall/exec_solaris.go
src/syscall/exec_unix.go
src/syscall/syscall.go
src/syscall/syscall_bsd.go
src/syscall/syscall_darwin.go
src/syscall/syscall_darwin_386.go
src/syscall/syscall_darwin_amd64.go
src/syscall/syscall_darwin_arm.go
src/syscall/syscall_darwin_arm64.go
src/syscall/syscall_dragonfly.go
src/syscall/syscall_freebsd.go
src/syscall/syscall_linux.go
src/syscall/syscall_linux_386.go
src/syscall/syscall_nacl.go
src/syscall/syscall_solaris.go
src/syscall/syscall_unix.go
src/syscall/unzip_nacl.go
src/testing/allocs.go
src/testing/benchmark.go
src/testing/iotest/reader.go
src/testing/quick/quick.go
src/testing/testing.go
src/text/scanner/scanner.go
src/text/template/exec.go
src/text/template/funcs.go
src/text/template/parse/parse.go
src/text/template/parse/parse_test.go
src/time/format.go
src/time/sleep.go
src/time/tick.go
src/time/tick_test.go
src/time/time.go
src/time/time_test.go
src/time/zoneinfo_read.go
src/time/zoneinfo_test.go
src/unicode/graphic.go
src/unicode/letter.go
src/unicode/maketables.go
src/unicode/utf8/utf8.go
src/unsafe/unsafe.go

index 042638175cd84a75fa7b56b806f87c88612f45cc..600ee4be09c44d06285de55c6fc02ad8a84fc762 100644 (file)
@@ -316,8 +316,8 @@ func (tw *Writer) writePAXHeader(hdr *Header, paxHeaders map[string]string) erro
        // succeed, and seems harmless enough.
        ext.ModTime = hdr.ModTime
        // The spec asks that we namespace our pseudo files
-       // with the current pid.  However, this results in differing outputs
-       // for identical inputs.  As such, the constant 0 is now used instead.
+       // with the current pid. However, this results in differing outputs
+       // for identical inputs. As such, the constant 0 is now used instead.
        // golang.org/issue/12358
        dir, file := path.Split(hdr.Name)
        fullName := path.Join(dir, "PaxHeaders.0", file)
index 2925946c9790ed93e2c8247e0329a106085d2865..7cf395c6e6d446972d6b30daffb801077f86c685 100644 (file)
@@ -234,7 +234,7 @@ func (b *Reader) ReadByte() (byte, error) {
        return c, nil
 }
 
-// UnreadByte unreads the last byte.  Only the most recently read byte can be unread.
+// UnreadByte unreads the last byte. Only the most recently read byte can be unread.
 func (b *Reader) UnreadByte() error {
        if b.lastByte < 0 || b.r == 0 && b.w > 0 {
                return ErrInvalidUnreadByte
@@ -273,7 +273,7 @@ func (b *Reader) ReadRune() (r rune, size int, err error) {
        return r, size, nil
 }
 
-// UnreadRune unreads the last rune.  If the most recent read operation on
+// UnreadRune unreads the last rune. If the most recent read operation on
 // the buffer was not a ReadRune, UnreadRune returns an error.  (In this
 // regard it is stricter than UnreadByte, which will unread the last byte
 // from any read operation.)
index 1aed86924d7cfb58f5859c836a1a86b2c7999c3d..992a9585e77137ae51334db3aa803d0b87b1c40f 100644 (file)
@@ -44,7 +44,7 @@ var ErrTooLarge = errors.New("bytes.Buffer: too large")
 func (b *Buffer) Bytes() []byte { return b.buf[b.off:] }
 
 // String returns the contents of the unread portion of the buffer
-// as a string.  If the Buffer is a nil pointer, it returns "<nil>".
+// as a string. If the Buffer is a nil pointer, it returns "<nil>".
 func (b *Buffer) String() string {
        if b == nil {
                // Special case, useful in debugging.
@@ -145,7 +145,7 @@ func (b *Buffer) WriteString(s string) (n int, err error) {
 }
 
 // MinRead is the minimum slice size passed to a Read call by
-// Buffer.ReadFrom.  As long as the Buffer has at least MinRead bytes beyond
+// Buffer.ReadFrom. As long as the Buffer has at least MinRead bytes beyond
 // what is required to hold the contents of r, ReadFrom will not grow the
 // underlying buffer.
 const MinRead = 512
@@ -252,7 +252,7 @@ func (b *Buffer) WriteRune(r rune) (n int, err error) {
 }
 
 // Read reads the next len(p) bytes from the buffer or until the buffer
-// is drained.  The return value n is the number of bytes read.  If the
+// is drained. The return value n is the number of bytes read. If the
 // buffer has no data to return, err is io.EOF (unless len(p) is zero);
 // otherwise it is nil.
 func (b *Buffer) Read(p []byte) (n int, err error) {
@@ -347,7 +347,7 @@ func (b *Buffer) UnreadRune() error {
 }
 
 // UnreadByte unreads the last byte returned by the most recent
-// read operation.  If write has happened since the last read, UnreadByte
+// read operation. If write has happened since the last read, UnreadByte
 // returns an error.
 func (b *Buffer) UnreadByte() error {
        if b.lastRead != opReadRune && b.lastRead != opRead {
@@ -400,7 +400,7 @@ func (b *Buffer) ReadString(delim byte) (line string, err error) {
 }
 
 // NewBuffer creates and initializes a new Buffer using buf as its initial
-// contents.  It is intended to prepare a Buffer to read existing data.  It
+// contents. It is intended to prepare a Buffer to read existing data. It
 // can also be used to size the internal buffer for writing. To do that,
 // buf should have the desired capacity but a length of zero.
 //
index b86824087e5356405855d4581aeb728fa50f8ae1..8a4409cb6b66aeb222efef0c56a50d10a974505c 100644 (file)
@@ -164,7 +164,7 @@ func IndexRune(s []byte, r rune) int {
 
 // IndexAny interprets s as a sequence of UTF-8-encoded Unicode code points.
 // It returns the byte index of the first occurrence in s of any of the Unicode
-// code points in chars.  It returns -1 if chars is empty or if there is no code
+// code points in chars. It returns -1 if chars is empty or if there is no code
 // point in common.
 func IndexAny(s []byte, chars string) int {
        if len(chars) > 0 {
@@ -188,8 +188,8 @@ func IndexAny(s []byte, chars string) int {
 }
 
 // LastIndexAny interprets s as a sequence of UTF-8-encoded Unicode code
-// points.  It returns the byte index of the last occurrence in s of any of
-// the Unicode code points in chars.  It returns -1 if chars is empty or if
+// points. It returns the byte index of the last occurrence in s of any of
+// the Unicode code points in chars. It returns -1 if chars is empty or if
 // there is no code point in common.
 func LastIndexAny(s []byte, chars string) int {
        if len(chars) > 0 {
@@ -276,7 +276,7 @@ func Fields(s []byte) [][]byte {
 
 // FieldsFunc interprets s as a sequence of UTF-8-encoded Unicode code points.
 // It splits the slice s at each run of code points c satisfying f(c) and
-// returns a slice of subslices of s.  If all code points in s satisfy f(c), or
+// returns a slice of subslices of s. If all code points in s satisfy f(c), or
 // len(s) == 0, an empty slice is returned.
 // FieldsFunc makes no guarantees about the order in which it calls f(c).
 // If f does not return consistent results for a given c, FieldsFunc may crash.
@@ -352,12 +352,12 @@ func HasSuffix(s, suffix []byte) bool {
 
 // Map returns a copy of the byte slice s with all its characters modified
 // according to the mapping function. If mapping returns a negative value, the character is
-// dropped from the string with no replacement.  The characters in s and the
+// dropped from the string with no replacement. The characters in s and the
 // output are interpreted as UTF-8-encoded Unicode code points.
 func Map(mapping func(r rune) rune, s []byte) []byte {
        // In the worst case, the slice can grow when mapped, making
-       // things unpleasant.  But it's so rare we barge in assuming it's
-       // fine.  It could also shrink but that falls out naturally.
+       // things unpleasant. But it's so rare we barge in assuming it's
+       // fine. It could also shrink but that falls out naturally.
        maxbytes := len(s) // length of b
        nbytes := 0        // number of bytes encoded in b
        b := make([]byte, maxbytes)
@@ -697,7 +697,7 @@ func EqualFold(s, t []byte) bool {
                        return false
                }
 
-               // General case.  SimpleFold(x) returns the next equivalent rune > x
+               // General case. SimpleFold(x) returns the next equivalent rune > x
                // or wraps around to smaller values.
                r := unicode.SimpleFold(sr)
                for r != sr && r < tr {
@@ -709,6 +709,6 @@ func EqualFold(s, t []byte) bool {
                return false
        }
 
-       // One string is empty.  Are both?
+       // One string is empty. Are both?
        return len(s) == len(t)
 }
index a412dc89b9f054545e233294b329833d7ddcb23d..f158098f9bc0d5b970883d0ec0acbc3a3f9efe32 100644 (file)
@@ -113,7 +113,7 @@ func TestEqualExhaustive(t *testing.T) {
        }
 }
 
-// make sure Equal returns false for minimally different strings.  The data
+// make sure Equal returns false for minimally different strings. The data
 // is all zeros except for a single one in one location.
 func TestNotEqual(t *testing.T) {
        var size = 128
@@ -797,7 +797,7 @@ func TestMap(t *testing.T) {
        // Run a couple of awful growth/shrinkage tests
        a := tenRunes('a')
 
-       // 1.  Grow.  This triggers two reallocations in Map.
+       // 1.  Grow. This triggers two reallocations in Map.
        maxRune := func(r rune) rune { return unicode.MaxRune }
        m := Map(maxRune, []byte(a))
        expect := tenRunes(unicode.MaxRune)
index f2d81d5310c0b915eeb304a8bae03f4b60d47d82..35088a1b2e9b26691a6f0a0bed6611e0bb6b563e 100644 (file)
@@ -62,7 +62,7 @@ func TestCompareBytes(t *testing.T) {
        a := make([]byte, n+1)
        b := make([]byte, n+1)
        for len := 0; len < 128; len++ {
-               // randomish but deterministic data.  No 0 or 255.
+               // randomish but deterministic data. No 0 or 255.
                for i := 0; i < len; i++ {
                        a[i] = byte(1 + 31*i%254)
                        b[i] = byte(1 + 31*i%254)
index 1bf19a74b80193c8be4d7952b18981ec0228e153..9fdead8a6040a968104da61755edced2775a40de 100644 (file)
@@ -14,11 +14,11 @@ import (
 )
 
 // This file tests the situation where memeq is checking
-// data very near to a page boundary.  We want to make sure
+// data very near to a page boundary. We want to make sure
 // equal does not read across the boundary and cause a page
 // fault where it shouldn't.
 
-// This test runs only on linux.  The code being tested is
+// This test runs only on linux. The code being tested is
 // not OS-specific, so it does not need to be tested on all
 // operating systems.
 
index ef72c4f66a3b177c3e230f76b6f3bebe8ca14d60..2859d59750dc5cf6bce4426ddf752b1c066b812c 100644 (file)
@@ -40,7 +40,7 @@ func sourceLine(n ast.Node) int {
 }
 
 // ReadGo populates f with information learned from reading the
-// Go source file with the given file name.  It gathers the C preamble
+// Go source file with the given file name. It gathers the C preamble
 // attached to the import "C" comment, a list of references to C.xxx,
 // a list of exported functions, and the actual AST, to be rewritten and
 // printed.
index 8d8349a635c062fd6ff3a22fab963ef7bc097e2a..b2835a495fb848f0ee5ac1ead536311f40cdabe3 100644 (file)
@@ -83,7 +83,7 @@ func (f *File) DiscardCgoDirectives() {
        f.Preamble = strings.Join(linesOut, "\n")
 }
 
-// addToFlag appends args to flag.  All flags are later written out onto the
+// addToFlag appends args to flag. All flags are later written out onto the
 // _cgo_flags file for the build system to use.
 func (p *Package) addToFlag(flag string, args []string) {
        p.CgoFlags[flag] = append(p.CgoFlags[flag], args...)
@@ -99,7 +99,7 @@ func (p *Package) addToFlag(flag string, args []string) {
 // Single quotes and double quotes are recognized to prevent splitting within the
 // quoted region, and are removed from the resulting substrings. If a quote in s
 // isn't closed err will be set and r will have the unclosed argument as the
-// last element.  The backslash is used for escaping.
+// last element. The backslash is used for escaping.
 //
 // For example, the following string:
 //
@@ -236,7 +236,7 @@ func (p *Package) guessKinds(f *File) []*Name {
                        if isConst {
                                n.Kind = "const"
                                // Turn decimal into hex, just for consistency
-                               // with enum-derived constants.  Otherwise
+                               // with enum-derived constants. Otherwise
                                // in the cgo -godefs output half the constants
                                // are in hex and half are in whatever the #define used.
                                i, err := strconv.ParseInt(n.Define, 0, 64)
@@ -385,7 +385,7 @@ func (p *Package) guessKinds(f *File) []*Name {
        if nerrors > 0 {
                // Check if compiling the preamble by itself causes any errors,
                // because the messages we've printed out so far aren't helpful
-               // to users debugging preamble mistakes.  See issue 8442.
+               // to users debugging preamble mistakes. See issue 8442.
                preambleErrors := p.gccErrors([]byte(f.Preamble))
                if len(preambleErrors) > 0 {
                        error_(token.NoPos, "\n%s errors for preamble:\n%s", p.gccBaseCmd()[0], preambleErrors)
@@ -403,7 +403,7 @@ func (p *Package) guessKinds(f *File) []*Name {
 // being referred to as C.xxx.
 func (p *Package) loadDWARF(f *File, names []*Name) {
        // Extract the types from the DWARF section of an object
-       // from a well-formed C program.  Gcc only generates DWARF info
+       // from a well-formed C program. Gcc only generates DWARF info
        // for symbols in the object file, so it is not enough to print the
        // preamble and hope the symbols we care about will be there.
        // Instead, emit
@@ -421,7 +421,7 @@ func (p *Package) loadDWARF(f *File, names []*Name) {
        }
 
        // Apple's LLVM-based gcc does not include the enumeration
-       // names and values in its DWARF debug output.  In case we're
+       // names and values in its DWARF debug output. In case we're
        // using such a gcc, create a data block initialized with the values.
        // We can read them out of the object file.
        fmt.Fprintf(&b, "long long __cgodebug_data[] = {\n")
@@ -594,7 +594,7 @@ func (p *Package) rewriteCalls(f *File) {
        }
 }
 
-// rewriteCall rewrites one call to add pointer checks.  We replace
+// rewriteCall rewrites one call to add pointer checks. We replace
 // each pointer argument x with _cgoCheckPointer(x).(T).
 func (p *Package) rewriteCall(f *File, call *ast.CallExpr, name *Name) {
        for i, param := range name.FuncType.Params {
@@ -642,13 +642,13 @@ func (p *Package) rewriteCall(f *File, call *ast.CallExpr, name *Name) {
                } else {
                        // In order for the type assertion to succeed,
                        // we need it to match the actual type of the
-                       // argument.  The only type we have is the
-                       // type of the function parameter.  We know
+                       // argument. The only type we have is the
+                       // type of the function parameter. We know
                        // that the argument type must be assignable
                        // to the function parameter type, or the code
                        // would not compile, but there is nothing
                        // requiring that the types be exactly the
-                       // same.  Add a type conversion to the
+                       // same. Add a type conversion to the
                        // argument so that the type assertion will
                        // succeed.
                        c.Args[0] = &ast.CallExpr{
@@ -675,7 +675,7 @@ func (p *Package) needsPointerCheck(f *File, t ast.Expr) bool {
        return p.hasPointer(f, t, true)
 }
 
-// hasPointer is used by needsPointerCheck.  If top is true it returns
+// hasPointer is used by needsPointerCheck. If top is true it returns
 // whether t is or contains a pointer that might point to a pointer.
 // If top is false it returns whether t is or contains a pointer.
 // f may be nil.
@@ -732,7 +732,7 @@ func (p *Package) hasPointer(f *File, t ast.Expr, top bool) bool {
                if goTypes[t.Name] != nil {
                        return false
                }
-               // We can't figure out the type.  Conservative
+               // We can't figure out the type. Conservative
                // approach is to assume it has a pointer.
                return true
        case *ast.SelectorExpr:
@@ -750,7 +750,7 @@ func (p *Package) hasPointer(f *File, t ast.Expr, top bool) bool {
                if name != nil && name.Kind == "type" && name.Type != nil && name.Type.Go != nil {
                        return p.hasPointer(f, name.Type.Go, top)
                }
-               // We can't figure out the type.  Conservative
+               // We can't figure out the type. Conservative
                // approach is to assume it has a pointer.
                return true
        default:
@@ -760,14 +760,14 @@ func (p *Package) hasPointer(f *File, t ast.Expr, top bool) bool {
 }
 
 // checkAddrArgs tries to add arguments to the call of
-// _cgoCheckPointer when the argument is an address expression.  We
+// _cgoCheckPointer when the argument is an address expression. We
 // pass true to mean that the argument is an address operation of
 // something other than a slice index, which means that it's only
 // necessary to check the specific element pointed to, not the entire
-// object.  This is for &s.f, where f is a field in a struct.  We can
+// object. This is for &s.f, where f is a field in a struct. We can
 // pass a slice or array, meaning that we should check the entire
 // slice or array but need not check any other part of the object.
-// This is for &s.a[i], where we need to check all of a.  However, we
+// This is for &s.a[i], where we need to check all of a. However, we
 // only pass the slice or array if we can refer to it without side
 // effects.
 func (p *Package) checkAddrArgs(f *File, args []ast.Expr, x ast.Expr) []ast.Expr {
@@ -786,7 +786,7 @@ func (p *Package) checkAddrArgs(f *File, args []ast.Expr, x ast.Expr) []ast.Expr
        index, ok := u.X.(*ast.IndexExpr)
        if !ok {
                // This is the address of something that is not an
-               // index expression.  We only need to examine the
+               // index expression. We only need to examine the
                // single value to which it points.
                // TODO: what if true is shadowed?
                return append(args, ast.NewIdent("true"))
@@ -853,10 +853,10 @@ func (p *Package) isType(t ast.Expr) bool {
        return false
 }
 
-// unsafeCheckPointerName is given the Go version of a C type.  If the
+// unsafeCheckPointerName is given the Go version of a C type. If the
 // type uses unsafe.Pointer, we arrange to build a version of
-// _cgoCheckPointer that returns that type.  This avoids using a type
-// assertion to unsafe.Pointer in our copy of user code.  We return
+// _cgoCheckPointer that returns that type. This avoids using a type
+// assertion to unsafe.Pointer in our copy of user code. We return
 // the name of the _cgoCheckPointer function we are going to build, or
 // the empty string if the type does not use unsafe.Pointer.
 func (p *Package) unsafeCheckPointerName(t ast.Expr) string {
@@ -906,7 +906,7 @@ func (p *Package) unsafeCheckPointerNameIndex(i int) string {
 
 // rewriteRef rewrites all the C.xxx references in f.AST to refer to the
 // Go equivalents, now that we have figured out the meaning of all
-// the xxx.  In *godefs mode, rewriteRef replaces the names
+// the xxx. In *godefs mode, rewriteRef replaces the names
 // with full definitions instead of mangled names.
 func (p *Package) rewriteRef(f *File) {
        // Keep a list of all the functions, to remove the ones
@@ -929,7 +929,7 @@ func (p *Package) rewriteRef(f *File) {
 
        // Now that we have all the name types filled in,
        // scan through the Refs to identify the ones that
-       // are trying to do a ,err call.  Also check that
+       // are trying to do a ,err call. Also check that
        // functions are only used in calls.
        for _, r := range f.Ref {
                if r.Name.Kind == "const" && r.Name.Const == "" {
@@ -987,7 +987,7 @@ func (p *Package) rewriteRef(f *File) {
                                        f.Name[fpName] = name
                                }
                                r.Name = name
-                               // Rewrite into call to _Cgo_ptr to prevent assignments.  The _Cgo_ptr
+                               // Rewrite into call to _Cgo_ptr to prevent assignments. The _Cgo_ptr
                                // function is defined in out.go and simply returns its argument. See
                                // issue 7757.
                                expr = &ast.CallExpr{
@@ -1155,7 +1155,7 @@ func (p *Package) gccDebug(stdin []byte) (*dwarf.Data, binary.ByteOrder, []byte)
                        for i := range f.Symtab.Syms {
                                s := &f.Symtab.Syms[i]
                                if isDebugData(s.Name) {
-                                       // Found it.  Now find data section.
+                                       // Found it. Now find data section.
                                        if i := int(s.Sect) - 1; 0 <= i && i < len(f.Sections) {
                                                sect := f.Sections[i]
                                                if sect.Addr <= s.Value && s.Value < sect.Addr+sect.Size {
@@ -1182,7 +1182,7 @@ func (p *Package) gccDebug(stdin []byte) (*dwarf.Data, binary.ByteOrder, []byte)
                        for i := range symtab {
                                s := &symtab[i]
                                if isDebugData(s.Name) {
-                                       // Found it.  Now find data section.
+                                       // Found it. Now find data section.
                                        if i := int(s.Section); 0 <= i && i < len(f.Sections) {
                                                sect := f.Sections[i]
                                                if sect.Addr <= s.Value && s.Value < sect.Addr+sect.Size {
@@ -1235,7 +1235,7 @@ func (p *Package) gccDefines(stdin []byte) string {
 }
 
 // gccErrors runs gcc over the C program stdin and returns
-// the errors that gcc prints.  That is, this function expects
+// the errors that gcc prints. That is, this function expects
 // gcc to fail.
 func (p *Package) gccErrors(stdin []byte) string {
        // TODO(rsc): require failure
@@ -1375,7 +1375,7 @@ var dwarfToName = map[string]string{
 
 const signedDelta = 64
 
-// String returns the current type representation.  Format arguments
+// String returns the current type representation. Format arguments
 // are assembled within this method so that any changes in mutable
 // values are taken into account.
 func (tr *TypeRepr) String() string {
@@ -1815,7 +1815,7 @@ func (c *typeConv) FuncArg(dtype dwarf.Type, pos token.Pos) *Type {
                }
        case *dwarf.TypedefType:
                // C has much more relaxed rules than Go for
-               // implicit type conversions.  When the parameter
+               // implicit type conversions. When the parameter
                // is type T defined as *X, simulate a little of the
                // laxness of C by making the argument *X instead of T.
                if ptr, ok := base(dt.Type).(*dwarf.PtrType); ok {
@@ -1831,7 +1831,7 @@ func (c *typeConv) FuncArg(dtype dwarf.Type, pos token.Pos) *Type {
                        }
 
                        // Remember the C spelling, in case the struct
-                       // has __attribute__((unavailable)) on it.  See issue 2888.
+                       // has __attribute__((unavailable)) on it. See issue 2888.
                        t.Typedef = dt.Name
                }
        }
@@ -1846,7 +1846,7 @@ func (c *typeConv) FuncType(dtype *dwarf.FuncType, pos token.Pos) *FuncType {
        for i, f := range dtype.ParamType {
                // gcc's DWARF generator outputs a single DotDotDotType parameter for
                // function pointers that specify no parameters (e.g. void
-               // (*__cgo_0)()).  Treat this special case as void.  This case is
+               // (*__cgo_0)()).  Treat this special case as void. This case is
                // invalid according to ISO C anyway (i.e. void (*__cgo_1)(...) is not
                // legal).
                if _, ok := f.(*dwarf.DotDotDotType); ok && i == 0 {
@@ -1917,8 +1917,8 @@ func (c *typeConv) Struct(dt *dwarf.StructType, pos token.Pos) (expr *ast.Struct
        off := int64(0)
 
        // Rename struct fields that happen to be named Go keywords into
-       // _{keyword}.  Create a map from C ident -> Go ident.  The Go ident will
-       // be mangled.  Any existing identifier that already has the same name on
+       // _{keyword}.  Create a map from C ident -> Go ident. The Go ident will
+       // be mangled. Any existing identifier that already has the same name on
        // the C-side will cause the Go-mangled version to be prefixed with _.
        // (e.g. in a struct with fields '_type' and 'type', the latter would be
        // rendered as '__type' in Go).
@@ -1958,7 +1958,7 @@ func (c *typeConv) Struct(dt *dwarf.StructType, pos token.Pos) (expr *ast.Struct
 
                // In godefs mode, if this field is a C11
                // anonymous union then treat the first field in the
-               // union as the field in the struct.  This handles
+               // union as the field in the struct. This handles
                // cases like the glibc <sys/resource.h> file; see
                // issue 6677.
                if *godefs {
@@ -2082,7 +2082,7 @@ func godefsFields(fld []*ast.Field) {
 }
 
 // fieldPrefix returns the prefix that should be removed from all the
-// field names when generating the C or Go code.  For generated
+// field names when generating the C or Go code. For generated
 // C, we leave the names as is (tv_sec, tv_usec), since that's what
 // people are used to seeing in C.  For generated Go code, such as
 // package syscall's data structures, we drop a common prefix
@@ -2092,7 +2092,7 @@ func fieldPrefix(fld []*ast.Field) string {
        for _, f := range fld {
                for _, n := range f.Names {
                        // Ignore field names that don't have the prefix we're
-                       // looking for.  It is common in C headers to have fields
+                       // looking for. It is common in C headers to have fields
                        // named, say, _pad in an otherwise prefixed header.
                        // If the struct has 3 fields tv_sec, tv_usec, _pad1, then we
                        // still want to remove the tv_ prefix.
index a8a87c59803e5e6dcf90ea5ddd925d64d7ffe643..5e863549d693135f2c2fc8da9b2376f95f7b576b 100644 (file)
@@ -190,9 +190,9 @@ func main() {
 
        if *dynobj != "" {
                // cgo -dynimport is essentially a separate helper command
-               // built into the cgo binary.  It scans a gcc-produced executable
+               // built into the cgo binary. It scans a gcc-produced executable
                // and dumps information about the imported symbols and the
-               // imported libraries.  The 'go build' rules for cgo prepare an
+               // imported libraries. The 'go build' rules for cgo prepare an
                // appropriate executable and then use its import information
                // instead of needing to make the linkers duplicate all the
                // specialized knowledge gcc has about where to look for imported
index bd41f8800ccf15e777d007d869972026a95af930..40c76b52e49c50187b60728cf35a46df38d62f6b 100644 (file)
@@ -55,7 +55,7 @@ func (p *Package) writeDefs() {
                fmt.Fprintf(fm, "char* _cgo_topofstack(void) { return (char*)0; }\n")
        } else {
                // If we're not importing runtime/cgo, we *are* runtime/cgo,
-               // which provides these functions.  We just need a prototype.
+               // which provides these functions. We just need a prototype.
                fmt.Fprintf(fm, "void crosscall2(void(*fn)(void*, int), void *a, int c);\n")
                fmt.Fprintf(fm, "void _cgo_wait_runtime_init_done();\n")
        }
@@ -592,7 +592,7 @@ func (p *Package) writeOutputFunc(fgcc *os.File, n *Name) {
                // the Go equivalents had good type params.
                // However, our version of the type omits the magic
                // words const and volatile, which can provoke
-               // C compiler warnings.  Silence them by casting
+               // C compiler warnings. Silence them by casting
                // all pointers to void*.  (Eventually that will produce
                // other warnings.)
                if c := t.C.String(); c[len(c)-1] == '*' {
@@ -616,8 +616,8 @@ func (p *Package) writeOutputFunc(fgcc *os.File, n *Name) {
        fmt.Fprintf(fgcc, "\n")
 }
 
-// Write out a wrapper for a function when using gccgo.  This is a
-// simple wrapper that just calls the real function.  We only need a
+// Write out a wrapper for a function when using gccgo. This is a
+// simple wrapper that just calls the real function. We only need a
 // wrapper to support static functions in the prologue--without a
 // wrapper, we can't refer to the function, since the reference is in
 // a different file.
@@ -707,7 +707,7 @@ func (p *Package) writeExports(fgo2, fm, fgcc, fgcch io.Writer) {
                fn := exp.Func
 
                // Construct a gcc struct matching the gc argument and
-               // result frame.  The gcc struct will be compiled with
+               // result frame. The gcc struct will be compiled with
                // __attribute__((packed)) so all padding must be accounted
                // for explicitly.
                ctype := "struct {\n"
index dd8116e926edafb200f386a4caebec8fb9a6d57b..4f5c48864e997329301bf976b6ddf84102a38123 100644 (file)
@@ -84,7 +84,7 @@ func lineno(pos token.Pos) string {
 // Die with an error message.
 func fatalf(msg string, args ...interface{}) {
        // If we've already printed other errors, they might have
-       // caused the fatal condition.  Assume they're enough.
+       // caused the fatal condition. Assume they're enough.
        if nerrors == 0 {
                fmt.Fprintf(os.Stderr, msg+"\n", args...)
        }
index 810214504fac1782c96a4e510289707dfc214902..b24c92cf69dd2b2760c8c0d3fc06da39346a8d03 100644 (file)
@@ -252,14 +252,14 @@ loop1:
        // MOVLQZX removal.
        // The MOVLQZX exists to avoid being confused for a
        // MOVL that is just copying 32-bit data around during
-       // copyprop.  Now that copyprop is done, remov MOVLQZX R1, R2
+       // copyprop. Now that copyprop is done, remov MOVLQZX R1, R2
        // if it is dominated by an earlier ADDL/MOVL/etc into R1 that
        // will have already cleared the high bits.
        //
        // MOVSD removal.
        // We never use packed registers, so a MOVSD between registers
        // can be replaced by MOVAPD, which moves the pair of float64s
-       // instead of just the lower one.  We only use the lower one, but
+       // instead of just the lower one. We only use the lower one, but
        // the processor can do better if we do moves using both.
        for r := (*gc.Flow)(g.Start); r != nil; r = r.Link {
                p = r.Prog
index d46d5a866069657483c7bd7165be6a4b25d8d3ae..9cda56106941af65410cc9cae8fd61e15ad4b55c 100644 (file)
@@ -126,7 +126,7 @@ func cgen64(n *gc.Node, res *gc.Node) {
        var ah gc.Node
        gc.Regalloc(&ah, hi1.Type, nil)
 
-       // Do op.  Leave result in ah:al.
+       // Do op. Leave result in ah:al.
        switch n.Op {
        default:
                gc.Fatalf("cgen64: not implemented: %v\n", n)
index a7f1c18b55ed2027aa6642d6818404237342cf0f..e8a5c14761d368e7c481fb169cda475f27f00614 100644 (file)
@@ -129,7 +129,7 @@ func blockcopy(n, res *gc.Node, osrc, odst, w int64) {
                // TODO(austin): Instead of generating ADD $-8,R8; ADD
                // $-8,R7; n*(MOVDU 8(R8),R9; MOVDU R9,8(R7);) just
                // generate the offsets directly and eliminate the
-               // ADDs.  That will produce shorter, more
+               // ADDs. That will produce shorter, more
                // pipeline-able code.
                var p *obj.Prog
                for ; c > 0; c-- {
index f46a494f175b0dcf2eedaf56df65850701b561e4..ea8e82d0b69152c2b0d8f13bedf66c62b45049fc 100644 (file)
@@ -442,7 +442,7 @@ func benchmarkBitLenN(b *testing.B, nbits uint) {
        }
 }
 
-// Individual bitLen tests.  Numbers chosen to examine both sides
+// Individual bitLen tests. Numbers chosen to examine both sides
 // of powers-of-two boundaries.
 func BenchmarkBitLen0(b *testing.B)  { benchmarkBitLenN(b, 0) }
 func BenchmarkBitLen1(b *testing.B)  { benchmarkBitLenN(b, 1) }
index 79cf6e07f7fa1de3e8cdf25d2b1980bc168c7ba3..7668b6481b3ed78c9293e9226ead25a671eae22f 100644 (file)
@@ -647,7 +647,7 @@ func trailingZeroBits(x Word) uint {
        // x & -x leaves only the right-most bit set in the word. Let k be the
        // index of that bit. Since only a single bit is set, the value is two
        // to the power of k. Multiplying by a power of two is equivalent to
-       // left shifting, in this case by k bits.  The de Bruijn constant is
+       // left shifting, in this case by k bits. The de Bruijn constant is
        // such that all six bit, consecutive substrings are distinct.
        // Therefore, if we have a left shifted version of this constant we can
        // find by how many bits it was shifted by looking at which six bit
@@ -1018,7 +1018,7 @@ func (z nat) expNNWindowed(x, y, m nat) nat {
                for j := 0; j < _W; j += n {
                        if i != len(y)-1 || j != 0 {
                                // Unrolled loop for significant performance
-                               // gain.  Use go test -bench=".*" in crypto/rsa
+                               // gain. Use go test -bench=".*" in crypto/rsa
                                // to check performance before making changes.
                                zz = zz.mul(z, z)
                                zz, z = z, zz
index 2cd9ed09388aeb3dd8a6211217a7aa843ad7f2ea..56ce33d8826bbe668bb2b04c4ca1827df13352ad 100644 (file)
@@ -63,7 +63,7 @@ func (z *Rat) SetFloat64(f float64) *Rat {
 
 // quotToFloat32 returns the non-negative float32 value
 // nearest to the quotient a/b, using round-to-even in
-// halfway cases.  It does not mutate its arguments.
+// halfway cases. It does not mutate its arguments.
 // Preconditions: b is non-zero; a and b have no common factors.
 func quotToFloat32(a, b nat) (f float32, exact bool) {
        const (
@@ -161,7 +161,7 @@ func quotToFloat32(a, b nat) (f float32, exact bool) {
 
 // quotToFloat64 returns the non-negative float64 value
 // nearest to the quotient a/b, using round-to-even in
-// halfway cases.  It does not mutate its arguments.
+// halfway cases. It does not mutate its arguments.
 // Preconditions: b is non-zero; a and b have no common factors.
 func quotToFloat64(a, b nat) (f float64, exact bool) {
        const (
index da2fdab4cab2bdce606959c37f5856701e8fb8b0..17bda4763713d731fcfec1282efe7d4b631e0480 100644 (file)
@@ -137,7 +137,7 @@ func TestFloatString(t *testing.T) {
        }
 }
 
-// Test inputs to Rat.SetString.  The prefix "long:" causes the test
+// Test inputs to Rat.SetString. The prefix "long:" causes the test
 // to be skipped in --test.short mode.  (The threshold is about 500us.)
 var float64inputs = []string{
        // Constants plundered from strconv/testfp.txt.
index a0ff4890c1d706fd4a96ddef845bcea4c34bdf9a..36cd1198a037de497f509a0c6b00797671d944b3 100644 (file)
@@ -406,7 +406,7 @@ func geneq(sym *Sym, t *Type) {
 
                // An array of pure memory would be handled by the
                // standard memequal, so the element type must not be
-               // pure memory.  Even if we unrolled the range loop,
+               // pure memory. Even if we unrolled the range loop,
                // each iteration would be a function call, so don't bother
                // unrolling.
                nrange := Nod(ORANGE, nil, Nod(OIND, np, nil))
index 812a8cb150dadad9eccfcded17e8ab00c89de5b2..f0122aff975f04dcf2cdd282940f5c517abd2eb3 100644 (file)
@@ -86,9 +86,9 @@ func widstruct(errtype *Type, t *Type, o int64, flag int) int64 {
        }
 
        // For nonzero-sized structs which end in a zero-sized thing, we add
-       // an extra byte of padding to the type.  This padding ensures that
+       // an extra byte of padding to the type. This padding ensures that
        // taking the address of the zero-sized thing can't manufacture a
-       // pointer to the next object in the heap.  See issue 9401.
+       // pointer to the next object in the heap. See issue 9401.
        if flag == 1 && o > starto && o == lastzero {
                o++
        }
index 5c2ffa6888d4aa4725b359d11f57a55b24022c6c..8ec63002450523d236af674141d26064f4398d62 100644 (file)
@@ -248,7 +248,7 @@ func (p *importer) typ() *Type {
                        // (comment from go.y)
                        // inl.C's inlnode in on a dotmeth node expects to find the inlineable body as
                        // (dotmeth's type).Nname.Inl, and dotmeth's type has been pulled
-                       // out by typecheck's lookdot as this $$.ttype.  So by providing
+                       // out by typecheck's lookdot as this $$.ttype. So by providing
                        // this back link here we avoid special casing there.
                        n.Type.Nname = n
 
index 0fe6242e74071a1ee389f35835e9361be1c243e6..4286f361b82f490a764f61df3d98cf4f1464f1c4 100644 (file)
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // NOTE: If you change this file you must run "go generate"
-// to update builtin.go.  This is not done automatically
+// to update builtin.go. This is not done automatically
 // to avoid depending on having a working compiler binary.
 
 // +build ignore
index a7fc8aa53e15a0308106d5d78ba4dbb0d072e1a0..6e25db65cc622b5fb79ccd37ba882314cc19b3fe 100644 (file)
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // NOTE: If you change this file you must run "go generate"
-// to update builtin.go.  This is not done automatically
+// to update builtin.go. This is not done automatically
 // to avoid depending on having a working compiler binary.
 
 // +build ignore
index 74f61129c260bda4b2d99dac11c1777184696061..df30100b10dc4de2ba06fe6bb895438f420cc676 100644 (file)
@@ -2296,7 +2296,7 @@ func sgen_wb(n *Node, ns *Node, w int64, wb bool) {
 
        if osrc != -1000 && odst != -1000 && (osrc == 1000 || odst == 1000) || wb && osrc != -1000 {
                // osrc and odst both on stack, and at least one is in
-               // an unknown position.  Could generate code to test
+               // an unknown position. Could generate code to test
                // for forward/backward copy, but instead just copy
                // to a temporary location first.
                //
index 52ada12f865de9a92ac298e3107426cfb15dac37..f68cffb33ed38d69f2e04bf8ea0806e7d1fb1a8c 100644 (file)
@@ -167,7 +167,7 @@ func declare(n *Node, ctxt Class) {
        n.Lineno = int32(parserline())
        s := n.Sym
 
-       // kludgy: typecheckok means we're past parsing.  Eg genwrapper may declare out of package names later.
+       // kludgy: typecheckok means we're past parsing. Eg genwrapper may declare out of package names later.
        if importpkg == nil && !typecheckok && s.Pkg != localpkg {
                Yyerror("cannot declare name %v", s)
        }
@@ -1021,7 +1021,7 @@ func embedded(s *Sym, pkg *Pkg) *Node {
                CenterDot = 0xB7
        )
        // Names sometimes have disambiguation junk
-       // appended after a center dot.  Discard it when
+       // appended after a center dot. Discard it when
        // making the name for the embedded struct field.
        name := s.Name
 
index e26cbb372bd212ca513080b30309694cee2c37f7..7ba377b2000aec102e3c890268f4e15e5dd63947 100644 (file)
@@ -15,7 +15,7 @@ import (
 // or single non-recursive functions, bottom up.
 //
 // Finding these sets is finding strongly connected components
-// in the static call graph.  The algorithm for doing that is taken
+// in the static call graph. The algorithm for doing that is taken
 // from Sedgewick, Algorithms, Second Edition, p. 482, with two
 // adaptations.
 //
@@ -168,7 +168,7 @@ func (v *bottomUpVisitor) visitcode(n *Node, min uint32) uint32 {
 //
 // First escfunc, esc and escassign recurse over the ast of each
 // function to dig out flow(dst,src) edges between any
-// pointer-containing nodes and store them in dst->escflowsrc.  For
+// pointer-containing nodes and store them in dst->escflowsrc. For
 // variables assigned to a variable in an outer scope or used as a
 // return value, they store a flow(theSink, src) edge to a fake node
 // 'the Sink'.  For variables referenced in closures, an edge
@@ -180,7 +180,7 @@ func (v *bottomUpVisitor) visitcode(n *Node, min uint32) uint32 {
 // parameters it can reach as leaking.
 //
 // If a value's address is taken but the address does not escape,
-// then the value can stay on the stack.  If the value new(T) does
+// then the value can stay on the stack. If the value new(T) does
 // not escape, then new(T) can be rewritten into a stack allocation.
 // The same is true of slice literals.
 //
@@ -340,7 +340,7 @@ func (e *EscState) track(n *Node) {
 }
 
 // Escape constants are numbered in order of increasing "escapiness"
-// to help make inferences be monotonic.  With the exception of
+// to help make inferences be monotonic. With the exception of
 // EscNever which is sticky, eX < eY means that eY is more exposed
 // than eX, and hence replaces it in a conservative analysis.
 const (
@@ -378,7 +378,7 @@ func escMax(e, etype uint16) uint16 {
 }
 
 // For each input parameter to a function, the escapeReturnEncoding describes
-// how the parameter may leak to the function's outputs.  This is currently the
+// how the parameter may leak to the function's outputs. This is currently the
 // "level" of the leak where level is 0 or larger (negative level means stored into
 // something whose address is returned -- but that implies stored into the heap,
 // hence EscHeap, which means that the details are not currently relevant. )
@@ -524,7 +524,7 @@ func escfunc(e *EscState, func_ *Node) {
 
 // Mark labels that have no backjumps to them as not increasing e->loopdepth.
 // Walk hasn't generated (goto|label)->left->sym->label yet, so we'll cheat
-// and set it to one of the following two.  Then in esc we'll clear it again.
+// and set it to one of the following two. Then in esc we'll clear it again.
 var looping Label
 
 var nonlooping Label
@@ -1099,7 +1099,7 @@ func escassign(e *EscState, dst *Node, src *Node) {
 
                // Might be pointer arithmetic, in which case
        // the operands flow into the result.
-       // TODO(rsc): Decide what the story is here.  This is unsettling.
+       // TODO(rsc): Decide what the story is here. This is unsettling.
        case OADD,
                OSUB,
                OOR,
@@ -1128,7 +1128,7 @@ func escassign(e *EscState, dst *Node, src *Node) {
 //  flow are 000, 001, 010, 011  and EEEE is computed Esc bits.
 // Note width of xxx depends on value of constant
 // bitsPerOutputInTag -- expect 2 or 3, so in practice the
-// tag cache array is 64 or 128 long.  Some entries will
+// tag cache array is 64 or 128 long. Some entries will
 // never be populated.
 var tags [1 << (bitsPerOutputInTag + EscReturnBits)]string
 
@@ -1290,7 +1290,7 @@ func (e *EscState) addDereference(n *Node) *Node {
        if Istype(t, Tptr) {
                // This should model our own sloppy use of OIND to encode
                // decreasing levels of indirection; i.e., "indirecting" an array
-               // might yield the type of an element.  To be enhanced...
+               // might yield the type of an element. To be enhanced...
                t = t.Type
        }
        ind.Type = t
@@ -1419,7 +1419,7 @@ func esccall(e *EscState, n *Node, up *Node) {
                        fmt.Printf("%v::esccall:: %v in recursive group\n", Ctxt.Line(int(lineno)), Nconv(n, obj.FmtShort))
                }
 
-               // function in same mutually recursive group.  Incorporate into flow graph.
+               // function in same mutually recursive group. Incorporate into flow graph.
                //              print("esc local fn: %N\n", fn->ntype);
                if fn.Name.Defn.Esc == EscFuncUnknown || nE.Escretval != nil {
                        Fatalf("graph inconsistency")
@@ -1469,7 +1469,7 @@ func esccall(e *EscState, n *Node, up *Node) {
                return
        }
 
-       // Imported or completely analyzed function.  Use the escape tags.
+       // Imported or completely analyzed function. Use the escape tags.
        if nE.Escretval != nil {
                Fatalf("esc already decorated call %v\n", Nconv(n, obj.FmtSign))
        }
index 8864b57f5d192227896a640f33e7ad71388d67c6..cf9ffc1fd19c37f44fe222e69fe3915d765fb64b 100644 (file)
@@ -69,7 +69,7 @@ var fmtbody bool
 // E.g. for %S:        %+S %#S %-S     print an identifier properly qualified for debug/export/internal mode.
 //
 // The mode flags  +, - and # are sticky, meaning they persist through
-// recursions of %N, %T and %S, but not the h and l flags.  The u flag is
+// recursions of %N, %T and %S, but not the h and l flags. The u flag is
 // sticky only on %T recursions and only used in %-/Sym mode.
 
 //
@@ -796,7 +796,7 @@ func stmtfmt(n *Node) string {
 
        // some statements allow for an init, but at most one,
        // but we may have an arbitrary number added, eg by typecheck
-       // and inlining.  If it doesn't fit the syntax, emit an enclosing
+       // and inlining. If it doesn't fit the syntax, emit an enclosing
        // block starting with the init statements.
 
        // if we can just say "for" n->ninit; ... then do so
index bd1391d9ad150e88276ed1ba38b92ac3b191d375..54d3ed1b7d4490bfbdad83be1e8b0203cf6c0b11 100644 (file)
@@ -17,7 +17,7 @@ import (
 )
 
 // Make sure "hello world" does not link in all the
-// fmt.scanf routines.  See issue 6853.
+// fmt.scanf routines. See issue 6853.
 func TestScanfRemoval(t *testing.T) {
        testenv.MustHaveGoBuild(t)
 
@@ -64,7 +64,7 @@ func main() {
        }
 }
 
-// Make sure -S prints assembly code.  See issue 14515.
+// Make sure -S prints assembly code. See issue 14515.
 func TestDashS(t *testing.T) {
        testenv.MustHaveGoBuild(t)
 
@@ -99,7 +99,7 @@ func main() {
 
        patterns := []string{
                // It is hard to look for actual instructions in an
-               // arch-independent way.  So we'll just look for
+               // arch-independent way. So we'll just look for
                // pseudo-ops that are arch-independent.
                "\tTEXT\t",
                "\tFUNCDATA\t",
index 84065658aea9a03270ee123ebc919eafd8cacbc9..5b8a5336664f3ae560932f3d65cce7f1ff4b6bab 100644 (file)
@@ -43,7 +43,7 @@ var inlretlabel *Node // target of the goto substituted in place of a return
 
 var inlretvars *NodeList // temp out variables
 
-// Get the function's package.  For ordinary functions it's on the ->sym, but for imported methods
+// Get the function's package. For ordinary functions it's on the ->sym, but for imported methods
 // the ->sym can be re-used in the local package, so peel it off the receiver's type.
 func fnpkg(fn *Node) *Pkg {
        if fn.Type.Thistuple != 0 {
@@ -63,7 +63,7 @@ func fnpkg(fn *Node) *Pkg {
        return fn.Sym.Pkg
 }
 
-// Lazy typechecking of imported bodies.  For local functions, caninl will set ->typecheck
+// Lazy typechecking of imported bodies. For local functions, caninl will set ->typecheck
 // because they're a copy of an already checked body.
 func typecheckinl(fn *Node) {
        lno := int(setlineno(fn))
@@ -300,7 +300,7 @@ func inlcopyslice(ll []*Node) []*Node {
 }
 
 // Inlcalls/nodelist/node walks fn's statements and expressions and substitutes any
-// calls made to inlineable functions.  This is the external entry point.
+// calls made to inlineable functions. This is the external entry point.
 func inlcalls(fn *Node) {
        savefn := Curfn
        Curfn = fn
@@ -358,7 +358,7 @@ func inlnodeslice(l []*Node) {
 }
 
 // inlnode recurses over the tree to find inlineable calls, which will
-// be turned into OINLCALLs by mkinlcall.  When the recursion comes
+// be turned into OINLCALLs by mkinlcall. When the recursion comes
 // back up will examine left, right, list, rlist, ninit, ntest, nincr,
 // nbody and nelse and use one of the 4 inlconv/glue functions above
 // to turn the OINLCALL into an expression, a statement, or patch it
@@ -881,7 +881,7 @@ func inlvar(var_ *Node) *Node {
 
        // This may no longer be necessary now that we run escape analysis
        // after wrapper generation, but for 1.5 this is conservatively left
-       // unchanged.  See bugs 11053 and 9537.
+       // unchanged. See bugs 11053 and 9537.
        if var_.Esc == EscHeap {
                addrescapes(n)
        }
index 7f59e2cafc397d0a0256701ad0b56b819a2b58c0..88a19f9015caa1102e54585aeaf33938e43cd158 100644 (file)
@@ -10,7 +10,7 @@ import (
 )
 
 // Rewrite tree to use separate statements to enforce
-// order of evaluation.  Makes walk easier, because it
+// order of evaluation. Makes walk easier, because it
 // can (after this runs) reorder at will within an expression.
 //
 // Rewrite x op= y into x = x op y.
index 983ffa356f5bafc04ee7b04c1291093ad4f82341..a485fa181afc5f5c773ea1b0176b0eb902b55bb3 100644 (file)
@@ -2011,7 +2011,7 @@ func (p *parser) hidden_fndcl() *Node {
 
                // inl.C's inlnode in on a dotmeth node expects to find the inlineable body as
                // (dotmeth's type).Nname.Inl, and dotmeth's type has been pulled
-               // out by typecheck's lookdot as this $$.ttype.  So by providing
+               // out by typecheck's lookdot as this $$.ttype. So by providing
                // this back link here we avoid special casing there.
                ss.Type.Nname = ss
                return ss
index 78872c1af29b3378d1b8d18cafd91b8f3ec7db87..384261b05ec54820011528084b933c56b8284394 100644 (file)
@@ -29,7 +29,7 @@ const (
 
 // An ordinary basic block.
 //
-// Instructions are threaded together in a doubly-linked list.  To iterate in
+// Instructions are threaded together in a doubly-linked list. To iterate in
 // program order follow the link pointer from the first node and stop after the
 // last node has been visited
 //
@@ -122,7 +122,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,
@@ -181,9 +181,9 @@ func printblock(bb *BasicBlock) {
        }
 }
 
-// Iterates over a basic block applying a callback to each instruction.  There
-// are two criteria for termination.  If the end of basic block is reached a
-// value of zero is returned.  If the callback returns a non-zero value, the
+// Iterates over a basic block applying a callback to each instruction. There
+// are two criteria for termination. If the end of basic block is reached a
+// value of zero is returned. If the callback returns a non-zero value, the
 // iteration is stopped and the value of the callback is returned.
 func blockany(bb *BasicBlock, f func(*obj.Prog) bool) bool {
        for p := bb.last; p != nil; p = p.Opt.(*obj.Prog) {
@@ -244,7 +244,7 @@ func getvariables(fn *Node) []*Node {
        return result
 }
 
-// A pretty printer for control flow graphs.  Takes an array of BasicBlock*s.
+// A pretty printer for control flow graphs. Takes an array of BasicBlock*s.
 func printcfg(cfg []*BasicBlock) {
        for _, bb := range cfg {
                printblock(bb)
@@ -252,7 +252,7 @@ func printcfg(cfg []*BasicBlock) {
 }
 
 // Assigns a reverse post order number to each connected basic block using the
-// standard algorithm.  Unconnected blocks will not be affected.
+// standard algorithm. Unconnected blocks will not be affected.
 func reversepostorder(root *BasicBlock, rpo *int32) {
        root.mark = VISITED
        for _, bb := range root.succ {
@@ -272,7 +272,7 @@ func (x blockrpocmp) Len() int           { return len(x) }
 func (x blockrpocmp) Swap(i, j int)      { x[i], x[j] = x[j], x[i] }
 func (x blockrpocmp) Less(i, j int) bool { return x[i].rpo < x[j].rpo }
 
-// A pattern matcher for call instructions.  Returns true when the instruction
+// A pattern matcher for call instructions. Returns true when the instruction
 // is a call to a specific package qualified function name.
 func iscall(prog *obj.Prog, name *obj.LSym) bool {
        if prog == nil {
@@ -340,8 +340,8 @@ func isdeferreturn(prog *obj.Prog) bool {
 }
 
 // Walk backwards from a runtime·selectgo call up to its immediately dominating
-// runtime·newselect call.  Any successor nodes of communication clause nodes
-// are implicit successors of the runtime·selectgo call node.  The goal of this
+// runtime·newselect call. Any successor nodes of communication clause nodes
+// are implicit successors of the runtime·selectgo call node. The goal of this
 // analysis is to add these missing edges to complete the control flow graph.
 func addselectgosucc(selectgo *BasicBlock) {
        var succ *BasicBlock
@@ -379,7 +379,7 @@ func addselectgosucc(selectgo *BasicBlock) {
        }
 }
 
-// The entry point for the missing selectgo control flow algorithm.  Takes an
+// The entry point for the missing selectgo control flow algorithm. Takes an
 // array of BasicBlock*s containing selectgo calls.
 func fixselectgo(selectgo []*BasicBlock) {
        for _, bb := range selectgo {
@@ -387,15 +387,15 @@ func fixselectgo(selectgo []*BasicBlock) {
        }
 }
 
-// Constructs a control flow graph from a sequence of instructions.  This
+// Constructs a control flow graph from a sequence of instructions. This
 // procedure is complicated by various sources of implicit control flow that are
-// not accounted for using the standard cfg construction algorithm.  Returns an
+// not accounted for using the standard cfg construction algorithm. Returns an
 // array of BasicBlock*s in control flow graph form (basic blocks ordered by
 // their RPO number).
 func newcfg(firstp *obj.Prog) []*BasicBlock {
-       // Reset the opt field of each prog to nil.  In the first and second
+       // Reset the opt field of each prog to nil. In the first and second
        // passes, instructions that are labels temporarily use the opt field to
-       // point to their basic block.  In the third pass, the opt field reset
+       // point to their basic block. In the third pass, the opt field reset
        // to point to the predecessor of an instruction in its basic block.
        for p := firstp; p != nil; p = p.Link {
                p.Opt = nil
@@ -436,7 +436,7 @@ func newcfg(firstp *obj.Prog) []*BasicBlock {
        }
 
        // Loop through all basic blocks maximally growing the list of
-       // contained instructions until a label is reached.  Add edges
+       // contained instructions until a label is reached. Add edges
        // for branches and fall-through instructions.
        for _, bb := range cfg {
                for p := bb.last; p != nil && p.As != obj.AEND; p = p.Link {
@@ -448,7 +448,7 @@ func newcfg(firstp *obj.Prog) []*BasicBlock {
                        // Stop before an unreachable RET, to avoid creating
                        // unreachable control flow nodes.
                        if p.Link != nil && p.Link.As == obj.ARET && p.Link.Mode == 1 {
-                               // TODO: remove after SSA is done.  SSA does not
+                               // TODO: remove after SSA is done. SSA does not
                                // generate any unreachable RET instructions.
                                break
                        }
@@ -472,7 +472,7 @@ func newcfg(firstp *obj.Prog) []*BasicBlock {
        }
 
        // Add back links so the instructions in a basic block can be traversed
-       // backward.  This is the final state of the instruction opt field.
+       // backward. This is the final state of the instruction opt field.
        for _, bb := range cfg {
                p := bb.first
                var prev *obj.Prog
@@ -500,13 +500,13 @@ func newcfg(firstp *obj.Prog) []*BasicBlock {
        rpo := int32(len(cfg))
        reversepostorder(bb, &rpo)
 
-       // Sort the basic blocks by their depth first number.  The
+       // Sort the basic blocks by their depth first number. The
        // array is now a depth-first spanning tree with the first
        // node being the root.
        sort.Sort(blockrpocmp(cfg))
 
        // Unreachable control flow nodes are indicated by a -1 in the rpo
-       // field.  If we see these nodes something must have gone wrong in an
+       // field. If we see these nodes something must have gone wrong in an
        // upstream compilation phase.
        bb = cfg[0]
        if bb.rpo == -1 {
@@ -536,7 +536,7 @@ func isfunny(n *Node) bool {
 }
 
 // Computes the effects of an instruction on a set of
-// variables.  The vars argument is an array of Node*s.
+// variables. The vars argument is an array of Node*s.
 //
 // The output vectors give bits for variables:
 //     uevar - used by this instruction
@@ -555,8 +555,8 @@ func progeffects(prog *obj.Prog, vars []*Node, uevar Bvec, varkill Bvec, avarini
        bvresetall(avarinit)
 
        if prog.As == obj.ARET {
-               // Return instructions implicitly read all the arguments.  For
-               // the sake of correctness, out arguments must be read.  For the
+               // Return instructions implicitly read all the arguments. For
+               // the sake of correctness, out arguments must be read. For the
                // sake of backtrace quality, we read in arguments as well.
                //
                // A return instruction with a p->to is a tail return, which brings
@@ -676,7 +676,7 @@ Next:
 }
 
 // Constructs a new liveness structure used to hold the global state of the
-// liveness computation.  The cfg argument is an array of BasicBlock*s and the
+// liveness computation. The cfg argument is an array of BasicBlock*s and the
 // vars argument is an array of Node*s.
 func newliveness(fn *Node, ptxt *obj.Prog, cfg []*BasicBlock, vars []*Node) *Liveness {
        result := new(Liveness)
@@ -721,7 +721,7 @@ func printeffects(p *obj.Prog, uevar Bvec, varkill Bvec, avarinit Bvec) {
        fmt.Printf("\n")
 }
 
-// Pretty print a variable node.  Uses Pascal like conventions for pointers and
+// Pretty print a variable node. Uses Pascal like conventions for pointers and
 // addresses to avoid confusing the C like conventions used in the node variable
 // names.
 func printnode(node *Node) {
@@ -736,7 +736,7 @@ func printnode(node *Node) {
        fmt.Printf(" %v%s%s", node, p, a)
 }
 
-// Pretty print a list of variables.  The vars argument is an array of Node*s.
+// Pretty print a list of variables. The vars argument is an array of Node*s.
 func printvars(name string, bv Bvec, vars []*Node) {
        fmt.Printf("%s:", name)
        for i, node := range vars {
@@ -850,10 +850,10 @@ func checkprog(fn *Node, p *obj.Prog) {
        }
 }
 
-// Check instruction invariants.  We assume that the nodes corresponding to the
+// Check instruction invariants. We assume that the nodes corresponding to the
 // sources and destinations of memory operations will be declared in the
-// function.  This is not strictly true, as is the case for the so-called funny
-// nodes and there are special cases to skip over that stuff.  The analysis will
+// function. This is not strictly true, as is the case for the so-called funny
+// nodes and there are special cases to skip over that stuff. The analysis will
 // fail if this invariant blindly changes.
 func checkptxt(fn *Node, firstp *obj.Prog) {
        if debuglive == 0 {
@@ -931,7 +931,7 @@ func onebitwalktype1(t *Type, xoffset *int64, bv Bvec) {
 
        case TARRAY:
                // The value of t->bound is -1 for slices types and >=0 for
-               // for fixed array types.  All other values are invalid.
+               // for fixed array types. All other values are invalid.
                if t.Bound < -1 {
                        Fatalf("onebitwalktype1: invalid bound, %v", t)
                }
@@ -975,8 +975,8 @@ func argswords() int32 {
        return int32(Curfn.Type.Argwid / int64(Widthptr))
 }
 
-// Generates live pointer value maps for arguments and local variables.  The
-// this argument and the in arguments are always assumed live.  The vars
+// Generates live pointer value maps for arguments and local variables. The
+// this argument and the in arguments are always assumed live. The vars
 // argument is an array of Node*s.
 func onebitlivepointermap(lv *Liveness, liveout Bvec, vars []*Node, args Bvec, locals Bvec) {
        var node *Node
@@ -1046,7 +1046,7 @@ func issafepoint(prog *obj.Prog) bool {
        return prog.As == obj.ATEXT || prog.As == obj.ACALL
 }
 
-// Initializes the sets for solving the live variables.  Visits all the
+// Initializes the sets for solving the live variables. Visits all the
 // instructions in each basic block to summarizes the information at each basic
 // block
 func livenessprologue(lv *Liveness) {
@@ -1140,15 +1140,15 @@ func livenesssolve(lv *Liveness) {
                }
        }
 
-       // Iterate through the blocks in reverse round-robin fashion.  A work
-       // queue might be slightly faster.  As is, the number of iterations is
+       // Iterate through the blocks in reverse round-robin fashion. A work
+       // queue might be slightly faster. As is, the number of iterations is
        // so low that it hardly seems to be worth the complexity.
        change = 1
 
        for change != 0 {
                change = 0
 
-               // Walk blocks in the general direction of propagation.  This
+               // Walk blocks in the general direction of propagation. This
                // improves convergence.
                for i := len(lv.cfg) - 1; i >= 0; i-- {
                        bb := lv.cfg[i]
@@ -1714,10 +1714,10 @@ func livenessprintdebug(lv *Liveness) {
        fmt.Printf("\n")
 }
 
-// Dumps an array of bitmaps to a symbol as a sequence of uint32 values.  The
-// first word dumped is the total number of bitmaps.  The second word is the
-// length of the bitmaps.  All bitmaps are assumed to be of equal length.  The
-// words that are followed are the raw bitmap words.  The arr argument is an
+// Dumps an array of bitmaps to a symbol as a sequence of uint32 values. The
+// first word dumped is the total number of bitmaps. The second word is the
+// length of the bitmaps. All bitmaps are assumed to be of equal length. The
+// words that are followed are the raw bitmap words. The arr argument is an
 // array of Node*s.
 func onebitwritesymbol(arr []Bvec, sym *Sym) {
        var i int
@@ -1759,7 +1759,7 @@ func printprog(p *obj.Prog) {
        }
 }
 
-// Entry pointer for liveness analysis.  Constructs a complete CFG, solves for
+// Entry pointer for liveness analysis. Constructs a complete CFG, solves for
 // the liveness of pointer variables in the function, and emits a runtime data
 // structure read by the garbage collector.
 func liveness(fn *Node, firstp *obj.Prog, argssym *Sym, livesym *Sym) {
index 43c6db0a00fe576fa06eccb59dfe1a6b06b13203..3cf480efd4326ef62ef8eab2b5ca70d232973250 100644 (file)
@@ -42,7 +42,7 @@ func siglt(a, b *Sig) bool {
 }
 
 // Builds a type representing a Bucket structure for
-// the given map type.  This type is not visible to users -
+// the given map type. This type is not visible to users -
 // we include only enough information to generate a correct GC
 // program for it.
 // Make sure this stays in sync with ../../../../runtime/hashmap.go!
@@ -421,7 +421,7 @@ func dimportpath(p *Pkg) {
        }
 
        // If we are compiling the runtime package, there are two runtime packages around
-       // -- localpkg and Runtimepkg.  We don't want to produce import path symbols for
+       // -- localpkg and Runtimepkg. We don't want to produce import path symbols for
        // both of them, so just produce one for localpkg.
        if myimportpath == "runtime" && p == Runtimepkg {
                return
index 03ff17eb0109d53d624e69cd297e01dc56087de8..1033cd9226ee54cabcf30a5185598785d3021359 100644 (file)
@@ -245,7 +245,7 @@ type state struct {
        // *Node is the unique identifier (an ONAME Node) for the variable.
        vars map[*Node]*ssa.Value
 
-       // all defined variables at the end of each block.  Indexed by block ID.
+       // all defined variables at the end of each block. Indexed by block ID.
        defvars []map[*Node]*ssa.Value
 
        // addresses of PPARAM and PPARAMOUT variables.
@@ -254,12 +254,12 @@ type state struct {
        // symbols for PEXTERN, PAUTO and PPARAMOUT variables so they can be reused.
        varsyms map[*Node]interface{}
 
-       // starting values.  Memory, stack pointer, and globals pointer
+       // starting values. Memory, stack pointer, and globals pointer
        startmem *ssa.Value
        sp       *ssa.Value
        sb       *ssa.Value
 
-       // line number stack.  The current line number is top of stack
+       // line number stack. The current line number is top of stack
        line []int32
 
        // list of panic calls by function name and line number.
@@ -269,7 +269,7 @@ type state struct {
        // list of FwdRef values.
        fwdRefs []*ssa.Value
 
-       // list of PPARAMOUT (return) variables.  Does not include PPARAM|PHEAP vars.
+       // list of PPARAMOUT (return) variables. Does not include PPARAM|PHEAP vars.
        returns []*Node
 
        cgoUnsafeArgs bool
@@ -339,7 +339,7 @@ func (s *state) startBlock(b *ssa.Block) {
 }
 
 // endBlock marks the end of generating code for the current block.
-// Returns the (former) current block.  Returns nil if there is no current
+// Returns the (former) current block. Returns nil if there is no current
 // block, i.e. if no code flows to the current execution point.
 func (s *state) endBlock() *ssa.Block {
        b := s.curBlock
@@ -540,7 +540,7 @@ func (s *state) stmt(n *Node) {
                        b.Kind = ssa.BlockExit
                        b.Control = m
                        // TODO: never rewrite OPANIC to OCALLFUNC in the
-                       // first place.  Need to wait until all backends
+                       // first place. Need to wait until all backends
                        // go through SSA.
                }
        case ODEFER:
@@ -653,8 +653,8 @@ func (s *state) stmt(n *Node) {
                rhs := n.Right
                if rhs != nil && (rhs.Op == OSTRUCTLIT || rhs.Op == OARRAYLIT) {
                        // All literals with nonzero fields have already been
-                       // rewritten during walk.  Any that remain are just T{}
-                       // or equivalents.  Use the zero value.
+                       // rewritten during walk. Any that remain are just T{}
+                       // or equivalents. Use the zero value.
                        if !iszero(rhs) {
                                Fatalf("literal with nonzero value in SSA: %v", rhs)
                        }
@@ -891,10 +891,10 @@ func (s *state) stmt(n *Node) {
 }
 
 // exit processes any code that needs to be generated just before returning.
-// It returns a BlockRet block that ends the control flow.  Its control value
+// It returns a BlockRet block that ends the control flow. Its control value
 // will be set to the final memory state.
 func (s *state) exit() *ssa.Block {
-       // Run exit code.  Typically, this code copies heap-allocated PPARAMOUT
+       // Run exit code. Typically, this code copies heap-allocated PPARAMOUT
        // variables back to the stack.
        s.stmts(s.exitCode)
 
@@ -906,7 +906,7 @@ func (s *state) exit() *ssa.Block {
                s.vars[&memVar] = s.newValue1A(ssa.OpVarDef, ssa.TypeMem, n, s.mem())
                s.vars[&memVar] = s.newValue3I(ssa.OpStore, ssa.TypeMem, n.Type.Size(), addr, val, s.mem())
                // TODO: if val is ever spilled, we'd like to use the
-               // PPARAMOUT slot for spilling it.  That won't happen
+               // PPARAMOUT slot for spilling it. That won't happen
                // currently.
        }
 
@@ -1382,7 +1382,7 @@ func (s *state) expr(n *Node) *ssa.Value {
                case CTBOOL:
                        v := s.constBool(n.Val().U.(bool))
                        // For some reason the frontend gets the line numbers of
-                       // CTBOOL literals totally wrong.  Fix it here by grabbing
+                       // CTBOOL literals totally wrong. Fix it here by grabbing
                        // the line number of the enclosing AST node.
                        if len(s.line) >= 2 {
                                v.Line = s.line[len(s.line)-2]
@@ -1925,7 +1925,7 @@ func (s *state) expr(n *Node) *ssa.Value {
                tab := s.expr(n.Left)
                data := s.expr(n.Right)
                // The frontend allows putting things like struct{*byte} in
-               // the data portion of an eface.  But we don't want struct{*byte}
+               // the data portion of an eface. But we don't want struct{*byte}
                // as a register type because (among other reasons) the liveness
                // analysis is confused by the "fat" variables that result from
                // such types being spilled.
@@ -2037,7 +2037,7 @@ func (s *state) expr(n *Node) *ssa.Value {
                r := s.rtcall(growslice, true, []*Type{pt, Types[TINT], Types[TINT]}, taddr, p, l, c, nl)
 
                s.vars[&ptrVar] = r[0]
-               // Note: we don't need to read r[1], the result's length.  It will be nl.
+               // Note: we don't need to read r[1], the result's length. It will be nl.
                // (or maybe we should, we just have to spill/restore nl otherwise?)
                s.vars[&capVar] = r[2]
                b = s.endBlock()
@@ -2106,7 +2106,7 @@ func (s *state) condBranch(cond *Node, yes, no *ssa.Block, likely int8) {
                return
                // Note: if likely==1, then both recursive calls pass 1.
                // If likely==-1, then we don't have enough information to decide
-               // whether the first branch is likely or not.  So we pass 0 for
+               // whether the first branch is likely or not. So we pass 0 for
                // the likeliness of the first branch.
                // TODO: have the frontend give us branch prediction hints for
                // OANDAND and OOROR nodes (if it ever has such info).
@@ -2191,7 +2191,7 @@ func (s *state) assign(left *Node, right *ssa.Value, wb, deref bool, line int32)
                s.addNamedValue(left, right)
                return
        }
-       // Left is not ssa-able.  Compute its address.
+       // Left is not ssa-able. Compute its address.
        addr := s.addr(left, false)
        if left.Op == ONAME {
                s.vars[&memVar] = s.newValue1A(ssa.OpVarDef, ssa.TypeMem, left, s.mem())
@@ -2333,7 +2333,7 @@ func (s *state) call(n *Node, k callKind) *ssa.Value {
        dowidth(fn.Type)
        stksize := fn.Type.Argwid // includes receiver
 
-       // Run all argument assignments.  The arg slots have already
+       // Run all argument assignments. The arg slots have already
        // been offset by the appropriate amount (+2*widthptr for go/defer,
        // +widthptr for interface calls).
        // For OCALLMETH, the receiver is set in these statements.
@@ -2462,12 +2462,12 @@ func (s *state) addr(n *Node, bounded bool) *ssa.Value {
                        return nil
                case PAUTO:
                        // We need to regenerate the address of autos
-                       // at every use.  This prevents LEA instructions
+                       // at every use. This prevents LEA instructions
                        // from occurring before the corresponding VarDef
                        // op and confusing the liveness analysis into thinking
                        // the variable is live at function entry.
                        // TODO: I'm not sure if this really works or we're just
-                       // getting lucky.  We might need a real dependency edge
+                       // getting lucky. We might need a real dependency edge
                        // between vardef and addr ops.
                        aux := &ssa.AutoSymbol{Typ: n.Type, Node: n}
                        return s.newValue1A(ssa.OpAddr, t, aux, s.sp)
@@ -2599,7 +2599,7 @@ func (s *state) canSSA(n *Node) bool {
 func canSSAType(t *Type) bool {
        dowidth(t)
        if t.Width > int64(4*Widthptr) {
-               // 4*Widthptr is an arbitrary constant.  We want it
+               // 4*Widthptr is an arbitrary constant. We want it
                // to be at least 3*Widthptr so slices can be registerized.
                // Too big and we'll introduce too much register pressure.
                return false
@@ -2647,7 +2647,7 @@ func (s *state) nilCheck(ptr *ssa.Value) {
        s.startBlock(bNext)
 }
 
-// boundsCheck generates bounds checking code.  Checks if 0 <= idx < len, branches to exit if not.
+// boundsCheck generates bounds checking code. Checks if 0 <= idx < len, branches to exit if not.
 // Starts a new block on return.
 func (s *state) boundsCheck(idx, len *ssa.Value) {
        if Debug['B'] != 0 {
@@ -2661,7 +2661,7 @@ func (s *state) boundsCheck(idx, len *ssa.Value) {
        s.check(cmp, Panicindex)
 }
 
-// sliceBoundsCheck generates slice bounds checking code.  Checks if 0 <= idx <= len, branches to exit if not.
+// sliceBoundsCheck generates slice bounds checking code. Checks if 0 <= idx <= len, branches to exit if not.
 // Starts a new block on return.
 func (s *state) sliceBoundsCheck(idx, len *ssa.Value) {
        if Debug['B'] != 0 {
@@ -2701,7 +2701,7 @@ func (s *state) check(cmp *ssa.Value, fn *Node) {
 // Returns a slice of results of the given result types.
 // The call is added to the end of the current block.
 // If returns is false, the block is marked as an exit block.
-// If returns is true, the block is marked as a call block.  A new block
+// If returns is true, the block is marked as a call block. A new block
 // is started to load the return values.
 func (s *state) rtcall(fn *Node, returns bool, results []*Type, args ...*ssa.Value) []*ssa.Value {
        // Write args to the stack
@@ -2773,7 +2773,7 @@ func (s *state) insertWBmove(t *Type, left, right *ssa.Value, line int32) {
 
        aux := &ssa.ExternSymbol{Types[TBOOL], syslook("writeBarrier", 0).Sym}
        flagaddr := s.newValue1A(ssa.OpAddr, Ptrto(Types[TUINT32]), aux, s.sb)
-       // TODO: select the .enabled field.  It is currently first, so not needed for now.
+       // TODO: select the .enabled field. It is currently first, so not needed for now.
        // Load word, test byte, avoiding partial register write from load byte.
        flag := s.newValue2(ssa.OpLoad, Types[TUINT32], flagaddr, s.mem())
        flag = s.newValue1(ssa.OpTrunc64to8, Types[TBOOL], flag)
@@ -2818,7 +2818,7 @@ func (s *state) insertWBstore(t *Type, left, right *ssa.Value, line int32) {
 
        aux := &ssa.ExternSymbol{Types[TBOOL], syslook("writeBarrier", 0).Sym}
        flagaddr := s.newValue1A(ssa.OpAddr, Ptrto(Types[TUINT32]), aux, s.sb)
-       // TODO: select the .enabled field.  It is currently first, so not needed for now.
+       // TODO: select the .enabled field. It is currently first, so not needed for now.
        // Load word, test byte, avoiding partial register write from load byte.
        flag := s.newValue2(ssa.OpLoad, Types[TUINT32], flagaddr, s.mem())
        flag = s.newValue1(ssa.OpTrunc64to8, Types[TBOOL], flag)
@@ -3018,7 +3018,7 @@ func (s *state) slice(t *Type, v, i, j, k *ssa.Value) (p, l, c *ssa.Value) {
        var rcap *ssa.Value
        switch {
        case t.IsString():
-               // Capacity of the result is unimportant.  However, we use
+               // Capacity of the result is unimportant. However, we use
                // rcap to test if we've generated a zero-length slice.
                // Use length of strings for that.
                rcap = rlen
@@ -3123,13 +3123,13 @@ func (s *state) uintTofloat(cvttab *u2fcvtTab, n *Node, x *ssa.Value, ft, tt *Ty
        // Code borrowed from old code generator.
        // What's going on: large 64-bit "unsigned" looks like
        // negative number to hardware's integer-to-float
-       // conversion.  However, because the mantissa is only
+       // conversion. However, because the mantissa is only
        // 63 bits, we don't need the LSB, so instead we do an
        // unsigned right shift (divide by two), convert, and
-       // double.  However, before we do that, we need to be
+       // double. However, before we do that, we need to be
        // sure that we do not lose a "1" if that made the
-       // difference in the resulting rounding.  Therefore, we
-       // preserve it, and OR (not ADD) it back in.  The case
+       // difference in the resulting rounding. Therefore, we
+       // preserve it, and OR (not ADD) it back in. The case
        // that matters is when the eleven discarded bits are
        // equal to 10000000001; that rounds up, and the 1 cannot
        // be lost else it would round down if the LSB of the
@@ -3470,15 +3470,15 @@ func (s *state) mem() *ssa.Value {
 }
 
 func (s *state) linkForwardReferences() {
-       // Build SSA graph.  Each variable on its first use in a basic block
+       // Build SSA graph. Each variable on its first use in a basic block
        // leaves a FwdRef in that block representing the incoming value
-       // of that variable.  This function links that ref up with possible definitions,
-       // inserting Phi values as needed.  This is essentially the algorithm
+       // of that variable. This function links that ref up with possible definitions,
+       // inserting Phi values as needed. This is essentially the algorithm
        // described by Braun, Buchwald, Hack, Leißa, Mallon, and Zwinkau:
        // http://pp.info.uni-karlsruhe.de/uploads/publikationen/braun13cc.pdf
        // Differences:
        //   - We use FwdRef nodes to postpone phi building until the CFG is
-       //     completely built.  That way we can avoid the notion of "sealed"
+       //     completely built. That way we can avoid the notion of "sealed"
        //     blocks.
        //   - Phi optimization is a separate pass (in ../ssa/phielim.go).
        for len(s.fwdRefs) > 0 {
@@ -3501,7 +3501,7 @@ func (s *state) resolveFwdRef(v *ssa.Value) {
                        v.Aux = name
                        return
                }
-               // Not SSAable.  Load it.
+               // Not SSAable. Load it.
                addr := s.decladdrs[name]
                if addr == nil {
                        // TODO: closure args reach here.
@@ -3527,7 +3527,7 @@ func (s *state) resolveFwdRef(v *ssa.Value) {
                args = append(args, s.lookupVarOutgoing(p, v.Type, name, v.Line))
        }
 
-       // Decide if we need a phi or not.  We need a phi if there
+       // Decide if we need a phi or not. We need a phi if there
        // are two different args (which are both not v).
        var w *ssa.Value
        for _, a := range args {
@@ -3548,7 +3548,7 @@ func (s *state) resolveFwdRef(v *ssa.Value) {
        if w == nil {
                s.Fatalf("no witness for reachable phi %s", v)
        }
-       // One witness.  Make v a copy of w.
+       // One witness. Make v a copy of w.
        v.Op = ssa.OpCopy
        v.AddArg(w)
 }
@@ -3560,7 +3560,7 @@ func (s *state) lookupVarOutgoing(b *ssa.Block, t ssa.Type, name *Node, line int
                return v
        }
        // The variable is not defined by b and we haven't
-       // looked it up yet.  Generate a FwdRef for the variable and return that.
+       // looked it up yet. Generate a FwdRef for the variable and return that.
        v := b.NewValue0A(line, ssa.OpFwdRef, t, name)
        s.fwdRefs = append(s.fwdRefs, v)
        m[name] = v
@@ -3740,7 +3740,7 @@ func genssa(f *ssa.Func, ptxt *obj.Prog, gcargs, gclocals *Sym) {
        gcsymdup(gcargs)
        gcsymdup(gclocals)
 
-       // Add frame prologue.  Zero ambiguously live variables.
+       // Add frame prologue. Zero ambiguously live variables.
        Thearch.Defframe(ptxt)
        if Debug['f'] != 0 {
                frame(0)
@@ -4115,7 +4115,7 @@ func (s *genState) genValue(v *ssa.Value) {
                if v.AuxInt2Int64() == -1<<31 || x == r {
                        if x != r {
                                // This code compensates for the fact that the register allocator
-                               // doesn't understand 2-address instructions yet.  TODO: fix that.
+                               // doesn't understand 2-address instructions yet. TODO: fix that.
                                p := Prog(moveByType(v.Type))
                                p.From.Type = obj.TYPE_REG
                                p.From.Reg = x
@@ -4183,7 +4183,7 @@ func (s *genState) genValue(v *ssa.Value) {
                ssa.OpAMD64SARBconst, ssa.OpAMD64ROLQconst, ssa.OpAMD64ROLLconst, ssa.OpAMD64ROLWconst,
                ssa.OpAMD64ROLBconst:
                // This code compensates for the fact that the register allocator
-               // doesn't understand 2-address instructions yet.  TODO: fix that.
+               // doesn't understand 2-address instructions yet. TODO: fix that.
                x := regnum(v.Args[0])
                r := regnum(v)
                if x != r {
@@ -4943,7 +4943,7 @@ func (s *state) extendIndex(v *ssa.Value) *ssa.Value {
                return v
        }
        if size > s.config.IntSize {
-               // TODO: truncate 64-bit indexes on 32-bit pointer archs.  We'd need to test
+               // TODO: truncate 64-bit indexes on 32-bit pointer archs. We'd need to test
                // the high word and branch to out-of-bounds failure if it is not 0.
                s.Unimplementedf("64->32 index truncation not implemented")
                return v
@@ -5089,7 +5089,7 @@ func moveByType(t ssa.Type) int {
 }
 
 // regnum returns the register (in cmd/internal/obj numbering) to
-// which v has been allocated.  Panics if v is not assigned to a
+// which v has been allocated. Panics if v is not assigned to a
 // register.
 // TODO: Make this panic again once it stops happening routinely.
 func regnum(v *ssa.Value) int16 {
index 204962ca85544e0c6b9e82d9454cd9af8b2b1b5d..ce1a3175306f26873de9864c21de98e284de7270 100644 (file)
@@ -739,7 +739,7 @@ func eqtype1(t1 *Type, t2 *Type, assumed_equal *TypePairList) bool {
        }
        if t1.Sym != nil || t2.Sym != nil {
                // Special case: we keep byte and uint8 separate
-               // for error messages.  Treat them as equal.
+               // for error messages. Treat them as equal.
                switch t1.Etype {
                case TUINT8:
                        if (t1 == Types[TUINT8] || t1 == bytetype) && (t2 == Types[TUINT8] || t2 == bytetype) {
@@ -997,7 +997,7 @@ func convertop(src *Type, dst *Type, why *string) Op {
        }
 
        // The rules for interfaces are no different in conversions
-       // than assignments.  If interfaces are involved, stop now
+       // than assignments. If interfaces are involved, stop now
        // with the good message from assignop.
        // Otherwise clear the error.
        if src.Etype == TINTER || dst.Etype == TINTER {
@@ -2684,8 +2684,8 @@ func ngotype(n *Node) *Sym {
 }
 
 // Convert raw string to the prefix that will be used in the symbol
-// table.  All control characters, space, '%' and '"', as well as
-// non-7-bit clean bytes turn into %xx.  The period needs escaping
+// table. All control characters, space, '%' and '"', as well as
+// non-7-bit clean bytes turn into %xx. The period needs escaping
 // only in the last segment of the path, and it makes for happier
 // users if we escape that as little as possible.
 //
index f9f459360b53b03589ba6271e2d5647bf3a3e1ce..98003fe48f67daaff4f932a9e57550eb20351ec1 100644 (file)
@@ -143,7 +143,7 @@ func (v V) val() int64 {
 // address taken to force heap allocation, and then based on
 // the value of which a pair of those locals are copied in
 // various ways to the two results y, and z, which are also
-// addressed.  Which is expected to be one of 11-13, 21-23, 31, 32,
+// addressed. Which is expected to be one of 11-13, 21-23, 31, 32,
 // and y.val() should be equal to which and y.p.val() should
 // be equal to z.val().  Also, x(.p)**8 == x; that is, the
 // autos are all linked into a ring.
index 7c7d721a2368688d0d2bab59f2f7e3111700b86f..be0aad5ff8eded824199feeb080f3327a3b6730e 100644 (file)
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // This program generates a test to verify that the standard arithmetic
-// operators properly handle some special cases.  The test file should be
+// operators properly handle some special cases. The test file should be
 // generated with a known working version of go.
 // launch with `go run arithBoundaryGen.go` a file called arithBoundary_ssa.go
 // will be written into the parent directory containing the tests
index 34e54ad08aa5d0ebfbe23e4b5127c12883f964e9..b32a59d514547dab00280873326157a8bdc99b77 100644 (file)
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // This program generates a test to verify that the standard arithmetic
-// operators properly handle const cases.  The test file should be
+// operators properly handle const cases. The test file should be
 // generated with a known working version of go.
 // launch with `go run arithConstGen.go` a file called arithConst_ssa.go
 // will be written into the parent directory containing the tests
index e0b0b4dfab2c42cd3e8d75e69cd82ea84dbf3ed0..df51921e0c7cdda793d1bef301045a5bde3d40cb 100644 (file)
@@ -42,7 +42,7 @@ func testStoreSize_ssa(p *uint16, q *uint16, v uint32) {
        switch {
        }
        // Test to make sure that (Store ptr (Trunc32to16 val) mem)
-       // does not end up as a 32-bit store.  It must stay a 16 bit store
+       // does not end up as a 32-bit store. It must stay a 16 bit store
        // even when Trunc32to16 is rewritten to be a nop.
        // To ensure that we get rewrite the Trunc32to16 before
        // we rewrite the Store, we force the truncate into an
index e855070fc3dcce6ea576e74e0f98b78b8ad61aca..6469bfea4479dbbe31ad8fb2e8c5fecac7410e96 100644 (file)
@@ -85,7 +85,7 @@ func foo() int32 {
                z = int32(data2[25])
        }
        // Lots of phis of the form phi(int32,int64) of type int32 happen here.
-       // Some will be stack phis.  For those stack phis, make sure the spill
+       // Some will be stack phis. For those stack phis, make sure the spill
        // of the second argument uses the phi's width (4 bytes), not its width
        // (8 bytes).  Otherwise, a random stack slot gets clobbered.
 
index d074eb1d5eaf8a9dd5f41fe072e1350539d337bf..a3d9dbcc39b64c6e72fb9c028199e77bb8c8a8f3 100644 (file)
@@ -30,7 +30,7 @@ func f_ssa() *[8]uint {
        } else {
                x = 0
        }
-       // Clobber the global pointer.  The only live ref
+       // Clobber the global pointer. The only live ref
        // to the allocated object is now x.
        a = nil
 
@@ -66,7 +66,7 @@ func g_ssa() *[7]uint {
        } else {
                x = 0
        }
-       // Clobber the global pointer.  The only live ref
+       // Clobber the global pointer. The only live ref
        // to the allocated object is now x.
        a = nil
 
index f09094ce23ced8469e615c6aab605f3130bc1c97..0f7842c5b2e64a2f5ee5c178790d3280e9142cd1 100644 (file)
@@ -117,7 +117,7 @@ func (t *Type) cmp(x *Type) ssa.Cmp {
 
        if t.Sym != nil || x.Sym != nil {
                // Special case: we keep byte and uint8 separate
-               // for error messages.  Treat them as equal.
+               // for error messages. Treat them as equal.
                switch t.Etype {
                case TUINT8:
                        if (t == Types[TUINT8] || t == bytetype) && (x == Types[TUINT8] || x == bytetype) {
index 102235f94e95c2550dd6f6d384c3e8a791c76a3f..f9120614234f4cfc56287ac83771968b2e07f686 100644 (file)
@@ -2840,7 +2840,7 @@ func keydup(n *Node, hash map[uint32][]*Node) {
                                cmp.Right = a.Left
                                evconst(&cmp)
                                if cmp.Op == OLITERAL {
-                                       // Sometimes evconst fails.  See issue 12536.
+                                       // Sometimes evconst fails. See issue 12536.
                                        b = cmp.Val().U.(bool)
                                }
                        }
@@ -3074,7 +3074,7 @@ func typecheckcomplit(np **Node) {
                                        Yyerror("implicit assignment of unexported field '%s' in %v literal", s.Name, t)
                                }
 
-                               // No pushtype allowed here.  Must name fields for that.
+                               // No pushtype allowed here. Must name fields for that.
                                ll.N = assignconv(ll.N, f.Type, "field value")
 
                                ll.N = Nod(OKEY, newname(f.Sym), ll.N)
@@ -3114,7 +3114,7 @@ func typecheckcomplit(np **Node) {
                                }
 
                                // Sym might have resolved to name in other top-level
-                               // package, because of import dot.  Redirect to correct sym
+                               // package, because of import dot. Redirect to correct sym
                                // before we do the lookup.
                                if s.Pkg != localpkg && exportname(s.Name) {
                                        s1 = Lookup(s.Name)
@@ -3136,7 +3136,7 @@ func typecheckcomplit(np **Node) {
                                fielddup(newname(s), hash)
                                r = l.Right
 
-                               // No pushtype allowed here.  Tried and rejected.
+                               // No pushtype allowed here. Tried and rejected.
                                typecheck(&r, Erv)
 
                                l.Right = assignconv(r, f.Type, "field value")
@@ -3504,7 +3504,7 @@ func domethod(n *Node) {
        //      }
        // then even though I.M looks like it doesn't care about the
        // value of its argument, a specific implementation of I may
-       // care.  The _ would suppress the assignment to that argument
+       // care. The _ would suppress the assignment to that argument
        // while generating a call, so remove it.
        for t := getinargx(nt.Type).Type; t != nil; t = t.Down {
                if t.Sym != nil && t.Sym.Name == "_" {
index 3e67f50620e800cc487b2a33463c48fb355b9070..04dac7ca2c7c08693880a8a91c0df1495df99cf4 100644 (file)
@@ -2788,7 +2788,7 @@ func appendslice(n *Node, init **NodeList) *Node {
 
        // walkexprlistsafe will leave OINDEX (s[n]) alone if both s
        // and n are name or literal, but those may index the slice we're
-       // modifying here.  Fix explicitly.
+       // modifying here. Fix explicitly.
        for l := n.List; l != nil; l = l.Next {
                l.N = cheapexpr(l.N, init)
        }
@@ -2907,7 +2907,7 @@ func walkappend(n *Node, init **NodeList, dst *Node) *Node {
 
        // walkexprlistsafe will leave OINDEX (s[n]) alone if both s
        // and n are name or literal, but those may index the slice we're
-       // modifying here.  Fix explicitly.
+       // modifying here. Fix explicitly.
        // Using cheapexpr also makes sure that the evaluation
        // of all arguments (and especially any panics) happen
        // before we begin to modify the slice in a visible way.
@@ -3241,7 +3241,7 @@ func walkcompare(np **Node, init **NodeList) {
                return
        }
 
-       // Chose not to inline.  Call equality function directly.
+       // Chose not to inline. Call equality function directly.
        var needsize int
        call := Nod(OCALL, eqfor(t, &needsize), nil)
 
index 434bfc73cbe689879ad4b511696628227430d1ff..bdcb5658394d435705f200587e2bc7f0162d3988 100644 (file)
@@ -129,7 +129,7 @@ func blockcopy(n, res *gc.Node, osrc, odst, w int64) {
                // TODO: Instead of generating ADDV $-8,R8; ADDV
                // $-8,R7; n*(MOVV 8(R8),R9; ADDV $8,R8; MOVV R9,8(R7);
                // ADDV $8,R7;) just generate the offsets directly and
-               // eliminate the ADDs.  That will produce shorter, more
+               // eliminate the ADDs. That will produce shorter, more
                // pipeline-able code.
                var p *obj.Prog
                for ; c > 0; c-- {
index f97be60a2a451e522b723bf4b2b317ae75708d6b..bf8a4ca979a21e051dc85fac9c4ab8e8cc78f4af 100644 (file)
@@ -62,7 +62,7 @@ loop1:
                // distinguish between moves that moves that *must*
                // sign/zero extend and moves that don't care so they
                // can eliminate moves that don't care without
-               // breaking moves that do care.  This might let us
+               // breaking moves that do care. This might let us
                // simplify or remove the next peep loop, too.
                if p.As == mips.AMOVV || p.As == mips.AMOVF || p.As == mips.AMOVD {
                        if regtyp(&p.To) {
@@ -697,7 +697,7 @@ func copyu(p *obj.Prog, v *obj.Addr, s *obj.Addr) int {
 // copyas returns 1 if a and v address the same register.
 //
 // If a is the from operand, this means this operation reads the
-// register in v.  If a is the to operand, this means this operation
+// register in v. If a is the to operand, this means this operation
 // writes the register in v.
 func copyas(a *obj.Addr, v *obj.Addr) bool {
        if regtyp(v) {
@@ -714,7 +714,7 @@ func copyas(a *obj.Addr, v *obj.Addr) bool {
 // same register as v.
 //
 // If a is the from operand, this means this operation reads the
-// register in v.  If a is the to operand, this means the operation
+// register in v. If a is the to operand, this means the operation
 // either reads or writes the register in v (if !copyas(a, v), then
 // the operation reads the register in v).
 func copyau(a *obj.Addr, v *obj.Addr) bool {
index 740e64cc8351d8b0d6371b6fe24d571b2ce22ab1..aea09503a858d25f0a64b687ff7f4e7605e9f749 100644 (file)
@@ -123,7 +123,7 @@ func blockcopy(n, res *gc.Node, osrc, odst, w int64) {
                // TODO(austin): Instead of generating ADD $-8,R8; ADD
                // $-8,R7; n*(MOVDU 8(R8),R9; MOVDU R9,8(R7);) just
                // generate the offsets directly and eliminate the
-               // ADDs.  That will produce shorter, more
+               // ADDs. That will produce shorter, more
                // pipeline-able code.
                var p *obj.Prog
                for ; c > 0; c-- {
index 534ea6290a2b91f41dab770e0c45c606896154f8..ca8be5063226f0f92e55e447057033432bd051f3 100644 (file)
@@ -42,9 +42,9 @@ var resvd = []int{
        ppc64.REGZERO,
        ppc64.REGSP, // reserved for SP
        // We need to preserve the C ABI TLS pointer because sigtramp
-       // may happen during C code and needs to access the g.  C
+       // may happen during C code and needs to access the g. C
        // clobbers REGG, so if Go were to clobber REGTLS, sigtramp
-       // won't know which convention to use.  By preserving REGTLS,
+       // won't know which convention to use. By preserving REGTLS,
        // we can just retrieve g from TLS when we aren't sure.
        ppc64.REGTLS,
 
index 99d2585d0079acbe188b7b8c30abc6cabb182c8c..4f81aa9c1eb2913043047b5ff134bac4237aa424 100644 (file)
@@ -5,7 +5,7 @@
 package ppc64
 
 // Many Power ISA arithmetic and logical instructions come in four
-// standard variants.  These bits let us map between variants.
+// standard variants. These bits let us map between variants.
 const (
        V_CC = 1 << 0 // xCC (affect CR field 0 flags)
        V_V  = 1 << 1 // xV (affect SO and OV flags)
index 1ff3109a4943ac3903939e1166dcebdf4603cfa0..dfd023c76685675f1d8b123e63e832655c59e644 100644 (file)
@@ -62,7 +62,7 @@ loop1:
                // distinguish between moves that moves that *must*
                // sign/zero extend and moves that don't care so they
                // can eliminate moves that don't care without
-               // breaking moves that do care.  This might let us
+               // breaking moves that do care. This might let us
                // simplify or remove the next peep loop, too.
                if p.As == ppc64.AMOVD || p.As == ppc64.AFMOVD {
                        if regtyp(&p.To) {
@@ -962,7 +962,7 @@ func copyu(p *obj.Prog, v *obj.Addr, s *obj.Addr) int {
 // copyas returns 1 if a and v address the same register.
 //
 // If a is the from operand, this means this operation reads the
-// register in v.  If a is the to operand, this means this operation
+// register in v. If a is the to operand, this means this operation
 // writes the register in v.
 func copyas(a *obj.Addr, v *obj.Addr) bool {
        if regtyp(v) {
@@ -979,7 +979,7 @@ func copyas(a *obj.Addr, v *obj.Addr) bool {
 // same register as v.
 //
 // If a is the from operand, this means this operation reads the
-// register in v.  If a is the to operand, this means the operation
+// register in v. If a is the to operand, this means the operation
 // either reads or writes the register in v (if !copyas(a, v), then
 // the operation reads the register in v).
 func copyau(a *obj.Addr, v *obj.Addr) bool {
index efeff86dca239bb1ebcc26e2778e53a05ee348a1..4cf10d04a9c08ac97b06068258a758b89cfd1e25 100644 (file)
@@ -180,8 +180,8 @@ func proginfo(p *obj.Prog) {
        }
 }
 
-// Instruction variants table.  Initially this contains entries only
-// for the "base" form of each instruction.  On the first call to
+// Instruction variants table. Initially this contains entries only
+// for the "base" form of each instruction. On the first call to
 // as2variant or variant2as, we'll add the variants to the table.
 var varianttable = [ppc64.ALAST][4]int{
        ppc64.AADD:     {ppc64.AADD, ppc64.AADDCC, ppc64.AADDV, ppc64.AADDVCC},
index 7641811a5fad0c01d35dde5ea9f76d0f949bb75a..2e520da0501e4b9e9efba174f328a4c0e29467a3 100644 (file)
@@ -8,29 +8,29 @@ import "fmt"
 
 // Block represents a basic block in the control flow graph of a function.
 type Block struct {
-       // A unique identifier for the block.  The system will attempt to allocate
+       // A unique identifier for the block. The system will attempt to allocate
        // these IDs densely, but no guarantees.
        ID ID
 
        // The kind of block this is.
        Kind BlockKind
 
-       // Subsequent blocks, if any.  The number and order depend on the block kind.
+       // Subsequent blocks, if any. The number and order depend on the block kind.
        // All successors must be distinct (to make phi values in successors unambiguous).
        Succs []*Block
 
        // Inverse of successors.
        // The order is significant to Phi nodes in the block.
        Preds []*Block
-       // TODO: predecessors is a pain to maintain.  Can we somehow order phi
+       // TODO: predecessors is a pain to maintain. Can we somehow order phi
        // arguments by block id and have this field computed explicitly when needed?
 
-       // A value that determines how the block is exited.  Its value depends on the kind
-       // of the block.  For instance, a BlockIf has a boolean control value and BlockExit
+       // A value that determines how the block is exited. Its value depends on the kind
+       // of the block. For instance, a BlockIf has a boolean control value and BlockExit
        // has a memory control value.
        Control *Value
 
-       // Auxiliary info for the block.  Its value depends on the Kind.
+       // Auxiliary info for the block. Its value depends on the Kind.
        Aux interface{}
 
        // The unordered set of Values that define the operation of this block.
@@ -97,7 +97,7 @@ func (b *Block) LongString() string {
        return s
 }
 
-// AddEdgeTo adds an edge from block b to block c.  Used during building of the
+// AddEdgeTo adds an edge from block b to block c. Used during building of the
 // SSA graph; do not use on an already-completed SSA graph.
 func (b *Block) AddEdgeTo(c *Block) {
        b.Succs = append(b.Succs, c)
index 54f774004eb807448b6ef1585a1b3c35d7d1ec24..7243cdc310e55a29053bb5b511b21cc77c9b27bc 100644 (file)
@@ -33,7 +33,7 @@ func checkFunc(f *Func) {
                // If the conditional is true, does v get the value of a or b?
                // We could solve this other ways, but the easiest is just to
                // require (by possibly adding empty control-flow blocks) that
-               // all successors are distinct.  They will need to be distinct
+               // all successors are distinct. They will need to be distinct
                // anyway for register allocation (duplicate successors implies
                // the existence of critical edges).
                // After regalloc we can allow non-distinct predecessors.
index f68819c3c27592440cefb189a7d43c2480965ea7..5a13b147fc81b11b3867ebe52ec269bc166bdd0a 100644 (file)
@@ -114,9 +114,9 @@ type pass struct {
 
 // PhaseOption sets the specified flag in the specified ssa phase,
 // returning empty string if this was successful or a string explaining
-// the error if it was not.  A version of the phase name with "_"
+// the error if it was not. A version of the phase name with "_"
 // replaced by " " is also checked for a match.
-// See gc/lex.go for dissection of the option string.  Example use:
+// See gc/lex.go for dissection of the option string. Example use:
 // GO_GCFLAGS=-d=ssa/generic_cse/time,ssa/generic_cse/stats,ssa/generic_cse/debug=3 ./make.bash ...
 //
 func PhaseOption(phase, flag string, val int) string {
@@ -189,7 +189,7 @@ var passes = [...]pass{
 
 // Double-check phase ordering constraints.
 // This code is intended to document the ordering requirements
-// between different phases.  It does not override the passes
+// between different phases. It does not override the passes
 // list above.
 type constraint struct {
        a, b string // a must come before b
index 8657509c5ccc9c4e821481655a0617a482fb0143..7d345ae280296cff4a48375a6d21d9f1c1186722 100644 (file)
@@ -24,7 +24,7 @@ type Config struct {
        optimize   bool                       // Do optimization
        curFunc    *Func
 
-       // TODO: more stuff.  Compiler flags of interest, ...
+       // TODO: more stuff. Compiler flags of interest, ...
 
        // Given an environment variable used for debug hash match,
        // what file (if any) receives the yes/no logging?
@@ -95,7 +95,7 @@ type Frontend interface {
        Line(int32) string
 }
 
-// interface used to hold *gc.Node.  We'd use *gc.Node directly but
+// interface used to hold *gc.Node. We'd use *gc.Node directly but
 // that would lead to an import cycle.
 type GCNode interface {
        Typ() Type
index c44748535b24c62748c7f8bb8631fbffb43a39fc..817ee4b341b782c0a1420c335378d9396e5c182f 100644 (file)
@@ -14,7 +14,7 @@ const (
 )
 
 // cse does common-subexpression elimination on the Function.
-// Values are just relinked, nothing is deleted.  A subsequent deadcode
+// Values are just relinked, nothing is deleted. A subsequent deadcode
 // pass is required to actually remove duplicate expressions.
 func cse(f *Func) {
        // Two values are equivalent if they satisfy the following definition:
@@ -82,7 +82,7 @@ func cse(f *Func) {
        }
 
        // Find an equivalence class where some members of the class have
-       // non-equivalent arguments.  Split the equivalence class appropriately.
+       // non-equivalent arguments. Split the equivalence class appropriately.
        // Repeat until we can't find any more splits.
        for {
                changed := false
@@ -117,7 +117,7 @@ func cse(f *Func) {
                                        changed = true
                                        continue eqloop
                                }
-                               // v and w are equivalent.  Keep w in e.
+                               // v and w are equivalent. Keep w in e.
                                j++
                        }
                        partition[i] = e
@@ -135,7 +135,7 @@ func cse(f *Func) {
        idom := dominators(f)
        sdom := newSparseTree(f, idom)
 
-       // Compute substitutions we would like to do.  We substitute v for w
+       // Compute substitutions we would like to do. We substitute v for w
        // if v and w are in the same equivalence class and v dominates w.
        rewrite := make([]*Value, f.NumValues())
        for _, e := range partition {
@@ -191,7 +191,7 @@ func cse(f *Func) {
        }
 }
 
-// An eqclass approximates an equivalence class.  During the
+// An eqclass approximates an equivalence class. During the
 // algorithm it may represent the union of several of the
 // final equivalence classes.
 type eqclass []*Value
@@ -207,7 +207,7 @@ type eqclass []*Value
 //  - first two arg's opcodes and auxint
 //  - NOT first two arg's aux; that can break CSE.
 // partitionValues returns a list of equivalence classes, each
-// being a sorted by ID list of *Values.  The eqclass slices are
+// being a sorted by ID list of *Values. The eqclass slices are
 // backed by the same storage as the input slice.
 // Equivalence classes of size 1 are ignored.
 func partitionValues(a []*Value, auxIDs auxmap) []eqclass {
index a33de438e2f760bfa5f96d2806e715e5f48ca40a..819f6de247485ee390ba05737b055671c2e289af 100644 (file)
@@ -84,9 +84,9 @@ func liveValues(f *Func, reachable []bool) []bool {
 
 // deadcode removes dead code from f.
 func deadcode(f *Func) {
-       // deadcode after regalloc is forbidden for now.  Regalloc
+       // deadcode after regalloc is forbidden for now. Regalloc
        // doesn't quite generate legal SSA which will lead to some
-       // required moves being eliminated.  See the comment at the
+       // required moves being eliminated. See the comment at the
        // top of regalloc.go for details.
        if f.RegAlloc != nil {
                f.Fatalf("deadcode after regalloc")
@@ -164,7 +164,7 @@ func deadcode(f *Func) {
        }
        f.Names = f.Names[:i]
 
-       // Remove dead values from blocks' value list.  Return dead
+       // Remove dead values from blocks' value list. Return dead
        // values to the allocator.
        for _, b := range f.Blocks {
                i := 0
@@ -184,7 +184,7 @@ func deadcode(f *Func) {
                b.Values = b.Values[:i]
        }
 
-       // Remove unreachable blocks.  Return dead blocks to allocator.
+       // Remove unreachable blocks. Return dead blocks to allocator.
        i = 0
        for _, b := range f.Blocks {
                if reachable[b.ID] {
@@ -235,11 +235,11 @@ func (b *Block) removePred(p *Block) {
                v.Args[n] = nil // aid GC
                v.Args = v.Args[:n]
                phielimValue(v)
-               // Note: this is trickier than it looks.  Replacing
+               // Note: this is trickier than it looks. Replacing
                // a Phi with a Copy can in general cause problems because
                // Phi and Copy don't have exactly the same semantics.
                // Phi arguments always come from a predecessor block,
-               // whereas copies don't.  This matters in loops like:
+               // whereas copies don't. This matters in loops like:
                // 1: x = (Phi y)
                //    y = (Add x 1)
                //    goto 1
@@ -253,15 +253,15 @@ func (b *Block) removePred(p *Block) {
                // will barf on it.
                //
                // Fortunately, this situation can only happen for dead
-               // code loops.  We know the code we're working with is
+               // code loops. We know the code we're working with is
                // not dead, so we're ok.
                // Proof: If we have a potential bad cycle, we have a
                // situation like this:
                //   x = (Phi z)
                //   y = (op1 x ...)
                //   z = (op2 y ...)
-               // Where opX are not Phi ops.  But such a situation
-               // implies a cycle in the dominator graph.  In the
+               // Where opX are not Phi ops. But such a situation
+               // implies a cycle in the dominator graph. In the
                // example, x.Block dominates y.Block, y.Block dominates
                // z.Block, and z.Block dominates x.Block (treating
                // "dominates" as reflexive).  Cycles in the dominator
index bad0e0096fd9f41521a02ee832a47d7d6fec69b8..20e8368cd53257fdcf58c0ea7ba17f85ad503f99 100644 (file)
@@ -7,7 +7,7 @@ package ssa
 // dse does dead-store elimination on the Function.
 // Dead stores are those which are unconditionally followed by
 // another store to the same location, with no intervening load.
-// This implementation only works within a basic block.  TODO: use something more global.
+// This implementation only works within a basic block. TODO: use something more global.
 func dse(f *Func) {
        var stores []*Value
        loadUse := f.newSparseSet(f.NumValues())
@@ -17,7 +17,7 @@ func dse(f *Func) {
        shadowed := f.newSparseSet(f.NumValues())
        defer f.retSparseSet(shadowed)
        for _, b := range f.Blocks {
-               // Find all the stores in this block.  Categorize their uses:
+               // Find all the stores in this block. Categorize their uses:
                //  loadUse contains stores which are used by a subsequent load.
                //  storeUse contains stores which are used by a subsequent store.
                loadUse.clear()
@@ -67,9 +67,9 @@ func dse(f *Func) {
                        b.Fatalf("no last store found - cycle?")
                }
 
-               // Walk backwards looking for dead stores.  Keep track of shadowed addresses.
+               // Walk backwards looking for dead stores. Keep track of shadowed addresses.
                // An "address" is an SSA Value which encodes both the address and size of
-               // the write.  This code will not remove dead stores to the same address
+               // the write. This code will not remove dead stores to the same address
                // of different types.
                shadowed.clear()
                v := last
index 9ded8bd6e663fe4bfdbbb74b37a94203e0534c21..c38f1cdbaf7682605e3614c30d4bc4823ff2a937 100644 (file)
@@ -65,7 +65,7 @@ func TestDeadStorePhi(t *testing.T) {
 }
 
 func TestDeadStoreTypes(t *testing.T) {
-       // Make sure a narrow store can't shadow a wider one.  We test an even
+       // Make sure a narrow store can't shadow a wider one. We test an even
        // stronger restriction, that one store can't shadow another unless the
        // types of the address fields are identical (where identicalness is
        // decided by the CSE pass).
index 2d53b5a957826f07f61b84a82b6f03b7d4f75b7e..7de8c354a188ddecca95fbbeefb5d5f29c92ee3e 100644 (file)
@@ -16,7 +16,7 @@ const (
 // of a control-flow graph.
 
 // postorder computes a postorder traversal ordering for the
-// basic blocks in f.  Unreachable blocks will not appear.
+// basic blocks in f. Unreachable blocks will not appear.
 func postorder(f *Func) []*Block {
        mark := make([]byte, f.NumBlocks())
 
@@ -31,12 +31,12 @@ func postorder(f *Func) []*Block {
                b := s[len(s)-1]
                switch mark[b.ID] {
                case explored:
-                       // Children have all been visited.  Pop & output block.
+                       // Children have all been visited. Pop & output block.
                        s = s[:len(s)-1]
                        mark[b.ID] = done
                        order = append(order, b)
                case notExplored:
-                       // Children have not been visited yet.  Mark as explored
+                       // Children have not been visited yet. Mark as explored
                        // and queue any children we haven't seen yet.
                        mark[b.ID] = explored
                        for _, c := range b.Succs {
@@ -140,9 +140,9 @@ func (f *Func) dfs(entries []*Block, succFn linkedBlocks, dfnum, order, parent [
        return
 }
 
-// dominators computes the dominator tree for f.  It returns a slice
+// dominators computes the dominator tree for f. It returns a slice
 // which maps block ID to the immediate dominator of that block.
-// Unreachable blocks map to nil.  The entry block maps to nil.
+// Unreachable blocks map to nil. The entry block maps to nil.
 func dominators(f *Func) []*Block {
        preds := func(b *Block) []*Block { return b.Preds }
        succs := func(b *Block) []*Block { return b.Succs }
@@ -298,9 +298,9 @@ func eval(v ID, ancestor []ID, semi []ID, dfnum []ID, best []ID) ID {
        return best[v]
 }
 
-// dominators computes the dominator tree for f.  It returns a slice
+// dominators computes the dominator tree for f. It returns a slice
 // which maps block ID to the immediate dominator of that block.
-// Unreachable blocks map to nil.  The entry block maps to nil.
+// Unreachable blocks map to nil. The entry block maps to nil.
 func dominatorsSimple(f *Func) []*Block {
        // A simple algorithm for now
        // Cooper, Harvey, Kennedy
index 7ed1fe5908f8e84b9e638be1d36101088322cd43..b9a974155e6ad4d62f6b6bb363a64b27a3e3facc 100644 (file)
@@ -7,18 +7,18 @@ package ssa
 const flagRegMask = regMask(1) << 33 // TODO: arch-specific
 
 // flagalloc allocates the flag register among all the flag-generating
-// instructions.  Flag values are recomputed if they need to be
+// instructions. Flag values are recomputed if they need to be
 // spilled/restored.
 func flagalloc(f *Func) {
        // Compute the in-register flag value we want at the end of
-       // each block.  This is basically a best-effort live variable
+       // each block. This is basically a best-effort live variable
        // analysis, so it can be much simpler than a full analysis.
        // TODO: do we really need to keep flag values live across blocks?
        // Could we force the flags register to be unused at basic block
        // boundaries?  Then we wouldn't need this computation.
        end := make([]*Value, f.NumBlocks())
        for n := 0; n < 2; n++ {
-               // Walk blocks backwards.  Poor-man's postorder traversal.
+               // Walk blocks backwards. Poor-man's postorder traversal.
                for i := len(f.Blocks) - 1; i >= 0; i-- {
                        b := f.Blocks[i]
                        // Walk values backwards to figure out what flag
@@ -117,7 +117,7 @@ func flagalloc(f *Func) {
                        // subsequent blocks.
                        _ = v.copyInto(b)
                        // Note: this flag generator is not properly linked up
-                       // with the flag users.  This breaks the SSA representation.
+                       // with the flag users. This breaks the SSA representation.
                        // We could fix up the users with another pass, but for now
                        // we'll just leave it.  (Regalloc has the same issue for
                        // standard regs, and it runs next.)
index 7cc5f6c8d99f2d28cc55ff6cb03f5ffa1d97d982..b648832d6431a85e9528985be49891025780da1f 100644 (file)
@@ -10,7 +10,7 @@ import (
 )
 
 // A Func represents a Go func declaration (or function literal) and
-// its body.  This package compiles each Func independently.
+// its body. This package compiles each Func independently.
 type Func struct {
        Config     *Config     // architecture information
        pass       *pass       // current pass information (name, options, etc.)
@@ -29,7 +29,7 @@ type Func struct {
 
        // map from LocalSlot to set of Values that we want to store in that slot.
        NamedValues map[LocalSlot][]*Value
-       // Names is a copy of NamedValues.Keys.  We keep a separate list
+       // Names is a copy of NamedValues.Keys. We keep a separate list
        // of keys to make iteration order deterministic.
        Names []LocalSlot
 
@@ -109,7 +109,7 @@ func (f *Func) logStat(key string, args ...interface{}) {
        f.Config.Warnl(int(f.Entry.Line), "\t%s\t%s%s\t%s", f.pass.name, key, value, f.Name)
 }
 
-// freeValue frees a value.  It must no longer be referenced.
+// freeValue frees a value. It must no longer be referenced.
 func (f *Func) freeValue(v *Value) {
        if v.Block == nil {
                f.Fatalf("trying to free an already freed value")
@@ -177,7 +177,7 @@ func (b *Block) NewValue0I(line int32, op Op, t Type, auxint int64) *Value {
 // NewValue returns a new value in the block with no arguments and an aux value.
 func (b *Block) NewValue0A(line int32, op Op, t Type, aux interface{}) *Value {
        if _, ok := aux.(int64); ok {
-               // Disallow int64 aux values.  They should be in the auxint field instead.
+               // Disallow int64 aux values. They should be in the auxint field instead.
                // Maybe we want to allow this at some point, but for now we disallow it
                // to prevent errors like using NewValue1A instead of NewValue1I.
                b.Fatalf("aux field has int64 type op=%s type=%s aux=%v", op, t, aux)
index 167ec82d187cc2dc5fa01a6b066088d4ec6362c2..25a88611301d0c19594c9a7e6c631da6cafcef95 100644 (file)
@@ -3,8 +3,8 @@
 // license that can be found in the LICENSE file.
 
 // x86 register conventions:
-//  - Integer types live in the low portion of registers.  Upper portions are junk.
-//  - Boolean types use the low-order byte of a register.  Upper bytes are junk.
+//  - Integer types live in the low portion of registers. Upper portions are junk.
+//  - Boolean types use the low-order byte of a register. Upper bytes are junk.
 //  - We do not use AH,BH,CH,DH registers.
 //  - Floating-point types will live in the low natural slot of an sse2 register.
 //    Unused portions are junk.
 //     ADDQ    $16, SI
 //     MOVUPS  X0, (DI)
 //     ADDQ    $16, DI
-// and 64 is the number of such blocks.  See src/runtime/duff_amd64.s:duffcopy.
+// and 64 is the number of such blocks. See src/runtime/duff_amd64.s:duffcopy.
 
 // Large copying uses REP MOVSQ.
 (Move [size] dst src mem) && size > 16*64 && size%8 == 0 ->
 
 // Note: the word and byte shifts keep the low 5 bits (not the low 4 or 3 bits)
 // because the x86 instructions are defined to use all 5 bits of the shift even
-// for the small shifts.  I don't think we'll ever generate a weird shift (e.g.
+// for the small shifts. I don't think we'll ever generate a weird shift (e.g.
 // (SHLW x (MOVWconst [24])), but just in case.
 
 (CMPQ x (MOVQconst [c])) && is32Bit(c) -> (CMPQconst x [c])
 
 // sign extended loads
 // Note: The combined instruction must end up in the same block
-// as the original load.  If not, we end up making a value with
+// as the original load. If not, we end up making a value with
 // memory type live in two different blocks, which can lead to
 // multiple memory values alive simultaneously.
 (MOVBQSX (MOVBload [off] {sym} ptr mem)) -> @v.Args[0].Block (MOVBQSXload <v.Type> [off] {sym} ptr mem)
index af08d189782c7e72488ec6503f3562cccaee39d5..59a94c887eaee16f8cdee31b1d1d7f28b1de8a02 100644 (file)
@@ -141,7 +141,7 @@ func init() {
        // Suffixes encode the bit width of various instructions.
        // Q = 64 bit, L = 32 bit, W = 16 bit, B = 8 bit
 
-       // TODO: 2-address instructions.  Mark ops as needing matching input/output regs.
+       // TODO: 2-address instructions. Mark ops as needing matching input/output regs.
        var AMD64ops = []opData{
                // fp ops
                {name: "ADDSS", argLength: 2, reg: fp21, asm: "ADDSS"},    // fp32 add
@@ -500,12 +500,12 @@ func init() {
                // arg0=ptr/int arg1=mem, output=int/ptr
                {name: "MOVQconvert", argLength: 2, reg: gp11nf, asm: "MOVQ"},
 
-               // Constant flag values.  For any comparison, there are 5 possible
+               // Constant flag values. For any comparison, there are 5 possible
                // outcomes: the three from the signed total order (<,==,>) and the
-               // three from the unsigned total order.  The == cases overlap.
+               // three from the unsigned total order. The == cases overlap.
                // Note: there's a sixth "unordered" outcome for floating-point
                // comparisons, but we don't use such a beast yet.
-               // These ops are for temporary use by rewrite rules.  They
+               // These ops are for temporary use by rewrite rules. They
                // cannot appear in the generated assembly.
                {name: "FlagEQ"},     // equal
                {name: "FlagLT_ULT"}, // signed < and unsigned <
index 11c7b9d7a19cee86dd64c3485ccfba2e1a8a06dd..5c23fdf6141c64fa872c0c3e0611ec2b4738b4ac 100644 (file)
     (Arg <t.FieldType(3)> {n} [off+t.FieldOff(3)]))
 
 // strength reduction of divide by a constant.
-// Note: frontend does <=32 bits.  We only need to do 64 bits here.
+// Note: frontend does <=32 bits. We only need to do 64 bits here.
 // TODO: Do them all here?
 
 // Div/mod by 1.  Currently handled by frontend.
index 31e45c45eafc9bdc2745a55d15e92c604d4e7f1a..f1ab468b21cf0902de0b111fad7a362fd6fb194c 100644 (file)
@@ -6,7 +6,7 @@ package main
 
 var genericOps = []opData{
        // 2-input arithmetic
-       // Types must be consistent with Go typing.  Add, for example, must take two values
+       // Types must be consistent with Go typing. Add, for example, must take two values
        // of the same type and produces that same type.
        {name: "Add8", argLength: 2, commutative: true}, // arg0 + arg1
        {name: "Add16", argLength: 2, commutative: true},
@@ -250,7 +250,7 @@ var genericOps = []opData{
        // arg0=ptr/int arg1=mem, output=int/ptr
        {name: "Convert", argLength: 2},
 
-       // constants.  Constant values are stored in the aux or
+       // constants. Constant values are stored in the aux or
        // auxint fields.
        {name: "ConstBool", aux: "Bool"},     // auxint is 0 for false and 1 for true
        {name: "ConstString", aux: "String"}, // value is aux.(string)
@@ -270,7 +270,7 @@ var genericOps = []opData{
 
        // The address of a variable.  arg0 is the base pointer (SB or SP, depending
        // on whether it is a global or stack variable).  The Aux field identifies the
-       // variable.  It will be either an *ExternSymbol (with arg0=SB), *ArgSymbol (arg0=SP),
+       // variable. It will be either an *ExternSymbol (with arg0=SB), *ArgSymbol (arg0=SP),
        // or *AutoSymbol (arg0=SP).
        {name: "Addr", argLength: 1, aux: "Sym"}, // Address of a variable.  Arg0=SP or SB.  Aux identifies the variable.
 
@@ -284,8 +284,8 @@ var genericOps = []opData{
        {name: "Move", argLength: 3, aux: "Int64"},              // arg0=destptr, arg1=srcptr, arg2=mem, auxint=size.  Returns memory.
        {name: "Zero", argLength: 2, aux: "Int64"},              // arg0=destptr, arg1=mem, auxint=size. Returns memory.
 
-       // Function calls.  Arguments to the call have already been written to the stack.
-       // Return values appear on the stack.  The method receiver, if any, is treated
+       // Function calls. Arguments to the call have already been written to the stack.
+       // Return values appear on the stack. The method receiver, if any, is treated
        // as a phantom first argument.
        {name: "ClosureCall", argLength: 3, aux: "Int64"}, // arg0=code pointer, arg1=context ptr, arg2=memory.  auxint=arg size.  Returns memory.
        {name: "StaticCall", argLength: 1, aux: "SymOff"}, // call function aux.(*gc.Sym), arg0=memory.  auxint=arg size.  Returns memory.
@@ -368,17 +368,17 @@ var genericOps = []opData{
        {name: "StructMake4", argLength: 4},                // arg0..3=field0..3.  Returns struct.
        {name: "StructSelect", argLength: 1, aux: "Int64"}, // arg0=struct, auxint=field index.  Returns the auxint'th field.
 
-       // Spill&restore ops for the register allocator.  These are
+       // Spill&restore ops for the register allocator. These are
        // semantically identical to OpCopy; they do not take/return
-       // stores like regular memory ops do.  We can get away without memory
+       // stores like regular memory ops do. We can get away without memory
        // args because we know there is no aliasing of spill slots on the stack.
        {name: "StoreReg", argLength: 1},
        {name: "LoadReg", argLength: 1},
 
-       // Used during ssa construction.  Like Copy, but the arg has not been specified yet.
+       // Used during ssa construction. Like Copy, but the arg has not been specified yet.
        {name: "FwdRef"},
 
-       // Unknown value.  Used for Values whose values don't matter because they are dead code.
+       // Unknown value. Used for Values whose values don't matter because they are dead code.
        {name: "Unknown"},
 
        {name: "VarDef", argLength: 1, aux: "Sym", typ: "Mem"}, // aux is a *gc.Node of a variable that is about to be initialized.  arg0=mem, returns mem
index 660511e46cb0cf0f6f53482a6fe71cdf945f0435..2736ed72f79b6d177cbd825e16aaf8be7394b8ba 100644 (file)
@@ -149,8 +149,8 @@ func genOp() {
                        }
                        fmt.Fprintln(w, "reg:regInfo{")
 
-                       // Compute input allocation order.  We allocate from the
-                       // most to the least constrained input.  This order guarantees
+                       // Compute input allocation order. We allocate from the
+                       // most to the least constrained input. This order guarantees
                        // that we will always be able to find a register.
                        var s []intPair
                        for i, r := range v.reg.inputs {
index e3e3efac4140ac2d10a9d3c67ab20d787d531cef..61a420270f74fd3d3da5c07cebcd87d3c951b2ce 100644 (file)
@@ -39,8 +39,8 @@ import (
 // variable ::= some token
 // opcode   ::= one of the opcodes from ../op.go (without the Op prefix)
 
-// extra conditions is just a chunk of Go that evaluates to a boolean.  It may use
-// variables declared in the matching sexpr.  The variable "v" is predefined to be
+// extra conditions is just a chunk of Go that evaluates to a boolean. It may use
+// variables declared in the matching sexpr. The variable "v" is predefined to be
 // the value matched by the entire rule.
 
 // If multiple rules match, the first one in file order is selected.
@@ -93,8 +93,8 @@ func genRules(arch arch) {
                lineno++
                line := scanner.Text()
                if i := strings.Index(line, "//"); i >= 0 {
-                       // Remove comments.  Note that this isn't string safe, so
-                       // it will truncate lines with // inside strings.  Oh well.
+                       // Remove comments. Note that this isn't string safe, so
+                       // it will truncate lines with // inside strings. Oh well.
                        line = line[:i]
                }
                rule += " " + line
@@ -159,7 +159,7 @@ func genRules(arch arch) {
        fmt.Fprintf(w, "return false\n")
        fmt.Fprintf(w, "}\n")
 
-       // Generate a routine per op.  Note that we don't make one giant routine
+       // Generate a routine per op. Note that we don't make one giant routine
        // because it is too big for some compilers.
        for _, op := range ops {
                fmt.Fprintf(w, "func rewriteValue%s_%s(v *Value, config *Config) bool {\n", arch.name, opName(op, arch))
@@ -190,7 +190,7 @@ func genRules(arch arch) {
                fmt.Fprintf(w, "}\n")
        }
 
-       // Generate block rewrite function.  There are only a few block types
+       // Generate block rewrite function. There are only a few block types
        // so we can make this one function with a switch.
        fmt.Fprintf(w, "func rewriteBlock%s(b *Block) bool {\n", arch.name)
        fmt.Fprintf(w, "switch b.Kind {\n")
@@ -229,7 +229,7 @@ func genRules(arch arch) {
                                fmt.Fprintf(w, "if !(%s) {\nbreak\n}\n", cond)
                        }
 
-                       // Rule matches.  Generate result.
+                       // Rule matches. Generate result.
                        t := split(result[1 : len(result)-1]) // remove parens, then split
                        newsuccs := t[2:]
 
@@ -316,7 +316,7 @@ func genMatch(w io.Writer, arch arch, match string) {
 func genMatch0(w io.Writer, arch arch, match, v string, m map[string]string, top bool) {
        if match[0] != '(' {
                if _, ok := m[match]; ok {
-                       // variable already has a definition.  Check whether
+                       // variable already has a definition. Check whether
                        // the old definition and the new definition match.
                        // For example, (add x x).  Equality is just pointer equality
                        // on Values (so cse is important to do before lowering).
@@ -332,7 +332,7 @@ func genMatch0(w io.Writer, arch arch, match, v string, m map[string]string, top
                return
        }
 
-       // split body up into regions.  Split by spaces/tabs, except those
+       // split body up into regions. Split by spaces/tabs, except those
        // contained in () or {}.
        s := split(match[1 : len(match)-1]) // remove parens, then split
 
@@ -348,7 +348,7 @@ func genMatch0(w io.Writer, arch arch, match, v string, m map[string]string, top
                        // type restriction
                        t := a[1 : len(a)-1] // remove <>
                        if !isVariable(t) {
-                               // code.  We must match the results of this code.
+                               // code. We must match the results of this code.
                                fmt.Fprintf(w, "if %s.Type != %s {\nbreak\n}\n", v, t)
                        } else {
                                // variable
index 6ce8705272429d76c908089f2c1b04670ce584d8..b01651971f7db7739b92a05213d958e95868f889 100755 (executable)
@@ -76,7 +76,7 @@ func describeBranchPrediction(f *Func, b *Block, likely, not int8, prediction Br
 func likelyadjust(f *Func) {
        // The values assigned to certain and local only matter
        // in their rank order.  0 is default, more positive
-       // is less likely.  It's possible to assign a negative
+       // is less likely. It's possible to assign a negative
        // unlikeliness (though not currently the case).
        certain := make([]int8, f.NumBlocks()) // In the long run, all outcomes are at least this bad. Mainly for Exit
        local := make([]int8, f.NumBlocks())   // for our immediate predecessors.
@@ -113,7 +113,7 @@ func likelyadjust(f *Func) {
                                // Notice that this can act like a "reset" on unlikeliness at loops; the
                                // default "everything returns" unlikeliness is erased by min with the
                                // backedge likeliness; however a loop with calls on every path will be
-                               // tagged with call cost.  Net effect is that loop entry is favored.
+                               // tagged with call cost. Net effect is that loop entry is favored.
                                b0 := b.Succs[0].ID
                                b1 := b.Succs[1].ID
                                certain[b.ID] = min8(certain[b0], certain[b1])
@@ -204,7 +204,7 @@ func (l *loop) LongString() string {
 
 // nearestOuterLoop returns the outer loop of loop most nearly
 // containing block b; the header must dominate b.  loop itself
-// is assumed to not be that loop.  For acceptable performance,
+// is assumed to not be that loop. For acceptable performance,
 // we're relying on loop nests to not be terribly deep.
 func (l *loop) nearestOuterLoop(sdom sparseTree, b *Block) *loop {
        var o *loop
index a8e84d5c93a76ed0618b0eaa4f33b96c9a884f8d..f6297fdfa541a11ba6d8be1f1a5c50dda8c34ea7 100644 (file)
@@ -6,7 +6,7 @@ package ssa
 
 // A copy of the code in ../gc/subr.go.
 // We can't use it directly because it would generate
-// an import cycle.  TODO: move to a common support package.
+// an import cycle. TODO: move to a common support package.
 
 // argument passing to/from
 // smagic and umagic
index f8caa7b04275470cf3fac4b410074332f16f1c25..ccd443197a3aa82a9351524e92a1ad76afc79da8 100644 (file)
@@ -43,7 +43,7 @@ func nilcheckelim(f *Func) {
        work = append(work, bp{block: f.Entry})
 
        // map from value ID to bool indicating if value is known to be non-nil
-       // in the current dominator path being walked.  This slice is updated by
+       // in the current dominator path being walked. This slice is updated by
        // walkStates to maintain the known non-nil values.
        nonNilValues := make([]bool, f.NumValues())
 
index 7b2a8f8f0486b1327b5d2a461393b9271e01a93b..d64a41ed453887dbed9d1a5fc47ccb3b9fab98cc 100644 (file)
@@ -52,7 +52,7 @@ const (
        auxSymValAndOff         // aux is a symbol, auxInt is a ValAndOff
 )
 
-// A ValAndOff is used by the several opcodes.  It holds
+// A ValAndOff is used by the several opcodes. It holds
 // both a value and a pointer offset.
 // A ValAndOff is intended to be encoded into an AuxInt field.
 // The zero ValAndOff encodes a value of 0 and an offset of 0.
index d69449ee21fa1c0e05cf59c19a0fd661650d1c58..0461e6e0792709b2e1745352125ad46fedcbc6fa 100644 (file)
@@ -5,8 +5,8 @@
 package ssa
 
 // phielim eliminates redundant phi values from f.
-// A phi is redundant if its arguments are all equal.  For
-// purposes of counting, ignore the phi itself.  Both of
+// A phi is redundant if its arguments are all equal. For
+// purposes of counting, ignore the phi itself. Both of
 // these phis are redundant:
 //   v = phi(x,x,x)
 //   v = phi(x,v,x,v)
@@ -58,8 +58,8 @@ func phielimValue(v *Value) bool {
        }
 
        if w == nil {
-               // v references only itself.  It must be in
-               // a dead code loop.  Don't bother modifying it.
+               // v references only itself. It must be in
+               // a dead code loop. Don't bother modifying it.
                return false
        }
        v.Op = OpCopy
index e900a3cfb82464221ff777539264bc06c5712b4e..f9680e42029cd3e3456d9c59379ae2e387d41c14 100644 (file)
@@ -4,9 +4,9 @@
 
 // Register allocation.
 //
-// We use a version of a linear scan register allocator.  We treat the
+// We use a version of a linear scan register allocator. We treat the
 // whole function as a single long basic block and run through
-// it using a greedy register allocator.  Then all merge edges
+// it using a greedy register allocator. Then all merge edges
 // (those targeting a block with len(Preds)>1) are processed to
 // shuffle data into the place that the target of the edge expects.
 //
@@ -15,7 +15,7 @@
 // value whose next use is farthest in the future.
 //
 // The register allocator requires that a block is not scheduled until
-// at least one of its predecessors have been scheduled.  The most recent
+// at least one of its predecessors have been scheduled. The most recent
 // such predecessor provides the starting register state for a block.
 //
 // It also requires that there are no critical edges (critical =
 // For every value, we generate a spill immediately after the value itself.
 //     x = Op y z    : AX
 //     x2 = StoreReg x
-// While AX still holds x, any uses of x will use that value.  When AX is needed
+// While AX still holds x, any uses of x will use that value. When AX is needed
 // for another value, we simply reuse AX.  Spill code has already been generated
-// so there is no code generated at "spill" time.  When x is referenced
+// so there is no code generated at "spill" time. When x is referenced
 // subsequently, we issue a load to restore x to a register using x2 as
 //  its argument:
 //    x3 = Restore x2 : CX
 // x3 can then be used wherever x is referenced again.
 // If the spill (x2) is never used, it will be removed at the end of regalloc.
 //
-// Phi values are special, as always.  We define two kinds of phis, those
+// Phi values are special, as always. We define two kinds of phis, those
 // where the merge happens in a register (a "register" phi) and those where
 // the merge happens in a stack location (a "stack" phi).
 //
 // A register phi must have the phi and all of its inputs allocated to the
-// same register.  Register phis are spilled similarly to regular ops:
+// same register. Register phis are spilled similarly to regular ops:
 //     b1: y = ... : AX        b2: z = ... : AX
 //         goto b3                 goto b3
 //     b3: x = phi(y, z) : AX
 //         x2 = StoreReg x
 //
 // A stack phi must have the phi and all of its inputs allocated to the same
-// stack location.  Stack phis start out life already spilled - each phi
+// stack location. Stack phis start out life already spilled - each phi
 // input must be a store (using StoreReg) at the end of the corresponding
 // predecessor block.
 //     b1: y = ... : AX        b2: z = ... : BX
 // TODO
 
 // Use an affinity graph to mark two values which should use the
-// same register.  This affinity graph will be used to prefer certain
-// registers for allocation.  This affinity helps eliminate moves that
+// same register. This affinity graph will be used to prefer certain
+// registers for allocation. This affinity helps eliminate moves that
 // are required for phi implementations and helps generate allocations
 // for 2-register architectures.
 
-// Note: regalloc generates a not-quite-SSA output.  If we have:
+// Note: regalloc generates a not-quite-SSA output. If we have:
 //
 //             b1: x = ... : AX
 //                 x2 = StoreReg x
@@ -85,8 +85,8 @@
 // add a x4:CX->BX copy at the end of b4.
 // But the definition of x3 doesn't dominate b2.  We should really
 // insert a dummy phi at the start of b2 (x5=phi(x3,x4):BX) to keep
-// SSA form.  For now, we ignore this problem as remaining in strict
-// SSA form isn't needed after regalloc.  We'll just leave the use
+// SSA form. For now, we ignore this problem as remaining in strict
+// SSA form isn't needed after regalloc. We'll just leave the use
 // of x3 not dominated by the definition of x3, and the CX->BX copy
 // will have no use (so don't run deadcode after regalloc!).
 // TODO: maybe we should introduce these extra phis?
@@ -102,7 +102,7 @@ import (
 const regDebug = false // TODO: compiler flag
 const logSpills = false
 
-// regalloc performs register allocation on f.  It sets f.RegAlloc
+// regalloc performs register allocation on f. It sets f.RegAlloc
 // to the resulting allocation.
 func regalloc(f *Func) {
        var s regAllocState
@@ -276,7 +276,7 @@ type startReg struct {
        vid ID // pre-regalloc value needed in this register
 }
 
-// freeReg frees up register r.  Any current user of r is kicked out.
+// freeReg frees up register r. Any current user of r is kicked out.
 func (s *regAllocState) freeReg(r register) {
        v := s.regs[r].v
        if v == nil {
@@ -355,18 +355,18 @@ func (s *regAllocState) allocReg(v *Value, mask regMask) register {
                return pickReg(mask)
        }
 
-       // Pick a value to spill.  Spill the value with the
+       // Pick a value to spill. Spill the value with the
        // farthest-in-the-future use.
        // TODO: Prefer registers with already spilled Values?
        // TODO: Modify preference using affinity graph.
        // TODO: if a single value is in multiple registers, spill one of them
        // before spilling a value in just a single register.
 
-       // SP and SB are allocated specially.  No regular value should
+       // SP and SB are allocated specially. No regular value should
        // be allocated to them.
        mask &^= 1<<4 | 1<<32
 
-       // Find a register to spill.  We spill the register containing the value
+       // Find a register to spill. We spill the register containing the value
        // whose next use is as far in the future as possible.
        // https://en.wikipedia.org/wiki/Page_replacement_algorithm#The_theoretically_optimal_page_replacement_algorithm
        var r register
@@ -378,7 +378,7 @@ func (s *regAllocState) allocReg(v *Value, mask regMask) register {
                v := s.regs[t].v
                if n := s.values[v.ID].uses.dist; n > maxuse {
                        // v's next use is farther in the future than any value
-                       // we've seen so far.  A new best spill candidate.
+                       // we've seen so far. A new best spill candidate.
                        r = t
                        maxuse = n
                }
@@ -476,7 +476,7 @@ func (s *regAllocState) init(f *Func) {
        }
        s.computeLive()
 
-       // Compute block order.  This array allows us to distinguish forward edges
+       // Compute block order. This array allows us to distinguish forward edges
        // from backward edges and compute how far they go.
        blockOrder := make([]int32, f.NumBlocks())
        for i, b := range f.Blocks {
@@ -589,7 +589,7 @@ func (s *regAllocState) regalloc(f *Func) {
                        liveSet.remove(v.ID)
                        if v.Op == OpPhi {
                                // Remove v from the live set, but don't add
-                               // any inputs.  This is the state the len(b.Preds)>1
+                               // any inputs. This is the state the len(b.Preds)>1
                                // case below desires; it wants to process phis specially.
                                continue
                        }
@@ -653,7 +653,7 @@ func (s *regAllocState) regalloc(f *Func) {
                                }
                        }
                } else {
-                       // This is the complicated case.  We have more than one predecessor,
+                       // This is the complicated case. We have more than one predecessor,
                        // which means we may have Phi ops.
 
                        // Copy phi ops into new schedule.
@@ -674,7 +674,7 @@ func (s *regAllocState) regalloc(f *Func) {
                                }
                        }
 
-                       // Decide on registers for phi ops.  Use the registers determined
+                       // 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?
@@ -728,7 +728,7 @@ func (s *regAllocState) regalloc(f *Func) {
                                }
                        }
 
-                       // Set registers for phis.  Add phi spill code.
+                       // Set registers for phis. Add phi spill code.
                        for i, v := range phis {
                                if !s.values[v.ID].needReg {
                                        continue
@@ -861,8 +861,8 @@ func (s *regAllocState) regalloc(f *Func) {
                                continue
                        }
                        if v.Op == OpArg {
-                               // Args are "pre-spilled" values.  We don't allocate
-                               // any register here.  We just set up the spill pointer to
+                               // Args are "pre-spilled" values. We don't allocate
+                               // any register here. We just set up the spill pointer to
                                // point at itself and any later user will restore it to use it.
                                s.values[v.ID].spill = v
                                s.values[v.ID].spillUsed = true // use is guaranteed
@@ -886,7 +886,7 @@ func (s *regAllocState) regalloc(f *Func) {
                                continue
                        }
 
-                       // Move arguments to registers.  Process in an ordering defined
+                       // Move arguments to registers. Process in an ordering defined
                        // by the register specification (most constrained first).
                        args = append(args[:0], v.Args...)
                        for _, i := range regspec.inputs {
@@ -926,7 +926,7 @@ func (s *regAllocState) regalloc(f *Func) {
                        }
                        b.Values = append(b.Values, v)
 
-                       // Issue a spill for this value.  We issue spills unconditionally,
+                       // Issue a spill for this value. We issue spills unconditionally,
                        // then at the end of regalloc delete the ones we never use.
                        // TODO: schedule the spill at a point that dominates all restores.
                        // The restore may be off in an unlikely branch somewhere and it
@@ -1002,7 +1002,7 @@ func (s *regAllocState) regalloc(f *Func) {
 
                // If a value is live at the end of the block and
                // isn't in a register, remember that its spill location
-               // is live.  We need to remember this information so that
+               // is live. We need to remember this information so that
                // the liveness analysis in stackalloc is correct.
                for _, e := range s.live[b.ID] {
                        if s.values[e.ID].regs != 0 {
@@ -1201,7 +1201,7 @@ func (e *edgeState) process() {
                        }
                }
                if i < len(dsts) {
-                       // Made some progress.  Go around again.
+                       // Made some progress. Go around again.
                        dsts = dsts[:i]
 
                        // Append any extras destinations we generated.
@@ -1210,7 +1210,7 @@ func (e *edgeState) process() {
                        continue
                }
 
-               // We made no progress.  That means that any
+               // We made no progress. That means that any
                // remaining unsatisfied moves are in simple cycles.
                // For example, A -> B -> C -> D -> A.
                //   A ----> B
@@ -1229,7 +1229,7 @@ func (e *edgeState) process() {
                // When we resume the outer loop, the A->B move can now proceed,
                // and eventually the whole cycle completes.
 
-               // Copy any cycle location to a temp register.  This duplicates
+               // Copy any cycle location to a temp register. This duplicates
                // one of the cycle entries, allowing the just duplicated value
                // to be overwritten and the cycle to proceed.
                loc := dsts[0].loc
@@ -1248,7 +1248,7 @@ func (e *edgeState) process() {
        }
 }
 
-// processDest generates code to put value vid into location loc.  Returns true
+// processDest generates code to put value vid into location loc. Returns true
 // if progress was made.
 func (e *edgeState) processDest(loc Location, vid ID, splice **Value) bool {
        occupant := e.contents[loc]
@@ -1258,7 +1258,7 @@ func (e *edgeState) processDest(loc Location, vid ID, splice **Value) bool {
                if splice != nil {
                        *splice = occupant.c
                }
-               // Note: if splice==nil then c will appear dead.  This is
+               // Note: if splice==nil then c will appear dead. This is
                // non-SSA formed code, so be careful after this pass not to run
                // deadcode elimination.
                return true
@@ -1306,7 +1306,7 @@ func (e *edgeState) processDest(loc Location, vid ID, splice **Value) bool {
                if dstReg {
                        x = v.copyInto(e.p)
                } else {
-                       // Rematerialize into stack slot.  Need a free
+                       // Rematerialize into stack slot. Need a free
                        // register to accomplish this.
                        e.erase(loc) // see pre-clobber comment below
                        r := e.findRegFor(v.Type)
@@ -1330,15 +1330,15 @@ func (e *edgeState) processDest(loc Location, vid ID, splice **Value) bool {
                        if dstReg {
                                x = e.p.NewValue1(c.Line, OpLoadReg, c.Type, c)
                        } else {
-                               // mem->mem.  Use temp register.
+                               // mem->mem. Use temp register.
 
-                               // Pre-clobber destination.  This avoids the
+                               // Pre-clobber destination. This avoids the
                                // following situation:
                                //   - v is currently held in R0 and stacktmp0.
                                //   - We want to copy stacktmp1 to stacktmp0.
                                //   - We choose R0 as the temporary register.
                                // During the copy, both R0 and stacktmp0 are
-                               // clobbered, losing both copies of v.  Oops!
+                               // clobbered, losing both copies of v. Oops!
                                // Erasing the destination early means R0 will not
                                // be chosen as the temp register, as it will then
                                // be the last copy of v.
@@ -1438,7 +1438,7 @@ func (e *edgeState) findRegFor(typ Type) Location {
                m = e.s.compatRegs(e.s.f.Config.fe.TypeInt64())
        }
 
-       // Pick a register.  In priority order:
+       // Pick a register. In priority order:
        // 1) an unused register
        // 2) a non-unique register not holding a final value
        // 3) a non-unique register
@@ -1455,9 +1455,9 @@ func (e *edgeState) findRegFor(typ Type) Location {
                return &registers[pickReg(x)]
        }
 
-       // No register is available.  Allocate a temp location to spill a register to.
+       // No register is available. Allocate a temp location to spill a register to.
        // The type of the slot is immaterial - it will not be live across
-       // any safepoint.  Just use a type big enough to hold any register.
+       // any safepoint. Just use a type big enough to hold any register.
        typ = e.s.f.Config.fe.TypeInt64()
        t := LocalSlot{e.s.f.Config.fe.Auto(typ), typ, 0}
        // TODO: reuse these slots.
@@ -1471,7 +1471,7 @@ func (e *edgeState) findRegFor(typ Type) Location {
                                if regDebug {
                                        fmt.Printf("  SPILL %s->%s %s\n", r.Name(), t.Name(), x.LongString())
                                }
-                               // r will now be overwritten by the caller.  At some point
+                               // r will now be overwritten by the caller. At some point
                                // later, the newly saved value will be moved back to its
                                // final destination in processDest.
                                return r
@@ -1508,10 +1508,10 @@ type liveInfo struct {
 }
 
 // computeLive computes a map from block ID to a list of value IDs live at the end
-// of that block.  Together with the value ID is a count of how many instructions
-// to the next use of that value.  The resulting map is stored at s.live.
+// of that block. Together with the value ID is a count of how many instructions
+// to the next use of that value. The resulting map is stored at s.live.
 // TODO: this could be quadratic if lots of variables are live across lots of
-// basic blocks.  Figure out a way to make this function (or, more precisely, the user
+// basic blocks. Figure out a way to make this function (or, more precisely, the user
 // of this function) require only linear size & time.
 func (s *regAllocState) computeLive() {
        f := s.f
index 60509d214e962f87a3ad797df4bc83402823bfd4..86f3c2010e1131d65eb2fd47c0f9e3497bcd512d 100644 (file)
@@ -105,7 +105,7 @@ func addOff(x, y int64) int64 {
        return z
 }
 
-// mergeSym merges two symbolic offsets.  There is no real merging of
+// mergeSym merges two symbolic offsets. There is no real merging of
 // offsets, we just pick the non-nil one.
 func mergeSym(x, y interface{}) interface{} {
        if x == nil {
index dd0a42a5dd310c260ad218ea01aeceb5f1ade741..f47f93c5c00343933603ce7663da1f83f73bbb9e 100644 (file)
@@ -15,10 +15,10 @@ const (
        ScoreCount // not a real score
 )
 
-// Schedule the Values in each Block.  After this phase returns, the
+// Schedule the Values in each Block. After this phase returns, the
 // order of b.Values matters and is the order in which those values
-// will appear in the assembly output.  For now it generates a
-// reasonable valid schedule using a priority queue.  TODO(khr):
+// will appear in the assembly output. For now it generates a
+// reasonable valid schedule using a priority queue. TODO(khr):
 // schedule smarter.
 func schedule(f *Func) {
        // For each value, the number of times it is used in the block
@@ -28,7 +28,7 @@ func schedule(f *Func) {
        // "priority" for a value
        score := make([]uint8, f.NumValues())
 
-       // scheduling order.  We queue values in this list in reverse order.
+       // scheduling order. We queue values in this list in reverse order.
        var order []*Value
 
        // priority queue of legally schedulable (0 unscheduled uses) values
@@ -36,7 +36,7 @@ func schedule(f *Func) {
 
        // maps mem values to the next live memory value
        nextMem := make([]*Value, f.NumValues())
-       // additional pretend arguments for each Value.  Used to enforce load/store ordering.
+       // additional pretend arguments for each Value. Used to enforce load/store ordering.
        additionalArgs := make([][]*Value, f.NumValues())
 
        for _, b := range f.Blocks {
@@ -77,12 +77,12 @@ func schedule(f *Func) {
                                uses[v.ID]++
                        }
                }
-               // Compute score.  Larger numbers are scheduled closer to the end of the block.
+               // Compute score. Larger numbers are scheduled closer to the end of the block.
                for _, v := range b.Values {
                        switch {
                        case v.Op == OpAMD64LoweredGetClosurePtr:
                                // We also score GetLoweredClosurePtr as early as possible to ensure that the
-                               // context register is not stomped.  GetLoweredClosurePtr should only appear
+                               // context register is not stomped. GetLoweredClosurePtr should only appear
                                // in the entry block where there are no phi functions, so there is no
                                // conflict or ambiguity here.
                                if b != f.Entry {
@@ -96,8 +96,8 @@ func schedule(f *Func) {
                                // We want all the vardefs next.
                                score[v.ID] = ScoreVarDef
                        case v.Type.IsMemory():
-                               // Schedule stores as early as possible.  This tends to
-                               // reduce register pressure.  It also helps make sure
+                               // Schedule stores as early as possible. This tends to
+                               // reduce register pressure. It also helps make sure
                                // VARDEF ops are scheduled before the corresponding LEA.
                                score[v.ID] = ScoreMemory
                        case v.Type.IsFlags():
@@ -117,7 +117,7 @@ func schedule(f *Func) {
                        // Schedule values dependent on the control value at the end.
                        // This reduces the number of register spills. We don't find
                        // all values that depend on the control, just values with a
-                       // direct dependency.  This is cheaper and in testing there
+                       // direct dependency. This is cheaper and in testing there
                        // was no difference in the number of spills.
                        for _, v := range b.Values {
                                if v.Op != OpPhi {
index 9a08f35d9d2617cf486f1dc042c6504cee93695a..cae91e7ddbf4cb3cc593261befe58dd9e0fe9f8a 100644 (file)
@@ -99,7 +99,7 @@ func (t sparseTree) numberBlock(b *Block, n int32) int32 {
 // Sibling returns a sibling of x in the dominator tree (i.e.,
 // a node with the same immediate dominator) or nil if there
 // are no remaining siblings in the arbitrary but repeatable
-// order chosen.  Because the Child-Sibling order is used
+// order chosen. Because the Child-Sibling order is used
 // to assign entry and exit numbers in the treewalk, those
 // numbers are also consistent with this order (i.e.,
 // Sibling(x) has entry number larger than x's exit number).
@@ -108,7 +108,7 @@ func (t sparseTree) Sibling(x *Block) *Block {
 }
 
 // Child returns a child of x in the dominator tree, or
-// nil if there are none.  The choice of first child is
+// nil if there are none. The choice of first child is
 // arbitrary but repeatable.
 func (t sparseTree) Child(x *Block) *Block {
        return t[x.ID].child
index 0e6cae09242d628abd14c0d548c871f1c0191e30..ef8a5846b0248dc4c4afbeb850406b2a9ddde75e 100644 (file)
@@ -91,8 +91,8 @@ func (s *stackAllocState) stackalloc() {
 
        // For each type, we keep track of all the stack slots we
        // have allocated for that type.
-       // TODO: share slots among equivalent types.  We would need to
-       // only share among types with the same GC signature.  See the
+       // TODO: share slots among equivalent types. We would need to
+       // only share among types with the same GC signature. See the
        // type.Equal calls below for where this matters.
        locations := map[Type][]LocalSlot{}
 
@@ -177,7 +177,7 @@ func (s *stackAllocState) stackalloc() {
 // computeLive computes a map from block ID to a list of
 // stack-slot-needing value IDs live at the end of that block.
 // TODO: this could be quadratic if lots of variables are live across lots of
-// basic blocks.  Figure out a way to make this function (or, more precisely, the user
+// basic blocks. Figure out a way to make this function (or, more precisely, the user
 // of this function) require only linear size & time.
 func (s *stackAllocState) computeLive(spillLive [][]ID) {
        s.live = make([][]ID, s.f.NumBlocks())
@@ -206,7 +206,7 @@ func (s *stackAllocState) computeLive(spillLive [][]ID) {
                                if v.Op == OpPhi {
                                        // Save phi for later.
                                        // Note: its args might need a stack slot even though
-                                       // the phi itself doesn't.  So don't use needSlot.
+                                       // the phi itself doesn't. So don't use needSlot.
                                        if !v.Type.IsMemory() && !v.Type.IsVoid() {
                                                phis = append(phis, v)
                                        }
@@ -299,7 +299,7 @@ func (s *stackAllocState) buildInterferenceGraph() {
                        if v.Op == OpArg && s.values[v.ID].needSlot {
                                // OpArg is an input argument which is pre-spilled.
                                // We add back v.ID here because we want this value
-                               // to appear live even before this point.  Being live
+                               // to appear live even before this point. Being live
                                // all the way to the start of the entry block prevents other
                                // values from being allocated to the same slot and clobbering
                                // the input value before we have a chance to load it.
index cc8c9fe87179a0e7ac4155f62cba431665cb77be..3ec788355d995f0eb9609217c855d07210d80239 100644 (file)
@@ -10,21 +10,21 @@ import (
 )
 
 // A Value represents a value in the SSA representation of the program.
-// The ID and Type fields must not be modified.  The remainder may be modified
+// The ID and Type fields must not be modified. The remainder may be modified
 // if they preserve the value of the Value (e.g. changing a (mul 2 x) to an (add x x)).
 type Value struct {
-       // A unique identifier for the value.  For performance we allocate these IDs
+       // A unique identifier for the value. For performance we allocate these IDs
        // densely starting at 1.  There is no guarantee that there won't be occasional holes, though.
        ID ID
 
-       // The operation that computes this value.  See op.go.
+       // The operation that computes this value. See op.go.
        Op Op
 
-       // The type of this value.  Normally this will be a Go type, but there
+       // The type of this value. Normally this will be a Go type, but there
        // are a few other pseudo-types, see type.go.
        Type Type
 
-       // Auxiliary info for this value.  The type of this information depends on the opcode and type.
+       // Auxiliary info for this value. The type of this information depends on the opcode and type.
        // AuxInt is used for integer values, Aux is used for other values.
        AuxInt int64
        Aux    interface{}
@@ -49,7 +49,7 @@ type Value struct {
 //  OpConst      int64      0    int64 constant
 //  OpAddcq      int64      1    amd64 op: v = arg[0] + constant
 
-// short form print.  Just v#.
+// short form print. Just v#.
 func (v *Value) String() string {
        if v == nil {
                return "nil" // should never happen, but not panicking helps with debugging
index 7e40a32db32faa4c8524399f3222ebf547e5e6e5..8bb7d371a37ccb7f2b86c5ed3b0b3b27989b0f38 100644 (file)
@@ -95,7 +95,7 @@ func cgen64(n *gc.Node, res *gc.Node) {
                split64(r, &lo2, &hi2)
        }
 
-       // Do op.  Leave result in DX:AX.
+       // Do op. Leave result in DX:AX.
        switch n.Op {
        // TODO: Constants
        case gc.OADD:
index 98595716cfa3935f8e5f289592eb17f57d4aca27..4fd6680cb4ddc2243facd05c4428b7c8576f01cd 100644 (file)
@@ -1511,7 +1511,7 @@ func floatmove_387(f *gc.Node, t *gc.Node) {
                // The way the code generator uses floating-point
        // registers, a move from F0 to F0 is intended as a no-op.
        // On the x86, it's not: it pushes a second copy of F0
-       // on the floating point stack.  So toss it away here.
+       // on the floating point stack. So toss it away here.
        // Also, F0 is the *only* register we ever evaluate
        // into, so we should only see register/register as F0/F0.
        /*
index 239e9cc35f9f45ede7916e70c791eac0f809f8ac..b9f05d3b472e29fa4e3197454f216864883fb6e4 100644 (file)
@@ -221,7 +221,7 @@ loop1:
        // MOVSD removal.
        // We never use packed registers, so a MOVSD between registers
        // can be replaced by MOVAPD, which moves the pair of float64s
-       // instead of just the lower one.  We only use the lower one, but
+       // instead of just the lower one. We only use the lower one, but
        // the processor can do better if we do moves using both.
        for r := g.Start; r != nil; r = r.Link {
                p = r.Prog
index c5d16826516ab92538316d14d3dd81b95d05ad16..46495950e98f53c57ae72d9ff6bbbea7a13da5cd 100644 (file)
@@ -311,8 +311,8 @@ func (f *File) addImport(path string) string {
 var slashslash = []byte("//")
 
 // initialComments returns the prefix of content containing only
-// whitespace and line comments.  Any +build directives must appear
-// within this region.  This approach is more reliable than using
+// whitespace and line comments. Any +build directives must appear
+// within this region. This approach is more reliable than using
 // go/printer to print a modified AST containing comments.
 //
 func initialComments(content []byte) []byte {
index a8c43495c37804627b60022883e81563b5d41848..e0e2ba1e3b64256c2e579ea7e7ab2305fd5b3b05 100644 (file)
@@ -284,7 +284,7 @@ func findgoversion() string {
        }
 
        // The $GOROOT/VERSION.cache file is a cache to avoid invoking
-       // git every time we run this command.  Unlike VERSION, it gets
+       // git every time we run this command. Unlike VERSION, it gets
        // deleted by the clean command.
        path = pathf("%s/VERSION.cache", goroot)
        if isfile(path) {
@@ -399,8 +399,8 @@ func setup() {
 
        // Create object directory.
        // We keep it in pkg/ so that all the generated binaries
-       // are in one tree.  If pkg/obj/libgc.a exists, it is a dreg from
-       // before we used subdirectories of obj.  Delete all of obj
+       // are in one tree. If pkg/obj/libgc.a exists, it is a dreg from
+       // before we used subdirectories of obj. Delete all of obj
        // to clean up.
        if p := pathf("%s/pkg/obj/libgc.a", goroot); isfile(p) {
                xremoveall(pathf("%s/pkg/obj", goroot))
index 17dc01544865a297d048690f824b5e333b02d1b2..d696beb5b39258628f5a6df980187e792e5bbdb0 100644 (file)
@@ -82,7 +82,7 @@ func mkzbootstrap(file string) {
 }
 
 // stackGuardMultiplier returns a multiplier to apply to the default
-// stack guard size.  Larger multipliers are used for non-optimized
+// stack guard size. Larger multipliers are used for non-optimized
 // builds that have larger stack frames.
 func stackGuardMultiplier() int {
        for _, s := range strings.Split(os.Getenv("GO_GCFLAGS"), " ") {
index 25ccfff015e58f363b8426a25d18a38a95f6f701..5406745ffc0442f9e9c578378de934e57a067485 100644 (file)
@@ -378,7 +378,7 @@ func (t *tester) registerTests() {
        })
 
        // Test that internal linking of standard packages does not
-       // require libgcc.  This ensures that we can install a Go
+       // require libgcc. This ensures that we can install a Go
        // release on a system that does not have a C compiler
        // installed and still build Go programs (that don't use cgo).
        for _, pkg := range cgoPackages {
index dc10d6beb526d892d3dec26c20063b3732208462..8b62346595fc21bb1cd8b882ad9e34cf6d2622e8 100644 (file)
@@ -168,7 +168,7 @@ func processFile(filename string, useStdin bool) error {
 
        // Print AST.  We did that after each fix, so this appears
        // redundant, but it is necessary to generate gofmt-compatible
-       // source code in a few cases.  The official gofmt style is the
+       // source code in a few cases. The official gofmt style is the
        // output of the printer run on a standard AST generated by the parser,
        // but the source we generated inside the loop above is the
        // output of the printer run on a mangled AST generated by a fixer.
index 391afbbc051b1f520fcb6458d79af606ee769c81..0352c49db0fe8010b19d5711cf2c244f60a33eba 100644 (file)
@@ -18,9 +18,9 @@ import (
 // The fact that it is partial is very important: the input is
 // an AST and a description of some type information to
 // assume about one or more packages, but not all the
-// packages that the program imports.  The checker is
+// packages that the program imports. The checker is
 // expected to do as much as it can with what it has been
-// given.  There is not enough information supplied to do
+// given. There is not enough information supplied to do
 // a full type check, but the type checker is expected to
 // apply information that can be derived from variable
 // declarations, function and method returns, and type switches
@@ -30,14 +30,14 @@ import (
 // TODO(rsc,gri): Replace with go/typechecker.
 // Doing that could be an interesting test case for go/typechecker:
 // the constraints about working with partial information will
-// likely exercise it in interesting ways.  The ideal interface would
+// likely exercise it in interesting ways. The ideal interface would
 // be to pass typecheck a map from importpath to package API text
 // (Go source code), but for now we use data structures (TypeConfig, Type).
 //
 // The strings mostly use gofmt form.
 //
 // A Field or FieldList has as its type a comma-separated list
-// of the types of the fields.  For example, the field list
+// of the types of the fields. For example, the field list
 //     x, y, z int
 // has type "int, int, int".
 
@@ -242,7 +242,7 @@ func typecheck1(cfg *TypeConfig, f interface{}, typeof map[interface{}]string, a
                // propagate the type to all the uses.
                // The !isDecl case is a cheat here, but it makes
                // up in some cases for not paying attention to
-               // struct fields.  The real type checker will be
+               // struct fields. The real type checker will be
                // more accurate so we won't need the cheat.
                if id, ok := n.(*ast.Ident); ok && id.Obj != nil && (isDecl || typeof[id.Obj] == "") {
                        typeof[id.Obj] = typ
@@ -367,7 +367,7 @@ func typecheck1(cfg *TypeConfig, f interface{}, typeof map[interface{}]string, a
                        typeof[n] = all
 
                case *ast.ValueSpec:
-                       // var declaration.  Use type if present.
+                       // var declaration. Use type if present.
                        if n.Type != nil {
                                t := typeof[n.Type]
                                if !isType(t) {
@@ -586,7 +586,7 @@ func typecheck1(cfg *TypeConfig, f interface{}, typeof map[interface{}]string, a
 
 // Convert between function type strings and lists of types.
 // Using strings makes this a little harder, but it makes
-// a lot of the rest of the code easier.  This will all go away
+// a lot of the rest of the code easier. This will all go away
 // when we can use go/typechecker directly.
 
 // splitFunc splits "func(x,y,z) (a,b,c)" into ["x", "y", "z"] and ["a", "b", "c"].
index 8bb73765daa40526de885e60256b0b0b8b0a6c18..5977828a3a183c2ecfe7cff3596ce86899926d0d 100644 (file)
@@ -517,7 +517,7 @@ func isMetaPackage(name string) bool {
 }
 
 // libname returns the filename to use for the shared library when using
-// -buildmode=shared.  The rules we use are:
+// -buildmode=shared. The rules we use are:
 // Use arguments for special 'meta' packages:
 //     std --> libstd.so
 //     std cmd --> libstd,cmd.so
@@ -788,7 +788,7 @@ func goFilesPackage(gofiles []string) *Package {
 
        // Synthesize fake "directory" that only shows the named files,
        // to make it look like this is a standard package or
-       // command directory.  So that local imports resolve
+       // command directory. So that local imports resolve
        // consistently, the files must all be in the same directory.
        var dirent []os.FileInfo
        var dir string
@@ -950,7 +950,7 @@ func (b *builder) action1(mode buildMode, depMode buildMode, p *Package, looksha
        // If we are not doing a cross-build, then record the binary we'll
        // generate for cgo as a dependency of the build of any package
        // using cgo, to make sure we do not overwrite the binary while
-       // a package is using it.  If this is a cross-build, then the cgo we
+       // a package is using it. If this is a cross-build, then the cgo we
        // are writing is not the cgo we need to use.
        if goos == runtime.GOOS && goarch == runtime.GOARCH && !buildRace && !buildMSan {
                if (len(p.CgoFiles) > 0 || p.Standard && p.ImportPath == "runtime/cgo") && !buildLinkshared && buildBuildmode != "shared" {
@@ -986,7 +986,7 @@ func (b *builder) action1(mode buildMode, depMode buildMode, p *Package, looksha
        }
 
        if p.local && p.target == "" {
-               // Imported via local path.  No permanent target.
+               // Imported via local path. No permanent target.
                mode = modeBuild
        }
        work := p.pkgdir
@@ -1034,7 +1034,7 @@ func (b *builder) action1(mode buildMode, depMode buildMode, p *Package, looksha
                        // the name will show up in ps listings. If the caller has specified
                        // a name, use that instead of a.out. The binary is generated
                        // in an otherwise empty subdirectory named exe to avoid
-                       // naming conflicts.  The only possible conflict is if we were
+                       // naming conflicts. The only possible conflict is if we were
                        // to create a top-level package named exe.
                        name := "a.out"
                        if p.exeName != "" {
@@ -1224,10 +1224,10 @@ func (b *builder) do(root *action) {
        // The original implementation here was a true queue
        // (using a channel) but it had the effect of getting
        // distracted by low-level leaf actions to the detriment
-       // of completing higher-level actions.  The order of
+       // of completing higher-level actions. The order of
        // work does not matter much to overall execution time,
        // but when running "go test std" it is nice to see each test
-       // results as soon as possible.  The priorities assigned
+       // results as soon as possible. The priorities assigned
        // ensure that, all else being equal, the execution prefers
        // to do what it would have done first in a simple depth-first
        // dependency order traversal.
@@ -1547,7 +1547,7 @@ func (b *builder) build(a *action) (err error) {
 
        // NOTE(rsc): On Windows, it is critically important that the
        // gcc-compiled objects (cgoObjects) be listed after the ordinary
-       // objects in the archive.  I do not know why this is.
+       // objects in the archive. I do not know why this is.
        // https://golang.org/issue/2601
        objects = append(objects, cgoObjects...)
 
@@ -1653,7 +1653,7 @@ func (b *builder) install(a *action) (err error) {
        }
 
        // remove object dir to keep the amount of
-       // garbage down in a large build.  On an operating system
+       // garbage down in a large build. On an operating system
        // with aggressive buffering, cleaning incrementally like
        // this keeps the intermediate objects from hitting the disk.
        if !buildWork {
@@ -1798,7 +1798,7 @@ func (b *builder) copyFile(a *action, dst, src string, perm os.FileMode, force b
        df, err := os.OpenFile(dst, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, perm)
        if err != nil && toolIsWindows {
                // Windows does not allow deletion of a binary file
-               // while it is executing.  Try to move it out of the way.
+               // while it is executing. Try to move it out of the way.
                // If the move fails, which is likely, we'll try again the
                // next time we do an install of this binary.
                if err := os.Rename(dst, dst+"~"); err == nil {
@@ -1928,7 +1928,7 @@ func (b *builder) showcmd(dir string, format string, args ...interface{}) {
 // The output is expected to contain references to 'dir', usually
 // the source directory for the package that has failed to build.
 // showOutput rewrites mentions of dir with a relative path to dir
-// when the relative path is shorter.  This is usually more pleasant.
+// when the relative path is shorter. This is usually more pleasant.
 // For example, if fmt doesn't compile and we are in src/html,
 // the output is
 //
@@ -1986,7 +1986,7 @@ func relPaths(paths []string) []string {
 // errPrintedOutput is a special error indicating that a command failed
 // but that it generated output as well, and that output has already
 // been printed, so there's no point showing 'exit status 1' or whatever
-// the wait status was.  The main executor, builder.do, knows not to
+// the wait status was. The main executor, builder.do, knows not to
 // print this error.
 var errPrintedOutput = errors.New("already printed output - no need to show error")
 
@@ -2055,7 +2055,7 @@ func (b *builder) runOut(dir string, desc string, env []string, cmdargs ...inter
                err := cmd.Run()
 
                // cmd.Run will fail on Unix if some other process has the binary
-               // we want to run open for writing.  This can happen here because
+               // we want to run open for writing. This can happen here because
                // we build and install the cgo command and then run it.
                // If another command was kicked off while we were writing the
                // cgo binary, the child process for that command may be holding
@@ -2067,27 +2067,27 @@ func (b *builder) runOut(dir string, desc string, env []string, cmdargs ...inter
                // The answer is that running a command is fork and exec.
                // A child forked while the cgo fd is open inherits that fd.
                // Until the child has called exec, it holds the fd open and the
-               // kernel will not let us run cgo.  Even if the child were to close
+               // kernel will not let us run cgo. Even if the child were to close
                // the fd explicitly, it would still be open from the time of the fork
                // until the time of the explicit close, and the race would remain.
                //
                // On Unix systems, this results in ETXTBSY, which formats
                // as "text file busy".  Rather than hard-code specific error cases,
-               // we just look for that string.  If this happens, sleep a little
-               // and try again.  We let this happen three times, with increasing
+               // we just look for that string. If this happens, sleep a little
+               // and try again. We let this happen three times, with increasing
                // sleep lengths: 100+200+400 ms = 0.7 seconds.
                //
                // An alternate solution might be to split the cmd.Run into
                // separate cmd.Start and cmd.Wait, and then use an RWLock
                // to make sure that copyFile only executes when no cmd.Start
-               // call is in progress.  However, cmd.Start (really syscall.forkExec)
+               // call is in progress. However, cmd.Start (really syscall.forkExec)
                // only guarantees that when it returns, the exec is committed to
-               // happen and succeed.  It uses a close-on-exec file descriptor
+               // happen and succeed. It uses a close-on-exec file descriptor
                // itself to determine this, so we know that when cmd.Start returns,
                // at least one close-on-exec file descriptor has been closed.
                // However, we cannot be sure that all of them have been closed,
                // so the program might still encounter ETXTBSY even with such
-               // an RWLock.  The race window would be smaller, perhaps, but not
+               // an RWLock. The race window would be smaller, perhaps, but not
                // guaranteed to be gone.
                //
                // Sleeping when we observe the race seems to be the most reliable
@@ -2137,7 +2137,7 @@ func (b *builder) mkdir(dir string) error {
        b.exec.Lock()
        defer b.exec.Unlock()
        // We can be a little aggressive about being
-       // sure directories exist.  Skip repeated calls.
+       // sure directories exist. Skip repeated calls.
        if b.mkdirCache[dir] {
                return nil
        }
@@ -2745,7 +2745,7 @@ func (tools gccgoToolchain) ld(b *builder, root *action, out string, allactions
                // initialization code.
                //
                // The user remains responsible for linking against
-               // -lgo -lpthread -lm in the final link.  We can't use
+               // -lgo -lpthread -lm in the final link. We can't use
                // -r to pick them up because we can't combine
                // split-stack and non-split-stack code in a single -r
                // link, and libgo picks up non-split-stack code from
@@ -3183,7 +3183,7 @@ func (b *builder) cgo(p *Package, cgoExe, obj string, pcCFLAGS, pcLDFLAGS, cgofi
                case strings.HasPrefix(f, "-fsanitize="):
                        continue
                // runpath flags not applicable unless building a shared
-               // object or executable; see issue 12115 for details.  This
+               // object or executable; see issue 12115 for details. This
                // is necessary as Go currently does not offer a way to
                // specify the set of LDFLAGS that only apply to shared
                // objects.
@@ -3534,12 +3534,12 @@ func (b *builder) swigOne(p *Package, file, obj string, pcCFLAGS []string, cxx b
 
 // disableBuildID adjusts a linker command line to avoid creating a
 // build ID when creating an object file rather than an executable or
-// shared library.  Some systems, such as Ubuntu, always add
+// shared library. Some systems, such as Ubuntu, always add
 // --build-id to every link, but we don't want a build ID when we are
-// producing an object file.  On some of those system a plain -r (not
+// producing an object file. On some of those system a plain -r (not
 // -Wl,-r) will turn off --build-id, but clang 3.0 doesn't support a
-// plain -r.  I don't know how to turn off --build-id when using clang
-// other than passing a trailing --build-id=none.  So that is what we
+// plain -r. I don't know how to turn off --build-id when using clang
+// other than passing a trailing --build-id=none. So that is what we
 // do, but only on systems likely to support it, which is to say,
 // systems that normally use gold or the GNU linker.
 func (b *builder) disableBuildID(ldflags []string) []string {
index 9bf45da78f2b6b1a199986ea03f3732485781c81..56a34c0b1b85618d577cf020cbda309bffa0cd5e 100644 (file)
@@ -112,7 +112,7 @@ func runGet(cmd *Command, args []string) {
 
        // Code we downloaded and all code that depends on it
        // needs to be evicted from the package cache so that
-       // the information will be recomputed.  Instead of keeping
+       // the information will be recomputed. Instead of keeping
        // track of the reverse dependency information, evict
        // everything.
        for name := range packageCache {
@@ -142,7 +142,7 @@ func runGet(cmd *Command, args []string) {
 }
 
 // downloadPaths prepares the list of paths to pass to download.
-// It expands ... patterns that can be expanded.  If there is no match
+// It expands ... patterns that can be expanded. If there is no match
 // for a particular pattern, downloadPaths leaves it in the result list,
 // in the hope that we can figure out the repository from the
 // initial ...-free prefix.
@@ -153,7 +153,7 @@ func downloadPaths(args []string) []string {
                if strings.Contains(a, "...") {
                        var expand []string
                        // Use matchPackagesInFS to avoid printing
-                       // warnings.  They will be printed by the
+                       // warnings. They will be printed by the
                        // eventual call to importPaths instead.
                        if build.IsLocalImport(a) {
                                expand = matchPackagesInFS(a)
@@ -237,7 +237,7 @@ func download(arg string, parent *Package, stk *importStack, mode int) {
                        return
                }
 
-               // Warn that code.google.com is shutting down.  We
+               // Warn that code.google.com is shutting down. We
                // issue the warning here because this is where we
                // have the import stack.
                if strings.HasPrefix(p.ImportPath, "code.google.com") {
@@ -355,7 +355,7 @@ func downloadPackage(p *Package) error {
        }
 
        if p.build.SrcRoot != "" {
-               // Directory exists.  Look for checkout along path to src.
+               // Directory exists. Look for checkout along path to src.
                vcs, rootPath, err = vcsForDir(p)
                if err != nil {
                        return err
@@ -399,7 +399,7 @@ func downloadPackage(p *Package) error {
        }
 
        if p.build.SrcRoot == "" {
-               // Package not found.  Put in first directory of $GOPATH.
+               // Package not found. Put in first directory of $GOPATH.
                list := filepath.SplitList(buildContext.GOPATH)
                if len(list) == 0 {
                        return fmt.Errorf("cannot download, $GOPATH not set. For more details see: go help gopath")
@@ -430,7 +430,7 @@ func downloadPackage(p *Package) error {
                return fmt.Errorf("%s exists but is not a directory", meta)
        }
        if err != nil {
-               // Metadata directory does not exist.  Prepare to checkout new copy.
+               // Metadata directory does not exist. Prepare to checkout new copy.
                // Some version control tools require the target directory not to exist.
                // We require that too, just to avoid stepping on existing work.
                if _, err := os.Stat(root); err == nil {
index fab29503efdbab971d0776eedf36f42e8ca94f8e..aa0016ad1e54e658f13d759be24c3699741f7fcd 100644 (file)
@@ -109,7 +109,7 @@ func TestMain(m *testing.M) {
        os.Exit(r)
 }
 
-// The length of an mtime tick on this system.  This is an estimate of
+// The length of an mtime tick on this system. This is an estimate of
 // how long we need to sleep to ensure that the mtime of two files is
 // different.
 // We used to try to be clever but that didn't always work (see golang.org/issue/12205).
@@ -181,7 +181,7 @@ func (tg *testgoData) pwd() string {
        return wd
 }
 
-// cd changes the current directory to the named directory.  Note that
+// cd changes the current directory to the named directory. Note that
 // using this means that the test must not be run in parallel with any
 // other tests.
 func (tg *testgoData) cd(dir string) {
@@ -325,7 +325,7 @@ func (tg *testgoData) getStderr() string {
 }
 
 // doGrepMatch looks for a regular expression in a buffer, and returns
-// whether it is found.  The regular expression is matched against
+// whether it is found. The regular expression is matched against
 // each line separately, as with the grep command.
 func (tg *testgoData) doGrepMatch(match string, b *bytes.Buffer) bool {
        if !tg.ran {
@@ -341,7 +341,7 @@ func (tg *testgoData) doGrepMatch(match string, b *bytes.Buffer) bool {
 }
 
 // doGrep looks for a regular expression in a buffer and fails if it
-// is not found.  The name argument is the name of the output we are
+// is not found. The name argument is the name of the output we are
 // searching, "output" or "error".  The msg argument is logged on
 // failure.
 func (tg *testgoData) doGrep(match string, b *bytes.Buffer, name, msg string) {
@@ -375,7 +375,7 @@ func (tg *testgoData) grepBoth(match, msg string) {
 }
 
 // doGrepNot looks for a regular expression in a buffer and fails if
-// it is found.  The name and msg arguments are as for doGrep.
+// it is found. The name and msg arguments are as for doGrep.
 func (tg *testgoData) doGrepNot(match string, b *bytes.Buffer, name, msg string) {
        if tg.doGrepMatch(match, b) {
                tg.t.Log(msg)
@@ -440,8 +440,8 @@ func (tg *testgoData) grepCountBoth(match string) int {
 }
 
 // creatingTemp records that the test plans to create a temporary file
-// or directory.  If the file or directory exists already, it will be
-// removed.  When the test completes, the file or directory will be
+// or directory. If the file or directory exists already, it will be
+// removed. When the test completes, the file or directory will be
 // removed if it exists.
 func (tg *testgoData) creatingTemp(path string) {
        if filepath.IsAbs(path) && !strings.HasPrefix(path, tg.tempdir) {
@@ -457,7 +457,7 @@ func (tg *testgoData) creatingTemp(path string) {
        tg.temps = append(tg.temps, path)
 }
 
-// makeTempdir makes a temporary directory for a run of testgo.  If
+// makeTempdir makes a temporary directory for a run of testgo. If
 // the temporary directory was already created, this does nothing.
 func (tg *testgoData) makeTempdir() {
        if tg.tempdir == "" {
@@ -1105,8 +1105,8 @@ func testMove(t *testing.T, vcs, url, base, config string) {
        }
        if vcs == "git" {
                // git will ask for a username and password when we
-               // run go get -d -f -u.  An empty username and
-               // password will work.  Prevent asking by setting
+               // run go get -d -f -u. An empty username and
+               // password will work. Prevent asking by setting
                // GIT_ASKPASS.
                tg.creatingTemp("sink" + exeSuffix)
                tg.tempFile("src/sink/sink.go", `package main; func main() {}`)
index f36d9f39aa1c033ea5a7c99998726d2c087f02a2..65cbab2b0db5ad135d13ca5e83d5a1a8756ed580 100644 (file)
@@ -339,7 +339,7 @@ func importPathsNoDotExpansion(args []string) []string {
        for _, a := range args {
                // Arguments are supposed to be import paths, but
                // as a courtesy to Windows developers, rewrite \ to /
-               // in command-line arguments.  Handles .\... and so on.
+               // in command-line arguments. Handles .\... and so on.
                if filepath.Separator == '\\' {
                        a = strings.Replace(a, `\`, `/`, -1)
                }
@@ -472,7 +472,7 @@ NextVar:
 }
 
 // matchPattern(pattern)(name) reports whether
-// name matches pattern.  Pattern is a limited glob
+// name matches pattern. Pattern is a limited glob
 // pattern in which '...' means 'any string' and there
 // is no other special syntax.
 func matchPattern(pattern string) func(name string) bool {
@@ -629,7 +629,7 @@ func matchPackages(pattern string) []string {
 
 // allPackagesInFS is like allPackages but is passed a pattern
 // beginning ./ or ../, meaning it should scan the tree rooted
-// at the given directory.  There are ... in the pattern too.
+// at the given directory. There are ... in the pattern too.
 func allPackagesInFS(pattern string) []string {
        pkgs := matchPackagesInFS(pattern)
        if len(pkgs) == 0 {
index 2f9db143dc5566f23483f8a55a6a2db8fac6e75c..ada8ddded47f2878990d7c86e37dd2b4846e8a22 100644 (file)
@@ -71,7 +71,7 @@ func readELFNote(filename, name string, typ int32) ([]byte, error) {
 var elfGoNote = []byte("Go\x00\x00")
 
 // The Go build ID is stored in a note described by an ELF PT_NOTE prog
-// header.  The caller has already opened filename, to get f, and read
+// header. The caller has already opened filename, to get f, and read
 // at least 4 kB out, in data.
 func readELFGoBuildID(filename string, f *os.File, data []byte) (buildid string, err error) {
        // Assume the note content is in the data, already read.
index 9de33f3521a412137081f7b7a6cf7a331263df89..8b0508894fe916b20b6495d6fdd5f4266ac6546d 100644 (file)
@@ -27,8 +27,8 @@ import (
 // A Package describes a single package found in a directory.
 type Package struct {
        // Note: These fields are part of the go command's public API.
-       // See list.go.  It is okay to add fields, but not to change or
-       // remove existing ones.  Keep in sync with list.go
+       // See list.go. It is okay to add fields, but not to change or
+       // remove existing ones. Keep in sync with list.go
        Dir           string `json:",omitempty"` // directory containing package sources
        ImportPath    string `json:",omitempty"` // import path of package in dir
        ImportComment string `json:",omitempty"` // path in import comment on package statement
@@ -208,7 +208,7 @@ func (p *PackageError) Error() string {
                return fmt.Sprintf("%s\npackage %s\n", p.Err, strings.Join(p.ImportStack, "\n\timports "))
        }
        if p.Pos != "" {
-               // Omit import stack.  The full path to the file where the error
+               // Omit import stack. The full path to the file where the error
                // is the most important thing.
                return p.Pos + ": " + p.Err
        }
@@ -267,8 +267,8 @@ func reloadPackage(arg string, stk *importStack) *Package {
 }
 
 // dirToImportPath returns the pseudo-import path we use for a package
-// outside the Go path.  It begins with _/ and then contains the full path
-// to the directory.  If the package lives in c:\home\gopher\my\pkg then
+// outside the Go path. It begins with _/ and then contains the full path
+// to the directory. If the package lives in c:\home\gopher\my\pkg then
 // the pseudo-import path is _/c_/home/gopher/my/pkg.
 // Using a pseudo-import path like this makes the ./ imports no longer
 // a special case, so that all the code to deal with ordinary imports works
@@ -472,7 +472,7 @@ func hasGoFiles(dir string) bool {
 }
 
 // reusePackage reuses package p to satisfy the import at the top
-// of the import stack stk.  If this use causes an import loop,
+// of the import stack stk. If this use causes an import loop,
 // reusePackage updates p's error information to record the loop.
 func reusePackage(p *Package, stk *importStack) *Package {
        // We use p.imports==nil to detect a package that
@@ -715,7 +715,7 @@ func expandScanner(err error) error {
                // Prepare error with \n before each message.
                // When printed in something like context: %v
                // this will put the leading file positions each on
-               // its own line.  It will also show all the errors
+               // its own line. It will also show all the errors
                // instead of just the first, as err.Error does.
                var buf bytes.Buffer
                for _, e := range err {
@@ -1356,8 +1356,8 @@ func isStale(p *Package) bool {
        }
 
        // A package without Go sources means we only found
-       // the installed .a file.  Since we don't know how to rebuild
-       // it, it can't be stale, even if -a is set.  This enables binary-only
+       // the installed .a file. Since we don't know how to rebuild
+       // it, it can't be stale, even if -a is set. This enables binary-only
        // distributions of Go packages, although such binaries are
        // only useful with the specific version of the toolchain that
        // created them.
@@ -1442,7 +1442,7 @@ func isStale(p *Package) bool {
        // As a courtesy to developers installing new versions of the compiler
        // frequently, define that packages are stale if they are
        // older than the compiler, and commands if they are older than
-       // the linker.  This heuristic will not work if the binaries are
+       // the linker. This heuristic will not work if the binaries are
        // back-dated, as some binary distributions may do, but it does handle
        // a very common case.
        // See issue 3036.
@@ -1564,7 +1564,7 @@ var cwd, _ = os.Getwd()
 var cmdCache = map[string]*Package{}
 
 // loadPackage is like loadImport but is used for command-line arguments,
-// not for paths found in import statements.  In addition to ordinary import paths,
+// not for paths found in import statements. In addition to ordinary import paths,
 // loadPackage accepts pseudo-paths beginning with cmd/ to denote commands
 // in the Go command directory, as well as paths to those directories.
 func loadPackage(arg string, stk *importStack) *Package {
@@ -1628,7 +1628,7 @@ func loadPackage(arg string, stk *importStack) *Package {
 // command line arguments 'args'.  If a named package
 // cannot be loaded at all (for example, if the directory does not exist),
 // then packages prints an error and does not include that
-// package in the results.  However, if errors occur trying
+// package in the results. However, if errors occur trying
 // to load dependencies of a named package, the named
 // package is still returned, with p.Incomplete = true
 // and details in p.DepsErrors.
index d9b0cac6a675906c5dd0f7eade0097ef521e01a4..18387b5eafab46ebe9072b79f6bfd4cb37ec992a 100644 (file)
@@ -128,7 +128,7 @@ func runRun(cmd *Command, args []string) {
 }
 
 // runProgram is the action for running a binary that has already
-// been compiled.  We ignore exit status.
+// been compiled. We ignore exit status.
 func (b *builder) runProgram(a *action) error {
        cmdline := stringList(findExecCmd(), a.deps[0].target, a.args)
        if buildN || buildX {
index 1996fc41837329a8ff5b3ff2faebb4562da56586..ca1a7d27224977f86d3f74f5d57f18aa87b35e1e 100644 (file)
@@ -388,7 +388,7 @@ func runTest(cmd *Command, args []string) {
        }
 
        // If a test timeout was given and is parseable, set our kill timeout
-       // to that timeout plus one minute.  This is a backup alarm in case
+       // to that timeout plus one minute. This is a backup alarm in case
        // the test wedges with a goroutine spinning and its background
        // timer does not get a chance to fire.
        if dt, err := time.ParseDuration(testTimeout); err == nil && dt > 0 {
@@ -691,7 +691,7 @@ func (b *builder) test(p *Package) (buildAction, runAction, printAction *action,
        // the usual place in the temporary tree, because then
        // other tests will see it as the real package.
        // Instead we make a _test directory under the import path
-       // and then repeat the import path there.  We tell the
+       // and then repeat the import path there. We tell the
        // compiler and linker to look in that _test directory first.
        //
        // That is, if the package under test is unicode/utf8,
index bda72f44f7d9198004b9dd69fe2dc0691c111af1..8d480d74fb5a69dcda63a24c1072c291d06a6303 100644 (file)
@@ -93,7 +93,7 @@ var vcsHg = &vcsCmd{
        downloadCmd: []string{"pull"},
 
        // We allow both tag and branch names as 'tags'
-       // for selecting a version.  This lets people have
+       // for selecting a version. This lets people have
        // a go.release.r60 branch and a go1 branch
        // and make changes in both, without constantly
        // editing .hgtags.
index f764b10ebb04540fce3aa5dd52ad64106bf3bb4d..cbc6983b6126c2561caf98467e773f6af11959bc 100644 (file)
@@ -28,9 +28,9 @@ func parse(fset *token.FileSet, filename string, src []byte, fragmentOk bool) (
 ) {
        // Try as whole source file.
        file, err = parser.ParseFile(fset, filename, src, parserMode)
-       // If there's no error, return.  If the error is that the source file didn't begin with a
+       // If there's no error, return. If the error is that the source file didn't begin with a
        // package line and source fragments are ok, fall through to
-       // try as a source fragment.  Stop and return on any other error.
+       // try as a source fragment. Stop and return on any other error.
        if err == nil || !fragmentOk || !strings.Contains(err.Error(), "expected 'package'") {
                return
        }
@@ -59,7 +59,7 @@ func parse(fset *token.FileSet, filename string, src []byte, fragmentOk bool) (
 
        // If this is a statement list, make it a source file
        // by inserting a package clause and turning the list
-       // into a function body.  This handles expressions too.
+       // into a function body. This handles expressions too.
        // Insert using a ;, not a newline, so that the line numbers
        // in fsrc match the ones in src. Add an extra '\n' before the '}'
        // to make sure comments are flushed before the '}'.
index 1eaeca6f1017cf4d31856e83b919fcb0a1f4481c..550492bf29a4b61160d86863e28b9db952b3355b 100644 (file)
@@ -158,7 +158,7 @@ func isWildcard(s string) bool {
 // recording wildcard submatches in m.
 // If m == nil, match checks whether pattern == val.
 func match(m map[string]reflect.Value, pattern, val reflect.Value) bool {
-       // Wildcard matches any expression.  If it appears multiple
+       // Wildcard matches any expression. If it appears multiple
        // times in the pattern, it must match the same expression
        // each time.
        if m != nil && pattern.IsValid() && pattern.Type() == identType {
index d75a16354cba9ac66913bbbd2f8544ff25050d50..9da33bc854b1212786f7d17a45c3c04f89abc00b 100644 (file)
@@ -2372,7 +2372,7 @@ func asmout(ctxt *obj.Link, p *obj.Prog, o *Optab, out []uint32) {
 
                // This is supposed to be something that stops execution.
        // It's not supposed to be reached, ever, but if it is, we'd
-       // like to be able to tell how we got there.  Assemble as
+       // like to be able to tell how we got there. Assemble as
        // 0xf7fabcfd which is guaranteed to raise undefined instruction
        // exception.
        case 96: /* UNDEF */
index f459483cce330d2480451749efc060d30597bace..ab0589495055da59f44403fa8d0bd3ca202c63ba 100644 (file)
@@ -1,14 +1,14 @@
 // cmd/7c/7.out.h  from Vita Nuova.
 // https://code.google.com/p/ken-cc/source/browse/src/cmd/7c/7.out.h
 //
-//     Copyright Â© 1994-1999 Lucent Technologies Inc.  All rights reserved.
+//     Copyright Â© 1994-1999 Lucent Technologies Inc. All rights reserved.
 //     Portions Copyright Â© 1995-1997 C H Forsyth (forsyth@terzarima.net)
 //     Portions Copyright Â© 1997-1999 Vita Nuova Limited
 //     Portions Copyright Â© 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
 //     Portions Copyright Â© 2004,2006 Bruce Ellis
 //     Portions Copyright Â© 2005-2007 C H Forsyth (forsyth@terzarima.net)
 //     Revisions Copyright Â© 2000-2007 Lucent Technologies Inc. and others
-//     Portions Copyright Â© 2009 The Go Authors.  All rights reserved.
+//     Portions Copyright Â© 2009 The Go Authors. All rights reserved.
 //
 // Permission is hereby granted, free of charge, to any person obtaining a copy
 // of this software and associated documentation files (the "Software"), to deal
@@ -167,7 +167,7 @@ const (
 )
 
 // Not registers, but flags that can be combined with regular register
-// constants to indicate extended register conversion.  When checking,
+// constants to indicate extended register conversion. When checking,
 // you should subtract obj.RBaseARM64 first. From this difference, bit 11
 // indicates extended register, bits 8-10 select the conversion mode.
 const REG_EXT = obj.RBaseARM64 + 1<<11
index 162acd255528719ecd250c5bedb1f67b226614ee..2b0a9cc287bf3a9fbd25d49deb10433fb27c0b3b 100644 (file)
@@ -1,14 +1,14 @@
 // cmd/7l/asm.c, cmd/7l/asmout.c, cmd/7l/optab.c, cmd/7l/span.c, cmd/ld/sub.c, cmd/ld/mod.c, from Vita Nuova.
 // https://code.google.com/p/ken-cc/source/browse/
 //
-//     Copyright Â© 1994-1999 Lucent Technologies Inc.  All rights reserved.
+//     Copyright Â© 1994-1999 Lucent Technologies Inc. All rights reserved.
 //     Portions Copyright Â© 1995-1997 C H Forsyth (forsyth@terzarima.net)
 //     Portions Copyright Â© 1997-1999 Vita Nuova Limited
 //     Portions Copyright Â© 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
 //     Portions Copyright Â© 2004,2006 Bruce Ellis
 //     Portions Copyright Â© 2005-2007 C H Forsyth (forsyth@terzarima.net)
 //     Revisions Copyright Â© 2000-2007 Lucent Technologies Inc. and others
-//     Portions Copyright Â© 2009 The Go Authors.  All rights reserved.
+//     Portions Copyright Â© 2009 The Go Authors. All rights reserved.
 //
 // Permission is hereby granted, free of charge, to any person obtaining a copy
 // of this software and associated documentation files (the "Software"), to deal
@@ -2811,7 +2811,7 @@ func asmout(ctxt *obj.Link, p *obj.Prog, o *Optab, out []uint32) {
 
        // This is supposed to be something that stops execution.
        // It's not supposed to be reached, ever, but if it is, we'd
-       // like to be able to tell how we got there.  Assemble as
+       // like to be able to tell how we got there. Assemble as
        // 0xbea71700 which is guaranteed to raise undefined instruction
        // exception.
        case 90:
index 53d67c91bbd462a6c3e0e471fb9fe83b01d286c2..36f544b53ad6c5c090c61864af2a1dad60a33362 100644 (file)
@@ -1,14 +1,14 @@
 // cmd/7l/list.c and cmd/7l/sub.c from Vita Nuova.
 // https://code.google.com/p/ken-cc/source/browse/
 //
-//     Copyright Â© 1994-1999 Lucent Technologies Inc.  All rights reserved.
+//     Copyright Â© 1994-1999 Lucent Technologies Inc. All rights reserved.
 //     Portions Copyright Â© 1995-1997 C H Forsyth (forsyth@terzarima.net)
 //     Portions Copyright Â© 1997-1999 Vita Nuova Limited
 //     Portions Copyright Â© 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
 //     Portions Copyright Â© 2004,2006 Bruce Ellis
 //     Portions Copyright Â© 2005-2007 C H Forsyth (forsyth@terzarima.net)
 //     Revisions Copyright Â© 2000-2007 Lucent Technologies Inc. and others
-//     Portions Copyright Â© 2009 The Go Authors.  All rights reserved.
+//     Portions Copyright Â© 2009 The Go Authors. All rights reserved.
 //
 // Permission is hereby granted, free of charge, to any person obtaining a copy
 // of this software and associated documentation files (the "Software"), to deal
index 93c4b1a6b8d74c7adbbf4a3402eaa50f3d4ec733..a4487d01254babd2d0122255def27481faa2abd0 100644 (file)
@@ -1,14 +1,14 @@
 // cmd/7l/noop.c, cmd/7l/obj.c, cmd/ld/pass.c from Vita Nuova.
 // https://code.google.com/p/ken-cc/source/browse/
 //
-//     Copyright Â© 1994-1999 Lucent Technologies Inc.  All rights reserved.
+//     Copyright Â© 1994-1999 Lucent Technologies Inc. All rights reserved.
 //     Portions Copyright Â© 1995-1997 C H Forsyth (forsyth@terzarima.net)
 //     Portions Copyright Â© 1997-1999 Vita Nuova Limited
 //     Portions Copyright Â© 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
 //     Portions Copyright Â© 2004,2006 Bruce Ellis
 //     Portions Copyright Â© 2005-2007 C H Forsyth (forsyth@terzarima.net)
 //     Revisions Copyright Â© 2000-2007 Lucent Technologies Inc. and others
-//     Portions Copyright Â© 2009 The Go Authors.  All rights reserved.
+//     Portions Copyright Â© 2009 The Go Authors. All rights reserved.
 //
 // Permission is hereby granted, free of charge, to any person obtaining a copy
 // of this software and associated documentation files (the "Software"), to deal
index 4ae819178ddb30bd180b1029d754edaede614b14..53a8fa33342d22bdd2e0a2bc1e523a18ee155a91 100644 (file)
@@ -460,7 +460,7 @@ const (
        // have the inherent issue that a 32-bit (or 64-bit!) displacement cannot be
        // stuffed into a 32-bit instruction, so an address needs to be spread across
        // several instructions, and in turn this requires a sequence of relocations, each
-       // updating a part of an instruction.  This leads to relocation codes that are
+       // updating a part of an instruction. This leads to relocation codes that are
        // inherently processor specific.
 
        // Arm64.
index ced1e842e017bedb5ac7f0ff51109bc9b7ae7796..7ff9fcaa913191df1594bd843cb6306b215a914a 100644 (file)
@@ -108,7 +108,7 @@ import (
 )
 
 // The Go and C compilers, and the assembler, call writeobj to write
-// out a Go object file.  The linker does not call this; the linker
+// out a Go object file. The linker does not call this; the linker
 // does not write out object files.
 func Writeobjdirect(ctxt *Link, b *Biobuf) {
        Flushplist(ctxt)
index 11be4d79f65293f08546c76c0251eb294012f41d..c747138eceb60d7007b667b86073ae42cc2531b3 100644 (file)
@@ -953,7 +953,7 @@ func stacksplit(ctxt *obj.Link, p *obj.Prog, framesize int32) *obj.Prog {
        }
 
        if ctxt.Flag_dynlink {
-               // Avoid calling morestack via a PLT when dynamically linking.  The
+               // Avoid calling morestack via a PLT when dynamically linking. The
                // PLT stubs generated by the system linker on ppc64le when "std r2,
                // 24(r1)" to save the TOC pointer in their callers stack
                // frame. Unfortunately (and necessarily) morestack is called before
index cf742a52180f084b1f768dae58b00c01e94f8298..57ecea334c5e5cacfc8809275d468f4b8df5e577 100644 (file)
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // This file defines flags attached to various functions
-// and data objects.  The compilers, assemblers, and linker must
+// and data objects. The compilers, assemblers, and linker must
 // all agree on these values.
 
 package obj
@@ -14,7 +14,7 @@ const (
        // Deprecated: Not implemented, do not use.
        NOPROF = 1
 
-       // It is ok for the linker to get multiple of these symbols.  It will
+       // It is ok for the linker to get multiple of these symbols. It will
        // pick one of the duplicates to use.
        DUPOK = 2
 
index 29768e0dd1f9e5bd3e61d8d595584ae9572179a2..a1c1cca895b13d7f468cc57fea791c5c1f46f2c3 100644 (file)
@@ -553,7 +553,7 @@ const (
 )
 
 // RegisterRegister binds a pretty-printer (Rconv) for register
-// numbers to a given register number range.  Lo is inclusive,
+// numbers to a given register number range. Lo is inclusive,
 // hi exclusive (valid registers are lo through hi-1).
 func RegisterRegister(lo, hi int, Rconv func(int) string) {
        regSpace = append(regSpace, regSet{lo, hi, Rconv})
index 9ab6615e43d87b01e5d6416d5a89377336e32b39..c4f2140e9c32745f2a3862570ff7b65ee50b3989 100644 (file)
@@ -2285,7 +2285,7 @@ func oclass(ctxt *obj.Link, p *obj.Prog, a *obj.Addr) int {
                                }
                        case obj.NAME_AUTO, obj.NAME_PARAM:
                                // These names must have a base of SP.  The old compiler
-                               // uses 0 for the base register.  SSA uses REG_SP.
+                               // uses 0 for the base register. SSA uses REG_SP.
                                if a.Reg != REG_SP && a.Reg != 0 {
                                        return Yxxx
                                }
index 3f8426ae3867acea64184f2a37531ef5fac6a298..a553c94b8b6f75d3c07e8824a0f6f71047c1e01f 100644 (file)
@@ -610,7 +610,7 @@ func preprocess(ctxt *obj.Link, cursym *obj.LSym) {
 
        var bpsize int
        if p.Mode == 64 && obj.Framepointer_enabled != 0 && autoffset > 0 {
-               // Make room for to save a base pointer.  If autoffset == 0,
+               // Make room for to save a base pointer. If autoffset == 0,
                // this might do something special like a tail jump to
                // another function, so in that case we omit this.
                bpsize = ctxt.Arch.Ptrsize
index fa785c25f3b2ecd6d4ef7a9664604a6ad8f89c60..eff9c032be471601309d6397ad9b334f7fff4025 100644 (file)
@@ -259,7 +259,7 @@ func adddynrel(s *ld.LSym, r *ld.Reloc) {
                                return
                        }
                        // The code is asking for the address of an external
-                       // function.  We provide it with the address of the
+                       // function. We provide it with the address of the
                        // correspondent GOT symbol.
                        addgotsym(targ)
 
@@ -292,7 +292,7 @@ func adddynrel(s *ld.LSym, r *ld.Reloc) {
                        // Instead, interpret the C declaration
                        //      void *_Cvar_stderr = &stderr;
                        // as making _Cvar_stderr the name of a GOT entry
-                       // for stderr.  This is separate from the usual GOT entry,
+                       // for stderr. This is separate from the usual GOT entry,
                        // just in case the C code assigns to the variable,
                        // and of course it only works for single pointers,
                        // but we only need to support cgo and that's all it needs.
@@ -564,7 +564,7 @@ func addpltsym(s *ld.LSym) {
                // To do lazy symbol lookup right, we're supposed
                // to tell the dynamic loader which library each
                // symbol comes from and format the link info
-               // section just so.  I'm too lazy (ha!) to do that
+               // section just so. I'm too lazy (ha!) to do that
                // so for now we'll just use non-lazy pointers,
                // which don't need to be told which library to use.
                //
index bd14a4326ccdcd9b849c03a14db6ecd512245913..321dd243b202f5158cc290bbf5b6a31c2b47dbe7 100644 (file)
@@ -57,9 +57,9 @@ type ArHdr struct {
 }
 
 // hostArchive reads an archive file holding host objects and links in
-// required objects.  The general format is the same as a Go archive
+// required objects. The general format is the same as a Go archive
 // file, but it has an armap listing symbols and the objects that
-// define them.  This is used for the compiler support library
+// define them. This is used for the compiler support library
 // libgcc.a.
 func hostArchive(name string) {
        f, err := obj.Bopenr(name)
index 67af9d5ba83f9f253b310cc0599b458f950f5e4d..d5e591a04530734edaa4c8968c087ee297835f11 100644 (file)
@@ -222,7 +222,7 @@ func datcmp(s1 *LSym, s2 *LSym) int {
        }
 
        // For ppc64, we want to interleave the .got and .toc sections
-       // from input files.  Both are type SELFGOT, so in that case
+       // from input files. Both are type SELFGOT, so in that case
        // fall through to the name comparison (conveniently, .got
        // sorts before .toc).
        if s1.Type != obj.SELFGOT && s1.Size != s2.Size {
index fb3d8fb2cd1be4671c7935fcd7eb314f9227bf78..200f4ccd9ede110c980999581c76cb49738b067b 100644 (file)
@@ -1132,7 +1132,7 @@ func defptrto(dwtype *DWDie) *DWDie {
 }
 
 // Copies src's children into dst. Copies attributes by value.
-// DWAttr.data is copied as pointer only.  If except is one of
+// DWAttr.data is copied as pointer only. If except is one of
 // the top-level children, it will not be copied.
 func copychildrenexcept(dst *DWDie, src *DWDie, except *DWDie) {
        for src = src.child; src != nil; src = src.link {
@@ -2263,7 +2263,7 @@ func dwarfaddshstrings(shstrtab *LSym) {
        }
 }
 
-// Add section symbols for DWARF debug info.  This is called before
+// Add section symbols for DWARF debug info. This is called before
 // dwarfaddelfheaders.
 func dwarfaddelfsectionsyms() {
        if infosym != nil {
index 2abfa3336fe903c0bd5405ae985b75ffd2cb2761..327a4770858627b1d7b55636d1e8adbe67703d42 100644 (file)
@@ -845,7 +845,7 @@ func ldmacho(f *obj.Biobuf, pkg string, length int64, pn string) {
                        }
 
                        // For i386 Mach-O PC-relative, the addend is written such that
-                       // it *is* the PC being subtracted.  Use that to make
+                       // it *is* the PC being subtracted. Use that to make
                        // it match our version of PC-relative.
                        if rel.pcrel != 0 && Thearch.Thechar == '8' {
                                rp.Add += int64(rp.Off) + int64(rp.Siz)
index 8439c065609994069f142fb04c894555f076f320..47b32f0099465188019683d55f2dbe90338c7b57 100644 (file)
@@ -234,7 +234,7 @@ func ldpe(f *obj.Biobuf, pkg string, length int64, pn string) {
 
                if sect.sh.Characteristics&(IMAGE_SCN_CNT_CODE|IMAGE_SCN_CNT_INITIALIZED_DATA|IMAGE_SCN_CNT_UNINITIALIZED_DATA) == 0 {
                        // This has been seen for .idata sections, which we
-                       // want to ignore.  See issues 5106 and 5273.
+                       // want to ignore. See issues 5106 and 5273.
                        continue
                }
 
@@ -283,7 +283,7 @@ func ldpe(f *obj.Biobuf, pkg string, length int64, pn string) {
                }
                if sect.sh.Characteristics&(IMAGE_SCN_CNT_CODE|IMAGE_SCN_CNT_INITIALIZED_DATA|IMAGE_SCN_CNT_UNINITIALIZED_DATA) == 0 {
                        // This has been seen for .idata sections, which we
-                       // want to ignore.  See issues 5106 and 5273.
+                       // want to ignore. See issues 5106 and 5273.
                        continue
                }
 
index 27fef60f18c1e8983ddd30dbe5e7f41ceb68d9b3..d078069f4a13f8eeae1dbc88df5cbe102016dfe9 100644 (file)
@@ -577,7 +577,7 @@ func loadlib() {
        if Linkmode == LinkExternal && !iscgo {
                // This indicates a user requested -linkmode=external.
                // The startup code uses an import of runtime/cgo to decide
-               // whether to initialize the TLS.  So give it one.  This could
+               // whether to initialize the TLS.  So give it one. This could
                // be handled differently but it's an unusual case.
                loadinternal("runtime/cgo")
 
@@ -1112,8 +1112,8 @@ func hostlink() {
 
        // On Windows, given -o foo, GCC will append ".exe" to produce
        // "foo.exe".  We have decided that we want to honor the -o
-       // option.  To make this work, we append a '.' so that GCC
-       // will decide that the file already has an extension.  We
+       // option. To make this work, we append a '.' so that GCC
+       // will decide that the file already has an extension. We
        // only want to do this when producing a Windows output file
        // on a Windows host.
        outopt := outfile
@@ -1179,8 +1179,8 @@ func hostlink() {
 
                // clang, unlike GCC, passes -rdynamic to the linker
                // even when linking with -static, causing a linker
-               // error when using GNU ld.  So take out -rdynamic if
-               // we added it.  We do it in this order, rather than
+               // error when using GNU ld. So take out -rdynamic if
+               // we added it. We do it in this order, rather than
                // only adding -rdynamic later, so that -extldflags
                // can override -rdynamic without using -static.
                if Iself && p == "-static" {
@@ -1254,8 +1254,8 @@ func hostlinkArchArgs() []string {
        return nil
 }
 
-// ldobj loads an input object.  If it is a host object (an object
-// compiled by a non-Go compiler) it returns the Hostobj pointer.  If
+// ldobj loads an input object. If it is a host object (an object
+// compiled by a non-Go compiler) it returns the Hostobj pointer. If
 // it is a Go object, it returns nil.
 func ldobj(f *obj.Biobuf, pkg string, length int64, pn string, file string, whence int) *Hostobj {
        eof := obj.Boffset(f) + length
@@ -1772,7 +1772,7 @@ func stkcheck(up *Chain, depth int) int {
                                        return -1
                                }
 
-                       // Indirect call.  Assume it is a call to a splitting function,
+                       // Indirect call. Assume it is a call to a splitting function,
                        // so we have to make sure it can call morestack.
                        // Arrange the data structures to report both calls, so that
                        // if there is an error, stkprint shows all the steps involved.
index 010e7da0eedfde61412780dd7772c0638b8bd715..d88a414dbf135a47a38f97a6f95d247d155b165b 100644 (file)
@@ -123,9 +123,9 @@ var sortsym []*LSym
 var nsortsym int
 
 // Amount of space left for adding load commands
-// that refer to dynamic libraries.  Because these have
+// that refer to dynamic libraries. Because these have
 // to go in the Mach-O header, we can't just pick a
-// "big enough" header size.  The initial header is
+// "big enough" header size. The initial header is
 // one page, the non-dynamic library stuff takes
 // up about 1300 bytes; we overestimate that as 2k.
 var load_budget int = INITIAL_MACHO_HEADR - 2*1024
@@ -338,7 +338,7 @@ func domacho() {
 
 func Machoadddynlib(lib string) {
        // Will need to store the library name rounded up
-       // and 24 bytes of header metadata.  If not enough
+       // and 24 bytes of header metadata. If not enough
        // space, grab another page of initial space at the
        // beginning of the output file.
        load_budget -= (len(lib)+7)/8*8 + 24
@@ -785,12 +785,12 @@ func Domacholink() int64 {
        s4 := Linklookup(Ctxt, ".machosymstr", 0)
 
        // Force the linkedit section to end on a 16-byte
-       // boundary.  This allows pure (non-cgo) Go binaries
+       // boundary. This allows pure (non-cgo) Go binaries
        // to be code signed correctly.
        //
        // Apple's codesign_allocate (a helper utility for
        // the codesign utility) can do this fine itself if
-       // it is run on a dynamic Mach-O binary.  However,
+       // it is run on a dynamic Mach-O binary. However,
        // when it is run on a pure (non-cgo) Go binary, where
        // the linkedit section is mostly empty, it fails to
        // account for the extra padding that it itself adds
index 92c02f6992beae8d85b05965667929a5b5933eae..8400468501a5cb5fac5b3acd994118701afd8e6b 100644 (file)
@@ -399,7 +399,7 @@ const (
 )
 
 // findfunctab generates a lookup table to quickly find the containing
-// function for a pc.  See src/runtime/symtab.go:findfunc for details.
+// function for a pc. See src/runtime/symtab.go:findfunc for details.
 func findfunctab() {
        t := Linklookup(Ctxt, "runtime.findfunctab", 0)
        t.Type = obj.SRODATA
index b87ca810074f4d3a087dee1ea6fd9d04e2077823..aea55299f5c7b803023505cd51136524d04b021b 100644 (file)
@@ -47,7 +47,7 @@ func putelfstr(s string) int {
 
        // When dynamically linking, we create LSym's by reading the names from
        // the symbol tables of the shared libraries and so the names need to
-       // match exactly.  Tools like DTrace will have to wait for now.
+       // match exactly. Tools like DTrace will have to wait for now.
        if !DynlinkingGo() {
                // Rewrite Â· to . for ASCII-only tools like DTrace (sigh)
                s = strings.Replace(s, "·", ".", -1)
index 169accc594ab0495c42af544e914d42211bb17a2..6c731d4b1e8fe59ee6c8e440e420ab1aee24f64f 100644 (file)
@@ -48,7 +48,7 @@ func genplt() {
        var i int
 
        // The ppc64 ABI PLT has similar concepts to other
-       // architectures, but is laid out quite differently.  When we
+       // architectures, but is laid out quite differently. When we
        // see an R_PPC64_REL24 relocation to a dynamic symbol
        // (indicating that the call needs to go through the PLT), we
        // generate up to three stubs and reserve a PLT slot.
@@ -78,7 +78,7 @@ func genplt() {
        // 5) We generate the glink resolver stub (only once).  This
        //    computes which symbol resolver stub we came through and
        //    invokes the dynamic resolver via a pointer provided by
-       //    the dynamic linker.  This will patch up the .plt slot to
+       //    the dynamic linker. This will patch up the .plt slot to
        //    point directly at the function so future calls go
        //    straight from the call stub to the real function, and
        //    then call the function.
@@ -89,8 +89,8 @@ func genplt() {
        // platforms.
 
        // Find all R_PPC64_REL24 relocations that reference dynamic
-       // imports.  Reserve PLT entries for these symbols and
-       // generate call stubs.  The call stubs need to live in .text,
+       // imports. Reserve PLT entries for these symbols and
+       // generate call stubs. The call stubs need to live in .text,
        // which is why we need to do this pass this early.
        //
        // This assumes "case 1" from the ABI, where the caller needs
@@ -131,7 +131,7 @@ func genplt() {
                        // Update the relocation to use the call stub
                        r.Sym = stub
 
-                       // Restore TOC after bl.  The compiler put a
+                       // Restore TOC after bl. The compiler put a
                        // nop here for us to overwrite.
                        o1 = 0xe8410018 // ld r2,24(r1)
                        ld.Ctxt.Arch.ByteOrder.PutUint32(s.P[r.Off+4:], o1)
@@ -284,7 +284,7 @@ func adddynrel(s *ld.LSym, r *ld.Reloc) {
 
                // This is a local call, so the caller isn't setting
                // up r12 and r2 is the same for the caller and
-               // callee.  Hence, we need to go to the local entry
+               // callee. Hence, we need to go to the local entry
                // point.  (If we don't do this, the callee will try
                // to use r12 to compute r2.)
                r.Add += int64(r.Sym.Localentry) * 4
@@ -465,7 +465,7 @@ func elfsetupplt() {
                // The dynamic linker stores the address of the
                // dynamic resolver and the DSO identifier in the two
                // doublewords at the beginning of the .plt section
-               // before the PLT array.  Reserve space for these.
+               // before the PLT array. Reserve space for these.
                plt.Size = 16
        }
 }
index 830a7e6af93a8c3dbef1fdc1ec817b6224ea099c..ad423dce991212e616d2ffe1d0d86b5d66b8819e 100644 (file)
@@ -299,7 +299,7 @@ func adddynrel(s *ld.LSym, r *ld.Reloc) {
                        // Instead, interpret the C declaration
                        //      void *_Cvar_stderr = &stderr;
                        // as making _Cvar_stderr the name of a GOT entry
-                       // for stderr.  This is separate from the usual GOT entry,
+                       // for stderr. This is separate from the usual GOT entry,
                        // just in case the C code assigns to the variable,
                        // and of course it only works for single pointers,
                        // but we only need to support cgo and that's all it needs.
index 9e669980a1fe153efcfdbae138ac1555c7095a13..6b879a84acdc0fdd27953a652eb3d8be2c4648bd 100644 (file)
@@ -15,7 +15,7 @@ func (p *Profile) decoder() []decoder {
 }
 
 // preEncode populates the unexported fields to be used by encode
-// (with suffix X) from the corresponding exported fields.  The
+// (with suffix X) from the corresponding exported fields. The
 // exported fields are cleared up to facilitate testing.
 func (p *Profile) preEncode() {
        strings := make(map[string]int)
index c7c047a64b38ca9255f235751483f78999a6163d..e1f24c4c6d129f727b7c588da585d41c8f0a28b6 100644 (file)
@@ -291,7 +291,7 @@ func ParseTracebacks(b []byte) (*Profile, error) {
                if s, addrs := extractHexAddresses(l); len(s) > 0 {
                        for _, addr := range addrs {
                                // Addresses from stack traces point to the next instruction after
-                               // each call.  Adjust by -1 to land somewhere on the actual call
+                               // each call. Adjust by -1 to land somewhere on the actual call
                                // (except for the leaf, which is not a call).
                                if len(sloc) > 0 {
                                        addr--
@@ -427,7 +427,7 @@ func cpuProfile(b []byte, period int64, parse func(b []byte) (uint64, []byte)) (
 //   3rd word -- 0
 //
 // Addresses from stack traces may point to the next instruction after
-// each call.  Optionally adjust by -1 to land somewhere on the actual
+// each call. Optionally adjust by -1 to land somewhere on the actual
 // call (except for the leaf, which is not a call).
 func parseCPUSamples(b []byte, parse func(b []byte) (uint64, []byte), adjust bool, p *Profile) ([]byte, map[uint64]*Location, error) {
        locs := make(map[uint64]*Location)
@@ -570,7 +570,7 @@ func parseHeap(b []byte) (p *Profile, err error) {
                var sloc []*Location
                for i, addr := range addrs {
                        // Addresses from stack traces point to the next instruction after
-                       // each call.  Adjust by -1 to land somewhere on the actual call
+                       // each call. Adjust by -1 to land somewhere on the actual call
                        // (except for the leaf, which is not a call).
                        if i > 0 {
                                addr--
@@ -778,7 +778,7 @@ func parseContention(b []byte) (p *Profile, err error) {
                var sloc []*Location
                for i, addr := range addrs {
                        // Addresses from stack traces point to the next instruction after
-                       // each call.  Adjust by -1 to land somewhere on the actual call
+                       // each call. Adjust by -1 to land somewhere on the actual call
                        // (except for the leaf, which is not a call).
                        if i > 0 {
                                addr--
@@ -921,7 +921,7 @@ func parseThread(b []byte) (*Profile, error) {
                var sloc []*Location
                for i, addr := range addrs {
                        // Addresses from stack traces point to the next instruction after
-                       // each call.  Adjust by -1 to land somewhere on the actual call
+                       // each call. Adjust by -1 to land somewhere on the actual call
                        // (except for the leaf, which is not a call).
                        if i > 0 {
                                addr--
index 6d175bf32acb6f8c2614862c58a5db4c8cd0f786..28e713d7bebecf48e7af75999d49ac0e31c85f2a 100644 (file)
@@ -114,7 +114,7 @@ type Function struct {
        filenameX   int64
 }
 
-// Parse parses a profile and checks for its validity.  The input
+// Parse parses a profile and checks for its validity. The input
 // may be a gzip-compressed encoded protobuf or one of many legacy
 // profile formats which may be unsupported in the future.
 func Parse(r io.Reader) (*Profile, error) {
@@ -221,7 +221,7 @@ func (p *Profile) Write(w io.Writer) error {
        return err
 }
 
-// CheckValid tests whether the profile is valid.  Checks include, but are
+// CheckValid tests whether the profile is valid. Checks include, but are
 // not limited to:
 //   - len(Profile.Sample[n].value) == len(Profile.value_unit)
 //   - Sample.id has a corresponding Profile.Location
index abc898cb375a5a01c6eb30bc4be8be4427f04cec..1924fada7a506e377661ef950ae1aea4cc3bf2d6 100644 (file)
@@ -12,7 +12,7 @@ import (
 )
 
 // Prune removes all nodes beneath a node matching dropRx, and not
-// matching keepRx.  If the root node of a Sample matches, the sample
+// matching keepRx. If the root node of a Sample matches, the sample
 // will have an empty stack.
 func (p *Profile) Prune(dropRx, keepRx *regexp.Regexp) {
        prune := make(map[uint64]bool)
index b6694f559ff392bc028160c59ba1ef67e8c08b5f..b2b07b24f989a1275542bb9f3d1754939481152a 100644 (file)
@@ -390,7 +390,7 @@ func printCallgrind(w io.Writer, rpt *Report) error {
 
 // callgrindName implements the callgrind naming compression scheme.
 // For names not previously seen returns "(N) name", where N is a
-// unique index.  For names previously seen returns "(N)" where N is
+// unique index. For names previously seen returns "(N)" where N is
 // the index returned the first time.
 func callgrindName(names map[string]int, name string) string {
        if name == "" {
index c81e5222085df98df9025dfead15b4fb549fc27a..15b3b6df26049d2ff67a499e1be3d069e134e189 100644 (file)
@@ -24,7 +24,7 @@ var (
 
 // Symbolize symbolizes profile p by parsing data returned by a
 // symbolz handler. syms receives the symbolz query (hex addresses
-// separated by '+') and returns the symbolz output in a string.  It
+// separated by '+') and returns the symbolz output in a string. It
 // symbolizes all locations based on their addresses, regardless of
 // mapping.
 func Symbolize(source string, syms func(string, string) ([]byte, error), p *profile.Profile) error {
index f056f07f8848e2b0f2c47031e7a2957ec250d44f..b896862c8f662872dd029940ae78cc1fc53e0581 100644 (file)
@@ -56,7 +56,7 @@ func checkCgoCall(f *File, node ast.Node) {
 }
 
 // cgoBaseType tries to look through type conversions involving
-// unsafe.Pointer to find the real type.  It converts:
+// unsafe.Pointer to find the real type. It converts:
 //   unsafe.Pointer(x) => x
 //   *(*unsafe.Pointer)(unsafe.Pointer(&x)) => x
 func cgoBaseType(f *File, arg ast.Expr) types.Type {
@@ -106,7 +106,7 @@ func cgoBaseType(f *File, arg ast.Expr) types.Type {
 }
 
 // typeOKForCgoCall returns true if the type of arg is OK to pass to a
-// C function using cgo.  This is not true for Go types with embedded
+// C function using cgo. This is not true for Go types with embedded
 // pointers.
 func typeOKForCgoCall(t types.Type) bool {
        if t == nil {
index 23c041bef34512a4ef856a7387c4ab578ae2002c..fc3873997bc866e8d571134caa4f20382266f012 100644 (file)
@@ -122,7 +122,7 @@ func vet(name string) bool {
        return report[name].isTrue()
 }
 
-// setExit sets the value for os.Exit when it is called, later.  It
+// setExit sets the value for os.Exit when it is called, later. It
 // remembers the highest value.
 func setExit(err int) {
        if err > exitCode {
index 00949df437295c5505ec960c6f869105fb1d44dc..8a554e152a033d1f2c3a3a86213ccc2f1dd98ec1 100644 (file)
@@ -26,10 +26,10 @@ type MethodSig struct {
 }
 
 // canonicalMethods lists the input and output types for Go methods
-// that are checked using dynamic interface checks.  Because the
+// that are checked using dynamic interface checks. Because the
 // checks are dynamic, such methods would not cause a compile error
 // if they have the wrong signature: instead the dynamic check would
-// fail, sometimes mysteriously.  If a method is found with a name listed
+// fail, sometimes mysteriously. If a method is found with a name listed
 // here but not the input/output types listed here, vet complains.
 //
 // A few of the canonical methods have very common names.
@@ -39,7 +39,7 @@ type MethodSig struct {
 // To do that, the arguments that have a = prefix are treated as
 // signals that the canonical meaning is intended: if a Scan
 // method doesn't have a fmt.ScanState as its first argument,
-// we let it go.  But if it does have a fmt.ScanState, then the
+// we let it go. But if it does have a fmt.ScanState, then the
 // rest has to match.
 var canonicalMethods = map[string]MethodSig{
        // "Flush": {{}, {"error"}}, // http.Flusher and jpeg.writer conflict
index a16e864cad212df7fc5480b736037c6d448e7fda..61139fdc115e0b00031c07319568850d54348cdb 100644 (file)
@@ -67,7 +67,7 @@ var printfList = map[string]int{
 }
 
 // printList records the unformatted-print functions. The value is the location
-// of the first parameter to be printed.  Names are lower-cased so the lookup is
+// of the first parameter to be printed. Names are lower-cased so the lookup is
 // case insensitive.
 var printList = map[string]int{
        "error":  0,
index bb8e9bfd84416d0b7e4a588cc6b1f0814fad5b9d..c39f9198cb70fec1e87f950cb957e971ff677e00 100644 (file)
@@ -95,14 +95,14 @@ expr3:
 // for clarity.
 const eof = 0
 
-// The parser uses the type <prefix>Lex as a lexer.  It must provide
+// The parser uses the type <prefix>Lex as a lexer. It must provide
 // the methods Lex(*<prefix>SymType) int and Error(string).
 type exprLex struct {
        line []byte
        peek rune
 }
 
-// The parser calls this method to get each new token.  This
+// The parser calls this method to get each new token. This
 // implementation returns operators and NUM.
 func (x *exprLex) Lex(yylval *exprSymType) int {
        for {
index 169a0c7b2ebe4b169212e73ddc7a6539ee8f7ac6..8bcd61ac2ab3002abae4d475e5463e3604415745 100644 (file)
@@ -491,9 +491,9 @@ func NewWriter(w io.Writer, level int) (*Writer, error) {
 }
 
 // NewWriterDict is like NewWriter but initializes the new
-// Writer with a preset dictionary.  The returned Writer behaves
+// Writer with a preset dictionary. The returned Writer behaves
 // as if the dictionary had been written to it without producing
-// any compressed output.  The compressed data written to w
+// any compressed output. The compressed data written to w
 // can only be decompressed by a Reader initialized with the
 // same dictionary.
 func NewWriterDict(w io.Writer, level int, dict []byte) (*Writer, error) {
index 72bc6652c8918d7d27a0b9038fdc74542459745b..c165ade73495a424f7c6c738dae340b791aaeffb 100644 (file)
@@ -247,7 +247,7 @@ func testSync(t *testing.T, level int, input []byte, name string) {
                // not necessarily the case: the write Flush may emit
                // some extra framing bits that are not necessary
                // to process to obtain the first half of the uncompressed
-               // data.  The test ran correctly most of the time, because
+               // data. The test ran correctly most of the time, because
                // the background goroutine had usually read even
                // those extra bits by now, but it's not a useful thing to
                // check.
index 616440412e4b2b869d22859bd873ea43a8145286..abbb63464ce4820eb6fa8b7a5e82061e1bb90355 100644 (file)
@@ -200,7 +200,7 @@ func (w *huffmanBitWriter) writeBytes(bytes []byte) {
 // The result is written into the codegen array, and the frequencies
 // of each code is written into the codegenFreq array.
 // Codes 0-15 are single byte codes. Codes 16-18 are followed by additional
-// information.  Code badCode is an end marker
+// information. Code badCode is an end marker
 //
 //  numLiterals      The number of literals in literalEncoding
 //  numOffsets       The number of offsets in offsetEncoding
@@ -213,7 +213,7 @@ func (w *huffmanBitWriter) generateCodegen(numLiterals int, numOffsets int) {
        // This is fine because the output is always shorter than the input used
        // so far.
        codegen := w.codegen // cache
-       // Copy the concatenated code sizes to codegen.  Put a marker at the end.
+       // Copy the concatenated code sizes to codegen. Put a marker at the end.
        copy(codegen[0:numLiterals], w.literalEncoding.codeBits)
        copy(codegen[numLiterals:numLiterals+numOffsets], w.offsetEncoding.codeBits)
        codegen[numLiterals+numOffsets] = badCode
index 50ec79c94051e1ba610e5926c77633514ffb83ab..1a4de12dd6e9ca484a778f74ee95e394f8b40e22 100644 (file)
@@ -113,7 +113,7 @@ const maxBitsLimit = 16
 // The cases of 0, 1, and 2 literals are handled by special case code.
 //
 // list  An array of the literals with non-zero frequencies
-//             and their associated frequencies.  The array is in order of increasing
+//             and their associated frequencies. The array is in order of increasing
 //             frequency, and has as its last element a special element with frequency
 //             MaxInt32
 // maxBits     The maximum number of bits that should be used to encode any literal.
@@ -128,7 +128,7 @@ func (h *huffmanEncoder) bitCounts(list []literalNode, maxBits int32) []int32 {
        list = list[0 : n+1]
        list[n] = maxNode()
 
-       // The tree can't have greater depth than n - 1, no matter what.  This
+       // The tree can't have greater depth than n - 1, no matter what. This
        // saves a little bit of work in some small cases
        if maxBits > n-1 {
                maxBits = n - 1
@@ -197,7 +197,7 @@ func (h *huffmanEncoder) bitCounts(list []literalNode, maxBits int32) []int32 {
 
                if l.needed--; l.needed == 0 {
                        // We've done everything we need to do for this level.
-                       // Continue calculating one level up.  Fill in nextPairFreq
+                       // Continue calculating one level up. Fill in nextPairFreq
                        // of that level with the sum of the two nodes we've just calculated on
                        // this level.
                        if l.level == maxBits {
@@ -277,7 +277,7 @@ func (h *huffmanEncoder) generate(freq []int32, maxBits int32) {
        h.codeBits = h.codeBits[0:len(freq)]
        list = list[0:count]
        if count <= 2 {
-               // Handle the small cases here, because they are awkward for the general case code.  With
+               // Handle the small cases here, because they are awkward for the general case code. With
                // two or fewer literals, everything has bit length 1.
                for i, node := range list {
                        // "list" is in order of increasing literal value.
index dccfdf228863dbb5a3e0a0a8b0950665499e5a48..501b45b72f057abe5234de0447c92dd650d69b5f 100644 (file)
@@ -115,7 +115,7 @@ type huffmanDecoder struct {
 // trees are permitted.
 func (h *huffmanDecoder) init(bits []int) bool {
        // Sanity enables additional runtime tests during Huffman
-       // table construction.  It's intended to be used during
+       // table construction. It's intended to be used during
        // development to supplement the currently ad-hoc unit tests.
        const sanity = false
 
@@ -162,7 +162,7 @@ func (h *huffmanDecoder) init(bits []int) bool {
        // Check that the coding is complete (i.e., that we've
        // assigned all 2-to-the-max possible bit sequences).
        // Exception: To be compatible with zlib, we also need to
-       // accept degenerate single-code codings.  See also
+       // accept degenerate single-code codings. See also
        // TestDegenerateHuffmanCoding.
        if code != 1<<uint(max) && !(code == 1 && max == 1) {
                return false
@@ -200,7 +200,7 @@ func (h *huffmanDecoder) init(bits []int) bool {
                if n <= huffmanChunkBits {
                        for off := reverse; off < len(h.chunks); off += 1 << uint(n) {
                                // We should never need to overwrite
-                               // an existing chunk.  Also, 0 is
+                               // an existing chunk. Also, 0 is
                                // never a valid chunk, because the
                                // lower 4 "count" bits should be
                                // between 1 and 15.
@@ -230,7 +230,7 @@ func (h *huffmanDecoder) init(bits []int) bool {
 
        if sanity {
                // Above we've sanity checked that we never overwrote
-               // an existing entry.  Here we additionally check that
+               // an existing entry. Here we additionally check that
                // we filled the tables completely.
                for i, chunk := range h.chunks {
                        if chunk == 0 {
@@ -478,7 +478,7 @@ func (f *decompressor) readHuffman() error {
 
 // Decode a single Huffman block from f.
 // hl and hd are the Huffman states for the lit/length values
-// and the distance values, respectively.  If hd == nil, using the
+// and the distance values, respectively. If hd == nil, using the
 // fixed distance encoding associated with fixed Huffman blocks.
 func (f *decompressor) huffmanBlock() {
        const (
@@ -791,9 +791,9 @@ func NewReader(r io.Reader) io.ReadCloser {
 }
 
 // NewReaderDict is like NewReader but initializes the reader
-// with a preset dictionary.  The returned Reader behaves as if
+// with a preset dictionary. The returned Reader behaves as if
 // the uncompressed data stream started with the given dictionary,
-// which has already been read.  NewReaderDict is typically used
+// which has already been read. NewReaderDict is typically used
 // to read data compressed by NewWriterDict.
 //
 // The ReadCloser returned by NewReader also implements Resetter.
index 3d331454a695bf065c5f1e57170ee5bd16ea98bc..4a4f19443d2b442ee82e688cad28aa6b51bb670e 100644 (file)
@@ -58,14 +58,14 @@ type Header struct {
 // uncompressed data from a gzip-format compressed file.
 //
 // In general, a gzip file can be a concatenation of gzip files,
-// each with its own header.  Reads from the Reader
+// each with its own header. Reads from the Reader
 // return the concatenation of the uncompressed data of each.
 // Only the first header is recorded in the Reader fields.
 //
 // Gzip files store a length and checksum of the uncompressed data.
 // The Reader will return a ErrChecksum when Read
 // reaches the end of the uncompressed data if it does not
-// have the expected length or checksum.  Clients should treat data
+// have the expected length or checksum. Clients should treat data
 // returned by Read as tentative until they receive the io.EOF
 // marking the end of the data.
 type Reader struct {
@@ -299,7 +299,7 @@ func (z *Reader) Read(p []byte) (n int, err error) {
                return
        }
 
-       // Yes.  Reset and read from it.
+       // Yes. Reset and read from it.
        z.digest.Reset()
        z.size = 0
        return z.Read(p)
index c467a11910c9f5e395d30c75c7078fbdcf53c574..5fe23b95372bd42e835a81e2989438e39ed7242f 100644 (file)
@@ -25,7 +25,7 @@ import "sort"
 //     !h.Less(j, i) for 0 <= i < h.Len() and 2*i+1 <= j <= 2*i+2 and j < h.Len()
 //
 // Note that Push and Pop in this interface are for package heap's
-// implementation to call.  To add and remove things from the heap,
+// implementation to call. To add and remove things from the heap,
 // use heap.Push and heap.Pop.
 type Interface interface {
        sort.Interface
index 57a7e9e25f2f36abdba68c03f6fd5f011e5fd2e9..41ea9cf95ed7c9c323f6bda9ef29a847debc667a 100644 (file)
@@ -137,7 +137,7 @@ func subw(w uint32) uint32 {
 // Rotate
 func rotw(w uint32) uint32 { return w<<8 | w>>24 }
 
-// Key expansion algorithm.  See FIPS-197, Figure 11.
+// Key expansion algorithm. See FIPS-197, Figure 11.
 // Their rcon[i] is our powx[i-1] << 24.
 func expandKeyGo(key []byte, enc, dec []uint32) {
        // Encryption key setup.
index 7d27fde61d8fac2a0fd63548d35d0b8bf02a7493..531ecad9ac00febd80a85475b27f4a209e751fa4 100644 (file)
@@ -9,8 +9,8 @@
 package cipher
 
 // A Block represents an implementation of block cipher
-// using a given key.  It provides the capability to encrypt
-// or decrypt individual blocks.  The mode implementations
+// using a given key. It provides the capability to encrypt
+// or decrypt individual blocks. The mode implementations
 // extend that capability to streams of blocks.
 type Block interface {
        // BlockSize returns the cipher's block size.
index a3550cb7dda2891e2ae6fa2f22d7e01c7c3726cd..ce58d5e713a55a43777c9a879fd84cf38eeb7ed6 100644 (file)
@@ -89,7 +89,7 @@ func (d0 *digest) Sum(in []byte) []byte {
 }
 
 func (d *digest) checkSum() [Size]byte {
-       // Padding.  Add a 1 bit and 0 bits until 56 bytes mod 64.
+       // Padding. Add a 1 bit and 0 bits until 56 bytes mod 64.
        len := d.len
        var tmp [64]byte
        tmp[0] = 0x80
index 37dd37eeb8d9814fa34fb0c63c27ac485c1aaf92..631972b92ac5e889870eed11e22ef680ff042333 100644 (file)
@@ -84,7 +84,7 @@ func (hr hideAgainReader) Read(p []byte) (n int, err error) {
 // systems without a reliable /dev/urandom.
 
 // newReader returns a new pseudorandom generator that
-// seeds itself by reading from entropy.  If entropy == nil,
+// seeds itself by reading from entropy. If entropy == nil,
 // the generator seeds itself by reading from the system's
 // random number generator, typically /dev/random.
 // The Read method on the returned reader always returns
index 599cdc22cd9f973bac97d4cfe80f87d329022c0c..592c57e76386e97859580e70bb2854759e2cbef9 100644 (file)
@@ -70,7 +70,7 @@ func Prime(rand io.Reader, bits int) (p *big.Int, err error) {
 
                p.SetBytes(bytes)
 
-               // Calculate the value mod the product of smallPrimes.  If it's
+               // Calculate the value mod the product of smallPrimes. If it's
                // a multiple of any of these primes we add two until it isn't.
                // The probability of overflowing is minimal and can be ignored
                // because we still perform Miller-Rabin tests on the result.
index 9acb681bfb64e5f8ae875049ed9d071d4f65a0f2..bd04aee69559dd4f8e54d88ded2909391f8222fb 100644 (file)
@@ -23,7 +23,7 @@ func (k KeySizeError) Error() string {
        return "crypto/rc4: invalid key size " + strconv.Itoa(int(k))
 }
 
-// NewCipher creates and returns a new Cipher.  The key argument should be the
+// NewCipher creates and returns a new Cipher. The key argument should be the
 // RC4 key, at least 1 byte and at most 256 bytes.
 func NewCipher(key []byte) (*Cipher, error) {
        k := len(key)
@@ -52,7 +52,7 @@ func (c *Cipher) Reset() {
 }
 
 // xorKeyStreamGeneric sets dst to the result of XORing src with the
-// key stream.  Dst and src may be the same slice but otherwise should
+// key stream. Dst and src may be the same slice but otherwise should
 // not overlap.
 //
 // This is the pure Go version. rc4_{amd64,386,arm}* contain assembly
index 7c82f181cb84589d28745f3d7c6fb8d8501553f9..1ba194a4ad2c5ded862701f2ebbee0ea14e5a059 100644 (file)
@@ -64,7 +64,7 @@ func emsaPSSEncode(mHash []byte, emBits int, salt []byte, hash hash.Hash) ([]byt
        hash.Reset()
 
        // 7.  Generate an octet string PS consisting of emLen - sLen - hLen - 2
-       //     zero octets.  The length of PS may be 0.
+       //     zero octets. The length of PS may be 0.
        //
        // 8.  Let DB = PS || 0x01 || salt; DB is an octet string of length
        //     emLen - hLen - 1.
index 9f1a96e36492ab131ecb403b76318238c667c79e..ac593b1bf0d30b8fdfd715e7e6b4f3230b8bd43c 100644 (file)
@@ -90,7 +90,7 @@ func (d0 *digest) Sum(in []byte) []byte {
 
 func (d *digest) checkSum() [Size]byte {
        len := d.len
-       // Padding.  Add a 1 bit and 0 bits until 56 bytes mod 64.
+       // Padding. Add a 1 bit and 0 bits until 56 bytes mod 64.
        var tmp [64]byte
        tmp[0] = 0x80
        if len%64 < 56 {
index 4a629518b761eb3c64813c35c0305a6f227fcbe2..80ac5e9f74fbbe114641640665c27f92eda82179 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.
 
-// SHA1 hash algorithm.  See RFC 3174.
+// SHA1 hash algorithm. See RFC 3174.
 
 package sha1
 
index d84cebf2ff2c1734ee143ee0ac3bd50ede3e2932..74b05b92d770f613864a5b381944c4965c27f422 100644 (file)
@@ -137,7 +137,7 @@ func (d0 *digest) Sum(in []byte) []byte {
 
 func (d *digest) checkSum() [Size]byte {
        len := d.len
-       // Padding.  Add a 1 bit and 0 bits until 56 bytes mod 64.
+       // Padding. Add a 1 bit and 0 bits until 56 bytes mod 64.
        var tmp [64]byte
        tmp[0] = 0x80
        if len%64 < 56 {
index 1d883d39059577224fd98faa37c1f80c0f353221..9ac8a96dfce168b82d709289217e0900d5e37943 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.
 
-// SHA256 hash algorithm.  See FIPS 180-2.
+// SHA256 hash algorithm. See FIPS 180-2.
 
 package sha256
 
index e7781fd2f41159ba8d03f770a6fe78653acf2cd0..5603c90fb74516257ab1f48a46fde6e498f330a3 100644 (file)
@@ -208,7 +208,7 @@ func (d0 *digest) Sum(in []byte) []byte {
 }
 
 func (d *digest) checkSum() [Size]byte {
-       // Padding.  Add a 1 bit and 0 bits until 112 bytes mod 128.
+       // Padding. Add a 1 bit and 0 bits until 112 bytes mod 128.
        len := d.len
        var tmp [128]byte
        tmp[0] = 0x80
index 04b3d4a3cc0ab12c0ac85a1a5ecdb05addbbb534..6992d125de4bb7d911f9aecbe62997c18873acbd 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.
 
-// SHA512 hash algorithm.  See FIPS 180-4.
+// SHA512 hash algorithm. See FIPS 180-4.
 
 package sha512
 
index 03775685fb67919e05ded9a1e4510a4ac2eb60a2..65b1d4b2e3aa5c215ca3b22a6eced522d16c2a75 100644 (file)
@@ -1073,7 +1073,7 @@ func (c *Conn) OCSPResponse() []byte {
 }
 
 // VerifyHostname checks that the peer certificate chain is valid for
-// connecting to host.  If so, it returns nil; if not, it returns an error
+// connecting to host. If so, it returns nil; if not, it returns an error
 // describing the problem.
 func (c *Conn) VerifyHostname(host string) error {
        c.handshakeMutex.Lock()
index e16cddcbd81db53051c63f155e0a2a3efef7d8af..dbab60b6bdbfb32588fde699f85053ec9351c12d 100644 (file)
@@ -462,7 +462,7 @@ func (hs *serverHandshakeState) doFullHandshake() error {
 
        // If we received a client cert in response to our certificate request message,
        // the client will send us a certificateVerifyMsg immediately after the
-       // clientKeyExchangeMsg.  This message is a digest of all preceding
+       // clientKeyExchangeMsg. This message is a digest of all preceding
        // handshake-layer messages that is signed using the private key corresponding
        // to the client's certificate. This allows us to verify that the client is in
        // possession of the private key of the certificate.
index 74ad72a848032d64095c90528c6fc898521b6fb0..f8de4e4551e34be441cd4bd467e87842ef6a918b 100644 (file)
@@ -69,7 +69,7 @@ func testClientHello(t *testing.T, serverConfig *Config, m handshakeMessage) {
 
 func testClientHelloFailure(t *testing.T, serverConfig *Config, m handshakeMessage, expectedSubStr string) {
        // Create in-memory network connection,
-       // send message to server.  Should return
+       // send message to server. Should return
        // expected error.
        c, s := net.Pipe()
        go func() {
index 0e6a7c2262404ae6bf499a914855b48bda897535..3326894a0861536f6ccb35699a36b1bc1e8f0266 100644 (file)
@@ -51,7 +51,7 @@ func (ka rsaKeyAgreement) processClientKeyExchange(config *Config, cert *Certifi
        if err != nil {
                return nil, err
        }
-       // We don't check the version number in the premaster secret.  For one,
+       // We don't check the version number in the premaster secret. For one,
        // by checking it, we would leak information about the validity of the
        // encrypted pre-master secret. Secondly, it provides only a small
        // benefit against a downgrade attack and some implementations send the
index 5cc14278a06806eb0512a533f17f4458c81c7409..27394e6d816c44718d20b6ba8228f79b3bc8d550 100644 (file)
@@ -199,7 +199,7 @@ func TestDialTimeout(t *testing.T) {
 func TestConnReadNonzeroAndEOF(t *testing.T) {
        // This test is racy: it assumes that after a write to a
        // localhost TCP connection, the peer TCP connection can
-       // immediately read it.  Because it's racy, we skip this test
+       // immediately read it. Because it's racy, we skip this test
        // in short mode, and then retry it several times with an
        // increasing sleep in between our final write (via srv.Close
        // below) and the following read.
index 49ceadb4366fc6666b406d8bbd64deb7ccfce4e5..0388d63e1495396ca41c1985ce350b74e08bb622 100644 (file)
@@ -42,7 +42,7 @@ type rfc1423Algo struct {
 }
 
 // rfc1423Algos holds a slice of the possible ways to encrypt a PEM
-// block.  The ivSize numbers were taken from the OpenSSL source.
+// block. The ivSize numbers were taken from the OpenSSL source.
 var rfc1423Algos = []rfc1423Algo{{
        cipher:     PEMCipherDES,
        name:       "DES-CBC",
index 81018b78fe66fabda6475e07d5cc256cf79486ed..51c3be3fa461686bdfb1b78458d7908922fa2efc 100644 (file)
@@ -179,7 +179,7 @@ func (c *Certificate) systemVerify(opts *VerifyOptions) (chains [][]*Certificate
        }
 
        // CertGetCertificateChain will traverse Windows's root stores
-       // in an attempt to build a verified certificate chain.  Once
+       // in an attempt to build a verified certificate chain. Once
        // it has found a verified chain, it stops. MSDN docs on
        // CERT_CHAIN_CONTEXT:
        //
index 27e9bbfbcc6029392b048cd95e80c4162925b343..d3b62d174c70531ab8f0a17da3aca736c8950df0 100644 (file)
@@ -179,7 +179,7 @@ func (c *Certificate) isValid(certType int, currentChain []*Certificate, opts *V
        // being valid for encryption only, but no-one noticed. Another
        // European CA marked its signature keys as not being valid for
        // signatures. A different CA marked its own trusted root certificate
-       // as being invalid for certificate signing.  Another national CA
+       // as being invalid for certificate signing. Another national CA
        // distributed a certificate to be used to encrypt data for the
        // country’s tax authority that was marked as only being usable for
        // digital signatures but not for encryption. Yet another CA reversed
index 740fd9d6e7c9af2a82a0f0d297e53b70d92e2d2e..92c3b689c1103c9f93804b1340a1852f8f6310e5 100644 (file)
@@ -44,7 +44,7 @@ func driverArgs(ds *driverStmt, args []interface{}) ([]driver.Value, error) {
        // Let the Stmt convert its own arguments.
        for n, arg := range args {
                // First, see if the value itself knows how to convert
-               // itself to a driver type.  For example, a NullString
+               // itself to a driver type. For example, a NullString
                // struct changing into a string or nil.
                if svi, ok := arg.(driver.Valuer); ok {
                        sv, err := svi.Value()
index eca25f29a0aa125dbdd5537b4d7708b0b16f6d63..70c44fb92130c79bf834ff3f08c7fad19212547a 100644 (file)
@@ -144,7 +144,7 @@ type Stmt interface {
 // any type to a driver Value.
 type ColumnConverter interface {
        // ColumnConverter returns a ValueConverter for the provided
-       // column index.  If the type of a specific column isn't known
+       // column index. If the type of a specific column isn't known
        // or shouldn't be handled specially, DefaultValueConverter
        // can be returned.
        ColumnConverter(idx int) ValueConverter
@@ -154,7 +154,7 @@ type ColumnConverter interface {
 type Rows interface {
        // Columns returns the names of the columns. The number of
        // columns of the result is inferred from the length of the
-       // slice.  If a particular column name isn't known, an empty
+       // slice. If a particular column name isn't known, an empty
        // string should be returned for that entry.
        Columns() []string
 
index bc547849897be063b15fdce16175e93f1d3672dc..fbca1ea635953033fff140227c2cc8a216e11974 100644 (file)
@@ -15,7 +15,7 @@ import (
 //
 // Various implementations of ValueConverter are provided by the
 // driver package to provide consistent implementations of conversions
-// between drivers.  The ValueConverters have several uses:
+// between drivers. The ValueConverters have several uses:
 //
 //  * converting from the Value types as provided by the sql package
 //    into a database table's specific column type and making sure it
index b5ff1213587085bed3fe3237b5a575ad701a5b35..662c81d1e9fc63b21822ade31d151849f688fd22 100644 (file)
@@ -37,7 +37,7 @@ var _ = log.Printf
 // named method on fakeStmt to panic.
 //
 // When opening a fakeDriver's database, it starts empty with no
-// tables.  All tables and data are stored in memory only.
+// tables. All tables and data are stored in memory only.
 type fakeDriver struct {
        mu         sync.Mutex // guards 3 following fields
        openCount  int        // conn opens
@@ -705,7 +705,7 @@ func (s *fakeStmt) Query(args []driver.Value) (driver.Rows, error) {
 rows:
        for _, trow := range t.rows {
                // Process the where clause, skipping non-match rows. This is lazy
-               // and just uses fmt.Sprintf("%v") to test equality.  Good enough
+               // and just uses fmt.Sprintf("%v") to test equality. Good enough
                // for test code.
                for widx, wcol := range s.whereCol {
                        idx := t.columnIndex(wcol)
index 28c36160b52803660a2b4c9a16285da1ed5e88a7..7ba7ce5c905ca53e5336e6d5b2790f5fd0aa9bbc 100644 (file)
@@ -797,7 +797,7 @@ func (db *DB) conn(strategy connReuseStrategy) (*driverConn, error) {
                return conn, nil
        }
 
-       // Out of free connections or we were asked not to use one.  If we're not
+       // Out of free connections or we were asked not to use one. If we're not
        // allowed to open any more connections, make a request and wait.
        if db.maxOpen > 0 && db.numOpen >= db.maxOpen {
                // Make the connRequest channel. It's buffered so that the
@@ -1207,7 +1207,7 @@ type Tx struct {
        // ErrTxDone.
        done bool
 
-       // All Stmts prepared for this transaction.  These will be closed after the
+       // All Stmts prepared for this transaction. These will be closed after the
        // transaction has been committed or rolled back.
        stmts struct {
                sync.Mutex
@@ -1286,7 +1286,7 @@ func (tx *Tx) Prepare(query string) (*Stmt, error) {
        // necessary. Or, better: keep a map in DB of query string to
        // Stmts, and have Stmt.Execute do the right thing and
        // re-prepare if the Conn in use doesn't have that prepared
-       // statement.  But we'll want to avoid caching the statement
+       // statement. But we'll want to avoid caching the statement
        // in the case where we only call conn.Prepare implicitly
        // (such as in db.Exec or tx.Exec), but the caller package
        // can't be holding a reference to the returned statement.
@@ -1334,7 +1334,7 @@ func (tx *Tx) Prepare(query string) (*Stmt, error) {
 // be used once the transaction has been committed or rolled back.
 func (tx *Tx) Stmt(stmt *Stmt) *Stmt {
        // TODO(bradfitz): optimize this. Currently this re-prepares
-       // each time.  This is fine for now to illustrate the API but
+       // each time. This is fine for now to illustrate the API but
        // we should really cache already-prepared statements
        // per-Conn. See also the big comment in Tx.Prepare.
 
@@ -1441,9 +1441,9 @@ type Stmt struct {
        closed bool
 
        // css is a list of underlying driver statement interfaces
-       // that are valid on particular connections.  This is only
+       // that are valid on particular connections. This is only
        // used if tx == nil and one is found that has idle
-       // connections.  If tx != nil, txsi is always used.
+       // connections. If tx != nil, txsi is always used.
        css []connStmt
 
        // lastNumClosed is copied from db.numClosed when Stmt is created
@@ -1741,9 +1741,9 @@ type Rows struct {
        closeStmt driver.Stmt // if non-nil, statement to Close on close
 }
 
-// Next prepares the next result row for reading with the Scan method.  It
+// Next prepares the next result row for reading with the Scan method. It
 // returns true on success, or false if there is no next result row or an error
-// happened while preparing it.  Err should be consulted to distinguish between
+// happened while preparing it. Err should be consulted to distinguish between
 // the two cases.
 //
 // Every call to Scan, even the first one, must be preceded by a call to Next.
@@ -1898,8 +1898,8 @@ func (r *Row) Scan(dest ...interface{}) error {
        // the Rows in our defer, when we return from this function.
        // the contract with the driver.Next(...) interface is that it
        // can return slices into read-only temporary memory that's
-       // only valid until the next Scan/Close.  But the TODO is that
-       // for a lot of drivers, this copy will be unnecessary.  We
+       // only valid until the next Scan/Close. But the TODO is that
+       // for a lot of drivers, this copy will be unnecessary. We
        // should provide an optional interface for drivers to
        // implement to say, "don't worry, the []bytes that I return
        // from Next will not be modified again." (for instance, if
index 68f17fb6b00f4bf4fb51ac53d00df44c63e95fea..6f11303c14232ca94d88747334bd613115df4c31 100644 (file)
@@ -911,7 +911,7 @@ func nullTestRun(t *testing.T, spec nullTestSpec) {
        if err == nil {
                // TODO: this test fails, but it's just because
                // fakeConn implements the optional Execer interface,
-               // so arguably this is the correct behavior.  But
+               // so arguably this is the correct behavior. But
                // maybe I should flesh out the fakeConn.Exec
                // implementation so this properly fails.
                // t.Errorf("expected error inserting nil name with Exec")
index 98fe7a6ec65a68bed6a5d34307c79a6962aaeb65..7443043c1136d01e4b70fa362e8fad8b5ce3f94a 100644 (file)
@@ -22,16 +22,16 @@ type buf struct {
        err    error
 }
 
-// Data format, other than byte order.  This affects the handling of
+// Data format, other than byte order. This affects the handling of
 // certain field formats.
 type dataFormat interface {
-       // DWARF version number.  Zero means unknown.
+       // DWARF version number. Zero means unknown.
        version() int
 
        // 64-bit DWARF format?
        dwarf64() (dwarf64 bool, isKnown bool)
 
-       // Size of an address, in bytes.  Zero means unknown.
+       // Size of an address, in bytes. Zero means unknown.
        addrsize() int
 }
 
index 5001bf85a2910166cf54be7cae89e637f62c6365..6f72005e7204cedf8846eb6836feaf7d5dea117f 100644 (file)
@@ -506,7 +506,7 @@ func (b *buf) entry(atab abbrevTable, ubase Offset) *Entry {
 }
 
 // A Reader allows reading Entry structures from a DWARF ``info'' section.
-// The Entry structures are arranged in a tree.  The Reader's Next function
+// The Entry structures are arranged in a tree. The Reader's Next function
 // return successive entries from a pre-order traversal of the tree.
 // If an entry has children, its Children field will be true, and the children
 // follow, terminated by an Entry with Tag 0.
@@ -598,7 +598,7 @@ func (r *Reader) Next() (*Entry, error) {
 }
 
 // SkipChildren skips over the child entries associated with
-// the last Entry returned by Next.  If that Entry did not have
+// the last Entry returned by Next. If that Entry did not have
 // children or Next has not been called, SkipChildren is a no-op.
 func (r *Reader) SkipChildren() {
        if r.err != nil || !r.lastChildren {
@@ -625,13 +625,13 @@ func (r *Reader) SkipChildren() {
        }
 }
 
-// clone returns a copy of the reader.  This is used by the typeReader
+// clone returns a copy of the reader. This is used by the typeReader
 // interface.
 func (r *Reader) clone() typeReader {
        return r.d.Reader()
 }
 
-// offset returns the current buffer offset.  This is used by the
+// offset returns the current buffer offset. This is used by the
 // typeReader interface.
 func (r *Reader) offset() Offset {
        return r.b.off
index 7255195031505c907c28ff682e151a973ef58005..0e9c01c2e98c4f2549a668c0ffad8e73546a205d 100644 (file)
@@ -78,9 +78,9 @@ func New(abbrev, aranges, frame, info, line, pubnames, ranges, str []byte) (*Dat
        return d, nil
 }
 
-// AddTypes will add one .debug_types section to the DWARF data.  A
+// AddTypes will add one .debug_types section to the DWARF data. A
 // typical object with DWARF version 4 debug info will have multiple
-// .debug_types sections.  The name is used for error reporting only,
+// .debug_types sections. The name is used for error reporting only,
 // and serves to distinguish one .debug_types section from another.
 func (d *Data) AddTypes(name string, types []byte) error {
        return d.parseTypes(name, types)
index e4dc6480d8d79bf12314597bf150cea197a2d129..9b39078a6fbef216b43b700e941329275a30999f 100644 (file)
@@ -356,7 +356,7 @@ func (d *Data) readType(name string, r typeReader, off Offset, typeCache map[Off
        }
 
        // Get Type referred to by Entry's AttrType field.
-       // Set err if error happens.  Not having a type is an error.
+       // Set err if error happens. Not having a type is an error.
        typeOf := func(e *Entry) Type {
                tval := e.Val(AttrType)
                var t Type
@@ -549,7 +549,7 @@ func (d *Data) readType(name string, r typeReader, off Offset, typeCache map[Off
                                        bito = f.ByteOffset * 8
                                }
                                if bito == lastFieldBitOffset && t.Kind != "union" {
-                                       // Last field was zero width.  Fix array length.
+                                       // Last field was zero width. Fix array length.
                                        // (DWARF writes out 0-length arrays as if they were 1-length arrays.)
                                        zeroArray(lastFieldType)
                                }
@@ -560,7 +560,7 @@ func (d *Data) readType(name string, r typeReader, off Offset, typeCache map[Off
                if t.Kind != "union" {
                        b, ok := e.Val(AttrByteSize).(int64)
                        if ok && b*8 == lastFieldBitOffset {
-                               // Final field must be zero width.  Fix array length.
+                               // Final field must be zero width. Fix array length.
                                zeroArray(lastFieldType)
                        }
                }
index 2bd7a48961240b2ce9b268ec39d847bcf6806ad2..0283466f088111e941059cef487f58f0e2290f2b 100644 (file)
@@ -34,7 +34,7 @@ var typedefTests = map[string]string{
 }
 
 // As Apple converts gcc to a clang-based front end
-// they keep breaking the DWARF output.  This map lists the
+// they keep breaking the DWARF output. This map lists the
 // conversion from real answer to Apple answer.
 var machoBug = map[string]string{
        "func(*char, ...) void":                                 "func(*char) void",
index 4032cd4745787249444b3ec4e7368eec008d017e..ed425473869e2b982c06feaa67fd200444a552eb 100644 (file)
@@ -9,11 +9,11 @@ import (
        "strconv"
 )
 
-// Parse the type units stored in a DWARF4 .debug_types section.  Each
+// Parse the type units stored in a DWARF4 .debug_types section. Each
 // type unit defines a single primary type and an 8-byte signature.
 // Other sections may then use formRefSig8 to refer to the type.
 
-// The typeUnit format is a single type with a signature.  It holds
+// The typeUnit format is a single type with a signature. It holds
 // the same data as a compilation unit.
 type typeUnit struct {
        unit
index f53ba0079a2d04fc3086519c4586124fdeaa2bd7..613b8c501d5a9e3f58195b7da7478c44837a2db1 100644 (file)
@@ -1896,7 +1896,7 @@ type Prog32 struct {
        Align  uint32 /* Alignment in memory and file. */
 }
 
-// ELF32 Dynamic structure.  The ".dynamic" section contains an array of them.
+// ELF32 Dynamic structure. The ".dynamic" section contains an array of them.
 type Dyn32 struct {
        Tag int32  /* Entry type. */
        Val uint32 /* Integer/Address value. */
@@ -1997,7 +1997,7 @@ type Prog64 struct {
        Align  uint64 /* Alignment in memory and file. */
 }
 
-// ELF64 Dynamic structure.  The ".dynamic" section contains an array of them.
+// ELF64 Dynamic structure. The ".dynamic" section contains an array of them.
 type Dyn64 struct {
        Tag int64  /* Entry type. */
        Val uint64 /* Integer/address value */
index 3aad41fe06a712f2cf834c2c344c12e3b8668fca..01a9f11f0548390d307e8161d16f123797d2ee50 100644 (file)
@@ -53,7 +53,7 @@ const oldQuantum = 1
 func (t *LineTable) parse(targetPC uint64, targetLine int) (b []byte, pc uint64, line int) {
        // The PC/line table can be thought of as a sequence of
        //  <pc update>* <line update>
-       // batches.  Each update batch results in a (pc, line) pair,
+       // batches. Each update batch results in a (pc, line) pair,
        // where line applies to every PC from pc up to but not
        // including the pc of the next pair.
        //
index aab53752ea0b4ed351dc86a7355590eb34a3a622..bde4cc7ac50360762407a38c7d6254c31b9495b1 100644 (file)
@@ -103,7 +103,7 @@ type Obj struct {
  * Symbol tables
  */
 
-// Table represents a Go symbol table.  It stores all of the
+// Table represents a Go symbol table. It stores all of the
 // symbols decoded from the program and provides methods to translate
 // between symbols, names, and addresses.
 type Table struct {
@@ -353,7 +353,7 @@ func NewTable(symtab []byte, pcln *LineTable) (*Table, error) {
        }
 
        // Count text symbols and attach frame sizes, parameters, and
-       // locals to them.  Also, find object file boundaries.
+       // locals to them. Also, find object file boundaries.
        lastf := 0
        for i := 0; i < len(t.Syms); i++ {
                sym := &t.Syms[i]
@@ -503,7 +503,7 @@ func (t *Table) PCToLine(pc uint64) (file string, line int, fn *Func) {
 }
 
 // LineToPC looks up the first program counter on the given line in
-// the named file.  It returns UnknownPathError or UnknownLineError if
+// the named file. It returns UnknownPathError or UnknownLineError if
 // there is an error looking up this line.
 func (t *Table) LineToPC(file string, line int) (pc uint64, fn *Func, err error) {
        obj, ok := t.Files[file]
index 4d7193873a2410fc67f9163ed6ea5e9e3e39f7b2..d42eb0ab00a6f970ba2d166dc61ebeb9d9f70413 100644 (file)
@@ -20,7 +20,7 @@ import (
 //
 // The encoding handles 4-byte chunks, using a special encoding
 // for the last fragment, so Encode is not appropriate for use on
-// individual blocks of a large data stream.  Use NewEncoder() instead.
+// individual blocks of a large data stream. Use NewEncoder() instead.
 //
 // Often, ascii85-encoded data is wrapped in <~ and ~> symbols.
 // Encode does not add these.
@@ -85,7 +85,7 @@ func Encode(dst, src []byte) int {
 // MaxEncodedLen returns the maximum length of an encoding of n source bytes.
 func MaxEncodedLen(n int) int { return (n + 3) / 4 * 5 }
 
-// NewEncoder returns a new ascii85 stream encoder.  Data written to
+// NewEncoder returns a new ascii85 stream encoder. Data written to
 // the returned writer will be encoded and then written to w.
 // Ascii85 encodings operate in 32-bit blocks; when finished
 // writing, the caller must Close the returned encoder to flush any
@@ -294,7 +294,7 @@ func (d *decoder) Read(p []byte) (n int, err error) {
                        }
                }
 
-               // Out of input, out of decoded output.  Check errors.
+               // Out of input, out of decoded output. Check errors.
                if d.err != nil {
                        return 0, d.err
                }
index 6e858584a67f90d43547153ffa919336d66f3919..2b796c4e75d108ade665452786be9ce5f067be2e 100644 (file)
@@ -17,7 +17,7 @@ import (
 
 // A forkableWriter is an in-memory buffer that can be
 // 'forked' to create new forkableWriters that bracket the
-// original.  After
+// original. After
 //    pre, post := w.fork()
 // the overall sequence of bytes represented is logically w+pre+post.
 type forkableWriter struct {
index 5a9e86919d80035a69febd7cc94eeabbf98db037..c193e65e1bc45d1dcc9d1a0318bfbaef56fa9203 100644 (file)
@@ -17,7 +17,7 @@ import (
  */
 
 // An Encoding is a radix 32 encoding/decoding scheme, defined by a
-// 32-character alphabet.  The most common is the "base32" encoding
+// 32-character alphabet. The most common is the "base32" encoding
 // introduced for SASL GSSAPI and standardized in RFC 4648.
 // The alternate "base32hex" encoding is used in DNSSEC.
 type Encoding struct {
@@ -66,7 +66,7 @@ var removeNewlinesMapper = func(r rune) rune {
 //
 // The encoding pads the output to a multiple of 8 bytes,
 // so Encode is not appropriate for use on individual blocks
-// of a large data stream.  Use NewEncoder() instead.
+// of a large data stream. Use NewEncoder() instead.
 func (enc *Encoding) Encode(dst, src []byte) {
        if len(src) == 0 {
                return
@@ -208,7 +208,7 @@ func (e *encoder) Close() error {
        return e.err
 }
 
-// NewEncoder returns a new base32 stream encoder.  Data written to
+// NewEncoder returns a new base32 stream encoder. Data written to
 // the returned writer will be encoded using enc and then written to w.
 // Base32 encodings operate in 5-byte blocks; when finished
 // writing, the caller must Close the returned encoder to flush any
@@ -313,9 +313,9 @@ func (enc *Encoding) decode(dst, src []byte) (n int, end bool, err error) {
        return n, end, nil
 }
 
-// Decode decodes src using the encoding enc.  It writes at most
+// Decode decodes src using the encoding enc. It writes at most
 // DecodedLen(len(src)) bytes to dst and returns the number of bytes
-// written.  If src contains invalid base32 data, it will return the
+// written. If src contains invalid base32 data, it will return the
 // number of bytes successfully written and CorruptInputError.
 // New line characters (\r and \n) are ignored.
 func (enc *Encoding) Decode(dst, src []byte) (n int, err error) {
index 1bda804c38ab4868e91d240c1245a78e35e73412..0de9b40f85612cadca2ecf9ebae291cb2cf3e7b9 100644 (file)
@@ -15,7 +15,7 @@ import (
  */
 
 // An Encoding is a radix 64 encoding/decoding scheme, defined by a
-// 64-character alphabet.  The most common encoding is the "base64"
+// 64-character alphabet. The most common encoding is the "base64"
 // encoding defined in RFC 4648 and used in MIME (RFC 2045) and PEM
 // (RFC 1421).  RFC 4648 also defines an alternate encoding, which is
 // the standard encoding with - and _ substituted for + and /.
@@ -89,7 +89,7 @@ var RawURLEncoding = URLEncoding.WithPadding(NoPadding)
 //
 // The encoding pads the output to a multiple of 4 bytes,
 // so Encode is not appropriate for use on individual blocks
-// of a large data stream.  Use NewEncoder() instead.
+// of a large data stream. Use NewEncoder() instead.
 func (enc *Encoding) Encode(dst, src []byte) {
        if len(src) == 0 {
                return
@@ -213,7 +213,7 @@ func (e *encoder) Close() error {
        return e.err
 }
 
-// NewEncoder returns a new base64 stream encoder.  Data written to
+// NewEncoder returns a new base64 stream encoder. Data written to
 // the returned writer will be encoded using enc and then written to w.
 // Base64 encodings operate in 4-byte blocks; when finished
 // writing, the caller must Close the returned encoder to flush any
@@ -328,9 +328,9 @@ func (enc *Encoding) decode(dst, src []byte) (n int, end bool, err error) {
        return n, end, err
 }
 
-// Decode decodes src using the encoding enc.  It writes at most
+// Decode decodes src using the encoding enc. It writes at most
 // DecodedLen(len(src)) bytes to dst and returns the number of bytes
-// written.  If src contains invalid base64 data, it will return the
+// written. If src contains invalid base64 data, it will return the
 // number of bytes successfully written and CorruptInputError.
 // New line characters (\r and \n) are ignored.
 func (enc *Encoding) Decode(dst, src []byte) (n int, err error) {
index efc425ec42bf53d3cceb4991466c76bd10482fd6..3511a996a1d2b551227b4a572a967ad45d4577eb 100644 (file)
@@ -266,7 +266,7 @@ func TestBlankFields(t *testing.T) {
 }
 
 // An attempt to read into a struct with an unexported field will
-// panic.  This is probably not the best choice, but at this point
+// panic. This is probably not the best choice, but at this point
 // anything else would be an API change.
 
 type Unexported struct {
index 816ed26754277673433b9c4afc7e541acf2c0b3e..58f6eed1e66c3f602487a9c1dcbd0a018596e8e1 100644 (file)
 //
 // Carriage returns before newline characters are silently removed.
 //
-// Blank lines are ignored.  A line with only whitespace characters (excluding
+// Blank lines are ignored. A line with only whitespace characters (excluding
 // the ending newline character) is not considered a blank line.
 //
 // Fields which start and stop with the quote character " are called
-// quoted-fields.  The beginning and ending quote are not part of the
+// quoted-fields. The beginning and ending quote are not part of the
 // field.
 //
 // The source:
@@ -84,15 +84,15 @@ var (
 // The exported fields can be changed to customize the details before the
 // first call to Read or ReadAll.
 //
-// Comma is the field delimiter.  It defaults to ','.
+// Comma is the field delimiter. It defaults to ','.
 //
 // Comment, if not 0, is the comment character. Lines beginning with the
 // Comment character are ignored.
 //
 // If FieldsPerRecord is positive, Read requires each record to
-// have the given number of fields.  If FieldsPerRecord is 0, Read sets it to
+// have the given number of fields. If FieldsPerRecord is 0, Read sets it to
 // the number of fields in the first record, so that future records must
-// have the same field count.  If FieldsPerRecord is negative, no check is
+// have the same field count. If FieldsPerRecord is negative, no check is
 // made and records may have a variable number of fields.
 //
 // If LazyQuotes is true, a quote may appear in an unquoted field and a
@@ -131,7 +131,7 @@ func (r *Reader) error(err error) error {
        }
 }
 
-// Read reads one record from r.  The record is a slice of strings with each
+// Read reads one record from r. The record is a slice of strings with each
 // string representing one field.
 func (r *Reader) Read() (record []string, err error) {
        for {
@@ -179,7 +179,7 @@ func (r *Reader) ReadAll() (records [][]string, err error) {
 func (r *Reader) readRune() (rune, error) {
        r1, _, err := r.r.ReadRune()
 
-       // Handle \r\n here.  We make the simplifying assumption that
+       // Handle \r\n here. We make the simplifying assumption that
        // anytime \r is followed by \n that it can be folded to \n.
        // We will not detect files which contain both \r\n and bare \n.
        if r1 == '\r' {
@@ -210,13 +210,13 @@ func (r *Reader) skip(delim rune) error {
 
 // parseRecord reads and parses a single csv record from r.
 func (r *Reader) parseRecord() (fields []string, err error) {
-       // Each record starts on a new line.  We increment our line
+       // Each record starts on a new line. We increment our line
        // number (lines start at 1, not 0) and set column to -1
        // so as we increment in readRune it points to the character we read.
        r.line++
        r.column = -1
 
-       // Peek at the first rune.  If it is an error we are done.
+       // Peek at the first rune. If it is an error we are done.
        // If we support comments and it is the comment character
        // then skip to the end of line.
 
@@ -249,8 +249,8 @@ func (r *Reader) parseRecord() (fields []string, err error) {
        }
 }
 
-// parseField parses the next field in the record.  The read field is
-// located in r.field.  Delim is the first character not part of the field
+// parseField parses the next field in the record. The read field is
+// located in r.field. Delim is the first character not part of the field
 // (r.Comma or '\n').
 func (r *Reader) parseField() (haveField bool, delim rune, err error) {
        r.field.Reset()
index e8739fb554232fc473f321fad634645ac0a65e41..84b7aa1ed10d30ac6e32a4e70bbac546718bbbca 100644 (file)
@@ -15,7 +15,7 @@ import (
 // A Writer writes records to a CSV encoded file.
 //
 // As returned by NewWriter, a Writer writes records terminated by a
-// newline and uses ',' as the field delimiter.  The exported fields can be
+// newline and uses ',' as the field delimiter. The exported fields can be
 // changed to customize the details before the first call to Write or WriteAll.
 //
 // Comma is the field delimiter.
index 536bbdb5ac6a5397330a21d3c5e5743e826e3ad4..d69d36f5164d51f796b50c229341757fc0c62ab4 100644 (file)
@@ -7,7 +7,7 @@
 
 package gob
 
-// This file is not normally included in the gob package.  Used only for debugging the package itself.
+// This file is not normally included in the gob package. Used only for debugging the package itself.
 // Except for reading uints, it is an implementation of a reader that is independent of
 // the one implemented by Decoder.
 // To enable the Debug function, delete the +build ignore line above and do
@@ -241,7 +241,7 @@ func (deb *debugger) delimitedMessage(indent tab) bool {
 // loadBlock preps us to read a message
 // of the length specified next in the input. It returns
 // the length of the block. The argument tells whether
-// an EOF is acceptable now.  If it is and one is found,
+// an EOF is acceptable now. If it is and one is found,
 // the return value is negative.
 func (deb *debugger) loadBlock(eofOK bool) int {
        n64, w, err := decodeUintReader(deb.r, deb.tmp) // deb.uint64 will error at EOF
@@ -339,7 +339,7 @@ func (deb *debugger) string() string {
        return string(b)
 }
 
-// delta returns the field delta at the input point.  The expect argument,
+// delta returns the field delta at the input point. The expect argument,
 // if non-negative, identifies what the value should be.
 func (deb *debugger) delta(expect int) int {
        delta := int(deb.uint64())
index 3b0dca86f349f091bfa0cac0eb332a5d3c18417a..3b2249f6168e5887fdffeb3a6b89760fd85dcdd8 100644 (file)
@@ -216,10 +216,10 @@ func ignoreTwoUints(i *decInstr, state *decoderState, v reflect.Value) {
 }
 
 // Since the encoder writes no zeros, if we arrive at a decoder we have
-// a value to extract and store.  The field number has already been read
+// a value to extract and store. The field number has already been read
 // (it's how we knew to call this decoder).
 // Each decoder is responsible for handling any indirections associated
-// with the data structure.  If any pointer so reached is nil, allocation must
+// with the data structure. If any pointer so reached is nil, allocation must
 // be done.
 
 // decAlloc takes a value and returns a settable value that can
@@ -308,9 +308,9 @@ func decUint64(i *decInstr, state *decoderState, value reflect.Value) {
 }
 
 // Floating-point numbers are transmitted as uint64s holding the bits
-// of the underlying representation.  They are sent byte-reversed, with
+// of the underlying representation. They are sent byte-reversed, with
 // the exponent end coming out first, so integer floating point numbers
-// (for example) transmit more compactly.  This routine does the
+// (for example) transmit more compactly. This routine does the
 // unswizzling.
 func float64FromBits(u uint64) float64 {
        var v uint64
@@ -332,7 +332,7 @@ func float32FromBits(u uint64, ovfl error) float64 {
        if av < 0 {
                av = -av
        }
-       // +Inf is OK in both 32- and 64-bit floats.  Underflow is always OK.
+       // +Inf is OK in both 32- and 64-bit floats. Underflow is always OK.
        if math.MaxFloat32 < av && av <= math.MaxFloat64 {
                error_(ovfl)
        }
@@ -421,7 +421,7 @@ func ignoreUint8Array(i *decInstr, state *decoderState, value reflect.Value) {
 // Execution engine
 
 // The encoder engine is an array of instructions indexed by field number of the incoming
-// decoder.  It is executed with random access according to field number.
+// decoder. It is executed with random access according to field number.
 type decEngine struct {
        instr    []decInstr
        numInstr int // the number of active instructions
@@ -442,7 +442,7 @@ func (dec *Decoder) decodeSingle(engine *decEngine, ut *userTypeInfo, value refl
 }
 
 // decodeStruct decodes a top-level struct and stores it in value.
-// Indir is for the value, not the type.  At the time of the call it may
+// Indir is for the value, not the type. At the time of the call it may
 // differ from ut.indir, which was computed when the engine was built.
 // This state cannot arise for decodeSingle, which is called directly
 // from the user's value, not from the innards of an engine.
@@ -536,7 +536,7 @@ func (dec *Decoder) decodeArrayHelper(state *decoderState, value reflect.Value,
 }
 
 // decodeArray decodes an array and stores it in value.
-// The length is an unsigned integer preceding the elements.  Even though the length is redundant
+// The length is an unsigned integer preceding the elements. Even though the length is redundant
 // (it's part of the type), it's a useful check and is included in the encoding.
 func (dec *Decoder) decodeArray(atyp reflect.Type, state *decoderState, value reflect.Value, elemOp decOp, length int, ovfl error, helper decHelper) {
        if n := state.decodeUint(); n != uint64(length) {
@@ -1075,7 +1075,7 @@ func (dec *Decoder) compileIgnoreSingle(remoteId typeId) (engine *decEngine, err
        return
 }
 
-// compileDec compiles the decoder engine for a value.  If the value is not a struct,
+// compileDec compiles the decoder engine for a value. If the value is not a struct,
 // it calls out to compileSingle.
 func (dec *Decoder) compileDec(remoteId typeId, ut *userTypeInfo) (engine *decEngine, err error) {
        defer catchError(&err)
index c453e9ba397d3c568d05116a5d4398be1d555bcb..c1829417733a1a4c15ce49856a27cf4b22ce123a 100644 (file)
@@ -130,9 +130,9 @@ func (dec *Decoder) nextUint() uint64 {
 // decodeTypeSequence parses:
 // TypeSequence
 //     (TypeDefinition DelimitedTypeDefinition*)?
-// and returns the type id of the next value.  It returns -1 at
+// and returns the type id of the next value. It returns -1 at
 // EOF.  Upon return, the remainder of dec.buf is the value to be
-// decoded.  If this is an interface value, it can be ignored by
+// decoded. If this is an interface value, it can be ignored by
 // resetting that buffer.
 func (dec *Decoder) decodeTypeSequence(isInterface bool) typeId {
        for dec.err == nil {
@@ -150,7 +150,7 @@ func (dec *Decoder) decodeTypeSequence(isInterface bool) typeId {
                // Type definition for (-id) follows.
                dec.recvType(-id)
                // When decoding an interface, after a type there may be a
-               // DelimitedValue still in the buffer.  Skip its count.
+               // DelimitedValue still in the buffer. Skip its count.
                // (Alternatively, the buffer is empty and the byte count
                // will be absorbed by recvMessage.)
                if dec.buf.Len() > 0 {
@@ -177,7 +177,7 @@ func (dec *Decoder) Decode(e interface{}) error {
        }
        value := reflect.ValueOf(e)
        // If e represents a value as opposed to a pointer, the answer won't
-       // get back to the caller.  Make sure it's a pointer.
+       // get back to the caller. Make sure it's a pointer.
        if value.Type().Kind() != reflect.Ptr {
                dec.err = errors.New("gob: attempt to decode into a non-pointer")
                return dec.err
@@ -187,7 +187,7 @@ func (dec *Decoder) Decode(e interface{}) error {
 
 // DecodeValue reads the next value from the input stream.
 // If v is the zero reflect.Value (v.Kind() == Invalid), DecodeValue discards the value.
-// Otherwise, it stores the value into v.  In that case, v must represent
+// Otherwise, it stores the value into v. In that case, v must represent
 // a non-nil pointer to data or be an assignable reflect.Value (v.CanSet())
 // If the input is at EOF, DecodeValue returns io.EOF and
 // does not modify v.
index 96052ef33b6f07b99e1a1fe6779950e7e654ff42..2b3a556eac2dd29b153dccf253ea7ed7e2061dbb 100644 (file)
@@ -96,7 +96,7 @@ func (enc *Encoder) freeEncoderState(e *encoderState) {
        enc.freeList = e
 }
 
-// Unsigned integers have a two-state encoding.  If the number is less
+// Unsigned integers have a two-state encoding. If the number is less
 // than 128 (0 through 0x7F), its value is written directly.
 // Otherwise the value is written in big-endian byte order preceded
 // by the byte length, negated.
@@ -152,8 +152,8 @@ func (state *encoderState) update(instr *encInstr) {
 
 // Each encoder for a composite is responsible for handling any
 // indirections associated with the elements of the data structure.
-// If any pointer so reached is nil, no bytes are written.  If the
-// data item is zero, no bytes are written.  Single values - ints,
+// If any pointer so reached is nil, no bytes are written. If the
+// data item is zero, no bytes are written. Single values - ints,
 // strings etc. - are indirected before calling their encoders.
 // Otherwise, the output (for a scalar) is the field number, as an
 // encoded integer, followed by the field data in its appropriate
@@ -203,9 +203,9 @@ func encUint(i *encInstr, state *encoderState, v reflect.Value) {
 
 // floatBits returns a uint64 holding the bits of a floating-point number.
 // Floating-point numbers are transmitted as uint64s holding the bits
-// of the underlying representation.  They are sent byte-reversed, with
+// of the underlying representation. They are sent byte-reversed, with
 // the exponent end coming out first, so integer floating point numbers
-// (for example) transmit more compactly.  This routine does the
+// (for example) transmit more compactly. This routine does the
 // swizzling.
 func floatBits(f float64) uint64 {
        u := math.Float64bits(f)
@@ -272,7 +272,7 @@ func encStructTerminator(i *encInstr, state *encoderState, v reflect.Value) {
 // Execution engine
 
 // encEngine an array of instructions indexed by field number of the encoding
-// data, typically a struct.  It is executed top to bottom, walking the struct.
+// data, typically a struct. It is executed top to bottom, walking the struct.
 type encEngine struct {
        instr []encInstr
 }
@@ -297,7 +297,7 @@ func (enc *Encoder) encodeSingle(b *encBuffer, engine *encEngine, value reflect.
        defer enc.freeEncoderState(state)
        state.fieldnum = singletonField
        // There is no surrounding struct to frame the transmission, so we must
-       // generate data even if the item is zero.  To do this, set sendZero.
+       // generate data even if the item is zero. To do this, set sendZero.
        state.sendZero = true
        instr := &engine.instr[singletonField]
        if instr.indir > 0 {
@@ -386,7 +386,7 @@ func (enc *Encoder) encodeMap(b *encBuffer, mv reflect.Value, keyOp, elemOp encO
 // encodeInterface encodes the interface value iv.
 // To send an interface, we send a string identifying the concrete type, followed
 // by the type identifier (which might require defining that type right now), followed
-// by the concrete value.  A nil value gets sent as the empty string for the name,
+// by the concrete value. A nil value gets sent as the empty string for the name,
 // followed by no value.
 func (enc *Encoder) encodeInterface(b *encBuffer, iv reflect.Value) {
        // Gobs can encode nil interface values but not typed interface
@@ -417,7 +417,7 @@ func (enc *Encoder) encodeInterface(b *encBuffer, iv reflect.Value) {
        enc.sendTypeDescriptor(enc.writer(), state, ut)
        // Send the type id.
        enc.sendTypeId(state, ut)
-       // Encode the value into a new buffer.  Any nested type definitions
+       // Encode the value into a new buffer. Any nested type definitions
        // should be written to b, before the encoded value.
        enc.pushWriter(b)
        data := encBufferPool.Get().(*encBuffer)
index 62d0f42e81ae3fc8f7bbdd692bfc31427803a68d..92b559ee1105fcba522d6f9c9df2563d0d5eac64 100644 (file)
@@ -191,7 +191,7 @@ func (enc *Encoder) sendTypeDescriptor(w io.Writer, state *encoderState, ut *use
                        return
                }
                // If the type info has still not been transmitted, it means we have
-               // a singleton basic type (int, []byte etc.) at top level.  We don't
+               // a singleton basic type (int, []byte etc.) at top level. We don't
                // need to send the type info but we do need to update enc.sent.
                if !sent {
                        info, err := getTypeInfo(ut)
index 811dd2b18ce797bcb0eb1cfacea4f2ec3c90b29b..9fa01d7bfcabf9c9d22b548e21b4b94aadc08a52 100644 (file)
@@ -439,8 +439,8 @@ func (this *interfaceIndirectTestT) F() bool {
        return true
 }
 
-// A version of a bug reported on golang-nuts.  Also tests top-level
-// slice of interfaces.  The issue was registering *T caused T to be
+// A version of a bug reported on golang-nuts. Also tests top-level
+// slice of interfaces. The issue was registering *T caused T to be
 // stored as the concrete type.
 func TestInterfaceIndirect(t *testing.T) {
        Register(&interfaceIndirectTestT{})
@@ -463,7 +463,7 @@ func TestInterfaceIndirect(t *testing.T) {
 
 // Also, when the ignored object contains an interface value, it may define
 // types. Make sure that skipping the value still defines the types by using
-// the encoder/decoder pair to send a value afterwards.  If an interface
+// the encoder/decoder pair to send a value afterwards. If an interface
 // is sent, its type in the test is always NewType0, so this checks that the
 // encoder and decoder don't skew with respect to type definitions.
 
@@ -913,7 +913,7 @@ func TestMutipleEncodingsOfBadType(t *testing.T) {
 // There was an error check comparing the length of the input with the
 // length of the slice being decoded. It was wrong because the next
 // thing in the input might be a type definition, which would lead to
-// an incorrect length check.  This test reproduces the corner case.
+// an incorrect length check. This test reproduces the corner case.
 
 type Z struct {
 }
index 92cc0c615e3bd94bd286700ac510705c5b1cac2a..8b5265c278ff2ad99150f84344276f73ff45e40d 100644 (file)
@@ -9,7 +9,7 @@ import "fmt"
 // Errors in decoding and encoding are handled using panic and recover.
 // Panics caused by user error (that is, everything except run-time panics
 // such as "index out of bounds" errors) do not leave the file that caused
-// them, but are instead turned into plain error returns.  Encoding and
+// them, but are instead turned into plain error returns. Encoding and
 // decoding functions and methods that do not return an error either use
 // panic to report an error or are guaranteed error-free.
 
@@ -30,7 +30,7 @@ func error_(err error) {
 }
 
 // catchError is meant to be used as a deferred function to turn a panic(gobError) into a
-// plain error.  It overwrites the error return of the function that deferred its call.
+// plain error. It overwrites the error return of the function that deferred its call.
 func catchError(err *error) {
        if e := recover(); e != nil {
                ge, ok := e.(gobError)
index 4681e6307b2d8aa5c4c55520342f51faa382f514..cf5ba386079c05f0af48d41bd13837fc095c8449 100644 (file)
@@ -60,7 +60,7 @@ func interfaceEncode(enc *gob.Encoder, p Pythagoras) {
        // registered. We registered it in the calling function.
 
        // Pass pointer to interface so Encode sees (and hence sends) a value of
-       // interface type.  If we passed p directly it would see the concrete type instead.
+       // interface type. If we passed p directly it would see the concrete type instead.
        // See the blog post, "The Laws of Reflection" for background.
        err := enc.Encode(&p)
        if err != nil {
index 020352ceeeba0c1c1b152651c36f67a6cc48d5af..16b71236f01b0a4755ac434e0222944c29e364bb 100644 (file)
@@ -24,7 +24,7 @@ type Q struct {
 // This example shows the basic usage of the package: Create an encoder,
 // transmit some values, receive them with a decoder.
 func Example_basic() {
-       // Initialize the encoder and decoder.  Normally enc and dec would be
+       // Initialize the encoder and decoder. Normally enc and dec would be
        // bound to network connections and the encoder and decoder would
        // run in different processes.
        var network bytes.Buffer        // Stand-in for a network connection
index d674f0c784d0944c6675596a5deac8644da4e11b..ecc91eef1f872df37261e71928d1b228ceaacf8a 100644 (file)
@@ -376,7 +376,7 @@ func TestGobEncoderIndirectArrayField(t *testing.T) {
 }
 
 // As long as the fields have the same name and implement the
-// interface, we can cross-connect them.  Not sure it's useful
+// interface, we can cross-connect them. Not sure it's useful
 // and may even be bad but it works and it's hard to prevent
 // without exposing the contents of the object, which would
 // defeat the purpose.
@@ -434,7 +434,7 @@ func TestGobEncoderValueEncoder(t *testing.T) {
 }
 
 // Test that we can use a value then a pointer type of a GobEncoder
-// in the same encoded value.  Bug 4647.
+// in the same encoded value. Bug 4647.
 func TestGobEncoderValueThenPointer(t *testing.T) {
        v := ValueGobber("forty-two")
        w := ValueGobber("six-by-nine")
index cf5cec0703bcc0f1cbeed1664e4bea00bdf6cb0a..c27f7e9707e91922f872ff36de6ba3fd20216dd3 100644 (file)
@@ -17,7 +17,7 @@ import (
 )
 
 // userTypeInfo stores the information associated with a type the user has handed
-// to the package.  It's computed once and stored in a map keyed by reflection
+// to the package. It's computed once and stored in a map keyed by reflection
 // type.
 type userTypeInfo struct {
        user        reflect.Type // the type the user handed us
@@ -44,7 +44,7 @@ var (
 )
 
 // validType returns, and saves, the information associated with user-provided type rt.
-// If the user type is not valid, err will be non-nil.  To be used when the error handler
+// If the user type is not valid, err will be non-nil. To be used when the error handler
 // is not set up.
 func validUserType(rt reflect.Type) (ut *userTypeInfo, err error) {
        userTypeLock.RLock()
@@ -64,7 +64,7 @@ func validUserType(rt reflect.Type) (ut *userTypeInfo, err error) {
        ut.base = rt
        ut.user = rt
        // A type that is just a cycle of pointers (such as type T *T) cannot
-       // be represented in gobs, which need some concrete data.  We use a
+       // be represented in gobs, which need some concrete data. We use a
        // cycle detection algorithm from Knuth, Vol 2, Section 3.1, Ex 6,
        // pp 539-540.  As we step through indirections, run another type at
        // half speed. If they meet up, there's a cycle.
@@ -493,7 +493,7 @@ func newTypeObject(name string, ut *userTypeInfo, rt reflect.Type) (gobType, err
                // For arrays, maps, and slices, we set the type id after the elements
                // are constructed. This is to retain the order of type id allocation after
                // a fix made to handle recursive types, which changed the order in
-               // which types are built.  Delaying the setting in this way preserves
+               // which types are built. Delaying the setting in this way preserves
                // type ids while allowing recursive types to be described. Structs,
                // done below, were already handling recursion correctly so they
                // assign the top-level id before those of the field.
@@ -597,7 +597,7 @@ func getBaseType(name string, rt reflect.Type) (gobType, error) {
 
 // getType returns the Gob type describing the given reflect.Type.
 // Should be called only when handling GobEncoders/Decoders,
-// which may be pointers.  All other types are handled through the
+// which may be pointers. All other types are handled through the
 // base type, never a pointer.
 // typeLock must be held.
 func getType(name string, ut *userTypeInfo, rt reflect.Type) (gobType, error) {
@@ -642,7 +642,7 @@ func bootstrapType(name string, e interface{}, expect typeId) typeId {
 // For bootstrapping purposes, we assume that the recipient knows how
 // to decode a wireType; it is exactly the wireType struct here, interpreted
 // using the gob rules for sending a structure, except that we assume the
-// ids for wireType and structType etc. are known.  The relevant pieces
+// ids for wireType and structType etc. are known. The relevant pieces
 // are built in encode.go's init() function.
 // To maintain binary compatibility, if you extend this type, always put
 // the new fields last.
@@ -789,7 +789,7 @@ func mustGetTypeInfo(rt reflect.Type) *typeInfo {
 //
 // Note: Since gobs can be stored permanently, it is good design
 // to guarantee the encoding used by a GobEncoder is stable as the
-// software evolves.  For instance, it might make sense for GobEncode
+// software evolves. For instance, it might make sense for GobEncode
 // to include a version number in the encoding.
 type GobEncoder interface {
        // GobEncode returns a byte slice representing the encoding of the
@@ -838,8 +838,8 @@ func RegisterName(name string, value interface{}) {
 }
 
 // Register records a type, identified by a value for that type, under its
-// internal type name.  That name will identify the concrete type of a value
-// sent or received as an interface variable.  Only types that will be
+// internal type name. That name will identify the concrete type of a value
+// sent or received as an interface variable. Only types that will be
 // transferred as implementations of interface values need to be registered.
 // Expecting to be used only during initialization, it panics if the mapping
 // between types and names is not a bijection.
index a51b1db61c1510dfca8539ba8a6b45c985f775bf..73a25034be12c7167ad85dd1acff5008b19e8978 100644 (file)
@@ -18,7 +18,7 @@ const hextable = "0123456789abcdef"
 func EncodedLen(n int) int { return n * 2 }
 
 // Encode encodes src into EncodedLen(len(src))
-// bytes of dst.  As a convenience, it returns the number
+// bytes of dst. As a convenience, it returns the number
 // of bytes written to dst, but this value is always EncodedLen(len(src)).
 // Encode implements hexadecimal encoding.
 func Encode(dst, src []byte) int {
index 539d952ad68678974ebb1cab0845e5db67998a56..3e4b16e4107d9c97e35134eae822a6c575d600a0 100644 (file)
@@ -29,9 +29,9 @@ import (
 // with the following additional rules:
 //
 // To unmarshal JSON into a pointer, Unmarshal first handles the case of
-// the JSON being the JSON literal null.  In that case, Unmarshal sets
-// the pointer to nil.  Otherwise, Unmarshal unmarshals the JSON into
-// the value pointed at by the pointer.  If the pointer is nil, Unmarshal
+// the JSON being the JSON literal null. In that case, Unmarshal sets
+// the pointer to nil. Otherwise, Unmarshal unmarshals the JSON into
+// the value pointed at by the pointer. If the pointer is nil, Unmarshal
 // allocates a new value for it to point to.
 //
 // To unmarshal JSON into a struct, Unmarshal matches incoming object
@@ -534,7 +534,7 @@ func (d *decodeState) array(v reflect.Value) {
 
        if i < v.Len() {
                if v.Kind() == reflect.Array {
-                       // Array.  Zero the rest.
+                       // Array. Zero the rest.
                        z := reflect.Zero(v.Type().Elem())
                        for ; i < v.Len(); i++ {
                                v.Index(i).Set(z)
@@ -902,7 +902,7 @@ func (d *decodeState) literalStore(item []byte, v reflect.Value, fromQuoted bool
 }
 
 // The xxxInterface routines build up a value to be stored
-// in an empty interface.  They are not strictly necessary,
+// in an empty interface. They are not strictly necessary,
 // but they avoid the weight of reflection in this common case.
 
 // valueInterface is like value but returns interface{}
index e54f7e9469e74d883dd9c28233234a5475a33b4f..982561d6ecd1eafd4c59bf243c53b09f39508e26 100644 (file)
@@ -131,7 +131,7 @@ import (
 // an UnsupportedTypeError.
 //
 // JSON cannot represent cyclic data structures and Marshal does not
-// handle them.  Passing cyclic structures to Marshal will result in
+// handle them. Passing cyclic structures to Marshal will result in
 // an infinite recursion.
 //
 func Marshal(v interface{}) ([]byte, error) {
@@ -325,7 +325,7 @@ func typeEncoder(t reflect.Type) encoderFunc {
 
        // To deal with recursive types, populate the map with an
        // indirect func before we build it. This type waits on the
-       // real func (f) to be ready and then calls it.  This indirect
+       // real func (f) to be ready and then calls it. This indirect
        // func is only used for recursive types.
        encoderCache.Lock()
        if encoderCache.m == nil {
index e495a4e8f0f64d733ae1de186d384583d329c2de..a6d8706c73130dcb55c190d7cae251d7f0e6c7bc 100644 (file)
@@ -132,7 +132,7 @@ const (
 
 // These values are stored in the parseState stack.
 // They give the current state of a composite value
-// being scanned.  If the parser is inside a nested value
+// being scanned. If the parser is inside a nested value
 // the parseState describes the nested state, outermost at entry 0.
 const (
        parseObjectKey   = iota // parsing object key (before colon)
index c056f2b6a533f2ef3ed6c998c1808d4dae7fe7fc..f5612692b8519868d0e6318d93aa4ae6553b3f66 100644 (file)
@@ -148,7 +148,7 @@ func (dec *Decoder) refill() error {
                dec.buf = newBuf
        }
 
-       // Read.  Delay error for next iteration (after scan).
+       // Read. Delay error for next iteration (after scan).
        n, err := dec.r.Read(dec.buf[len(dec.buf):cap(dec.buf)])
        dec.buf = dec.buf[0 : len(dec.buf)+n]
 
index 506196b1db9bd412c050b9da4516d172a1f1801e..ff2bed161adf7ca7c24768737ae7e094eef50525 100644 (file)
@@ -150,7 +150,7 @@ func Decode(data []byte) (p *Block, rest []byte) {
 func decodeError(data, rest []byte) (*Block, []byte) {
        // If we get here then we have rejected a likely looking, but
        // ultimately invalid PEM block. We need to start over from a new
-       // position.  We have consumed the preamble line and will have consumed
+       // position. We have consumed the preamble line and will have consumed
        // any lines which could be header lines. However, a valid preamble
        // line is not a valid header line, therefore we cannot have consumed
        // the preamble line for the any subsequent block. Thus, we will always
index 9fcd5d769597917bc416c9d5d8c0f8fa869cdf1f..b9f5a39fde537ab873a7493b7fc3e0821e5ccfe6 100644 (file)
@@ -26,9 +26,9 @@ const (
 //
 // Marshal handles an array or slice by marshalling each of the elements.
 // Marshal handles a pointer by marshalling the value it points at or, if the
-// pointer is nil, by writing nothing.  Marshal handles an interface value by
+// pointer is nil, by writing nothing. Marshal handles an interface value by
 // marshalling the value it contains or, if the interface value is nil, by
-// writing nothing.  Marshal handles all other data by writing one or more XML
+// writing nothing. Marshal handles all other data by writing one or more XML
 // elements containing the data.
 //
 // The name for the XML elements is taken from, in order of preference:
@@ -63,7 +63,7 @@ const (
 //       value were part of the outer struct.
 //
 // If a field uses a tag "a>b>c", then the element c will be nested inside
-// parent elements a and b.  Fields that appear next to each other that name
+// parent elements a and b. Fields that appear next to each other that name
 // the same parent will be enclosed in one XML element.
 //
 // See MarshalIndent for an example.
@@ -217,7 +217,7 @@ func (enc *Encoder) EncodeToken(t Token) error {
                return p.cachedWriteError()
        case ProcInst:
                // First token to be encoded which is also a ProcInst with target of xml
-               // is the xml declaration.  The only ProcInst where target of xml is allowed.
+               // is the xml declaration. The only ProcInst where target of xml is allowed.
                if t.Target == "xml" && p.Buffered() != 0 {
                        return fmt.Errorf("xml: EncodeToken of ProcInst xml target only valid for xml declaration, first token encoded")
                }
@@ -949,8 +949,8 @@ type parentStack struct {
 }
 
 // trim updates the XML context to match the longest common prefix of the stack
-// and the given parents.  A closing tag will be written for every parent
-// popped.  Passing a zero slice or nil will close all the elements.
+// and the given parents. A closing tag will be written for every parent
+// popped. Passing a zero slice or nil will close all the elements.
 func (s *parentStack) trim(parents []string) error {
        split := 0
        for ; split < len(parents) && split < len(s.stack); split++ {
index 38d7cdfb1589b5b2177eb72114ca08395282c6ad..ee725cb8bb05a705dd5f7e832235660f704fa562 100644 (file)
@@ -27,7 +27,7 @@ import (
 // discarded.
 //
 // Because Unmarshal uses the reflect package, it can only assign
-// to exported (upper case) fields.  Unmarshal uses a case-sensitive
+// to exported (upper case) fields. Unmarshal uses a case-sensitive
 // comparison to match XML element names to tag values and struct
 // field names.
 //
@@ -37,7 +37,7 @@ import (
 //
 //   * If the struct has a field of type []byte or string with tag
 //      ",innerxml", Unmarshal accumulates the raw XML nested inside the
-//      element in that field.  The rest of the rules still apply.
+//      element in that field. The rest of the rules still apply.
 //
 //   * If the struct has a field named XMLName of type xml.Name,
 //      Unmarshal records the element name in that field.
@@ -59,7 +59,7 @@ import (
 //
 //   * If the XML element contains comments, they are accumulated in
 //      the first struct field that has tag ",comment".  The struct
-//      field may have type []byte or string.  If there is no such
+//      field may have type []byte or string. If there is no such
 //      field, the comments are discarded.
 //
 //   * If the XML element contains a sub-element whose name matches
@@ -102,7 +102,7 @@ import (
 //
 // Unmarshal maps an XML element or attribute value to an integer or
 // floating-point field by setting the field to the result of
-// interpreting the string value in decimal.  There is no check for
+// interpreting the string value in decimal. There is no check for
 // overflow.
 //
 // Unmarshal maps an XML element to an xml.Name by recording the
index 5c2fb6f90e4e066ce1dcf60eb2ac3f9c81b4f867..9a3b7929559e2ac6beba0457352bf7be3321973f 100644 (file)
@@ -219,7 +219,7 @@ func NewDecoder(r io.Reader) *Decoder {
 //
 // Slices of bytes in the returned token data refer to the
 // parser's internal buffer and remain valid only until the next
-// call to Token.  To acquire a copy of the bytes, call CopyToken
+// call to Token. To acquire a copy of the bytes, call CopyToken
 // or the token's Copy method.
 //
 // Token expands self-closing elements such as <br/>
@@ -332,7 +332,7 @@ func (d *Decoder) switchToReader(r io.Reader) {
 }
 
 // Parsing state - stack holds old name space translations
-// and the current set of open elements.  The translations to pop when
+// and the current set of open elements. The translations to pop when
 // ending a given tag are *below* it on the stack, which is
 // more work but forced on us by XML.
 type stack struct {
@@ -1230,7 +1230,7 @@ func isNameString(s string) bool {
 
 // These tables were generated by cut and paste from Appendix B of
 // the XML spec at http://www.xml.com/axml/testaxml.htm
-// and then reformatting.  First corresponds to (Letter | '_' | ':')
+// and then reformatting. First corresponds to (Letter | '_' | ':')
 // and second corresponds to NameChar.
 
 var first = &unicode.RangeTable{
index 1d51bc97f9f5bf5ca6e5996c62f7dbe7943b9cda..d675a0230cdbf272370cb36dc23287d212eb8a53 100644 (file)
@@ -15,7 +15,7 @@
 //     memstats  runtime.Memstats
 //
 // The package is sometimes only imported for the side effect of
-// registering its HTTP handler and the above variables.  To use it
+// registering its HTTP handler and the above variables. To use it
 // this way, link this package into your program:
 //     import _ "expvar"
 //
index 3abc80e9c676ca9334a50fd69db1b9084c7158a7..6acbbcd321b9eb56233df915101aa54e573ea558 100644 (file)
@@ -261,7 +261,7 @@ const (
        PanicOnError                         // Call panic with a descriptive error.
 )
 
-// A FlagSet represents a set of defined flags.  The zero value of a FlagSet
+// A FlagSet represents a set of defined flags. The zero value of a FlagSet
 // has no name and has ContinueOnError error handling.
 type FlagSet struct {
        // Usage is the function called when an error occurs while parsing flags.
@@ -324,7 +324,7 @@ func (f *FlagSet) VisitAll(fn func(*Flag)) {
 }
 
 // VisitAll visits the command-line flags in lexicographical order, calling
-// fn for each.  It visits all flags, even those not set.
+// fn for each. It visits all flags, even those not set.
 func VisitAll(fn func(*Flag)) {
        CommandLine.VisitAll(fn)
 }
@@ -338,7 +338,7 @@ func (f *FlagSet) Visit(fn func(*Flag)) {
 }
 
 // Visit visits the command-line flags in lexicographical order, calling fn
-// for each.  It visits only those flags that have been set.
+// for each. It visits only those flags that have been set.
 func Visit(fn func(*Flag)) {
        CommandLine.Visit(fn)
 }
@@ -514,7 +514,7 @@ func (f *FlagSet) NFlag() int { return len(f.actual) }
 // NFlag returns the number of command-line flags that have been set.
 func NFlag() int { return len(CommandLine.actual) }
 
-// Arg returns the i'th argument.  Arg(0) is the first remaining argument
+// Arg returns the i'th argument. Arg(0) is the first remaining argument
 // after flags have been processed. Arg returns an empty string if the
 // requested element does not exist.
 func (f *FlagSet) Arg(i int) string {
@@ -524,7 +524,7 @@ func (f *FlagSet) Arg(i int) string {
        return f.args[i]
 }
 
-// Arg returns the i'th command-line argument.  Arg(0) is the first remaining argument
+// Arg returns the i'th command-line argument. Arg(0) is the first remaining argument
 // after flags have been processed. Arg returns an empty string if the
 // requested element does not exist.
 func Arg(i int) string {
@@ -890,7 +890,7 @@ func (f *FlagSet) parseOne() (bool, error) {
 }
 
 // Parse parses flag definitions from the argument list, which should not
-// include the command name.  Must be called after all flags in the FlagSet
+// include the command name. Must be called after all flags in the FlagSet
 // are defined and before flags are accessed by the program.
 // The return value will be ErrHelp if -help or -h were set but not defined.
 func (f *FlagSet) Parse(arguments []string) error {
index 3cbe93419ee0b271ee874304d379aa3eced0c103..0d0e3138070be9dd45a3b12a2784933e298af59c 100644 (file)
@@ -579,7 +579,7 @@ var fmtTests = []struct {
 
        // The "<nil>" show up because maps are printed by
        // first obtaining a list of keys and then looking up
-       // each key.  Since NaNs can be map keys but cannot
+       // each key. Since NaNs can be map keys but cannot
        // be fetched directly, the lookup fails and returns a
        // zero reflect.Value, which formats as <nil>.
        // This test is just to check that it shows the two NaNs at all.
index fc8d057be4b3b1f98067fbff17803435b25742e6..e49b8af967a431d4457202f9832ff8cd91d14a16 100644 (file)
@@ -133,7 +133,7 @@ func (f *fmt) fmt_boolean(v bool) {
        }
 }
 
-// integer; interprets prec but not wid.  Once formatted, result is sent to pad()
+// integer; interprets prec but not wid. Once formatted, result is sent to pad()
 // and then flags are cleared.
 func (f *fmt) integer(a int64, base uint64, signedness bool, digits string) {
        // precision of 0 and value of 0 means "print nothing"
index fa63e4983a5f099817ec6160e1cb3f72fc95748e..bf7c9acb8eccbf7161b32b5ca75544d0afc38784 100644 (file)
@@ -33,7 +33,7 @@ type ScanState interface {
        // Token skips space in the input if skipSpace is true, then returns the
        // run of Unicode code points c satisfying f(c).  If f is nil,
        // !unicode.IsSpace(c) is used; that is, the token will hold non-space
-       // characters.  Newlines are treated appropriately for the operation being
+       // characters. Newlines are treated appropriately for the operation being
        // performed; see the package documentation for more information.
        // The returned slice points to shared data that may be overwritten
        // by the next call to Token, a call to a Scan function using the ScanState
@@ -50,15 +50,15 @@ type ScanState interface {
 
 // Scanner is implemented by any value that has a Scan method, which scans
 // the input for the representation of a value and stores the result in the
-// receiver, which must be a pointer to be useful.  The Scan method is called
+// receiver, which must be a pointer to be useful. The Scan method is called
 // for any argument to Scan, Scanf, or Scanln that implements it.
 type Scanner interface {
        Scan(state ScanState, verb rune) error
 }
 
 // Scan scans text read from standard input, storing successive
-// space-separated values into successive arguments.  Newlines count
-// as space.  It returns the number of items successfully scanned.
+// space-separated values into successive arguments. Newlines count
+// as space. It returns the number of items successfully scanned.
 // If that is less than the number of arguments, err will report why.
 func Scan(a ...interface{}) (n int, err error) {
        return Fscan(os.Stdin, a...)
@@ -72,7 +72,7 @@ func Scanln(a ...interface{}) (n int, err error) {
 
 // Scanf scans text read from standard input, storing successive
 // space-separated values into successive arguments as determined by
-// the format.  It returns the number of items successfully scanned.
+// the format. It returns the number of items successfully scanned.
 // If that is less than the number of arguments, err will report why.
 // Newlines in the input must match newlines in the format.
 // The one exception: the verb %c always scans the next rune in the
@@ -93,8 +93,8 @@ func (r *stringReader) Read(b []byte) (n int, err error) {
 }
 
 // Sscan scans the argument string, storing successive space-separated
-// values into successive arguments.  Newlines count as space.  It
-// returns the number of items successfully scanned.  If that is less
+// values into successive arguments. Newlines count as space. It
+// returns the number of items successfully scanned. If that is less
 // than the number of arguments, err will report why.
 func Sscan(str string, a ...interface{}) (n int, err error) {
        return Fscan((*stringReader)(&str), a...)
@@ -107,7 +107,7 @@ func Sscanln(str string, a ...interface{}) (n int, err error) {
 }
 
 // Sscanf scans the argument string, storing successive space-separated
-// values into successive arguments as determined by the format.  It
+// values into successive arguments as determined by the format. It
 // returns the number of items successfully parsed.
 // Newlines in the input must match newlines in the format.
 func Sscanf(str string, format string, a ...interface{}) (n int, err error) {
@@ -115,8 +115,8 @@ func Sscanf(str string, format string, a ...interface{}) (n int, err error) {
 }
 
 // Fscan scans text read from r, storing successive space-separated
-// values into successive arguments.  Newlines count as space.  It
-// returns the number of items successfully scanned.  If that is less
+// values into successive arguments. Newlines count as space. It
+// returns the number of items successfully scanned. If that is less
 // than the number of arguments, err will report why.
 func Fscan(r io.Reader, a ...interface{}) (n int, err error) {
        s, old := newScanState(r, true, false)
@@ -135,7 +135,7 @@ func Fscanln(r io.Reader, a ...interface{}) (n int, err error) {
 }
 
 // Fscanf scans text read from r, storing successive space-separated
-// values into successive arguments as determined by the format.  It
+// values into successive arguments as determined by the format. It
 // returns the number of items successfully parsed.
 // Newlines in the input must match newlines in the format.
 func Fscanf(r io.Reader, format string, a ...interface{}) (n int, err error) {
@@ -448,8 +448,8 @@ func (s *ss) skipSpace(stopAtNewline bool) {
        }
 }
 
-// token returns the next space-delimited string from the input.  It
-// skips white space.  For Scanln, it stops at newlines.  For Scan,
+// token returns the next space-delimited string from the input. It
+// skips white space. For Scanln, it stops at newlines. For Scan,
 // newlines are treated as spaces.
 func (s *ss) token(skipSpace bool, f func(rune) bool) []byte {
        if skipSpace {
@@ -518,7 +518,7 @@ func (s *ss) notEOF() {
        s.UnreadRune()
 }
 
-// accept checks the next rune in the input.  If it's a byte (sic) in the string, it puts it in the
+// accept checks the next rune in the input. If it's a byte (sic) in the string, it puts it in the
 // buffer and returns true. Otherwise it return false.
 func (s *ss) accept(ok string) bool {
        return s.consume(ok, true)
@@ -542,7 +542,7 @@ func (s *ss) scanBool(verb rune) bool {
        if !s.okVerb(verb, "tv", "boolean") {
                return false
        }
-       // Syntax-checking a boolean is annoying.  We're not fastidious about case.
+       // Syntax-checking a boolean is annoying. We're not fastidious about case.
        switch s.getRune() {
        case '0':
                return false
@@ -636,7 +636,7 @@ func (s *ss) scanBasePrefix() (base int, digits string, found bool) {
 }
 
 // scanInt returns the value of the integer represented by the next
-// token, checking for overflow.  Any error is stored in s.err.
+// token, checking for overflow. Any error is stored in s.err.
 func (s *ss) scanInt(verb rune, bitSize int) int64 {
        if verb == 'c' {
                return s.scanRune(bitSize)
@@ -669,7 +669,7 @@ func (s *ss) scanInt(verb rune, bitSize int) int64 {
 }
 
 // scanUint returns the value of the unsigned integer represented
-// by the next token, checking for overflow.  Any error is stored in s.err.
+// by the next token, checking for overflow. Any error is stored in s.err.
 func (s *ss) scanUint(verb rune, bitSize int) uint64 {
        if verb == 'c' {
                return uint64(s.scanRune(bitSize))
@@ -1148,7 +1148,7 @@ func (s *ss) doScanf(format string, a []interface{}) (numProcessed int, err erro
                }
                // Either we failed to advance, we have a percent character, or we ran out of input.
                if format[i] != '%' {
-                       // Can't advance format.  Why not?
+                       // Can't advance format. Why not?
                        if w < 0 {
                                s.errorString("input does not match format")
                        }
index 3302a7ca2dbd186e4e59d865f0171b65c2383480..c9a731b10caf6367f0a608883dee9927f4cd0d2a 100644 (file)
@@ -767,7 +767,7 @@ func TestUnreadRuneWithBufio(t *testing.T) {
 
 type TwoLines string
 
-// Scan attempts to read two lines into the object.  Scanln should prevent this
+// Scan attempts to read two lines into the object. Scanln should prevent this
 // because it stops at newline; Scan and Scanf should be fine.
 func (t *TwoLines) Scan(state ScanState, verb rune) error {
        chars := make([]rune, 0, 100)
index 5c794c3e79821648e67b7dbabd0f97908c795a14..6b27fe822e5c3742313b66c97accf60d1ff952a6 100644 (file)
@@ -31,7 +31,7 @@ func SortImports(fset *token.FileSet, f *File) {
                specs := d.Specs[:0]
                for j, s := range d.Specs {
                        if j > i && fset.Position(s.Pos()).Line > 1+fset.Position(d.Specs[j-1].End()).Line {
-                               // j begins a new run.  End this one.
+                               // j begins a new run. End this one.
                                specs = append(specs, sortSpecs(fset, f, d.Specs[i:j])...)
                                i = j
                        }
index 0406bfc584abf9579c2828f1fd61b08d254897db..c1830b5e4db3075ff6e2a1cf6133a9bb83bb351e 100644 (file)
@@ -56,7 +56,7 @@ func resolve(scope *Scope, ident *Ident) bool {
 // indexed by package id (canonical import path).
 // An Importer must determine the canonical import path and
 // check the map to see if it is already present in the imports map.
-// If so, the Importer can return the map entry.  Otherwise, the
+// If so, the Importer can return the map entry. Otherwise, the
 // Importer should load the package data for the given path into
 // a new *Object (pkg), record pkg in the imports map, and then
 // return pkg.
index b723269fda2fa04714c8859294dbaffebf282b9b..1bd44cb3e533504cf8645b33bb2bcd00bce4e4ad 100644 (file)
@@ -55,8 +55,8 @@ type Context struct {
        InstallSuffix string
 
        // By default, Import uses the operating system's file system calls
-       // to read directories and files.  To read from other sources,
-       // callers can set the following functions.  They all have default
+       // to read directories and files. To read from other sources,
+       // callers can set the following functions. They all have default
        // behaviors that use the local file system, so clients need only set
        // the functions whose behaviors they wish to change.
 
@@ -302,7 +302,7 @@ type ImportMode uint
 
 const (
        // If FindOnly is set, Import stops after locating the directory
-       // that should contain the sources for a package.  It does not
+       // that should contain the sources for a package. It does not
        // read any files in the directory.
        FindOnly ImportMode = 1 << iota
 
@@ -691,7 +691,7 @@ Found:
                        continue
                }
 
-               // Going to save the file.  For non-Go files, can stop here.
+               // Going to save the file. For non-Go files, can stop here.
                switch ext {
                case ".c":
                        p.CFiles = append(p.CFiles, name)
@@ -1087,7 +1087,7 @@ var slashslash = []byte("//")
 // lines beginning with '// +build' are taken as build directives.
 //
 // The file is accepted only if each such line lists something
-// matching the file.  For example:
+// matching the file. For example:
 //
 //     // +build windows linux
 //
@@ -1279,7 +1279,7 @@ func safeCgoName(s string, spaces bool) bool {
 // Single quotes and double quotes are recognized to prevent splitting within the
 // quoted region, and are removed from the resulting substrings. If a quote in s
 // isn't closed err will be set and r will have the unclosed argument as the
-// last element.  The backslash is used for escaping.
+// last element. The backslash is used for escaping.
 //
 // For example, the following string:
 //
index 77fd701665efb22f1ce81038232993cbb2a26f36..9bd3ec82bba762fb575a4d69aad3cc5049e73140 100644 (file)
@@ -21,7 +21,7 @@ import (
 )
 
 // pkgDeps defines the expected dependencies between packages in
-// the Go source tree.  It is a statement of policy.
+// the Go source tree. It is a statement of policy.
 // Changes should not be made to this map without prior discussion.
 //
 // The map contains two kinds of entries:
index 236277e2475246aef27b25e6f856d487bca952c2..c926467059bd6a48a14364e57f642d05770a2bbb 100644 (file)
@@ -8,7 +8,7 @@
 //
 // The Go path is a list of directory trees containing Go source code.
 // It is consulted to resolve imports that cannot be found in the standard
-// Go tree.  The default path is the value of the GOPATH environment
+// Go tree. The default path is the value of the GOPATH environment
 // variable, interpreted as a path list appropriate to the operating system
 // (on Unix, the variable is a colon-separated string;
 // on Windows, a semicolon-separated string;
@@ -16,7 +16,7 @@
 //
 // Each directory listed in the Go path must have a prescribed structure:
 //
-// The src/ directory holds source code.  The path below 'src' determines
+// The src/ directory holds source code. The path below 'src' determines
 // the import path or executable name.
 //
 // The pkg/ directory holds installed package objects.
@@ -31,9 +31,9 @@
 //
 // The bin/ directory holds compiled commands.
 // Each command is named for its source directory, but only
-// using the final element, not the entire path.  That is, the
+// using the final element, not the entire path. That is, the
 // command with source in DIR/src/foo/quux is installed into
-// DIR/bin/quux, not DIR/bin/foo/quux.  The foo/ is stripped
+// DIR/bin/quux, not DIR/bin/foo/quux. The foo/ is stripped
 // so that you can add DIR/bin to your PATH to get at the
 // installed commands.
 //
index 5631539abc9dc89f7b4cbfa39178125d0665cffa..ed8eef4c61f19618fedb8c45481871c59cd3173d 100644 (file)
@@ -398,7 +398,7 @@ func blocks(text string) []block {
 
 // ToText prepares comment text for presentation in textual output.
 // It wraps paragraphs of text to width or fewer Unicode code points
-// and then prefixes each line with the indent.  In preformatted sections
+// and then prefixes each line with the indent. In preformatted sections
 // (such as program text), it prefixes each non-blank line with preIndent.
 func ToText(w io.Writer, text string, indent, preIndent string, width int) {
        l := lineWrapper{
index 905e49644ad14f1524f138ef21494f67ed353d21..1d581f057e619a8d340f487d8a40442161a3c1e1 100644 (file)
@@ -33,7 +33,7 @@ type B struct {
        result    BenchmarkResult
 }
 
-// StartTimer starts timing a test.  This function is called automatically
+// StartTimer starts timing a test. This function is called automatically
 // before a benchmark starts, but it can also used to resume timing after
 // a call to StopTimer.
 func (b *B) StartTimer() {
@@ -43,7 +43,7 @@ func (b *B) StartTimer() {
        }
 }
 
-// StopTimer stops timing a test.  This can be used to pause the timer
+// StopTimer stops timing a test. This can be used to pause the timer
 // while performing complex initialization that you don't
 // want to measure.
 func (b *B) StopTimer() {
@@ -134,9 +134,9 @@ func (b *B) run() BenchmarkResult {
        return b.result
 }
 
-// launch launches the benchmark function.  It gradually increases the number
+// launch launches the benchmark function. It gradually increases the number
 // of benchmark iterations until the benchmark runs for a second in order
-// to get a reasonable measurement.  It prints timing information in this form
+// to get a reasonable measurement. It prints timing information in this form
 //             testing.BenchmarkHello  100000          19 ns/op
 // launch is run by the fun function as a separate goroutine.
 func (b *B) launch() {
index f8348f1ac34a493cc0d43d834cc0f215f85fce5a..83cf37cd3a9c3d90dcd77b089dfc498cd1eef8cb 100644 (file)
@@ -78,10 +78,10 @@ TYPES
        // SetBytes records the number of bytes processed in a single ...
        func (b *B) SetBytes(n int64)
 
-       // StartTimer starts timing a test.  This function is called ...
+       // StartTimer starts timing a test. This function is called ...
        func (b *B) StartTimer()
 
-       // StopTimer stops timing a test.  This can be used to pause the ...
+       // StopTimer stops timing a test. This can be used to pause the ...
        func (b *B) StopTimer()
 
        // The results of a benchmark run. 
index 282bb1015ad577d11d70e5cf08f53b36e37fa532..b9d14517a9cfebd00d5292ebabfcf39ddaa6a794 100644 (file)
@@ -25,8 +25,8 @@ VARIABLES
        // 
        var (
                // The short flag requests that tests run more quickly, but its functionality
-               // is provided by test writers themselves.  The testing package is just its
-               // home.  The all.bash installation script sets it to make installation more
+               // is provided by test writers themselves. The testing package is just its
+               // home. The all.bash installation script sets it to make installation more
                // efficient, but by default the flag is off so a plain "go test" will do a
                // full test of the package.
                short   = flag.Bool("test.short", false, "run smaller test suite to save time")
@@ -151,13 +151,13 @@ TYPES
        // SetBytes records the number of bytes processed in a single ...
        func (b *B) SetBytes(n int64)
 
-       // StartTimer starts timing a test.  This function is called ...
+       // StartTimer starts timing a test. This function is called ...
        func (b *B) StartTimer()
 
-       // StopTimer stops timing a test.  This can be used to pause the ...
+       // StopTimer stops timing a test. This can be used to pause the ...
        func (b *B) StopTimer()
 
-       // launch launches the benchmark function.  It gradually increases ...
+       // launch launches the benchmark function. It gradually increases ...
        func (b *B) launch()
 
        // log generates the output. It's always at the same stack depth. 
index f8348f1ac34a493cc0d43d834cc0f215f85fce5a..83cf37cd3a9c3d90dcd77b089dfc498cd1eef8cb 100644 (file)
@@ -78,10 +78,10 @@ TYPES
        // SetBytes records the number of bytes processed in a single ...
        func (b *B) SetBytes(n int64)
 
-       // StartTimer starts timing a test.  This function is called ...
+       // StartTimer starts timing a test. This function is called ...
        func (b *B) StartTimer()
 
-       // StopTimer stops timing a test.  This can be used to pause the ...
+       // StopTimer stops timing a test. This can be used to pause the ...
        func (b *B) StopTimer()
 
        // The results of a benchmark run. 
index 93ed494c32b166391532286fdd9067d0be03e8e6..52810f7a564c17389dd6e5f30404dc517ba8d967 100644 (file)
@@ -22,7 +22,7 @@
 //         }
 //     }
 // The benchmark package will vary b.N until the benchmark function lasts
-// long enough to be timed reliably.  The output
+// long enough to be timed reliably. The output
 //     testing.BenchmarkHello    10000000    282 ns/op
 // means that the loop ran 10000000 times at a speed of 282 ns per loop.
 //
@@ -51,8 +51,8 @@ import (
 
 var (
        // The short flag requests that tests run more quickly, but its functionality
-       // is provided by test writers themselves.  The testing package is just its
-       // home.  The all.bash installation script sets it to make installation more
+       // is provided by test writers themselves. The testing package is just its
+       // home. The all.bash installation script sets it to make installation more
        // efficient, but by default the flag is off so a plain "go test" will do a
        // full test of the package.
        short = flag.Bool("test.short", false, "run smaller test suite to save time")
@@ -152,9 +152,9 @@ func (c *common) FailNow() {
        // This previous version duplicated code (those lines are in
        // tRunner no matter what), but worse the goroutine teardown
        // implicit in runtime.Goexit was not guaranteed to complete
-       // before the test exited.  If a test deferred an important cleanup
+       // before the test exited. If a test deferred an important cleanup
        // function (like removing temporary files), there was no guarantee
-       // it would run on a test failure.  Because we send on c.signal during
+       // it would run on a test failure. Because we send on c.signal during
        // a top-of-stack deferred function now, we know that the send
        // only happens after any other stacked defers have completed.
        runtime.Goexit()
index 9d04878f8664a1133e7101a7fea723fa6597350d..b8b470da8bb1bd5d6d286c3d5aeee80866cccee2 100644 (file)
@@ -28,9 +28,9 @@ func parse(fset *token.FileSet, filename string, src []byte, fragmentOk bool) (
 ) {
        // Try as whole source file.
        file, err = parser.ParseFile(fset, filename, src, parserMode)
-       // If there's no error, return.  If the error is that the source file didn't begin with a
+       // If there's no error, return. If the error is that the source file didn't begin with a
        // package line and source fragments are ok, fall through to
-       // try as a source fragment.  Stop and return on any other error.
+       // try as a source fragment. Stop and return on any other error.
        if err == nil || !fragmentOk || !strings.Contains(err.Error(), "expected 'package'") {
                return
        }
@@ -59,7 +59,7 @@ func parse(fset *token.FileSet, filename string, src []byte, fragmentOk bool) (
 
        // If this is a statement list, make it a source file
        // by inserting a package clause and turning the list
-       // into a function body.  This handles expressions too.
+       // into a function body. This handles expressions too.
        // Insert using a ;, not a newline, so that the line numbers
        // in fsrc match the ones in src. Add an extra '\n' before the '}'
        // to make sure comments are flushed before the '}'.
index e9476c4dee452eb3aece27e1da60a4b4c6ee471b..4041d9aa470653ff2bb3940ac54e0d961dc9ff02 100644 (file)
@@ -26,7 +26,7 @@ import (
 type ErrorHandler func(pos token.Position, msg string)
 
 // A Scanner holds the scanner's internal state while processing
-// a given text.  It can be allocated as part of another data
+// a given text. It can be allocated as part of another data
 // structure but must be initialized via Init before use.
 //
 type Scanner struct {
index 0fd567b26910e8fb64b4e070538dcfe347938162..ac9016b46ed65f25af8e10af56798968c4e5e841 100644 (file)
@@ -12,7 +12,7 @@ import (
 // initOrder computes the Info.InitOrder for package variables.
 func (check *Checker) initOrder() {
        // An InitOrder may already have been computed if a package is
-       // built from several calls to (*Checker).Files.  Clear it.
+       // built from several calls to (*Checker).Files. Clear it.
        check.Info.InitOrder = check.Info.InitOrder[:0]
 
        // compute the object dependency graph and
index b835c6e53e820a98de40c6cebea13f0d5eb6b3ca..707b806d3fcd3e136cac2b1c52fd5e34d9722a4b 100644 (file)
@@ -188,7 +188,7 @@ func (obj *Var) Anonymous() bool { return obj.anonymous }
 func (obj *Var) IsField() bool { return obj.isField }
 
 // A Func represents a declared function, concrete method, or abstract
-// (interface) method.  Its Type() is always a *Signature.
+// (interface) method. Its Type() is always a *Signature.
 // An abstract method may belong to many interfaces due to embedding.
 type Func struct {
        object
index 4a432b549600679ca5f5e675672a4c6b70256434..a588ee73dce9d861d01b6d394c3cc22046d75960 100644 (file)
@@ -55,7 +55,7 @@ func (pkg *Package) MarkComplete() { pkg.complete = true }
 // pkg; the list is in source order. Package unsafe is excluded.
 //
 // If pkg was loaded from export data, Imports includes packages that
-// provide package-level objects referenced by pkg.  This may be more or
+// provide package-level objects referenced by pkg. This may be more or
 // less than the set of packages directly imported by pkg's source code.
 func (pkg *Package) Imports() []*Package { return pkg.imports }
 
index 3502840225f4a8946dd28229948d1e04e7090e62..b5d34d6e655af9ab06a96b48790119088830aa44 100644 (file)
@@ -31,7 +31,7 @@ type Scope struct {
 }
 
 // NewScope returns a new, empty scope contained in the given parent
-// scope, if any.  The comment is for debugging only.
+// scope, if any. The comment is for debugging only.
 func NewScope(parent *Scope, pos, end token.Pos, comment string) *Scope {
        s := &Scope{parent, nil, nil, pos, end, comment}
        // don't add children to Universe scope!
index d8415f1fdf204d2755f250aba9560f4562354000..4e00da3212ffa1ad7ce279cca9f8353a7530457a 100644 (file)
@@ -229,7 +229,7 @@ func NewSignature(recv *Var, params, results *Tuple, variadic bool) *Signature {
 // function.
 //
 // For an abstract method, Recv returns the enclosing interface either
-// as a *Named or an *Interface.  Due to embedding, an interface may
+// as a *Named or an *Interface. Due to embedding, an interface may
 // contain methods whose receiver type is a different interface.
 func (s *Signature) Recv() *Var { return s.recv }
 
index 8f99e1b96246e3290c6e9cdc4b08cac0ee7a0f23..5637384bd86329fc00221403f9b66ed06b0a82b9 100644 (file)
@@ -164,7 +164,7 @@ const (
        //   different context than an earlier pass, there is no single context.
        //   In the example, there is missing a quote, so it is not clear
        //   whether {{.}} is meant to be inside a JS string or in a JS value
-       //   context.  The second iteration would produce something like
+       //   context. The second iteration would produce something like
        //
        //     <script>var x = ['firstValue,'secondValue]</script>
        ErrRangeLoopReentry
index 3c183405478ab5e8b49411256a76b6a0b5202a7e..595bf0011e39b776f6c9af76c84eaeec18fbb4fa 100644 (file)
@@ -15,8 +15,8 @@ import (
 
 // escapeTemplate rewrites the named template, which must be
 // associated with t, to guarantee that the output of any of the named
-// templates is properly escaped.  If no error is returned, then the named templates have
-// been modified.  Otherwise the named templates have been rendered
+// templates is properly escaped. If no error is returned, then the named templates have
+// been modified. Otherwise the named templates have been rendered
 // unusable.
 func escapeTemplate(tmpl *Template, node parse.Node, name string) error {
        e := newEscaper(tmpl)
index cae059b6daa6d7714bd1c4c7ad759ec41b104be1..104433974eab6a7f77f7da15089382507f556899 100644 (file)
@@ -147,7 +147,7 @@ type Model interface {
 func ModelFunc(f func(Color) Color) Model {
        // Note: using *modelFunc as the implementation
        // means that callers can still use comparisons
-       // like m == RGBAModel.  This is not possible if
+       // like m == RGBAModel. This is not possible if
        // we use the func value directly, because funcs
        // are no longer comparable.
        return &modelFunc{f}
index 72b52e36e5764f796d19ad3652074417c719629c..6bfc72e9741b6a747075c1138e617fb0215a5811 100644 (file)
@@ -96,7 +96,7 @@ type decoder struct {
 // blockReader parses the block structure of GIF image data, which
 // comprises (n, (n bytes)) blocks, with 1 <= n <= 255.  It is the
 // reader given to the LZW decoder, which is thus immune to the
-// blocking.  After the LZW decoder completes, there will be a 0-byte
+// blocking. After the LZW decoder completes, there will be a 0-byte
 // block remaining (0, ()), which is consumed when checking that the
 // blockReader is exhausted.
 type blockReader struct {
index 016e9247eb2f12efa67eb543f6ec0e28a6e26473..f7f059ff4562211cbb95ca9d666893594056da3f 100644 (file)
@@ -41,23 +41,23 @@ var ErrNoProgress = errors.New("multiple Read calls return no data or error")
 
 // Reader is the interface that wraps the basic Read method.
 //
-// Read reads up to len(p) bytes into p.  It returns the number of bytes
-// read (0 <= n <= len(p)) and any error encountered.  Even if Read
+// Read reads up to len(p) bytes into p. It returns the number of bytes
+// read (0 <= n <= len(p)) and any error encountered. Even if Read
 // returns n < len(p), it may use all of p as scratch space during the call.
 // If some data is available but not len(p) bytes, Read conventionally
 // returns what is available instead of waiting for more.
 //
 // When Read encounters an error or end-of-file condition after
 // successfully reading n > 0 bytes, it returns the number of
-// bytes read.  It may return the (non-nil) error from the same call
+// bytes read. It may return the (non-nil) error from the same call
 // or return the error (and n == 0) from a subsequent call.
 // An instance of this general case is that a Reader returning
 // a non-zero number of bytes at the end of the input stream may
-// return either err == EOF or err == nil.  The next Read should
+// return either err == EOF or err == nil. The next Read should
 // return 0, EOF.
 //
 // Callers should always process the n > 0 bytes returned before
-// considering the error err.  Doing so correctly handles I/O errors
+// considering the error err. Doing so correctly handles I/O errors
 // that happen after reading some bytes and also both of the
 // allowed EOF behaviors.
 //
@@ -176,15 +176,15 @@ type WriterTo interface {
 // ReaderAt is the interface that wraps the basic ReadAt method.
 //
 // ReadAt reads len(p) bytes into p starting at offset off in the
-// underlying input source.  It returns the number of bytes
+// underlying input source. It returns the number of bytes
 // read (0 <= n <= len(p)) and any error encountered.
 //
 // When ReadAt returns n < len(p), it returns a non-nil error
-// explaining why more bytes were not returned.  In this respect,
+// explaining why more bytes were not returned. In this respect,
 // ReadAt is stricter than Read.
 //
 // Even if ReadAt returns n < len(p), it may use all of p as scratch
-// space during the call.  If some data is available but not len(p) bytes,
+// space during the call. If some data is available but not len(p) bytes,
 // ReadAt blocks until either all the data is available or an error occurs.
 // In this respect ReadAt is different from Read.
 //
@@ -206,7 +206,7 @@ type ReaderAt interface {
 // WriterAt is the interface that wraps the basic WriteAt method.
 //
 // WriteAt writes len(p) bytes from p to the underlying data stream
-// at offset off.  It returns the number of bytes written from p (0 <= n <= len(p))
+// at offset off. It returns the number of bytes written from p (0 <= n <= len(p))
 // and any error encountered that caused the write to stop early.
 // WriteAt must return a non-nil error if it returns n < len(p).
 //
@@ -335,7 +335,7 @@ func CopyN(dst Writer, src Reader, n int64) (written int64, err error) {
 }
 
 // Copy copies from src to dst until either EOF is reached
-// on src or an error occurs.  It returns the number of bytes
+// on src or an error occurs. It returns the number of bytes
 // copied and the first error encountered while copying, if any.
 //
 // A successful Copy returns err == nil, not err == EOF.
@@ -497,7 +497,7 @@ func (s *SectionReader) Size() int64 { return s.limit - s.base }
 
 // TeeReader returns a Reader that writes to w what it reads from r.
 // All reads from r performed through it are matched with
-// corresponding writes to w.  There is no internal buffering -
+// corresponding writes to w. There is no internal buffering -
 // the write must complete before the read completes.
 // Any error encountered while writing is reported as a read error.
 func TeeReader(r Reader, w Writer) Reader {
index e90a33f99b08f6f9b27fa351483fd4ccf4dca80d..8ecbb2de76407b8a62598b459165553418751a46 100644 (file)
@@ -63,8 +63,8 @@ func ReadFile(filename string) ([]byte, error) {
                }
        }
        // As initial capacity for readAll, use n + a little extra in case Size is zero,
-       // and to avoid another allocation after Read has filled the buffer.  The readAll
-       // call will read into its allocated internal buffer cheaply.  If the size was
+       // and to avoid another allocation after Read has filled the buffer. The readAll
+       // call will read into its allocated internal buffer cheaply. If the size was
        // wrong, we'll either waste some space off the end or reallocate as needed, but
        // in the overwhelmingly common case we'll get it just right.
        return readAll(f, n+bytes.MinRead)
index a85982ef25c55fdfdea47becc4a1e2f1ff0d397e..42718cc73d37ecc3049bff448f8709b144fe1d72 100644 (file)
@@ -41,8 +41,8 @@ func nextSuffix() string {
 // If dir is the empty string, TempFile uses the default directory
 // for temporary files (see os.TempDir).
 // Multiple programs calling TempFile simultaneously
-// will not choose the same file.  The caller can use f.Name()
-// to find the pathname of the file.  It is the caller's responsibility
+// will not choose the same file. The caller can use f.Name()
+// to find the pathname of the file. It is the caller's responsibility
 // to remove the file when no longer needed.
 func TempFile(dir, prefix string) (f *os.File, err error) {
        if dir == "" {
@@ -68,10 +68,10 @@ func TempFile(dir, prefix string) (f *os.File, err error) {
 
 // TempDir creates a new temporary directory in the directory dir
 // with a name beginning with prefix and returns the path of the
-// new directory.  If dir is the empty string, TempDir uses the
+// new directory. If dir is the empty string, TempDir uses the
 // default directory for temporary files (see os.TempDir).
 // Multiple programs calling TempDir simultaneously
-// will not choose the same directory.  It is the caller's responsibility
+// will not choose the same directory. It is the caller's responsibility
 // to remove the directory when no longer needed.
 func TempDir(dir, prefix string) (name string, err error) {
        if dir == "" {
index 16860aa361f13ab62f6afc33857a2d308a7ac7c5..c23c12b151e132c397de655d4117133c61098bb9 100644 (file)
@@ -25,7 +25,7 @@ func (mr *multiReader) Read(p []byte) (n int, err error) {
 }
 
 // MultiReader returns a Reader that's the logical concatenation of
-// the provided input readers.  They're read sequentially.  Once all
+// the provided input readers. They're read sequentially. Once all
 // inputs have returned EOF, Read will return EOF.  If any of the readers
 // return a non-nil, non-EOF error, Read will return that error.
 func MultiReader(readers ...Reader) Reader {
index 4cfe5503006d65de3abc779ce3ac057f90def012..26cdb532dfcacb88a65a2cfd1690cc357e17d4e2 100644 (file)
@@ -42,8 +42,8 @@ const (
 )
 
 // A Logger represents an active logging object that generates lines of
-// output to an io.Writer.  Each logging operation makes a single call to
-// the Writer's Write method.  A Logger can be used simultaneously from
+// output to an io.Writer. Each logging operation makes a single call to
+// the Writer's Write method. A Logger can be used simultaneously from
 // multiple goroutines; it guarantees to serialize access to the Writer.
 type Logger struct {
        mu     sync.Mutex // ensures atomic writes; protects the following fields
@@ -53,7 +53,7 @@ type Logger struct {
        buf    []byte     // for accumulating text to write
 }
 
-// New creates a new Logger.   The out variable sets the
+// New creates a new Logger. The out variable sets the
 // destination to which log data will be written.
 // The prefix appears at the beginning of each generated log line.
 // The flag argument defines the logging properties.
@@ -134,10 +134,10 @@ func (l *Logger) formatHeader(buf *[]byte, t time.Time, file string, line int) {
        }
 }
 
-// Output writes the output for a logging event.  The string s contains
+// Output writes the output for a logging event. The string s contains
 // the text to print after the prefix specified by the flags of the
-// Logger.  A newline is appended if the last character of s is not
-// already a newline.  Calldepth is used to recover the PC and is
+// Logger. A newline is appended if the last character of s is not
+// already a newline. Calldepth is used to recover the PC and is
 // provided for generality, although at the moment on all pre-defined
 // paths it will be 2.
 func (l *Logger) Output(calldepth int, s string) error {
@@ -334,10 +334,10 @@ func Panicln(v ...interface{}) {
        panic(s)
 }
 
-// Output writes the output for a logging event.  The string s contains
+// Output writes the output for a logging event. The string s contains
 // the text to print after the prefix specified by the flags of the
-// Logger.  A newline is appended if the last character of s is not
-// already a newline.  Calldepth is the count of the number of
+// Logger. A newline is appended if the last character of s is not
+// already a newline. Calldepth is the count of the number of
 // frames to skip when computing the file name and line number
 // if Llongfile or Lshortfile is set; a value of 1 will print the details
 // for the caller of Output.
index f489059d5add3a342f71683bc20a8a348b6efc53..9e888dd1d9dd4d92ba9a7b71847cdbec27fec3e7 100644 (file)
@@ -85,8 +85,8 @@ type Writer struct {
 }
 
 // This interface and the separate syslog_unix.go file exist for
-// Solaris support as implemented by gccgo.  On Solaris you cannot
-// simply open a TCP connection to the syslog daemon.  The gccgo
+// Solaris support as implemented by gccgo. On Solaris you cannot
+// simply open a TCP connection to the syslog daemon. The gccgo
 // sources have a syslog_solaris.go file that implements unixSyslog to
 // return a type that satisfies this interface and simply calls the C
 // library syslog function.
@@ -100,7 +100,7 @@ type netConn struct {
        conn  net.Conn
 }
 
-// New establishes a new connection to the system log daemon.  Each
+// New establishes a new connection to the system log daemon. Each
 // write to the returned writer sends a log message with the given
 // priority and prefix.
 func New(priority Priority, tag string) (*Writer, error) {
@@ -108,7 +108,7 @@ func New(priority Priority, tag string) (*Writer, error) {
 }
 
 // Dial establishes a connection to a log daemon by connecting to
-// address raddr on the specified network.  Each write to the returned
+// address raddr on the specified network. Each write to the returned
 // writer sends a log message with the given facility, severity and
 // tag.
 // If network is empty, Dial will connect to the local syslog server.
index e394008b078cb2db2bec1942b7c71e9cb5da8b1a..dce21b23507273005abd18643238ff8cafd742c9 100644 (file)
@@ -6,7 +6,7 @@ package math
 
 // The original C code, the long comment, and the constants
 // below are from FreeBSD's /usr/src/lib/msun/src/e_acosh.c
-// and came with this notice.  The go code is a simplified
+// and came with this notice. The go code is a simplified
 // version of the original C.
 //
 // ====================================================
index ff2de0215f5a9e2585fbb560de3f78234ef4771c..3b793b0ceaaeaca2091d19e98ed72e5c784417c7 100644 (file)
@@ -6,7 +6,7 @@ package math
 
 // The original C code, the long comment, and the constants
 // below are from FreeBSD's /usr/src/lib/msun/src/s_asinh.c
-// and came with this notice.  The go code is a simplified
+// and came with this notice. The go code is a simplified
 // version of the original C.
 //
 // ====================================================
index 113d5c103c03c733db433f693a6ead597615eb8f..d59a8474fc0ef6018119cda1bffb4cfa7ca999b5 100644 (file)
@@ -6,7 +6,7 @@ package math
 
 // The original C code, the long comment, and the constants
 // below are from FreeBSD's /usr/src/lib/msun/src/e_atanh.c
-// and came with this notice.  The go code is a simplified
+// and came with this notice. The go code is a simplified
 // version of the original C.
 //
 // ====================================================
index f46a494f175b0dcf2eedaf56df65850701b561e4..ea8e82d0b69152c2b0d8f13bedf66c62b45049fc 100644 (file)
@@ -442,7 +442,7 @@ func benchmarkBitLenN(b *testing.B, nbits uint) {
        }
 }
 
-// Individual bitLen tests.  Numbers chosen to examine both sides
+// Individual bitLen tests. Numbers chosen to examine both sides
 // of powers-of-two boundaries.
 func BenchmarkBitLen0(b *testing.B)  { benchmarkBitLenN(b, 0) }
 func BenchmarkBitLen1(b *testing.B)  { benchmarkBitLenN(b, 1) }
index 79cf6e07f7fa1de3e8cdf25d2b1980bc168c7ba3..7668b6481b3ed78c9293e9226ead25a671eae22f 100644 (file)
@@ -647,7 +647,7 @@ func trailingZeroBits(x Word) uint {
        // x & -x leaves only the right-most bit set in the word. Let k be the
        // index of that bit. Since only a single bit is set, the value is two
        // to the power of k. Multiplying by a power of two is equivalent to
-       // left shifting, in this case by k bits.  The de Bruijn constant is
+       // left shifting, in this case by k bits. The de Bruijn constant is
        // such that all six bit, consecutive substrings are distinct.
        // Therefore, if we have a left shifted version of this constant we can
        // find by how many bits it was shifted by looking at which six bit
@@ -1018,7 +1018,7 @@ func (z nat) expNNWindowed(x, y, m nat) nat {
                for j := 0; j < _W; j += n {
                        if i != len(y)-1 || j != 0 {
                                // Unrolled loop for significant performance
-                               // gain.  Use go test -bench=".*" in crypto/rsa
+                               // gain. Use go test -bench=".*" in crypto/rsa
                                // to check performance before making changes.
                                zz = zz.mul(z, z)
                                zz, z = z, zz
index 2cd9ed09388aeb3dd8a6211217a7aa843ad7f2ea..56ce33d8826bbe668bb2b04c4ca1827df13352ad 100644 (file)
@@ -63,7 +63,7 @@ func (z *Rat) SetFloat64(f float64) *Rat {
 
 // quotToFloat32 returns the non-negative float32 value
 // nearest to the quotient a/b, using round-to-even in
-// halfway cases.  It does not mutate its arguments.
+// halfway cases. It does not mutate its arguments.
 // Preconditions: b is non-zero; a and b have no common factors.
 func quotToFloat32(a, b nat) (f float32, exact bool) {
        const (
@@ -161,7 +161,7 @@ func quotToFloat32(a, b nat) (f float32, exact bool) {
 
 // quotToFloat64 returns the non-negative float64 value
 // nearest to the quotient a/b, using round-to-even in
-// halfway cases.  It does not mutate its arguments.
+// halfway cases. It does not mutate its arguments.
 // Preconditions: b is non-zero; a and b have no common factors.
 func quotToFloat64(a, b nat) (f float64, exact bool) {
        const (
index da2fdab4cab2bdce606959c37f5856701e8fb8b0..17bda4763713d731fcfec1282efe7d4b631e0480 100644 (file)
@@ -137,7 +137,7 @@ func TestFloatString(t *testing.T) {
        }
 }
 
-// Test inputs to Rat.SetString.  The prefix "long:" causes the test
+// Test inputs to Rat.SetString. The prefix "long:" causes the test
 // to be skipped in --test.short mode.  (The threshold is about 500us.)
 var float64inputs = []string{
        // Constants plundered from strconv/testfp.txt.
index 276be07ae9a7ca905c05d145fcb8c4c01370d3f5..72f81e907cf0444e14931e52820bbe3c0302700c 100644 (file)
@@ -43,7 +43,7 @@ import "math"
 // Cancelation error in r-x or r+x is avoided by using the
 // identity  2 Re w Im w  =  y.
 //
-// Note that -w is also a square root of z.  The root chosen
+// Note that -w is also a square root of z. The root chosen
 // is always in the right half plane and Im w has the same sign as y.
 //
 // ACCURACY:
index 4cd80f80c3be966c89e7bac27e2eda5c9ab9b8af..8ddd5f9809d9959fd5690c9292726943c8d7eeee 100644 (file)
@@ -10,7 +10,7 @@ package math
 
 // The original C code and the long comment below are
 // from FreeBSD's /usr/src/lib/msun/src/s_erf.c and
-// came with this notice.  The go code is a simplified
+// came with this notice. The go code is a simplified
 // version of the original C.
 //
 // ====================================================
index f31585fa7700b7e5a1e091508a8d0432eadb99dc..3268c9888cace2a07f64b2281efa23663840179d 100644 (file)
@@ -15,7 +15,7 @@ func Exp(x float64) float64
 
 // The original C code, the long comment, and the constants
 // below are from FreeBSD's /usr/src/lib/msun/src/e_exp.c
-// and came with this notice.  The go code is a simplified
+// and came with this notice. The go code is a simplified
 // version of the original C.
 //
 // ====================================================
index 670b96de5e20f2c2683bc717a8100006ec3b880a..8ce67e5e619472b69dd97edee44dc2c451fb45db 100644 (file)
@@ -6,7 +6,7 @@ package math
 
 // The original C code, the long comment, and the constants
 // below are from FreeBSD's /usr/src/lib/msun/src/s_expm1.c
-// and came with this notice.  The go code is a simplified
+// and came with this notice. The go code is a simplified
 // version of the original C.
 //
 // ====================================================
index 164f54f332b13936be26575059f9b2b795c7d7a5..841ec114a0a84fc6831d681dcf921e090c507c51 100644 (file)
@@ -21,7 +21,7 @@ package math
 //
 // DESCRIPTION:
 //
-// Returns gamma function of the argument.  The result is
+// Returns gamma function of the argument. The result is
 // correctly signed, and the sign (+1 or -1) is also
 // returned in a global (extern) variable named signgam.
 // This variable is also filled in by the logarithmic gamma
index de7738880e6f5a10c6028e664add33d731aa2ace..cbef7aa7d6e0021608a0aa40333c2840b53cb333 100644 (file)
@@ -10,7 +10,7 @@ package math
 
 // The original C code and the long comment below are
 // from FreeBSD's /usr/src/lib/msun/src/e_j0.c and
-// came with this notice.  The go code is a simplified
+// came with this notice. The go code is a simplified
 // version of the original C.
 //
 // ====================================================
index c537a72eb2500703463997d93d631e6c2387f1a9..d359d9072e340fd78f823fd483b056a3f17366f7 100644 (file)
@@ -10,7 +10,7 @@ package math
 
 // The original C code and the long comment below are
 // from FreeBSD's /usr/src/lib/msun/src/e_j1.c and
-// came with this notice.  The go code is a simplified
+// came with this notice. The go code is a simplified
 // version of the original C.
 //
 // ====================================================
index ffb8a00f50f0187e6cc735e8f13c53ee24619db8..721112f77c42f89f4d9a7cbee8ca2ff37c546ffa 100644 (file)
@@ -10,7 +10,7 @@ package math
 
 // The original C code and the long comment below are
 // from FreeBSD's /usr/src/lib/msun/src/e_jn.c and
-// came with this notice.  The go code is a simplified
+// came with this notice. The go code is a simplified
 // version of the original C.
 //
 // ====================================================
index 6a02c412d93b603cc6d0abd3e0514ef9e2763a0b..19ac3ffafcaf81d027e3145b4d5c66934cccae45 100644 (file)
@@ -10,7 +10,7 @@ package math
 
 // The original C code and the long comment below are
 // from FreeBSD's /usr/src/lib/msun/src/e_lgamma_r.c and
-// came with this notice.  The go code is a simplified
+// came with this notice. The go code is a simplified
 // version of the original C.
 //
 // ====================================================
index 818f00a73fe98534ca9c259e98f0bb9938bef9f2..e328348328f497d6dd3a8dea2fb99f9fa400a7ea 100644 (file)
@@ -10,7 +10,7 @@ package math
 
 // The original C code, the long comment, and the constants
 // below are from FreeBSD's /usr/src/lib/msun/src/e_log.c
-// and came with this notice.  The go code is a simpler
+// and came with this notice. The go code is a simpler
 // version of the original C.
 //
 // ====================================================
index 12b98684c3d780d0f8084916ac810b95f8c02ef0..d1bddfb1005a7aa605bb0cb61d074a317c16f84c 100644 (file)
@@ -6,7 +6,7 @@ package math
 
 // The original C code, the long comment, and the constants
 // below are from FreeBSD's /usr/src/lib/msun/src/s_log1p.c
-// and came with this notice.  The go code is a simplified
+// and came with this notice. The go code is a simplified
 // version of the original C.
 //
 // ====================================================
index 81cb8b5a9ce6ef8cd004e376101e4e94352e019e..c5bb89455f91856d788afb2133095c535c80eee7 100644 (file)
@@ -5,7 +5,7 @@
 package math
 
 // Modf returns integer and fractional floating-point numbers
-// that sum to f.  Both values have the same sign as f.
+// that sum to f. Both values have the same sign as f.
 //
 // Special cases are:
 //     Modf(±Inf) = Â±Inf, NaN
index 9a4e4154c484102de2fcd1d8a9dab5ef9d607b02..504fdda7dff64ea4237b784f9537a634aa100be7 100644 (file)
@@ -6,7 +6,7 @@ package math
 
 // The original C code and the comment below are from
 // FreeBSD's /usr/src/lib/msun/src/e_remainder.c and came
-// with this notice.  The go code is a simplified version of
+// with this notice. The go code is a simplified version of
 // the original C.
 //
 // ====================================================
index 96af6e2687d87e6f286ed401ec0a4f4a220f17ab..b633a4a6adb29b87f3c0751c2ae31e2f49a9f370 100644 (file)
@@ -6,7 +6,7 @@ package math
 
 // The original C code and the long comment below are
 // from FreeBSD's /usr/src/lib/msun/src/e_sqrt.c and
-// came with this notice.  The go code is a simplified
+// came with this notice. The go code is a simplified
 // version of the original C.
 //
 // ====================================================
@@ -79,7 +79,7 @@ package math
 //      equal to huge for some floating point number "huge" and "tiny".
 //
 //
-// Notes:  Rounding mode detection omitted.  The constants "mask", "shift",
+// Notes:  Rounding mode detection omitted. The constants "mask", "shift",
 // and "bias" are found in src/math/bits.go
 
 // Sqrt returns the square root of x.
index efee65bb00b30e1cd05026ae0af07b818adb6853..18454011273646d99dc444d07650761e2bd6a4b0 100644 (file)
@@ -221,7 +221,7 @@ func isNotTokenChar(r rune) bool {
 
 // consumeToken consumes a token from the beginning of provided
 // string, per RFC 2045 section 5.1 (referenced from 2183), and return
-// the token consumed and the rest of the string.  Returns ("", v) on
+// the token consumed and the rest of the string. Returns ("", v) on
 // failure to consume at least one character.
 func consumeToken(v string) (token, rest string) {
        notPos := strings.IndexFunc(v, isNotTokenChar)
@@ -237,7 +237,7 @@ func consumeToken(v string) (token, rest string) {
 // consumeValue consumes a "value" per RFC 2045, where a value is
 // either a 'token' or a 'quoted-string'.  On success, consumeValue
 // returns the value consumed (and de-quoted/escaped, if a
-// quoted-string) and the rest of the string.  On failure, returns
+// quoted-string) and the rest of the string. On failure, returns
 // ("", v).
 func consumeValue(v string) (value, rest string) {
        if v == "" {
index 3b746a5e15756c5281b212017f54775cdf20cfd8..5b5168c8263886c10997d844245161f3a7b2facb 100644 (file)
@@ -150,13 +150,13 @@ func (pr partReader) Read(d []byte) (n int, err error) {
        }()
        if p.buffer.Len() >= len(d) {
                // Internal buffer of unconsumed data is large enough for
-               // the read request.  No need to parse more at the moment.
+               // the read request. No need to parse more at the moment.
                return p.buffer.Read(d)
        }
        peek, err := p.mr.bufReader.Peek(peekBufferSize) // TODO(bradfitz): add buffer size accessor
 
        // Look for an immediate empty part without a leading \r\n
-       // before the boundary separator.  Some MIME code makes empty
+       // before the boundary separator. Some MIME code makes empty
        // parts like this. Most browsers, however, write the \r\n
        // before the subsequent boundary even for empty parts and
        // won't hit this path.
@@ -210,7 +210,7 @@ func (p *Part) Close() error {
 }
 
 // Reader is an iterator over parts in a MIME multipart body.
-// Reader's underlying parser consumes its input as needed.  Seeking
+// Reader's underlying parser consumes its input as needed. Seeking
 // isn't supported.
 type Reader struct {
        bufReader *bufio.Reader
@@ -310,7 +310,7 @@ func (mr *Reader) isBoundaryDelimiterLine(line []byte) (ret bool) {
        rest = skipLWSPChar(rest)
 
        // On the first part, see our lines are ending in \n instead of \r\n
-       // and switch into that mode if so.  This is a violation of the spec,
+       // and switch into that mode if so. This is a violation of the spec,
        // but occurs in practice.
        if mr.partsRead == 0 && len(rest) == 1 && rest[0] == '\n' {
                mr.nl = mr.nl[1:]
index d06bb4159aaf0de2148ab3f7102da9aa93828705..82a7f86e67c1bb7ee39993a5227a6fed0c462d9e 100644 (file)
@@ -446,8 +446,8 @@ type parseTest struct {
 var parseTests = []parseTest{
        // Actual body from App Engine on a blob upload. The final part (the
        // Content-Type: message/external-body) is what App Engine replaces
-       // the uploaded file with.  The other form fields (prefixed with
-       // "other" in their form-data name) are unchanged.  A bug was
+       // the uploaded file with. The other form fields (prefixed with
+       // "other" in their form-data name) are unchanged. A bug was
        // reported with blob uploads failing when the other fields were
        // empty. This was the MIME POST body that previously failed.
        {
index 58ab7d706c61be3db190b14f21277e79437ba23a..0b9d160fd432cfca79a241cfe1cfd819e8e1fb2f 100644 (file)
@@ -203,7 +203,7 @@ func (s *byRFC6724) Less(i, j int) bool {
                // (e.g., https://golang.org/issue/13283).  Glibc instead only
                // uses CommonPrefixLen for IPv4 when the source and destination
                // addresses are on the same subnet, but that requires extra
-               // work to find the netmask for our source addresses.  As a
+               // work to find the netmask for our source addresses. As a
                // simpler heuristic, we limit its use to when the source and
                // destination belong to the same special purpose block.
                if da4 {
index ddaa978f4f63c5b5286c941b3bf4411017383363..36566a49e2ec0145770153ebffa8570be398fab9 100644 (file)
@@ -185,7 +185,7 @@ func (c *conf) hostLookupOrder(hostname string) (ret hostLookupOrder) {
                hostname = hostname[:len(hostname)-1]
        }
        if stringsHasSuffixFold(hostname, ".local") {
-               // Per RFC 6762, the ".local" TLD is special.  And
+               // Per RFC 6762, the ".local" TLD is special. And
                // because Go's native resolver doesn't do mDNS or
                // similar local resolution mechanisms, assume that
                // libc might (via Avahi, etc) and use cgo.
index 1df923f14b031e7314613158fdb8bbc9e743104f..0bcdbfc925ce1241a864684958ce653726d9307b 100644 (file)
@@ -298,7 +298,7 @@ func TestDialParallel(t *testing.T) {
        const fallbackDelay = 200 * time.Millisecond
 
        // Some cases will run quickly when "connection refused" is fast,
-       // or trigger the fallbackDelay on Windows.  This value holds the
+       // or trigger the fallbackDelay on Windows. This value holds the
        // lesser of the two delays.
        var closedPortOrFallbackDelay time.Duration
        if closedPortDelay < fallbackDelay {
index 5094ac4f1b790a64c342b6bb37225b83c3ac3d15..f1835b8c060f2f200cf83394710c1f9bf5facea7 100644 (file)
@@ -45,7 +45,7 @@ func answer(name, server string, dns *dnsMsg, qtype uint16) (cname string, addrs
        }
        if dns.rcode != dnsRcodeSuccess {
                // None of the error codes make sense
-               // for the query we sent.  If we didn't get
+               // for the query we sent. If we didn't get
                // a name error and we didn't get success,
                // the server is behaving incorrectly or
                // having temporary trouble.
index 0515ca90de1d3fe5edad4ac01dcd6a9ab19dd3cf..181d47b36d0e3b1ad7752096062e3212ab7fde47 100644 (file)
@@ -61,7 +61,7 @@ func dnsReadConfig(filename string) *dnsConfig {
                case "nameserver": // add one name server
                        if len(f) > 1 && len(conf.servers) < 3 { // small, but the standard limit
                                // One more check: make sure server name is
-                               // just an IP address.  Otherwise we need DNS
+                               // just an IP address. Otherwise we need DNS
                                // to look it up.
                                if parseIPv4(f[1]) != nil {
                                        conf.servers = append(conf.servers, f[1])
index 5747fd232b987cc9fdfa51a762e0df8f83dc7230..c01381f1903e7737395618df221473415664bce1 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.
 
-// DNS packet assembly.  See RFC 1035.
+// DNS packet assembly. See RFC 1035.
 //
 // This is intended to support name resolution during Dial.
 // It doesn't have to be blazing fast.
@@ -18,7 +18,7 @@
 // generic pack/unpack routines.
 //
 // TODO(rsc):  There are enough names defined in this file that they're all
-// prefixed with dns.  Perhaps put this in its own package later.
+// prefixed with dns. Perhaps put this in its own package later.
 
 package net
 
@@ -376,7 +376,7 @@ func (rr *dnsRR_AAAA) Walk(f func(v interface{}, name, tag string) bool) bool {
 // All the packers and unpackers take a (msg []byte, off int)
 // and return (off1 int, ok bool).  If they return ok==false, they
 // also return off1==len(msg), so that the next unpacker will
-// also fail.  This lets us avoid checks of ok until the end of a
+// also fail. This lets us avoid checks of ok until the end of a
 // packing sequence.
 
 // Map of constructors for each RR wire type.
@@ -399,7 +399,7 @@ var rr_mk = map[int]func() dnsRR{
 
 // Pack a domain name s into msg[off:].
 // Domain names are a sequence of counted strings
-// split at the dots.  They end with a zero-length string.
+// split at the dots. They end with a zero-length string.
 func packDomainName(s string, msg []byte, off int) (off1 int, ok bool) {
        // Add trailing dot to canonicalize name.
        if n := len(s); n == 0 || s[n-1] != '.' {
@@ -452,8 +452,8 @@ func packDomainName(s string, msg []byte, off int) (off1 int, ok bool) {
 // In addition to the simple sequences of counted strings above,
 // domain names are allowed to refer to strings elsewhere in the
 // packet, to avoid repeating common suffixes when returning
-// many entries in a single domain.  The pointers are marked
-// by a length byte with the top two bits set.  Ignoring those
+// many entries in a single domain. The pointers are marked
+// by a length byte with the top two bits set. Ignoring those
 // two bits, that byte and the next give a 14 bit offset from msg[0]
 // where we should pick up the trail.
 // Note that if we jump elsewhere in the packet,
index 2639eab1c4f8c4061818bcddd95c90eb22040881..6c385dbef2243bfa69e5708efaab6b58124db7a5 100644 (file)
@@ -210,7 +210,7 @@ func (fd *netFD) Close() error {
        }
        // Unblock any I/O.  Once it all unblocks and returns,
        // so that it cannot be referring to fd.sysfd anymore,
-       // the final decref will close fd.sysfd.  This should happen
+       // the final decref will close fd.sysfd. This should happen
        // fairly quickly, since all the I/O is non-blocking, and any
        // attempts to block in the pollDesc will return errClosing.
        fd.pd.Evict()
@@ -464,7 +464,7 @@ func dupCloseOnExec(fd int) (newfd int, err error) {
                        // and fcntl there falls back (undocumented)
                        // to doing an ioctl instead, returning EBADF
                        // in this case because fd is not of the
-                       // expected device fd type.  Treat it as
+                       // expected device fd type. Treat it as
                        // EINVAL instead, so we fall back to the
                        // normal dup path.
                        // TODO: only do this on 10.6 if we can detect 10.6
index 9b4d8754183247661e339a104bd6a1d2738323b2..b2657b13a82ea72acceb8ed3d6c8641fb81da904 100644 (file)
@@ -10,7 +10,7 @@
 //
 // Note that using CGI means starting a new process to handle each
 // request, which is typically less efficient than using a
-// long-running server.  This package is intended primarily for
+// long-running server. This package is intended primarily for
 // compatibility with existing systems.
 package cgi
 
index 3106d229da6f7c2c448c397980c540f5cf1315e1..68676a5dc9e04b992b7f0978e70b1ecb4dfc3a84 100644 (file)
@@ -237,7 +237,7 @@ func send(ireq *Request, rt RoundTripper, deadline time.Time) (*Response, error)
        }
 
        // Most the callers of send (Get, Post, et al) don't need
-       // Headers, leaving it uninitialized.  We guarantee to the
+       // Headers, leaving it uninitialized. We guarantee to the
        // Transport that this has been initialized, though.
        if req.Header == nil {
                forkReq()
index fbaa805712b157a50d35c7c9ae99694ae97e8949..171060b5413affddebfc6d5d8955de096f952723 100644 (file)
@@ -356,7 +356,7 @@ func TestH12_HandlerWritesTooLittle(t *testing.T) {
 }
 
 // Tests that the HTTP/1 and HTTP/2 servers prevent handlers from
-// writing more than they declared.  This test does not test whether
+// writing more than they declared. This test does not test whether
 // the transport deals with too much data, though, since the server
 // doesn't make it possible to send bogus data. For those tests, see
 // transport_test.go (for HTTP/1) or x/net/http2/transport_test.go
index 821787e0c4b2a2316fefde19db15c14feb5136c1..32126d7ec0f6c368fa92447fe42edaa3017d3883 100644 (file)
@@ -33,7 +33,7 @@ func NewFileTransport(fs FileSystem) RoundTripper {
 
 func (t fileTransport) RoundTrip(req *Request) (resp *Response, err error) {
        // We start ServeHTTP in a goroutine, which may take a long
-       // time if the file is large.  The newPopulateResponseWriter
+       // time if the file is large. The newPopulateResponseWriter
        // call returns a channel which either ServeHTTP or finish()
        // sends our *Response on, once the *Response itself has been
        // populated (even if the body itself is still being
index 520a5477a7ba867f3d87fb2be92b8e9a40cb008d..7e672a091071d54c872c65c8e6f5529d9c36b82e 100644 (file)
@@ -96,7 +96,7 @@ func dirList(w ResponseWriter, f File) {
 }
 
 // ServeContent replies to the request using the content in the
-// provided ReadSeeker.  The main benefit of ServeContent over io.Copy
+// provided ReadSeeker. The main benefit of ServeContent over io.Copy
 // is that it handles Range requests properly, sets the MIME type, and
 // handles If-Modified-Since requests.
 //
@@ -108,7 +108,7 @@ func dirList(w ResponseWriter, f File) {
 // never sent in the response.
 //
 // If modtime is not the zero time or Unix epoch, ServeContent
-// includes it in a Last-Modified header in the response.  If the
+// includes it in a Last-Modified header in the response. If the
 // request includes an If-Modified-Since header, ServeContent uses
 // modtime to decide whether the content needs to be sent at all.
 //
@@ -196,7 +196,7 @@ func serveContent(w ResponseWriter, r *Request, name string, modtime time.Time,
                        // The total number of bytes in all the ranges
                        // is larger than the size of the file by
                        // itself, so this is probably an attack, or a
-                       // dumb client.  Ignore the range request.
+                       // dumb client. Ignore the range request.
                        ranges = nil
                }
                switch {
@@ -291,7 +291,7 @@ func checkLastModified(w ResponseWriter, r *Request, modtime time.Time) bool {
 // checkETag implements If-None-Match and If-Range checks.
 //
 // The ETag or modtime must have been previously set in the
-// ResponseWriter's headers.  The modtime is only compared at second
+// ResponseWriter's headers. The modtime is only compared at second
 // granularity and may be the zero value to mean unknown.
 //
 // The return value is the effective request "Range" header to use and
@@ -336,7 +336,7 @@ func checkETag(w ResponseWriter, r *Request, modtime time.Time) (rangeReq string
                }
 
                // TODO(bradfitz): deal with comma-separated or multiple-valued
-               // list of If-None-match values.  For now just handle the common
+               // list of If-None-match values. For now just handle the common
                // case of a single item.
                if inm == etag || inm == "*" {
                        h := w.Header()
index f778acb2b5dfd2987f2456726ce8f82b7b8f28d7..1e9088c9c369c3c23c67fc66f92137067fa5545c 100644 (file)
@@ -300,7 +300,7 @@ func http2registerHTTPSProtocol(t *Transport, rt RoundTripper) (err error) {
 }
 
 // noDialClientConnPool is an implementation of http2.ClientConnPool
-// which never dials.  We let the HTTP/1.1 client dial and use its TLS
+// which never dials. We let the HTTP/1.1 client dial and use its TLS
 // connection instead.
 type http2noDialClientConnPool struct{ *http2clientConnPool }
 
@@ -1421,7 +1421,7 @@ type http2PriorityParam struct {
        Exclusive bool
 
        // Weight is the stream's zero-indexed weight. It should be
-       // set together with StreamDep, or neither should be set.  Per
+       // set together with StreamDep, or neither should be set. Per
        // the spec, "Add one to the value to obtain a weight between
        // 1 and 256."
        Weight uint8
@@ -2335,7 +2335,7 @@ type http2connectionStater interface {
        ConnectionState() tls.ConnectionState
 }
 
-// pipe is a goroutine-safe io.Reader/io.Writer pair.  It's like
+// pipe is a goroutine-safe io.Reader/io.Writer pair. It's like
 // io.Pipe except there are no PipeReader/PipeWriter halves, and the
 // underlying buffer is an interface. (io.Pipe is always unbuffered)
 type http2pipe struct {
@@ -4211,8 +4211,8 @@ func (b *http2requestBody) Read(p []byte) (n int, err error) {
        return
 }
 
-// responseWriter is the http.ResponseWriter implementation.  It's
-// intentionally small (1 pointer wide) to minimize garbage.  The
+// responseWriter is the http.ResponseWriter implementation. It's
+// intentionally small (1 pointer wide) to minimize garbage. The
 // responseWriterState pointer inside is zeroed at the end of a
 // request (in handlerDone) and calls on the responseWriter thereafter
 // simply crash (caller's mistake), but the much larger responseWriterState
@@ -4386,7 +4386,7 @@ const http2TrailerPrefix = "Trailer:"
 // says you SHOULD (but not must) predeclare any trailers in the
 // header, the official ResponseWriter rules said trailers in Go must
 // be predeclared, and then we reuse the same ResponseWriter.Header()
-// map to mean both Headers and Trailers.  When it's time to write the
+// map to mean both Headers and Trailers. When it's time to write the
 // Trailers, we pick out the fields of Headers that were declared as
 // trailers. That worked for a while, until we found the first major
 // user of Trailers in the wild: gRPC (using them only over http2),
index 57f311fedc8d89f7b8604762ffbc474a3d5deb73..6343165a840c7ab120c78bfd5cb4bad7bd73360e 100644 (file)
@@ -25,7 +25,7 @@ func (h Header) Add(key, value string) {
 }
 
 // Set sets the header entries associated with key to
-// the single element value.  It replaces any existing
+// the single element value. It replaces any existing
 // values associated with key.
 func (h Header) Set(key, value string) {
        textproto.MIMEHeader(h).Set(key, value)
@@ -164,9 +164,9 @@ func (h Header) WriteSubset(w io.Writer, exclude map[string]bool) error {
 }
 
 // CanonicalHeaderKey returns the canonical format of the
-// header key s.  The canonicalization converts the first
+// header key s. The canonicalization converts the first
 // letter and any letter following a hyphen to upper case;
-// the rest are converted to lowercase.  For example, the
+// the rest are converted to lowercase. For example, the
 // canonical key for "accept-encoding" is "Accept-Encoding".
 // If s contains a space or invalid header field bytes, it is
 // returned without modifications.
@@ -186,7 +186,7 @@ func hasToken(v, token string) bool {
        for sp := 0; sp <= len(v)-len(token); sp++ {
                // Check that first character is good.
                // The token is ASCII, so checking only a single byte
-               // is sufficient.  We skip this potential starting
+               // is sufficient. We skip this potential starting
                // position if both the first byte and its potential
                // ASCII uppercase equivalent (b|0x20) don't match.
                // False positives ('^' => '~') are caught by EqualFold.
index 7e52adb6071e187591327a8f9fd798b249bff054..8655426eafebbae569449c1c0cdf1c3de8a748f2 100644 (file)
@@ -158,7 +158,7 @@ func (s *Server) Close() {
                        // previously-flaky tests) in the case of
                        // socket-late-binding races from the http Client
                        // dialing this server and then getting an idle
-                       // connection before the dial completed.  There is thus
+                       // connection before the dial completed. There is thus
                        // a connected connection in StateNew with no
                        // associated Request. We only close StateIdle and
                        // StateNew because they're not doing anything. It's
@@ -297,7 +297,7 @@ func (s *Server) closeConn(c net.Conn) { s.closeConnChan(c, nil) }
 func (s *Server) closeConnChan(c net.Conn, done chan<- bool) {
        if runtime.GOOS == "plan9" {
                // Go's Plan 9 net package isn't great at unblocking reads when
-               // their underlying TCP connections are closed.  Don't trust
+               // their underlying TCP connections are closed. Don't trust
                // that that the ConnState state machine will get to
                // StateClosed. Instead, just go there directly. Plan 9 may leak
                // resources if the syscall doesn't end up returning. Oh well.
index 245eed0b21b7a10e85a75e2fa1601d685df6a672..3af53958980dc049d32fbde52cbbe2f7541569f0 100644 (file)
@@ -128,7 +128,7 @@ func DumpRequestOut(req *http.Request, body bool) ([]byte, error) {
 
        // If we used a dummy body above, remove it now.
        // TODO: if the req.ContentLength is large, we allocate memory
-       // unnecessarily just to slice it off here.  But this is just
+       // unnecessarily just to slice it off here. But this is just
        // a debug function, so this is acceptable for now. We could
        // discard the body earlier if this matters.
        if dummyBody {
@@ -269,7 +269,7 @@ func DumpRequest(req *http.Request, body bool) (dump []byte, err error) {
 var errNoBody = errors.New("sentinel error value")
 
 // failureToReadBody is a io.ReadCloser that just returns errNoBody on
-// Read.  It's swapped in when we don't actually want to consume
+// Read. It's swapped in when we don't actually want to consume
 // the body, but need a non-nil one, and want to distinguish the
 // error from reading the dummy body.
 type failureToReadBody struct{}
index 987bcc96ba1d16c8dd26ffd3296f287c1ddb1c74..4cb110b71649bf31349c5f39422baeefecfb6e0e 100644 (file)
@@ -239,7 +239,7 @@ type ClientConn struct {
        writeReq func(*http.Request, io.Writer) error
 }
 
-// NewClientConn returns a new ClientConn reading and writing c.  If r is not
+// NewClientConn returns a new ClientConn reading and writing c. If r is not
 // nil, it is the buffer to use when reading c.
 //
 // ClientConn is low-level and old. Applications should use Client or
index 54411caeca8f90472cf0aa220d53bf906bee0f79..26a668b6dfcb0ec8695a6d9322e21cd0075101db 100644 (file)
@@ -180,9 +180,9 @@ func (p *ReverseProxy) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
        outreq.ProtoMinor = 1
        outreq.Close = false
 
-       // Remove hop-by-hop headers to the backend.  Especially
+       // Remove hop-by-hop headers to the backend. Especially
        // important is "Connection" because we want a persistent
-       // connection, regardless of what the client sent to us.  This
+       // connection, regardless of what the client sent to us. This
        // is modifying the same underlying map from req (shallow
        // copied above) so we only copy it if necessary.
        copiedHeaders := false
index 3400dbbdc6f6153a005f083f142a9a75bf487aad..2357d8ed1ede411aff0980e215cff34cf3e0caf2 100644 (file)
@@ -15,7 +15,7 @@
 //     import _ "net/http/pprof"
 //
 // If your application is not already running an http server, you
-// need to start one.  Add "net/http" and "log" to your imports and
+// need to start one. Add "net/http" and "log" to your imports and
 // the following code to your main function:
 //
 //     go func() {
@@ -146,11 +146,11 @@ func Symbol(w http.ResponseWriter, r *http.Request) {
        w.Header().Set("Content-Type", "text/plain; charset=utf-8")
 
        // We have to read the whole POST body before
-       // writing any output.  Buffer the output here.
+       // writing any output. Buffer the output here.
        var buf bytes.Buffer
 
        // We don't know how many symbols we have, but we
-       // do have symbol information.  Pprof only cares whether
+       // do have symbol information. Pprof only cares whether
        // this number is 0 (no symbols available) or > 0.
        fmt.Fprintf(&buf, "num_symbols: 1\n")
 
index 4037f40a3efa9ae90b5b0b6b363569505fbdb2db..76fb8fe6d1c553add26a333c6e6ace1fcecb2978 100644 (file)
@@ -279,8 +279,8 @@ func (r *Request) Cookie(name string) (*Cookie, error) {
        return nil, ErrNoCookie
 }
 
-// AddCookie adds a cookie to the request.  Per RFC 6265 section 5.4,
-// AddCookie does not attach more than one Cookie header field.  That
+// AddCookie adds a cookie to the request. Per RFC 6265 section 5.4,
+// AddCookie does not attach more than one Cookie header field. That
 // means all cookies, if any, are written into the same line,
 // separated by semicolon.
 func (r *Request) AddCookie(c *Cookie) {
@@ -375,7 +375,7 @@ func (r *Request) Write(w io.Writer) error {
 }
 
 // WriteProxy is like Write but writes the request in the form
-// expected by an HTTP proxy.  In particular, WriteProxy writes the
+// expected by an HTTP proxy. In particular, WriteProxy writes the
 // initial Request-URI line of the request with an absolute URI, per
 // section 5.1.2 of RFC 2616, including the scheme and host.
 // In either case, WriteProxy also writes a Host header, using
@@ -776,7 +776,7 @@ func readRequest(b *bufio.Reader, deleteHostHeader bool) (req *Request, err erro
        // and
        //      GET http://www.google.com/index.html HTTP/1.1
        //      Host: doesntmatter
-       // the same.  In the second case, any Host line is ignored.
+       // the same. In the second case, any Host line is ignored.
        req.Host = req.URL.Host
        if req.Host == "" {
                req.Host = req.Header.get("Host")
index 671cca91a65408b529fda1281505e68ed0b936cf..2545f6f4c22f25b93facc306807b1378459e8b08 100644 (file)
@@ -604,7 +604,7 @@ func TestRequestWriteError(t *testing.T) {
        failAfter, writeCount := 0, 0
        errFail := errors.New("fake write failure")
 
-       // w is the buffered io.Writer to write the request to.  It
+       // w is the buffered io.Writer to write the request to. It
        // fails exactly once on its Nth Write call, as controlled by
        // failAfter. It also tracks the number of calls in
        // writeCount.
index c424f61cd00e19ba8d6e7b98aa806302eb8af050..a596d1d342622105651be25556e3932a830c9c08 100644 (file)
@@ -33,7 +33,7 @@ type Response struct {
        ProtoMajor int    // e.g. 1
        ProtoMinor int    // e.g. 0
 
-       // Header maps header keys to values.  If the response had multiple
+       // Header maps header keys to values. If the response had multiple
        // headers with the same key, they may be concatenated, with comma
        // delimiters.  (Section 4.2 of RFC 2616 requires that multiple headers
        // be semantically equivalent to a comma-delimited sequence.) Values
@@ -57,8 +57,8 @@ type Response struct {
        // with a "chunked" Transfer-Encoding.
        Body io.ReadCloser
 
-       // ContentLength records the length of the associated content.  The
-       // value -1 indicates that the length is unknown.  Unless Request.Method
+       // ContentLength records the length of the associated content. The
+       // value -1 indicates that the length is unknown. Unless Request.Method
        // is "HEAD", values >= 0 indicate that the given number of bytes may
        // be read from Body.
        ContentLength int64
@@ -68,7 +68,7 @@ type Response struct {
        TransferEncoding []string
 
        // Close records whether the header directed that the connection be
-       // closed after reading Body.  The value is advice for clients: neither
+       // closed after reading Body. The value is advice for clients: neither
        // ReadResponse nor Response.Write ever closes a connection.
        Close bool
 
@@ -108,8 +108,8 @@ func (r *Response) Cookies() []*Cookie {
 var ErrNoLocation = errors.New("http: no Location header in response")
 
 // Location returns the URL of the response's "Location" header,
-// if present.  Relative redirects are resolved relative to
-// the Response's Request.  ErrNoLocation is returned if no
+// if present. Relative redirects are resolved relative to
+// the Response's Request. ErrNoLocation is returned if no
 // Location header is present.
 func (r *Response) Location() (*url.URL, error) {
        lv := r.Header.Get("Location")
index 384b453ce0ad5860a2fc67ff01537c700145c325..250e18644cc936c21fd545378900025d12d88992 100644 (file)
@@ -617,7 +617,7 @@ func TestIdentityResponse(t *testing.T) {
        defer ts.Close()
 
        // Note: this relies on the assumption (which is true) that
-       // Get sends HTTP/1.1 or greater requests.  Otherwise the
+       // Get sends HTTP/1.1 or greater requests. Otherwise the
        // server wouldn't have the choice to send back chunked
        // responses.
        for _, te := range []string{"", "identity"} {
@@ -984,7 +984,7 @@ func TestTLSServer(t *testing.T) {
        defer ts.Close()
 
        // Connect an idle TCP connection to this server before we run
-       // our real tests.  This idle connection used to block forever
+       // our real tests. This idle connection used to block forever
        // in the TLS handshake, preventing future connections from
        // being accepted. It may prevent future accidental blocking
        // in newConn.
@@ -2027,7 +2027,7 @@ func TestHandlerPanicWithHijack(t *testing.T) {
 func testHandlerPanic(t *testing.T, withHijack, h2 bool, panicValue interface{}) {
        defer afterTest(t)
        // Unlike the other tests that set the log output to ioutil.Discard
-       // to quiet the output, this test uses a pipe.  The pipe serves three
+       // to quiet the output, this test uses a pipe. The pipe serves three
        // purposes:
        //
        //   1) The log.Print from the http server (generated by the caught
@@ -2060,7 +2060,7 @@ func testHandlerPanic(t *testing.T, withHijack, h2 bool, panicValue interface{})
        defer cst.close()
 
        // Do a blocking read on the log output pipe so its logging
-       // doesn't bleed into the next test.  But wait only 5 seconds
+       // doesn't bleed into the next test. But wait only 5 seconds
        // for it.
        done := make(chan bool, 1)
        go func() {
@@ -2205,10 +2205,10 @@ func testRequestBodyLimit(t *testing.T, h2 bool) {
        nWritten := new(int64)
        req, _ := NewRequest("POST", cst.ts.URL, io.LimitReader(countReader{neverEnding('a'), nWritten}, limit*200))
 
-       // Send the POST, but don't care it succeeds or not.  The
+       // Send the POST, but don't care it succeeds or not. The
        // remote side is going to reply and then close the TCP
        // connection, and HTTP doesn't really define if that's
-       // allowed or not.  Some HTTP clients will get the response
+       // allowed or not. Some HTTP clients will get the response
        // and some (like ours, currently) will complain that the
        // request write failed, without reading the response.
        //
@@ -2650,7 +2650,7 @@ func TestOptions(t *testing.T) {
 }
 
 // Tests regarding the ordering of Write, WriteHeader, Header, and
-// Flush calls.  In Go 1.0, rw.WriteHeader immediately flushed the
+// Flush calls. In Go 1.0, rw.WriteHeader immediately flushed the
 // (*response).header to the wire. In Go 1.1, the actual wire flush is
 // delayed, so we could maybe tack on a Content-Length and better
 // Content-Type after we see more (or all) of the output. To preserve
@@ -3107,7 +3107,7 @@ func testTransportAndServerSharedBodyRace(t *testing.T, h2 bool) {
 
        const bodySize = 1 << 20
 
-       // errorf is like t.Errorf, but also writes to println.  When
+       // errorf is like t.Errorf, but also writes to println. When
        // this test fails, it hangs. This helps debugging and I've
        // added this enough times "temporarily".  It now gets added
        // full time.
index 773dd59c6bf8c19f466023a65d6a17411f844f2f..7a27a4157c476b2a578c141a919417a740e5cbc5 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.
 
-// HTTP server.  See RFC 2616.
+// HTTP server. See RFC 2616.
 
 package http
 
@@ -74,7 +74,7 @@ type ResponseWriter interface {
 
        // Write writes the data to the connection as part of an HTTP reply.
        // If WriteHeader has not yet been called, Write calls WriteHeader(http.StatusOK)
-       // before writing the data.  If the Header does not contain a
+       // before writing the data. If the Header does not contain a
        // Content-Type line, Write adds a Content-Type set to the result of passing
        // the initial 512 bytes of written data to DetectContentType.
        Write([]byte) (int, error)
@@ -342,7 +342,7 @@ type response struct {
        requestBodyLimitHit bool
 
        // trailers are the headers to be sent after the handler
-       // finishes writing the body.  This field is initialized from
+       // finishes writing the body. This field is initialized from
        // the Trailer response header when the response header is
        // written.
        trailers []string
@@ -766,7 +766,7 @@ func (w *response) Header() Header {
 
 // maxPostHandlerReadBytes is the max number of Request.Body bytes not
 // consumed by a handler that the server will read from the client
-// in order to keep a connection alive.  If there are more bytes than
+// in order to keep a connection alive. If there are more bytes than
 // this then the server to be paranoid instead sends a "Connection:
 // close" response.
 //
@@ -855,8 +855,8 @@ func (h extraHeader) Write(w *bufio.Writer) {
 // to cw.res.conn.bufw.
 //
 // p is not written by writeHeader, but is the first chunk of the body
-// that will be written.  It is sniffed for a Content-Type if none is
-// set explicitly.  It's also used to set the Content-Length, if the
+// that will be written. It is sniffed for a Content-Type if none is
+// set explicitly. It's also used to set the Content-Length, if the
 // total body size was small and the handler has already finished
 // running.
 func (cw *chunkWriter) writeHeader(p []byte) {
@@ -911,9 +911,9 @@ func (cw *chunkWriter) writeHeader(p []byte) {
        // Exceptions: 304/204/1xx responses never get Content-Length, and if
        // it was a HEAD request, we don't know the difference between
        // 0 actual bytes and 0 bytes because the handler noticed it
-       // was a HEAD request and chose not to write anything.  So for
+       // was a HEAD request and chose not to write anything. So for
        // HEAD, the handler should either write the Content-Length or
-       // write non-zero bytes.  If it's actually 0 bytes and the
+       // write non-zero bytes. If it's actually 0 bytes and the
        // handler never looked at the Request.Method, we just don't
        // send a Content-Length header.
        // Further, we don't send an automatic Content-Length if they
@@ -965,7 +965,7 @@ func (cw *chunkWriter) writeHeader(p []byte) {
        }
 
        // Per RFC 2616, we should consume the request body before
-       // replying, if the handler hasn't already done so.  But we
+       // replying, if the handler hasn't already done so. But we
        // don't want to do an unbounded amount of reading here for
        // DoS reasons, so we only try up to a threshold.
        if w.req.ContentLength != 0 && !w.closeAfterReply {
@@ -1174,7 +1174,7 @@ func (w *response) bodyAllowed() bool {
 // The Life Of A Write is like this:
 //
 // Handler starts. No header has been sent. The handler can either
-// write a header, or just start writing.  Writing before sending a header
+// write a header, or just start writing. Writing before sending a header
 // sends an implicitly empty 200 OK header.
 //
 // If the handler didn't declare a Content-Length up front, we either
@@ -1200,7 +1200,7 @@ func (w *response) bodyAllowed() bool {
 // initial header contains both a Content-Type and Content-Length.
 // Also short-circuit in (1) when the header's been sent and not in
 // chunking mode, writing directly to (4) instead, if (2) has no
-// buffered data.  More generally, we could short-circuit from (1) to
+// buffered data. More generally, we could short-circuit from (1) to
 // (3) even in chunking mode if the write size from (1) is over some
 // threshold and nothing is in (2).  The answer might be mostly making
 // bufferBeforeChunkingSize smaller and having bufio's fast-paths deal
@@ -1341,7 +1341,7 @@ type closeWriter interface {
 var _ closeWriter = (*net.TCPConn)(nil)
 
 // closeWrite flushes any outstanding data and sends a FIN packet (if
-// client is connected via TCP), signalling that we're done.  We then
+// client is connected via TCP), signalling that we're done. We then
 // pause for a bit, hoping the client processes it before any
 // subsequent RST.
 //
@@ -1355,7 +1355,7 @@ func (c *conn) closeWriteAndWait() {
 }
 
 // validNPN reports whether the proto is not a blacklisted Next
-// Protocol Negotiation protocol.  Empty and built-in protocol types
+// Protocol Negotiation protocol. Empty and built-in protocol types
 // are blacklisted and can't be overridden with alternate
 // implementations.
 func validNPN(proto string) bool {
@@ -1433,7 +1433,7 @@ func (c *conn) serve() {
                                // able to read this if we're
                                // responding to them and hanging up
                                // while they're still writing their
-                               // request.  Undefined behavior.
+                               // request. Undefined behavior.
                                io.WriteString(c.rwc, "HTTP/1.1 431 Request Header Fields Too Large\r\nContent-Type: text/plain\r\nConnection: close\r\n\r\n431 Request Header Fields Too Large")
                                c.closeWriteAndWait()
                                return
@@ -1467,7 +1467,7 @@ func (c *conn) serve() {
                // HTTP cannot have multiple simultaneous active requests.[*]
                // Until the server replies to this request, it can't read another,
                // so we might as well run the handler in this goroutine.
-               // [*] Not strictly true: HTTP pipelining.  We could let them all process
+               // [*] Not strictly true: HTTP pipelining. We could let them all process
                // in parallel even if their responses need to be serialized.
                serverHandler{c.server}.ServeHTTP(w, w.req)
                if c.hijacked() {
@@ -1488,7 +1488,7 @@ func (w *response) sendExpectationFailed() {
        // TODO(bradfitz): let ServeHTTP handlers handle
        // requests with non-standard expectation[s]? Seems
        // theoretical at best, and doesn't fit into the
-       // current ServeHTTP model anyway.  We'd need to
+       // current ServeHTTP model anyway. We'd need to
        // make the ResponseWriter an optional
        // "ExpectReplier" interface or something.
        //
@@ -1608,7 +1608,7 @@ func requestBodyRemains(rc io.ReadCloser) bool {
 }
 
 // The HandlerFunc type is an adapter to allow the use of
-// ordinary functions as HTTP handlers.  If f is a function
+// ordinary functions as HTTP handlers. If f is a function
 // with the appropriate signature, HandlerFunc(f) is a
 // Handler that calls f.
 type HandlerFunc func(ResponseWriter, *Request)
@@ -1779,7 +1779,7 @@ func RedirectHandler(url string, code int) Handler {
 // been registered separately.
 //
 // Patterns may optionally begin with a host name, restricting matches to
-// URLs on that host only.  Host-specific patterns take precedence over
+// URLs on that host only. Host-specific patterns take precedence over
 // general patterns, so that a handler might register for the two patterns
 // "/codesearch" and "codesearch.google.com/" without also taking over
 // requests for "http://www.google.com/".
@@ -1968,7 +1968,7 @@ func HandleFunc(pattern string, handler func(ResponseWriter, *Request)) {
 }
 
 // Serve accepts incoming HTTP connections on the listener l,
-// creating a new service goroutine for each.  The service goroutines
+// creating a new service goroutine for each. The service goroutines
 // read requests and then call handler to reply to them.
 // Handler is typically nil, in which case the DefaultServeMux is used.
 func Serve(l net.Listener, handler Handler) error {
@@ -1988,10 +1988,10 @@ type Server struct {
 
        // TLSNextProto optionally specifies a function to take over
        // ownership of the provided TLS connection when an NPN
-       // protocol upgrade has occurred.  The map key is the protocol
+       // protocol upgrade has occurred. The map key is the protocol
        // name negotiated. The Handler argument should be used to
        // handle HTTP requests and will initialize the Request's TLS
-       // and RemoteAddr if not already set.  The connection is
+       // and RemoteAddr if not already set. The connection is
        // automatically closed when the function returns.
        // If TLSNextProto is nil, HTTP/2 support is enabled automatically.
        TLSNextProto map[string]func(*Server, *tls.Conn, Handler)
@@ -2330,7 +2330,7 @@ type timeoutHandler struct {
        body    string
 
        // timeout returns the channel of a *time.Timer and
-       // cancelTimer cancels it.  They're stored separately for
+       // cancelTimer cancels it. They're stored separately for
        // testing purposes.
        timeout     func() <-chan time.Time // returns channel producing a timeout
        cancelTimer func() bool             // optional
index 44f83db020a2217b74e106ad99df0330d0691c09..54986b9956782a3f019f14e29456e56f86a48e39 100644 (file)
@@ -14,8 +14,8 @@ const sniffLen = 512
 
 // DetectContentType implements the algorithm described
 // at http://mimesniff.spec.whatwg.org/ to determine the
-// Content-Type of the given data.  It considers at most the
-// first 512 bytes of data.  DetectContentType always returns
+// Content-Type of the given data. It considers at most the
+// first 512 bytes of data. DetectContentType always returns
 // a valid MIME type: if it cannot determine a more specific one, it
 // returns "application/octet-stream".
 func DetectContentType(data []byte) string {
index 7ff4953a14ab568b20e70c32e7433a92f02587c5..4c130f0cc49735a8eb0b9fd53bdf000b7f00a4c7 100644 (file)
@@ -276,7 +276,7 @@ func (t *transferReader) protoAtLeast(m, n int) bool {
 }
 
 // bodyAllowedForStatus reports whether a given response status code
-// permits a body.  See RFC2616, section 4.4.
+// permits a body. See RFC2616, section 4.4.
 func bodyAllowedForStatus(status int) bool {
        switch {
        case status >= 100 && status <= 199:
@@ -379,7 +379,7 @@ func readTransfer(msg interface{}, r *bufio.Reader) (err error) {
                }
        }
 
-       // Prepare body reader.  ContentLength < 0 means chunked encoding
+       // Prepare body reader. ContentLength < 0 means chunked encoding
        // or close connection when finished, since multipart is not supported yet
        switch {
        case chunked(t.TransferEncoding):
@@ -727,11 +727,11 @@ func (b *body) readTrailer() error {
        }
 
        // Make sure there's a header terminator coming up, to prevent
-       // a DoS with an unbounded size Trailer.  It's not easy to
+       // a DoS with an unbounded size Trailer. It's not easy to
        // slip in a LimitReader here, as textproto.NewReader requires
-       // a concrete *bufio.Reader.  Also, we can't get all the way
+       // a concrete *bufio.Reader. Also, we can't get all the way
        // back up to our conn's LimitedReader that *might* be backing
-       // this bufio.Reader.  Instead, a hack: we iteratively Peek up
+       // this bufio.Reader. Instead, a hack: we iteratively Peek up
        // to the bufio.Reader's max size, looking for a double CRLF.
        // This limits the trailer to the underlying buffer size, typically 4kB.
        if !seeUpcomingDoubleCRLF(b.r) {
index f622f6f9834b3e4c6f76be46175da879d80bdcb6..163e1bd2b91ccf0c5a802d6aecb9b717114c0ef3 100644 (file)
@@ -118,7 +118,7 @@ type Transport struct {
        DisableCompression bool
 
        // MaxIdleConnsPerHost, if non-zero, controls the maximum idle
-       // (keep-alive) to keep per-host.  If zero,
+       // (keep-alive) to keep per-host. If zero,
        // DefaultMaxIdleConnsPerHost is used.
        MaxIdleConnsPerHost int
 
@@ -137,7 +137,7 @@ type Transport struct {
 
        // TLSNextProto specifies how the Transport switches to an
        // alternate protocol (such as HTTP/2) after a TLS NPN/ALPN
-       // protocol negotiation.  If Transport dials an TLS connection
+       // protocol negotiation. If Transport dials an TLS connection
        // with a non-empty protocol name and TLSNextProto contains a
        // map entry for that key (such as "h2"), then the func is
        // called with the request's authority (such as "example.com"
@@ -306,7 +306,7 @@ func (t *Transport) RoundTrip(req *Request) (*Response, error) {
 
                // Get the cached or newly-created connection to either the
                // host (for http or https), the http proxy, or the http proxy
-               // pre-CONNECTed to https server.  In any case, we'll be ready
+               // pre-CONNECTed to https server. In any case, we'll be ready
                // to send it requests.
                pconn, err := t.getConn(req, cm)
                if err != nil {
@@ -541,7 +541,7 @@ func (t *Transport) tryPutIdleConn(pconn *persistConn) error {
                // We're done with this pconn and somebody else is
                // currently waiting for a conn of this type (they're
                // actively dialing, but this conn is ready
-               // first). Chrome calls this socket late binding.  See
+               // first). Chrome calls this socket late binding. See
                // https://insouciant.org/tech/connection-management-in-chromium/
                t.idleMu.Unlock()
                return nil
@@ -666,7 +666,7 @@ func (t *Transport) dial(network, addr string) (net.Conn, error) {
 }
 
 // getConn dials and creates a new persistConn to the target as
-// specified in the connectMethod.  This includes doing a proxy CONNECT
+// specified in the connectMethod. This includes doing a proxy CONNECT
 // and/or setting up TLS.  If this doesn't return an error, the persistConn
 // is ready to write requests to.
 func (t *Transport) getConn(req *Request, cm connectMethod) (*persistConn, error) {
@@ -1558,7 +1558,7 @@ func (pc *persistConn) closeLocked(err error) {
                        // handlePendingDial's putOrCloseIdleConn when
                        // it turns out the abandoned connection in
                        // flight ended up negotiating an alternate
-                       // protocol.  We don't use the connection
+                       // protocol. We don't use the connection
                        // freelist for http2. That's done by the
                        // alternate protocol's RoundTripper.
                } else {
index e8a4623556806e4ac9a5f1b4ded2eadc60c21bff..9f17017651a55dac5421c818000dd87b88ad1c30 100644 (file)
@@ -478,7 +478,7 @@ func TestTransportServerClosingUnexpectedly(t *testing.T) {
 
        // This test has an expected race. Sleeping for 25 ms prevents
        // it on most fast machines, causing the next fetch() call to
-       // succeed quickly.  But if we do get errors, fetch() will retry 5
+       // succeed quickly. But if we do get errors, fetch() will retry 5
        // times with some delays between.
        time.Sleep(25 * time.Millisecond)
 
@@ -518,7 +518,7 @@ func TestStressSurpriseServerCloses(t *testing.T) {
        // after each request completes, regardless of whether it failed.
        // 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
+       // not what we want to test. TODO(bradfitz): use an io.Pipe
        // dialer for this test instead?
        const (
                numClients    = 20
@@ -1026,7 +1026,7 @@ func TestTransportPersistConnLeak(t *testing.T) {
 
        growth := nfinal - n0
 
-       // We expect 0 or 1 extra goroutine, empirically.  Allow up to 5.
+       // We expect 0 or 1 extra goroutine, empirically. Allow up to 5.
        // Previously we were leaking one per numReq.
        if int(growth) > 5 {
                t.Logf("goroutine growth: %d -> %d -> %d (delta: %d)", n0, nhigh, nfinal, growth)
@@ -1067,7 +1067,7 @@ func TestTransportPersistConnLeakShortBody(t *testing.T) {
 
        growth := nfinal - n0
 
-       // We expect 0 or 1 extra goroutine, empirically.  Allow up to 5.
+       // We expect 0 or 1 extra goroutine, empirically. Allow up to 5.
        // Previously we were leaking one per numReq.
        t.Logf("goroutine growth: %d -> %d -> %d (delta: %d)", n0, nhigh, nfinal, growth)
        if int(growth) > 5 {
@@ -1103,8 +1103,8 @@ func TestTransportIdleConnCrash(t *testing.T) {
 }
 
 // Test that the transport doesn't close the TCP connection early,
-// before the response body has been read.  This was a regression
-// which sadly lacked a triggering test.  The large response body made
+// before the response body has been read. This was a regression
+// which sadly lacked a triggering test. The large response body made
 // the old race easier to trigger.
 func TestIssue3644(t *testing.T) {
        defer afterTest(t)
@@ -1199,7 +1199,7 @@ func TestTransportConcurrency(t *testing.T) {
 
        // Due to the Transport's "socket late binding" (see
        // idleConnCh in transport.go), the numReqs HTTP requests
-       // below can finish with a dial still outstanding.  To keep
+       // below can finish with a dial still outstanding. To keep
        // the leak checker happy, keep track of pending dials and
        // wait for them to finish (and be closed or returned to the
        // idle pool) before we close idle connections.
@@ -2273,7 +2273,7 @@ func TestTLSServerClosesConnection(t *testing.T) {
 }
 
 // byteFromChanReader is an io.Reader that reads a single byte at a
-// time from the channel.  When the channel is closed, the reader
+// time from the channel. When the channel is closed, the reader
 // returns io.EOF.
 type byteFromChanReader chan byte
 
@@ -2405,7 +2405,7 @@ func (plan9SleepReader) Read(p []byte) (int, error) {
                // After the fix to unblock TCP Reads in
                // https://golang.org/cl/15941, this sleep is required
                // on plan9 to make sure TCP Writes before an
-               // immediate TCP close go out on the wire.  On Plan 9,
+               // immediate TCP close go out on the wire. On Plan 9,
                // it seems that a hangup of a TCP connection with
                // queued data doesn't send the queued data first.
                // https://golang.org/issue/9554
@@ -2424,7 +2424,7 @@ func (f closerFunc) Close() error { return f() }
 // from (or finish writing to) the socket.
 //
 // NOTE: we resend a request only if the request is idempotent, we reused a
-// keep-alive connection, and we haven't yet received any header data.  This
+// keep-alive connection, and we haven't yet received any header data. This
 // automatically prevents an infinite resend loop because we'll run out of the
 // cached keep-alive connections eventually.
 func TestRetryIdempotentRequestsOnError(t *testing.T) {
index 64a284c157dc54f688685b98456066be73d9ba43..c99f8fd216648e98df48bf9516973af8ea0475da 100644 (file)
@@ -15,7 +15,7 @@ var (
 )
 
 // Interface represents a mapping between network interface name
-// and index.  It also represents network interface facility
+// and index. It also represents network interface facility
 // information.
 type Interface struct {
        Index        int          // positive integer that starts at one, zero is never used
index 4525388c9577e61a9382d2dcd1b2a9def076f80f..b173fbcefc20f143765f512cb13344bf48770431 100644 (file)
@@ -13,7 +13,7 @@ import (
 )
 
 // If the ifindex is zero, interfaceTable returns mappings of all
-// network interfaces.  Otherwise it returns a mapping of a specific
+// network interfaces. Otherwise it returns a mapping of a specific
 // interface.
 func interfaceTable(ifindex int) ([]Interface, error) {
        tab, err := syscall.RouteRIB(syscall.NET_RT_IFLIST, ifindex)
@@ -95,7 +95,7 @@ func linkFlags(rawFlags int32) Flags {
 }
 
 // If the ifi is nil, interfaceAddrTable returns addresses for all
-// network interfaces.  Otherwise it returns addresses for a specific
+// network interfaces. Otherwise it returns addresses for a specific
 // interface.
 func interfaceAddrTable(ifi *Interface) ([]Addr, error) {
        index := 0
index 55beca5895cdda982fbfef5b7350b0b36887189c..5e391b28b0f8c4b2f83b4a9353d8249655dbb12f 100644 (file)
@@ -11,7 +11,7 @@ import (
 )
 
 // If the ifindex is zero, interfaceTable returns mappings of all
-// network interfaces.  Otherwise it returns a mapping of a specific
+// network interfaces. Otherwise it returns a mapping of a specific
 // interface.
 func interfaceTable(ifindex int) ([]Interface, error) {
        tab, err := syscall.NetlinkRIB(syscall.RTM_GETLINK, syscall.AF_UNSPEC)
@@ -115,7 +115,7 @@ func linkFlags(rawFlags uint32) Flags {
 }
 
 // If the ifi is nil, interfaceAddrTable returns addresses for all
-// network interfaces.  Otherwise it returns addresses for a specific
+// network interfaces. Otherwise it returns addresses for a specific
 // interface.
 func interfaceAddrTable(ifi *Interface) ([]Addr, error) {
        tab, err := syscall.NetlinkRIB(syscall.RTM_GETADDR, syscall.AF_UNSPEC)
index d1e30f7e95b799c0c2266f4ee03cb078c785c000..f64174c62eef3c4697b24fa90ccfa541523014c5 100644 (file)
@@ -7,14 +7,14 @@
 package net
 
 // If the ifindex is zero, interfaceTable returns mappings of all
-// network interfaces.  Otherwise it returns a mapping of a specific
+// network interfaces. Otherwise it returns a mapping of a specific
 // interface.
 func interfaceTable(ifindex int) ([]Interface, error) {
        return nil, nil
 }
 
 // If the ifi is nil, interfaceAddrTable returns addresses for all
-// network interfaces.  Otherwise it returns addresses for a specific
+// network interfaces. Otherwise it returns addresses for a specific
 // interface.
 func interfaceAddrTable(ifi *Interface) ([]Addr, error) {
        return nil, nil
index 56c3e919a8b71cba35d04befbdc0748438a2b0a7..1487acf601022ea9b8aa59919f17ac2c2a2420c7 100644 (file)
@@ -11,7 +11,7 @@ import (
 )
 
 // loopbackInterface returns an available logical network interface
-// for loopback tests.  It returns nil if no suitable interface is
+// for loopback tests. It returns nil if no suitable interface is
 // found.
 func loopbackInterface() *Interface {
        ift, err := Interfaces()
index 78bf375b6dadfb7831c8fd48fc3d88cfa552f74d..8b976e585f36aab51876c2a1b36681c074532b72 100644 (file)
@@ -61,7 +61,7 @@ func adapterAddresses() ([]*windows.IpAdapterAddresses, error) {
 }
 
 // If the ifindex is zero, interfaceTable returns mappings of all
-// network interfaces.  Otherwise it returns a mapping of a specific
+// network interfaces. Otherwise it returns a mapping of a specific
 // interface.
 func interfaceTable(ifindex int) ([]Interface, error) {
        aas, err := adapterAddresses()
@@ -116,7 +116,7 @@ func interfaceTable(ifindex int) ([]Interface, error) {
 }
 
 // If the ifi is nil, interfaceAddrTable returns addresses for all
-// network interfaces.  Otherwise it returns addresses for a specific
+// network interfaces. Otherwise it returns addresses for a specific
 // interface.
 func interfaceAddrTable(ifi *Interface) ([]Addr, error) {
        aas, err := adapterAddresses()
index cc004d607297c426a9c777bcb2b4bbe1d835fdee..a25729cfc9e94b8b51269dd48420194f37e4b34c 100644 (file)
@@ -653,7 +653,7 @@ func ParseIP(s string) IP {
 // RFC 4632 and RFC 4291.
 //
 // It returns the IP address and the network implied by the IP
-// and mask.  For example, ParseCIDR("192.168.100.1/16") returns
+// and mask. For example, ParseCIDR("192.168.100.1/16") returns
 // the IP address 192.168.100.1 and the network 192.168.0.0/16.
 func ParseCIDR(s string) (IP, *IPNet, error) {
        i := byteIndex(s, '/')
index e872eafe6b791910ccad082cf0d02ff9dfd06b1d..6fb3893529ce4315273ef78954d8b44837f6d89e 100644 (file)
@@ -32,7 +32,7 @@ func (c *IPConn) ReadFrom(b []byte) (int, Addr, error) {
 }
 
 // ReadMsgIP reads a packet from c, copying the payload into b and the
-// associated out-of-band data into oob.  It returns the number of
+// associated out-of-band data into oob. It returns the number of
 // bytes copied into b, the number of bytes copied into oob, the flags
 // that were set on the packet and the source address of the packet.
 func (c *IPConn) ReadMsgIP(b, oob []byte) (n, oobn, flags int, addr *IPAddr, err error) {
@@ -44,7 +44,7 @@ func (c *IPConn) ReadMsgIP(b, oob []byte) (n, oobn, flags int, addr *IPAddr, err
 //
 // WriteToIP can be made to time out and return an error with
 // Timeout() == true after a fixed time limit; see SetDeadline and
-// SetWriteDeadline.  On packet-oriented connections, write timeouts
+// SetWriteDeadline. On packet-oriented connections, write timeouts
 // are rare.
 func (c *IPConn) WriteToIP(b []byte, addr *IPAddr) (int, error) {
        return 0, &OpError{Op: "write", Net: c.fd.dir, Source: c.fd.laddr, Addr: addr.opAddr(), Err: syscall.EPLAN9}
@@ -56,7 +56,7 @@ func (c *IPConn) WriteTo(b []byte, addr Addr) (int, error) {
 }
 
 // WriteMsgIP writes a packet to addr via c, copying the payload from
-// b and the associated out-of-band data from oob.  It returns the
+// b and the associated out-of-band data from oob. It returns the
 // number of payload and out-of-band bytes written.
 func (c *IPConn) WriteMsgIP(b, oob []byte, addr *IPAddr) (n, oobn int, err error) {
        return 0, 0, &OpError{Op: "write", Net: c.fd.dir, Source: c.fd.laddr, Addr: addr.opAddr(), Err: syscall.EPLAN9}
@@ -74,7 +74,7 @@ func dialIP(netProto string, laddr, raddr *IPAddr, deadline time.Time) (*IPConn,
 }
 
 // ListenIP listens for incoming IP packets addressed to the local
-// address laddr.  The returned connection's ReadFrom and WriteTo
+// address laddr. The returned connection's ReadFrom and WriteTo
 // methods can be used to receive and send IP packets with per-packet
 // addressing.
 func ListenIP(netProto string, laddr *IPAddr) (*IPConn, error) {
index 449660db4ea4581609fd6b84783263c61e0ea6de..7364bfe455f2ce8b27297afab8b114e1304da1a1 100644 (file)
@@ -114,7 +114,7 @@ func (c *IPConn) ReadFrom(b []byte) (int, Addr, error) {
 }
 
 // ReadMsgIP reads a packet from c, copying the payload into b and the
-// associated out-of-band data into oob.  It returns the number of
+// associated out-of-band data into oob. It returns the number of
 // bytes copied into b, the number of bytes copied into oob, the flags
 // that were set on the packet and the source address of the packet.
 func (c *IPConn) ReadMsgIP(b, oob []byte) (n, oobn, flags int, addr *IPAddr, err error) {
@@ -140,7 +140,7 @@ func (c *IPConn) ReadMsgIP(b, oob []byte) (n, oobn, flags int, addr *IPAddr, err
 //
 // WriteToIP can be made to time out and return an error with
 // Timeout() == true after a fixed time limit; see SetDeadline and
-// SetWriteDeadline.  On packet-oriented connections, write timeouts
+// SetWriteDeadline. On packet-oriented connections, write timeouts
 // are rare.
 func (c *IPConn) WriteToIP(b []byte, addr *IPAddr) (int, error) {
        if !c.ok() {
@@ -176,7 +176,7 @@ func (c *IPConn) WriteTo(b []byte, addr Addr) (int, error) {
 }
 
 // WriteMsgIP writes a packet to addr via c, copying the payload from
-// b and the associated out-of-band data from oob.  It returns the
+// b and the associated out-of-band data from oob. It returns the
 // number of payload and out-of-band bytes written.
 func (c *IPConn) WriteMsgIP(b, oob []byte, addr *IPAddr) (n, oobn int, err error) {
        if !c.ok() {
@@ -228,7 +228,7 @@ func dialIP(netProto string, laddr, raddr *IPAddr, deadline time.Time) (*IPConn,
 }
 
 // ListenIP listens for incoming IP packets addressed to the local
-// address laddr.  The returned connection's ReadFrom and WriteTo
+// address laddr. The returned connection's ReadFrom and WriteTo
 // methods can be used to receive and send IP packets with per-packet
 // addressing.
 func ListenIP(netProto string, laddr *IPAddr) (*IPConn, error) {
index cfa9e884640a8e301ffd920dca4c43c1b8b2389b..d6a6785e066558ae8f7353746d98b752677bf1ba 100644 (file)
@@ -22,7 +22,7 @@ var (
 
        // supportsIPv4map reports whether the platform supports
        // mapping an IPv4 address inside an IPv6 address at transport
-       // layer protocols.  See RFC 4291, RFC 4038 and RFC 3493.
+       // layer protocols. See RFC 4291, RFC 4038 and RFC 3493.
        supportsIPv4map bool
 )
 
@@ -106,7 +106,7 @@ func ipv6only(addr IPAddr) bool {
 
 // SplitHostPort splits a network address of the form "host:port",
 // "[host]:port" or "[ipv6-host%zone]:port" into host or
-// ipv6-host%zone and port.  A literal address or host name for IPv6
+// ipv6-host%zone and port. A literal address or host name for IPv6
 // must be enclosed in square brackets, as in "[::1]:80",
 // "[ipv6-host]:http" or "[ipv6-host%zone]:80".
 func SplitHostPort(hostport string) (host, port string, err error) {
index 4812146c5c7d48029240d3b6f30e1128e9512bcd..53a122ac8cb18c6de359b403c79393810bbca15e 100644 (file)
@@ -39,8 +39,8 @@ func probeIPv4Stack() bool {
        return probe(netdir+"/iproute", "4i")
 }
 
-// probeIPv6Stack returns two boolean values.  If the first boolean
-// value is true, kernel supports basic IPv6 functionality.  If the
+// probeIPv6Stack returns two boolean values. If the first boolean
+// value is true, kernel supports basic IPv6 functionality. If the
 // second boolean value is true, kernel supports IPv6 IPv4-mapping.
 func probeIPv6Stack() (supportsIPv6, supportsIPv4map bool) {
        // Plan 9 uses IPv6 natively, see ip(3).
index 331985f33f9a11bf3609b8e073fdc007c6ce1b1a..a42ca9c3e83df7b9174e31114ac4333aa0af0436 100644 (file)
@@ -35,15 +35,15 @@ func probeIPv4Stack() bool {
 // Should we try to use the IPv4 socket interface if we're
 // only dealing with IPv4 sockets?  As long as the host system
 // understands IPv6, it's okay to pass IPv4 addresses to the IPv6
-// interface.  That simplifies our code and is most general.
+// interface. That simplifies our code and is most general.
 // Unfortunately, we need to run on kernels built without IPv6
-// support too.  So probe the kernel to figure it out.
+// support too. So probe the kernel to figure it out.
 //
 // probeIPv6Stack probes both basic IPv6 capability and IPv6 IPv4-
 // mapping capability which is controlled by IPV6_V6ONLY socket
 // option and/or kernel state "net.inet6.ip6.v6only".
-// It returns two boolean values.  If the first boolean value is
-// true, kernel supports basic IPv6 functionality.  If the second
+// It returns two boolean values. If the first boolean value is
+// true, kernel supports basic IPv6 functionality. If the second
 // boolean value is true, kernel supports IPv6 IPv4-mapping.
 func probeIPv6Stack() (supportsIPv6, supportsIPv4map bool) {
        var probes = []struct {
@@ -93,8 +93,8 @@ func probeIPv6Stack() (supportsIPv6, supportsIPv4map bool) {
 }
 
 // favoriteAddrFamily returns the appropriate address family to
-// the given net, laddr, raddr and mode.  At first it figures
-// address family out from the net.  If mode indicates "listen"
+// the given net, laddr, raddr and mode. At first it figures
+// address family out from the net. If mode indicates "listen"
 // and laddr is a wildcard, it assumes that the user wants to
 // make a passive connection with a wildcard address family, both
 // AF_INET and AF_INET6, and a wildcard address like following:
@@ -182,7 +182,7 @@ func ipToSockaddr(family int, ip IP, port int, zone string) (syscall.Sockaddr, e
                }
                // IPv4 callers use 0.0.0.0 to mean "announce on any available address".
                // In IPv6 mode, Linux treats that as meaning "announce on 0.0.0.0",
-               // which it refuses to do.  Rewrite to the IPv6 unspecified address.
+               // which it refuses to do. Rewrite to the IPv6 unspecified address.
                if ip.Equal(IPv4zero) {
                        ip = IPv6zero
                }
index 0770b6e31dac60e7af2e92816f9407bbd5d86dec..ab6886ddff644a4cd51b3cdf939c2bfd2b922f3f 100644 (file)
@@ -92,7 +92,7 @@ func lookupIPDeadline(host string, deadline time.Time) (addrs []IPAddr, err erro
        }
 
        // We could push the deadline down into the name resolution
-       // functions.  However, the most commonly used implementation
+       // functions. However, the most commonly used implementation
        // calls getaddrinfo, which has no timeout.
 
        timeout := deadline.Sub(time.Now())
@@ -108,10 +108,10 @@ func lookupIPDeadline(host string, deadline time.Time) (addrs []IPAddr, err erro
 
        select {
        case <-t.C:
-               // The DNS lookup timed out for some reason.  Force
+               // The DNS lookup timed out for some reason. Force
                // future requests to start the DNS lookup again
                // rather than waiting for the current lookup to
-               // complete.  See issue 8602.
+               // complete. See issue 8602.
                lookupGroup.Forget(host)
 
                return nil, errTimeout
@@ -150,12 +150,12 @@ func LookupCNAME(name string) (cname string, err error) {
 }
 
 // LookupSRV tries to resolve an SRV query of the given service,
-// protocol, and domain name.  The proto is "tcp" or "udp".
+// protocol, and domain name. The proto is "tcp" or "udp".
 // The returned records are sorted by priority and randomized
 // by weight within a priority.
 //
 // LookupSRV constructs the DNS name to look up following RFC 2782.
-// That is, it looks up _service._proto.name.  To accommodate services
+// That is, it looks up _service._proto.name. To accommodate services
 // publishing SRV records under non-standard names, if both service
 // and proto are empty strings, LookupSRV looks up name directly.
 func LookupSRV(service, proto, name string) (cname string, addrs []*SRV, err error) {
index d9d23fae8f6c3a77de201b48bea91b1591c8e058..2ff1a34981a5dd6b2e68ee6073fcfba4af202dcb 100644 (file)
@@ -297,7 +297,7 @@ func (c *conn) File() (f *os.File, err error) {
 // Multiple goroutines may invoke methods on a PacketConn simultaneously.
 type PacketConn interface {
        // ReadFrom reads a packet from the connection,
-       // copying the payload into b.  It returns the number of
+       // copying the payload into b. It returns the number of
        // bytes copied into b and the return address that
        // was on the packet.
        // ReadFrom can be made to time out and return
index d0c4a69214e82d71277b2dae78e1d65df0c2dfa3..862fb1ae0c1c7378455bd4e6812519550a3dcb57 100644 (file)
@@ -55,7 +55,7 @@ type Client struct {
 // reading of RPC responses for the client side of an RPC session.
 // The client calls WriteRequest to write a request to the connection
 // and calls ReadResponseHeader and ReadResponseBody in pairs
-// to read responses.  The client calls Close when finished with the
+// to read responses. The client calls Close when finished with the
 // connection. ReadResponseBody may be called with a nil
 // argument to force the body of the response to be read and then
 // discarded.
@@ -173,7 +173,7 @@ func (call *Call) done() {
        case call.Done <- call:
                // ok
        default:
-               // We don't want to block here.  It is the caller's responsibility to make
+               // We don't want to block here. It is the caller's responsibility to make
                // sure the channel has enough buffer space. See comment in Go().
                if debugLog {
                        log.Println("rpc: discarding Call reply due to insufficient Done chan capacity")
@@ -285,9 +285,9 @@ func (client *Client) Close() error {
        return client.codec.Close()
 }
 
-// Go invokes the function asynchronously.  It returns the Call structure representing
-// the invocation.  The done channel will signal when the call is complete by returning
-// the same Call object.  If done is nil, Go will allocate a new channel.
+// Go invokes the function asynchronously. It returns the Call structure representing
+// the invocation. The done channel will signal when the call is complete by returning
+// the same Call object. If done is nil, Go will allocate a new channel.
 // If non-nil, done must be buffered or Go will deliberately crash.
 func (client *Client) Go(serviceMethod string, args interface{}, reply interface{}, done chan *Call) *Call {
        call := new(Call)
@@ -299,7 +299,7 @@ func (client *Client) Go(serviceMethod string, args interface{}, reply interface
        } else {
                // If caller passes done != nil, it must arrange that
                // done has enough buffer for the number of simultaneous
-               // RPCs that will be using that channel.  If the channel
+               // RPCs that will be using that channel. If the channel
                // is totally unbuffered, it's best not to run at all.
                if cap(done) == 0 {
                        log.Panic("rpc: done channel is unbuffered")
index 820b4ab9f578be1047d8485f4c944276fe796bd4..40e4e6f2aa5c18b58c1e7913136c3b87cae69220 100644 (file)
@@ -110,7 +110,7 @@ func (c *serverCodec) WriteResponse(r *rpc.Response, x interface{}) error {
        c.mutex.Unlock()
 
        if b == nil {
-               // Invalid request so no id.  Use JSON null.
+               // Invalid request so no id. Use JSON null.
                b = &null
        }
        resp := serverResponse{Id: b}
index c4d4479958adc781e3dbc0c600130156c784d01d..cff32413a344af05bf4570244e12bb8c40073606 100644 (file)
@@ -143,8 +143,8 @@ const (
        DefaultDebugPath = "/debug/rpc"
 )
 
-// Precompute the reflect type for error.  Can't use error directly
-// because Typeof takes an empty interface value.  This is annoying.
+// Precompute the reflect type for error. Can't use error directly
+// because Typeof takes an empty interface value. This is annoying.
 var typeOfError = reflect.TypeOf((*error)(nil)).Elem()
 
 type methodType struct {
@@ -162,7 +162,7 @@ type service struct {
        method map[string]*methodType // registered methods
 }
 
-// Request is a header written before every RPC call.  It is used internally
+// Request is a header written before every RPC call. It is used internally
 // but documented here as an aid to debugging, such as when analyzing
 // network traffic.
 type Request struct {
@@ -171,7 +171,7 @@ type Request struct {
        next          *Request // for free list in Server
 }
 
-// Response is a header written before every RPC return.  It is used internally
+// Response is a header written before every RPC return. It is used internally
 // but documented here as an aid to debugging, such as when analyzing
 // network traffic.
 type Response struct {
@@ -442,7 +442,7 @@ func (c *gobServerCodec) Close() error {
 // ServeConn blocks, serving the connection until the client hangs up.
 // The caller typically invokes ServeConn in a go statement.
 // ServeConn uses the gob wire format (see package gob) on the
-// connection.  To use an alternate codec, use ServeCodec.
+// connection. To use an alternate codec, use ServeCodec.
 func (server *Server) ServeConn(conn io.ReadWriteCloser) {
        buf := bufio.NewWriter(conn)
        srv := &gobServerCodec{
@@ -583,7 +583,7 @@ func (server *Server) readRequestHeader(codec ServerCodec) (service *service, mt
                return
        }
 
-       // We read the header successfully.  If we see an error now,
+       // We read the header successfully. If we see an error now,
        // we can still recover and move on to the next request.
        keepReading = true
 
@@ -638,7 +638,7 @@ func RegisterName(name string, rcvr interface{}) error {
 // RPC responses for the server side of an RPC session.
 // The server calls ReadRequestHeader and ReadRequestBody in pairs
 // to read requests from the connection, and it calls WriteResponse to
-// write a response back.  The server calls Close when finished with the
+// write a response back. The server calls Close when finished with the
 // connection. ReadRequestBody may be called with a nil
 // argument to force the body of the request to be read and discarded.
 type ServerCodec interface {
@@ -654,7 +654,7 @@ type ServerCodec interface {
 // ServeConn blocks, serving the connection until the client hangs up.
 // The caller typically invokes ServeConn in a go statement.
 // ServeConn uses the gob wire format (see package gob) on the
-// connection.  To use an alternate codec, use ServeCodec.
+// connection. To use an alternate codec, use ServeCodec.
 func ServeConn(conn io.ReadWriteCloser) {
        DefaultServer.ServeConn(conn)
 }
index 0988350322204f7e43fdfcc172d16c8646031f67..b4e4867a9ee9313c76f1a71063420e19fcda2c04 100644 (file)
@@ -83,8 +83,8 @@ func (c *Client) hello() error {
 
 // Hello sends a HELO or EHLO to the server as the given host name.
 // Calling this method is only necessary if the client needs control
-// over the host name used.  The client will introduce itself as "localhost"
-// automatically otherwise.  If Hello is called, it must be called before
+// over the host name used. The client will introduce itself as "localhost"
+// automatically otherwise. If Hello is called, it must be called before
 // any of the other methods.
 func (c *Client) Hello(localName string) error {
        if c.didHello {
@@ -265,7 +265,7 @@ func (d *dataCloser) Close() error {
 
 // Data issues a DATA command to the server and returns a writer that
 // can be used to write the mail headers and body. The caller should
-// close the writer before calling any more methods on c.  A call to
+// close the writer before calling any more methods on c. A call to
 // Data must be preceded by one or more calls to Rcpt.
 func (c *Client) Data() (io.WriteCloser, error) {
        _, _, err := c.cmd(354, "DATA")
@@ -287,7 +287,7 @@ var testHookStartTLS func(*tls.Config) // nil, except for tests
 //
 // The msg parameter should be an RFC 822-style email with headers
 // first, a blank line, and then the message body. The lines of msg
-// should be CRLF terminated.  The msg headers should usually include
+// should be CRLF terminated. The msg headers should usually include
 // fields such as "From", "To", "Subject", and "Cc".  Sending "Bcc"
 // messages is accomplished by including an email address in the to
 // parameter but not including it in the msg headers.
index 2eae146ae2c267885fc506cee2a9149fb3e90167..567e4e1b7c8cbbc0abf86503b110eb68b667bf99 100644 (file)
@@ -27,7 +27,7 @@ func setDefaultSockopts(s, family, sotype int, ipv6only bool) error {
        }
        if supportsIPv4map && family == syscall.AF_INET6 && sotype != syscall.SOCK_RAW {
                // Allow both IP versions even if the OS default
-               // is otherwise.  Note that some operating systems
+               // is otherwise. Note that some operating systems
                // never admit this option.
                syscall.SetsockoptInt(s, syscall.IPPROTO_IPV6, syscall.IPV6_V6ONLY, boolint(ipv6only))
        }
index 147c263bcfcab370ca8b19174efb239e692d0e50..0f70b12407bcade0925f18e3695914459d884199 100644 (file)
@@ -12,7 +12,7 @@ import (
 func setDefaultSockopts(s, family, sotype int, ipv6only bool) error {
        if family == syscall.AF_INET6 && sotype != syscall.SOCK_RAW {
                // Allow both IP versions even if the OS default
-               // is otherwise.  Note that some operating systems
+               // is otherwise. Note that some operating systems
                // never admit this option.
                syscall.SetsockoptInt(s, syscall.IPPROTO_IPV6, syscall.IPV6_V6ONLY, boolint(ipv6only))
        }
index 147c263bcfcab370ca8b19174efb239e692d0e50..0f70b12407bcade0925f18e3695914459d884199 100644 (file)
@@ -12,7 +12,7 @@ import (
 func setDefaultSockopts(s, family, sotype int, ipv6only bool) error {
        if family == syscall.AF_INET6 && sotype != syscall.SOCK_RAW {
                // Allow both IP versions even if the OS default
-               // is otherwise.  Note that some operating systems
+               // is otherwise. Note that some operating systems
                // never admit this option.
                syscall.SetsockoptInt(s, syscall.IPPROTO_IPV6, syscall.IPV6_V6ONLY, boolint(ipv6only))
        }
index ff51626ac147ee9aa400b3d0b74d536b0db4de29..80174265212daae6606e35fa55e1c7d69183c21b 100644 (file)
@@ -12,7 +12,7 @@ import (
 func setDefaultSockopts(s syscall.Handle, family, sotype int, ipv6only bool) error {
        if family == syscall.AF_INET6 && sotype != syscall.SOCK_RAW {
                // Allow both IP versions even if the OS default
-               // is otherwise.  Note that some operating systems
+               // is otherwise. Note that some operating systems
                // never admit this option.
                syscall.SetsockoptInt(s, syscall.IPPROTO_IPV6, syscall.IPV6_V6ONLY, boolint(ipv6only))
        }
index 0eb40699fa8259f7de8e293b5fb05a9be201fcef..c25c05150e3e92f53a1f7902aa889aa14a48f05b 100644 (file)
@@ -130,7 +130,7 @@ func dialTCP(net string, laddr, raddr *TCPAddr, deadline time.Time, cancel <-cha
        return newTCPConn(fd), nil
 }
 
-// TCPListener is a TCP network listener.  Clients should typically
+// TCPListener is a TCP network listener. Clients should typically
 // use variables of type Listener instead of assuming TCP.
 type TCPListener struct {
        fd *netFD
@@ -197,11 +197,11 @@ func (l *TCPListener) SetDeadline(t time.Time) error {
 }
 
 // File returns a copy of the underlying os.File, set to blocking
-// mode.  It is the caller's responsibility to close f when finished.
+// mode. It is the caller's responsibility to close f when finished.
 // Closing l does not affect f, and closing f does not affect l.
 //
 // The returned os.File's file descriptor is different from the
-// connection's.  Attempting to change properties of the original
+// connection's. Attempting to change properties of the original
 // using this duplicate may or may not have the desired effect.
 func (l *TCPListener) File() (f *os.File, err error) {
        f, err = l.dup()
@@ -212,8 +212,8 @@ func (l *TCPListener) File() (f *os.File, err error) {
 }
 
 // ListenTCP announces on the TCP address laddr and returns a TCP
-// listener.  Net must be "tcp", "tcp4", or "tcp6".  If laddr has a
-// port of 0, ListenTCP will choose an available port.  The caller can
+// listener. Net must be "tcp", "tcp4", or "tcp6".  If laddr has a
+// port of 0, ListenTCP will choose an available port. The caller can
 // use the Addr method of TCPListener to retrieve the chosen address.
 func ListenTCP(net string, laddr *TCPAddr) (*TCPListener, error) {
        switch net {
index 261c0be030fc2672831af519573320dec469b307..ecbe00fb34d9e788c30f2cbb7a18b683dfb1ba19 100644 (file)
@@ -173,18 +173,18 @@ func dialTCP(net string, laddr, raddr *TCPAddr, deadline time.Time, cancel <-cha
        // TCP has a rarely used mechanism called a 'simultaneous connection' in
        // which Dial("tcp", addr1, addr2) run on the machine at addr1 can
        // connect to a simultaneous Dial("tcp", addr2, addr1) run on the machine
-       // at addr2, without either machine executing Listen.  If laddr == nil,
+       // at addr2, without either machine executing Listen. If laddr == nil,
        // it means we want the kernel to pick an appropriate originating local
-       // address.  Some Linux kernels cycle blindly through a fixed range of
-       // local ports, regardless of destination port.  If a kernel happens to
+       // address. Some Linux kernels cycle blindly through a fixed range of
+       // local ports, regardless of destination port. If a kernel happens to
        // pick local port 50001 as the source for a Dial("tcp", "", "localhost:50001"),
        // then the Dial will succeed, having simultaneously connected to itself.
        // This can only happen when we are letting the kernel pick a port (laddr == nil)
        // and when there is no listener for the destination address.
-       // It's hard to argue this is anything other than a kernel bug.  If we
+       // It's hard to argue this is anything other than a kernel bug. If we
        // see this happen, rather than expose the buggy effect to users, we
-       // close the fd and try again.  If it happens twice more, we relent and
-       // use the result.  See also:
+       // close the fd and try again. If it happens twice more, we relent and
+       // use the result. See also:
        //      https://golang.org/issue/2690
        //      http://stackoverflow.com/questions/4949858/
        //
@@ -239,7 +239,7 @@ func spuriousENOTAVAIL(err error) bool {
        return err == syscall.EADDRNOTAVAIL
 }
 
-// TCPListener is a TCP network listener.  Clients should typically
+// TCPListener is a TCP network listener. Clients should typically
 // use variables of type Listener instead of assuming TCP.
 type TCPListener struct {
        fd *netFD
@@ -299,11 +299,11 @@ func (l *TCPListener) SetDeadline(t time.Time) error {
 }
 
 // File returns a copy of the underlying os.File, set to blocking
-// mode.  It is the caller's responsibility to close f when finished.
+// mode. It is the caller's responsibility to close f when finished.
 // Closing l does not affect f, and closing f does not affect l.
 //
 // The returned os.File's file descriptor is different from the
-// connection's.  Attempting to change properties of the original
+// connection's. Attempting to change properties of the original
 // using this duplicate may or may not have the desired effect.
 func (l *TCPListener) File() (f *os.File, err error) {
        f, err = l.fd.dup()
@@ -314,8 +314,8 @@ func (l *TCPListener) File() (f *os.File, err error) {
 }
 
 // ListenTCP announces on the TCP address laddr and returns a TCP
-// listener.  Net must be "tcp", "tcp4", or "tcp6".  If laddr has a
-// port of 0, ListenTCP will choose an available port.  The caller can
+// listener. Net must be "tcp", "tcp4", or "tcp6".  If laddr has a
+// port of 0, ListenTCP will choose an available port. The caller can
 // use the Addr method of TCPListener to retrieve the chosen address.
 func ListenTCP(net string, laddr *TCPAddr) (*TCPListener, error) {
        switch net {
index d482eea8e5d845f1ecf4b906ea82fc3e32e8171e..2e2752a755899c7e6c5d2b30e68c9b619bbda767 100644 (file)
@@ -16,7 +16,7 @@ func (h MIMEHeader) Add(key, value string) {
 }
 
 // Set sets the header entries associated with key to
-// the single element value.  It replaces any existing
+// the single element value. It replaces any existing
 // values associated with key.
 func (h MIMEHeader) Set(key, value string) {
        h[CanonicalMIMEHeaderKey(key)] = []string{value}
@@ -24,7 +24,7 @@ func (h MIMEHeader) Set(key, value string) {
 
 // Get gets the first value associated with the given key.
 // If there are no values associated with the key, Get returns "".
-// Get is a convenience method.  For more complex queries,
+// Get is a convenience method. For more complex queries,
 // access the map directly.
 func (h MIMEHeader) Get(key string) string {
        if h == nil {
index af0e3d8369706ed62e4652c484375cc3efe96762..2e283218b50807f3327820c796572501993a98b8 100644 (file)
@@ -66,8 +66,8 @@ func (p *Pipeline) EndResponse(id uint) {
 }
 
 // A sequencer schedules a sequence of numbered events that must
-// happen in order, one after the other.  The event numbering must start
-// at 0 and increment without skipping.  The event number wraps around
+// happen in order, one after the other. The event numbering must start
+// at 0 and increment without skipping. The event number wraps around
 // safely as long as there are not 2^32 simultaneous events pending.
 type sequencer struct {
        mu   sync.Mutex
index 37221cf3addca152ec54a6fe4ae4f1e79a8202b8..e07d1d62e0931e653e71ee169a3540d036c04e3b 100644 (file)
@@ -71,7 +71,7 @@ func (r *Reader) readLineSlice() ([]byte, error) {
 // ReadContinuedLine reads a possibly continued line from r,
 // eliding the final trailing ASCII white space.
 // Lines after the first are considered continuations if they
-// begin with a space or tab character.  In the returned data,
+// begin with a space or tab character. In the returned data,
 // continuation lines are separated from the previous line
 // only by a single space: the newline and leading white space
 // are removed.
@@ -204,7 +204,7 @@ func parseCodeLine(line string, expectCode int) (code int, continued bool, messa
 // ReadCodeLine reads a response code line of the form
 //     code message
 // where code is a three-digit status code and the message
-// extends to the rest of the line.  An example of such a line is:
+// extends to the rest of the line. An example of such a line is:
 //     220 plan9.bell-labs.com ESMTP
 //
 // If the prefix of the status does not match the digits in expectCode,
@@ -366,7 +366,7 @@ func (d *dotReader) Read(b []byte) (n int, err error) {
                                d.state = stateBeginLine
                                break
                        }
-                       // Not part of \r\n.  Emit saved \r
+                       // Not part of \r\n. Emit saved \r
                        br.UnreadByte()
                        c = '\r'
                        d.state = stateData
@@ -552,9 +552,9 @@ func (r *Reader) upcomingHeaderNewlines() (n int) {
 }
 
 // CanonicalMIMEHeaderKey returns the canonical format of the
-// MIME header key s.  The canonicalization converts the first
+// MIME header key s. The canonicalization converts the first
 // letter and any letter following a hyphen to upper case;
-// the rest are converted to lowercase.  For example, the
+// the rest are converted to lowercase. For example, the
 // canonical key for "accept-encoding" is "Accept-Encoding".
 // MIME header keys are assumed to be ASCII only.
 // If s contains a space or invalid header field bytes, it is
index ed8a9553750e0c69f972850f87aa2847084c4785..8fd781e7775745d247ffda98ca442904a9fa7f7a 100644 (file)
@@ -87,7 +87,7 @@ func Dial(network, addr string) (*Conn, error) {
 }
 
 // Cmd is a convenience method that sends a command after
-// waiting its turn in the pipeline.  The command text is the
+// waiting its turn in the pipeline. The command text is the
 // result of formatting format with args and appending \r\n.
 // Cmd returns the id of the command, for use with StartResponse and EndResponse.
 //
index 56c490c28341612525d97024977f784260e5b3a9..1bc5974c6c2f3df3d266d890e3eb505d1307edf8 100644 (file)
@@ -36,7 +36,7 @@ func (w *Writer) PrintfLine(format string, args ...interface{}) error {
 // DotWriter returns a writer that can be used to write a dot-encoding to w.
 // It takes care of inserting leading dots when necessary,
 // translating line-ending \n into \r\n, and adding the final .\r\n line
-// when the DotWriter is closed.  The caller should close the
+// when the DotWriter is closed. The caller should close the
 // DotWriter before the next call to a method on w.
 //
 // See the documentation for Reader's DotReader method for details about dot-encoding.
index 88a80ad148459cd693a44682f75f29710c5153c9..4bc3be76565cbc236492b31353b31bfc4a9da072 100644 (file)
@@ -54,7 +54,7 @@ func (c *UDPConn) ReadFrom(b []byte) (int, Addr, error) {
 }
 
 // ReadMsgUDP reads a packet from c, copying the payload into b and
-// the associated out-of-band data into oob.  It returns the number
+// the associated out-of-band data into oob. It returns the number
 // of bytes copied into b, the number of bytes copied into oob, the
 // flags that were set on the packet and the source address of the
 // packet.
@@ -67,7 +67,7 @@ func (c *UDPConn) ReadMsgUDP(b, oob []byte) (n, oobn, flags int, addr *UDPAddr,
 //
 // WriteToUDP can be made to time out and return an error with
 // Timeout() == true after a fixed time limit; see SetDeadline and
-// SetWriteDeadline.  On packet-oriented connections, write timeouts
+// SetWriteDeadline. On packet-oriented connections, write timeouts
 // are rare.
 func (c *UDPConn) WriteToUDP(b []byte, addr *UDPAddr) (int, error) {
        if !c.ok() || c.fd.data == nil {
@@ -107,7 +107,7 @@ func (c *UDPConn) WriteTo(b []byte, addr Addr) (int, error) {
 // WriteMsgUDP writes a packet to addr via c if c isn't connected, or
 // to c's remote destination address if c is connected (in which case
 // addr must be nil).  The payload is copied from b and the associated
-// out-of-band data is copied from oob.  It returns the number of
+// out-of-band data is copied from oob. It returns the number of
 // payload and out-of-band bytes written.
 func (c *UDPConn) WriteMsgUDP(b, oob []byte, addr *UDPAddr) (n, oobn int, err error) {
        return 0, 0, &OpError{Op: "write", Net: c.fd.dir, Source: c.fd.laddr, Addr: addr.opAddr(), Err: syscall.EPLAN9}
@@ -168,10 +168,10 @@ func unmarshalUDPHeader(b []byte) (*udpHeader, []byte) {
 }
 
 // ListenUDP listens for incoming UDP packets addressed to the local
-// address laddr.  Net must be "udp", "udp4", or "udp6".  If laddr has
+// address laddr. Net must be "udp", "udp4", or "udp6".  If laddr has
 // a port of 0, ListenUDP will choose an available port.
 // The LocalAddr method of the returned UDPConn can be used to
-// discover the port.  The returned connection's ReadFrom and WriteTo
+// discover the port. The returned connection's ReadFrom and WriteTo
 // methods can be used to receive and send UDP packets with per-packet
 // addressing.
 func ListenUDP(net string, laddr *UDPAddr) (*UDPConn, error) {
index 028151f9ed8d6d5b7324ac970b1dc0a8425440c9..3b9b1298904399a5c62bba2443f58c223c6292c9 100644 (file)
@@ -84,7 +84,7 @@ func (c *UDPConn) ReadFrom(b []byte) (int, Addr, error) {
 }
 
 // ReadMsgUDP reads a packet from c, copying the payload into b and
-// the associated out-of-band data into oob.  It returns the number
+// the associated out-of-band data into oob. It returns the number
 // of bytes copied into b, the number of bytes copied into oob, the
 // flags that were set on the packet and the source address of the
 // packet.
@@ -111,7 +111,7 @@ func (c *UDPConn) ReadMsgUDP(b, oob []byte) (n, oobn, flags int, addr *UDPAddr,
 //
 // WriteToUDP can be made to time out and return an error with
 // Timeout() == true after a fixed time limit; see SetDeadline and
-// SetWriteDeadline.  On packet-oriented connections, write timeouts
+// SetWriteDeadline. On packet-oriented connections, write timeouts
 // are rare.
 func (c *UDPConn) WriteToUDP(b []byte, addr *UDPAddr) (int, error) {
        if !c.ok() {
@@ -149,7 +149,7 @@ func (c *UDPConn) WriteTo(b []byte, addr Addr) (int, error) {
 // WriteMsgUDP writes a packet to addr via c if c isn't connected, or
 // to c's remote destination address if c is connected (in which case
 // addr must be nil).  The payload is copied from b and the associated
-// out-of-band data is copied from oob.  It returns the number of
+// out-of-band data is copied from oob. It returns the number of
 // payload and out-of-band bytes written.
 func (c *UDPConn) WriteMsgUDP(b, oob []byte, addr *UDPAddr) (n, oobn int, err error) {
        if !c.ok() {
@@ -197,10 +197,10 @@ func dialUDP(net string, laddr, raddr *UDPAddr, deadline time.Time) (*UDPConn, e
 }
 
 // ListenUDP listens for incoming UDP packets addressed to the local
-// address laddr.  Net must be "udp", "udp4", or "udp6".  If laddr has
+// address laddr. Net must be "udp", "udp4", or "udp6".  If laddr has
 // a port of 0, ListenUDP will choose an available port.
 // The LocalAddr method of the returned UDPConn can be used to
-// discover the port.  The returned connection's ReadFrom and WriteTo
+// discover the port. The returned connection's ReadFrom and WriteTo
 // methods can be used to receive and send UDP packets with per-packet
 // addressing.
 func ListenUDP(net string, laddr *UDPAddr) (*UDPConn, error) {
index 4bd3962ccbc759e8b6ff45f5c9667e1854322751..d0e3ca72e876979ee7ad9cee88302fa835d59c1b 100644 (file)
@@ -16,7 +16,7 @@ type UnixConn struct {
        conn
 }
 
-// ReadFromUnix reads a packet from c, copying the payload into b.  It
+// ReadFromUnix reads a packet from c, copying the payload into b. It
 // returns the number of bytes copied into b and the source address of
 // the packet.
 //
@@ -33,7 +33,7 @@ func (c *UnixConn) ReadFrom(b []byte) (int, Addr, error) {
 }
 
 // ReadMsgUnix reads a packet from c, copying the payload into b and
-// the associated out-of-band data into oob.  It returns the number of
+// the associated out-of-band data into oob. It returns the number of
 // bytes copied into b, the number of bytes copied into oob, the flags
 // that were set on the packet, and the source address of the packet.
 func (c *UnixConn) ReadMsgUnix(b, oob []byte) (n, oobn, flags int, addr *UnixAddr, err error) {
@@ -44,7 +44,7 @@ func (c *UnixConn) ReadMsgUnix(b, oob []byte) (n, oobn, flags int, addr *UnixAdd
 //
 // WriteToUnix can be made to time out and return an error with
 // Timeout() == true after a fixed time limit; see SetDeadline and
-// SetWriteDeadline.  On packet-oriented connections, write timeouts
+// SetWriteDeadline. On packet-oriented connections, write timeouts
 // are rare.
 func (c *UnixConn) WriteToUnix(b []byte, addr *UnixAddr) (int, error) {
        return 0, &OpError{Op: "write", Net: c.fd.dir, Source: c.fd.laddr, Addr: addr.opAddr(), Err: syscall.EPLAN9}
@@ -56,7 +56,7 @@ func (c *UnixConn) WriteTo(b []byte, addr Addr) (int, error) {
 }
 
 // WriteMsgUnix writes a packet to addr via c, copying the payload
-// from b and the associated out-of-band data from oob.  It returns
+// from b and the associated out-of-band data from oob. It returns
 // the number of payload and out-of-band bytes written.
 func (c *UnixConn) WriteMsgUnix(b, oob []byte, addr *UnixAddr) (n, oobn int, err error) {
        return 0, 0, &OpError{Op: "write", Net: c.fd.dir, Source: c.fd.laddr, Addr: addr.opAddr(), Err: syscall.EPLAN9}
@@ -85,7 +85,7 @@ func dialUnix(net string, laddr, raddr *UnixAddr, deadline time.Time) (*UnixConn
        return nil, &OpError{Op: "dial", Net: net, Source: laddr.opAddr(), Addr: raddr.opAddr(), Err: syscall.EPLAN9}
 }
 
-// UnixListener is a Unix domain socket listener.  Clients should
+// UnixListener is a Unix domain socket listener. Clients should
 // typically use variables of type Listener instead of assuming Unix
 // domain sockets.
 type UnixListener struct {
@@ -93,7 +93,7 @@ type UnixListener struct {
 }
 
 // ListenUnix announces on the Unix domain socket laddr and returns a
-// Unix listener.  The network net must be "unix" or "unixpacket".
+// Unix listener. The network net must be "unix" or "unixpacket".
 func ListenUnix(net string, laddr *UnixAddr) (*UnixListener, error) {
        return nil, &OpError{Op: "listen", Net: net, Source: nil, Addr: laddr.opAddr(), Err: syscall.EPLAN9}
 }
@@ -110,7 +110,7 @@ func (l *UnixListener) Accept() (Conn, error) {
        return nil, &OpError{Op: "accept", Net: l.fd.dir, Source: nil, Addr: l.fd.laddr, Err: syscall.EPLAN9}
 }
 
-// Close stops listening on the Unix address.  Already accepted
+// Close stops listening on the Unix address. Already accepted
 // connections are not closed.
 func (l *UnixListener) Close() error {
        return &OpError{Op: "close", Net: l.fd.dir, Source: nil, Addr: l.fd.laddr, Err: syscall.EPLAN9}
@@ -128,18 +128,18 @@ func (l *UnixListener) SetDeadline(t time.Time) error {
 }
 
 // File returns a copy of the underlying os.File, set to blocking
-// mode.  It is the caller's responsibility to close f when finished.
+// mode. It is the caller's responsibility to close f when finished.
 // Closing l does not affect f, and closing f does not affect l.
 //
 // The returned os.File's file descriptor is different from the
-// connection's.  Attempting to change properties of the original
+// connection's. Attempting to change properties of the original
 // using this duplicate may or may not have the desired effect.
 func (l *UnixListener) File() (*os.File, error) {
        return nil, &OpError{Op: "file", Net: l.fd.dir, Source: nil, Addr: l.fd.laddr, Err: syscall.EPLAN9}
 }
 
 // ListenUnixgram listens for incoming Unix datagram packets addressed
-// to the local address laddr.  The network net must be "unixgram".
+// to the local address laddr. The network net must be "unixgram".
 // The returned connection's ReadFrom and WriteTo methods can be used
 // to receive and send packets with per-packet addressing.
 func ListenUnixgram(net string, laddr *UnixAddr) (*UnixConn, error) {
index 0e72e9034471c2f6c84352b26c89ae75b9a81ff1..83d3e8cb0154f8d25c224ffc368edfc2c33e1133 100644 (file)
@@ -102,7 +102,7 @@ type UnixConn struct {
 
 func newUnixConn(fd *netFD) *UnixConn { return &UnixConn{conn{fd}} }
 
-// ReadFromUnix reads a packet from c, copying the payload into b.  It
+// ReadFromUnix reads a packet from c, copying the payload into b. It
 // returns the number of bytes copied into b and the source address of
 // the packet.
 //
@@ -140,7 +140,7 @@ func (c *UnixConn) ReadFrom(b []byte) (int, Addr, error) {
 }
 
 // ReadMsgUnix reads a packet from c, copying the payload into b and
-// the associated out-of-band data into oob.  It returns the number of
+// the associated out-of-band data into oob. It returns the number of
 // bytes copied into b, the number of bytes copied into oob, the flags
 // that were set on the packet, and the source address of the packet.
 func (c *UnixConn) ReadMsgUnix(b, oob []byte) (n, oobn, flags int, addr *UnixAddr, err error) {
@@ -164,7 +164,7 @@ func (c *UnixConn) ReadMsgUnix(b, oob []byte) (n, oobn, flags int, addr *UnixAdd
 //
 // WriteToUnix can be made to time out and return an error with
 // Timeout() == true after a fixed time limit; see SetDeadline and
-// SetWriteDeadline.  On packet-oriented connections, write timeouts
+// SetWriteDeadline. On packet-oriented connections, write timeouts
 // are rare.
 func (c *UnixConn) WriteToUnix(b []byte, addr *UnixAddr) (int, error) {
        if !c.ok() {
@@ -200,7 +200,7 @@ func (c *UnixConn) WriteTo(b []byte, addr Addr) (n int, err error) {
 }
 
 // WriteMsgUnix writes a packet to addr via c, copying the payload
-// from b and the associated out-of-band data from oob.  It returns
+// from b and the associated out-of-band data from oob. It returns
 // the number of payload and out-of-band bytes written.
 func (c *UnixConn) WriteMsgUnix(b, oob []byte, addr *UnixAddr) (n, oobn int, err error) {
        if !c.ok() {
@@ -269,7 +269,7 @@ func dialUnix(net string, laddr, raddr *UnixAddr, deadline time.Time) (*UnixConn
        return newUnixConn(fd), nil
 }
 
-// UnixListener is a Unix domain socket listener.  Clients should
+// UnixListener is a Unix domain socket listener. Clients should
 // typically use variables of type Listener instead of assuming Unix
 // domain sockets.
 type UnixListener struct {
@@ -279,7 +279,7 @@ type UnixListener struct {
 }
 
 // ListenUnix announces on the Unix domain socket laddr and returns a
-// Unix listener.  The network net must be "unix" or "unixpacket".
+// Unix listener. The network net must be "unix" or "unixpacket".
 func ListenUnix(net string, laddr *UnixAddr) (*UnixListener, error) {
        switch net {
        case "unix", "unixpacket":
@@ -319,7 +319,7 @@ func (l *UnixListener) Accept() (Conn, error) {
        return c, nil
 }
 
-// Close stops listening on the Unix address.  Already accepted
+// Close stops listening on the Unix address. Already accepted
 // connections are not closed.
 func (l *UnixListener) Close() error {
        if l == nil || l.fd == nil {
@@ -334,7 +334,7 @@ func (l *UnixListener) Close() error {
        // and replaced our socket name already--
        // but this sequence (remove then close)
        // is at least compatible with the auto-remove
-       // sequence in ListenUnix.  It's only non-Go
+       // sequence in ListenUnix. It's only non-Go
        // programs that can mess us up.
        if l.path[0] != '@' && l.unlink {
                syscall.Unlink(l.path)
@@ -364,11 +364,11 @@ func (l *UnixListener) SetDeadline(t time.Time) error {
 }
 
 // File returns a copy of the underlying os.File, set to blocking
-// mode.  It is the caller's responsibility to close f when finished.
+// mode. It is the caller's responsibility to close f when finished.
 // Closing l does not affect f, and closing f does not affect l.
 //
 // The returned os.File's file descriptor is different from the
-// connection's.  Attempting to change properties of the original
+// connection's. Attempting to change properties of the original
 // using this duplicate may or may not have the desired effect.
 func (l *UnixListener) File() (f *os.File, err error) {
        f, err = l.fd.dup()
@@ -379,7 +379,7 @@ func (l *UnixListener) File() (f *os.File, err error) {
 }
 
 // ListenUnixgram listens for incoming Unix datagram packets addressed
-// to the local address laddr.  The network net must be "unixgram".
+// to the local address laddr. The network net must be "unixgram".
 // The returned connection's ReadFrom and WriteTo methods can be used
 // to receive and send packets with per-packet addressing.
 func ListenUnixgram(net string, laddr *UnixAddr) (*UnixConn, error) {
index 86ed887931dfce7fbffc01a0c2eda764b602c704..d2ec3333107edc83e9641653442eff6ddcab2446 100644 (file)
@@ -427,7 +427,7 @@ func Parse(rawurl string) (*URL, error) {
        return url, nil
 }
 
-// ParseRequestURI parses rawurl into a URL structure.  It assumes that
+// ParseRequestURI parses rawurl into a URL structure. It assumes that
 // rawurl was received in an HTTP request, so the rawurl is interpreted
 // only as an absolute URI or an absolute path.
 // The string rawurl is assumed not to have a #fragment suffix.
@@ -436,7 +436,7 @@ func ParseRequestURI(rawurl string) (*URL, error) {
        return parse(rawurl, true)
 }
 
-// parse parses a URL from a string in one of two contexts.  If
+// parse parses a URL from a string in one of two contexts. If
 // viaRequest is true, the URL is assumed to have arrived via an HTTP request,
 // in which case only absolute URLs or path-absolute relative URLs are allowed.
 // If viaRequest is false, all forms of relative URLs are allowed.
@@ -852,8 +852,8 @@ func (u *URL) IsAbs() bool {
        return u.Scheme != ""
 }
 
-// Parse parses a URL in the context of the receiver.  The provided URL
-// may be relative or absolute.  Parse returns nil, err on parse
+// Parse parses a URL in the context of the receiver. The provided URL
+// may be relative or absolute. Parse returns nil, err on parse
 // failure, otherwise its return value is the same as ResolveReference.
 func (u *URL) Parse(ref string) (*URL, error) {
        refurl, err := Parse(ref)
@@ -865,7 +865,7 @@ func (u *URL) Parse(ref string) (*URL, error) {
 
 // ResolveReference resolves a URI reference to an absolute URI from
 // an absolute base URI, per RFC 3986 Section 5.2.  The URI reference
-// may be relative or absolute.  ResolveReference always returns a new
+// may be relative or absolute. ResolveReference always returns a new
 // URL instance, even if the returned URL is identical to either the
 // base or reference. If ref is an absolute URL, then ResolveReference
 // ignores base and returns a copy of ref.
index b52aba3958f91331e91f3cb647ba27aab0e7488e..0313eac234d4a85bba748b95982b0a774e4bb1be 100644 (file)
@@ -77,14 +77,14 @@ func (p *ProcessState) Success() bool {
 }
 
 // Sys returns system-dependent exit information about
-// the process.  Convert it to the appropriate underlying
+// the process. Convert it to the appropriate underlying
 // type, such as syscall.WaitStatus on Unix, to access its contents.
 func (p *ProcessState) Sys() interface{} {
        return p.sys()
 }
 
 // SysUsage returns system-dependent resource usage information about
-// the exited process.  Convert it to the appropriate underlying
+// the exited process. Convert it to the appropriate underlying
 // type, such as *syscall.Rusage on Unix, to access its contents.
 // (On Unix, *syscall.Rusage matches struct rusage as defined in the
 // getrusage(2) manual page.)
index 63ad7fd399909daf2789e4c8e2b0df03a2918e10..4a147144c3edf5fde33e03742130ea375c961898 100644 (file)
@@ -27,7 +27,7 @@ func Expand(s string, mapping func(string) string) string {
 }
 
 // ExpandEnv replaces ${var} or $var in the string according to the values
-// of the current environment variables.  References to undefined
+// of the current environment variables. References to undefined
 // variables are replaced by the empty string.
 func ExpandEnv(s string) string {
        return Expand(s, Getenv)
@@ -49,7 +49,7 @@ func isAlphaNum(c uint8) bool {
 }
 
 // getShellName returns the name that begins the string and the number of bytes
-// consumed to extract it.  If the name is enclosed in {}, it's part of a ${}
+// consumed to extract it. If the name is enclosed in {}, it's part of a ${}
 // expansion and two more bytes are needed than the length of the name.
 func getShellName(s string) (string, int) {
        switch {
index 15e95b917223e603d305d10ec4c8d2863509c3ce..239fd9288897e68545aaa39c69a8cc0e8983fced 100644 (file)
@@ -41,10 +41,10 @@ type ProcAttr struct {
        // new process in the form returned by Environ.
        // If it is nil, the result of Environ will be used.
        Env []string
-       // Files specifies the open files inherited by the new process.  The
+       // Files specifies the open files inherited by the new process. The
        // first three entries correspond to standard input, standard output, and
-       // standard error.  An implementation may support additional entries,
-       // depending on the underlying operating system.  A nil entry corresponds
+       // standard error. An implementation may support additional entries,
+       // depending on the underlying operating system. A nil entry corresponds
        // to that file being closed when the process starts.
        Files []*File
 
index a69b5176d5aff4c021733937f8390e9e502fb8b3..1f2fd12adda46786808f67b4abe486529e2a9078 100644 (file)
@@ -697,7 +697,7 @@ func TestHelperProcess(*testing.T) {
                }
                // Referring to fd3 here ensures that it is not
                // garbage collected, and therefore closed, while
-               // executing the wantfd loop above.  It doesn't matter
+               // executing the wantfd loop above. It doesn't matter
                // what we do with fd3 as long as we refer to it;
                // closing it is the easy choice.
                fd3.Close()
index 94dd04beb23c2676ebfc1709f976360a455dd54c..3cf38b68add3cd5ade2fe26d45b190e91ee43305 100644 (file)
@@ -21,7 +21,7 @@ var (
 func startProcess(name string, argv []string, attr *ProcAttr) (p *Process, err error) {
        // If there is no SysProcAttr (ie. no Chroot or changed
        // UID/GID), double-check existence of the directory we want
-       // to chdir into.  We can make the error clearer this way.
+       // to chdir into. We can make the error clearer this way.
        if attr != nil && attr.Sys == nil && attr.Dir != "" {
                if _, err := Stat(attr.Dir); err != nil {
                        pe := err.(*PathError)
index 4f8e3f3450c0e5859416eff2b258abfb29716c38..6b1ecbc34e895b6695cc0b3b5566d5670c744274 100644 (file)
@@ -236,7 +236,7 @@ func (f *File) Chdir() error {
        return nil
 }
 
-// Open opens the named file for reading.  If successful, methods on
+// Open opens the named file for reading. If successful, methods on
 // the returned file can be used for reading; the associated file
 // descriptor has mode O_RDONLY.
 // If there is an error, it will be of type *PathError.
index c83fa028b991bba71ecddc889b7b6e4e95a84d79..0fe1b8213dc54bdf2d180af29262ea5992bec2b1 100644 (file)
@@ -75,8 +75,8 @@ func syscallMode(i FileMode) (o uint32) {
 }
 
 // OpenFile is the generalized open call; most users will use Open
-// or Create instead.  It opens the named file with specified flag
-// (O_RDONLY etc.) and perm, (0666 etc.) if applicable.  If successful,
+// or Create instead. It opens the named file with specified flag
+// (O_RDONLY etc.) and perm, (0666 etc.) if applicable. If successful,
 // methods on the returned File can be used for I/O.
 // If there is an error, it will be of type *PathError.
 func OpenFile(name string, flag int, perm FileMode) (*File, error) {
index 05d94f6edb95d866e331d8e0f873b4d054ff9440..9b64f216500fd5f96d635c853b5ac85ff1a98702 100644 (file)
@@ -79,8 +79,8 @@ func epipecheck(file *File, e error) {
 const DevNull = "/dev/null"
 
 // OpenFile is the generalized open call; most users will use Open
-// or Create instead.  It opens the named file with specified flag
-// (O_RDONLY etc.) and perm, (0666 etc.) if applicable.  If successful,
+// or Create instead. It opens the named file with specified flag
+// (O_RDONLY etc.) and perm, (0666 etc.) if applicable. If successful,
 // methods on the returned File can be used for I/O.
 // If there is an error, it will be of type *PathError.
 func OpenFile(name string, flag int, perm FileMode) (*File, error) {
@@ -115,7 +115,7 @@ func OpenFile(name string, flag int, perm FileMode) (*File, error) {
        }
 
        // There's a race here with fork/exec, which we are
-       // content to live with.  See ../syscall/exec_unix.go.
+       // content to live with. See ../syscall/exec_unix.go.
        if !supportsCloseOnExec {
                syscall.CloseOnExec(r)
        }
@@ -176,7 +176,7 @@ func Stat(name string) (FileInfo, error) {
 
 // Lstat returns a FileInfo describing the named file.
 // If the file is a symbolic link, the returned FileInfo
-// describes the symbolic link.  Lstat makes no attempt to follow the link.
+// describes the symbolic link. Lstat makes no attempt to follow the link.
 // If there is an error, it will be of type *PathError.
 func Lstat(name string) (FileInfo, error) {
        var fs fileStat
@@ -311,7 +311,7 @@ func Remove(name string) error {
 
        // Both failed: figure out which error to return.
        // OS X and Linux differ on whether unlink(dir)
-       // returns EISDIR, so can't use that.  However,
+       // returns EISDIR, so can't use that. However,
        // both agree that rmdir(file) returns ENOTDIR,
        // so we can use that to decide which error is real.
        // Rmdir might also return ENOTDIR if given a bad
index aa8c05c4ff824ef6fe252f9c87d2c9f218be516f..7d04477d42ec111bec9f3817e8d2c5ea283374dc 100644 (file)
@@ -136,8 +136,8 @@ func openDir(name string) (file *File, err error) {
 }
 
 // OpenFile is the generalized open call; most users will use Open
-// or Create instead.  It opens the named file with specified flag
-// (O_RDONLY etc.) and perm, (0666 etc.) if applicable.  If successful,
+// or Create instead. It opens the named file with specified flag
+// (O_RDONLY etc.) and perm, (0666 etc.) if applicable. If successful,
 // methods on the returned File can be used for I/O.
 // If there is an error, it will be of type *PathError.
 func OpenFile(name string, flag int, perm FileMode) (*File, error) {
index d5da53b34bfa429ca2bc9ff02370a2481bf4dc7d..4c3c0d94cb0354db3506eb095f054d9191287f29 100644 (file)
@@ -20,7 +20,7 @@ var getwdCache struct {
 var useSyscallwd = func(error) bool { return true }
 
 // Getwd returns a rooted path name corresponding to the
-// current directory.  If the current directory can be
+// current directory. If the current directory can be
 // reached via multiple paths (due to symbolic links),
 // Getwd may return any one of them.
 func Getwd() (dir string, err error) {
@@ -74,7 +74,7 @@ func Getwd() (dir string, err error) {
        }
 
        // General algorithm: find name in parent
-       // and then find name of parent.  Each iteration
+       // and then find name of parent. Each iteration
        // adds /name to the beginning of dir.
        dir = ""
        for parent := ".."; ; parent = "../" + parent {
index d02e07b478a5ccfcba237484c686c18ab59a92f0..c47f5462ab56c874bd921593fd7db12dc4ba46a4 100644 (file)
@@ -39,7 +39,7 @@ func TestChown(t *testing.T) {
        }
        // Use TempDir() to make sure we're on a local file system,
        // so that the group ids returned by Getgroups will be allowed
-       // on the file.  On NFS, the Getgroups groups are
+       // on the file. On NFS, the Getgroups groups are
        // basically useless.
        f := newFile("TestChown", t)
        defer Remove(f.Name())
@@ -50,7 +50,7 @@ func TestChown(t *testing.T) {
        }
 
        // Can't change uid unless root, but can try
-       // changing the group id.  First try our current group.
+       // changing the group id. First try our current group.
        gid := Getgid()
        t.Log("gid:", gid)
        if err = Chown(f.Name(), -1, gid); err != nil {
@@ -86,7 +86,7 @@ func TestFileChown(t *testing.T) {
        }
        // Use TempDir() to make sure we're on a local file system,
        // so that the group ids returned by Getgroups will be allowed
-       // on the file.  On NFS, the Getgroups groups are
+       // on the file. On NFS, the Getgroups groups are
        // basically useless.
        f := newFile("TestFileChown", t)
        defer Remove(f.Name())
@@ -97,7 +97,7 @@ func TestFileChown(t *testing.T) {
        }
 
        // Can't change uid unless root, but can try
-       // changing the group id.  First try our current group.
+       // changing the group id. First try our current group.
        gid := Getgid()
        t.Log("gid:", gid)
        if err = f.Chown(-1, gid); err != nil {
@@ -133,7 +133,7 @@ func TestLchown(t *testing.T) {
        }
        // Use TempDir() to make sure we're on a local file system,
        // so that the group ids returned by Getgroups will be allowed
-       // on the file.  On NFS, the Getgroups groups are
+       // on the file. On NFS, the Getgroups groups are
        // basically useless.
        f := newFile("TestLchown", t)
        defer Remove(f.Name())
@@ -150,7 +150,7 @@ func TestLchown(t *testing.T) {
        defer Remove(linkname)
 
        // Can't change uid unless root, but can try
-       // changing the group id.  First try our current group.
+       // changing the group id. First try our current group.
        gid := Getgid()
        t.Log("gid:", gid)
        if err = Lchown(linkname, -1, gid); err != nil {
index 84a3be3348f1d82e28790a4d005c857fce938ee0..146d7b695481dcf279515484c4508de4b90f7d3f 100644 (file)
@@ -61,7 +61,7 @@ func MkdirAll(path string, perm FileMode) error {
 
 // RemoveAll removes path and any children it contains.
 // It removes everything it can but returns the first error
-// it encounters.  If the path does not exist, RemoveAll
+// it encounters. If the path does not exist, RemoveAll
 // returns nil (no error).
 func RemoveAll(path string) error {
        // Simple case: if Remove works, we're done.
index b4531314d04e1302aebdf010f2ee3721bf01986d..51dc25bb23072f6eaa7022ab389086120456b2e5 100644 (file)
@@ -147,7 +147,7 @@ func TestRemoveAll(t *testing.T) {
                // No error checking here: either RemoveAll
                // will or won't be able to remove dpath;
                // either way we want to see if it removes fpath
-               // and path/zzz.  Reasons why RemoveAll might
+               // and path/zzz. Reasons why RemoveAll might
                // succeed in removing dpath as well include:
                //      * running as root
                //      * running on a file system without permissions (FAT)
index 82b792eac499b04293ec460f5d61f763d802e4ec..74cce80ee4b027f4d36884d1349fdc0fcb997518 100644 (file)
@@ -88,7 +88,7 @@ func TestStdPipe(t *testing.T) {
        }
 }
 
-// This is a helper for TestStdPipe.  It's not a test in itself.
+// This is a helper for TestStdPipe. It's not a test in itself.
 func TestStdPipeHelper(t *testing.T) {
        if os.Getenv("GO_TEST_STD_PIPE_HELPER_SIGNAL") != "" {
                signal.Notify(make(chan os.Signal, 1), syscall.SIGPIPE)
index 2e6f18665837c91b6b5f0f2fa185fbea9583d4c9..c1376daaea6e28ccb85dd7e518aaae878249a1c4 100644 (file)
@@ -79,7 +79,7 @@ func Ignore(sig ...os.Signal) {
 //
 // Package signal will not block sending to c: the caller must ensure
 // that c has sufficient buffer space to keep up with the expected
-// signal rate.  For a channel used for notification of just one signal value,
+// signal rate. For a channel used for notification of just one signal value,
 // a buffer of size 1 is sufficient.
 //
 // It is allowed to call Notify multiple times with the same channel:
index fa4bd83aefb25d48e7cdbea5d67de985206a851e..a2df5fe1395b92c2bcdabc1d6261dfb6a5c8995c 100644 (file)
@@ -100,7 +100,7 @@ func Stat(name string) (FileInfo, error) {
 
 // Lstat returns a FileInfo describing the named file.
 // If the file is a symbolic link, the returned FileInfo
-// describes the symbolic link.  Lstat makes no attempt to follow the link.
+// describes the symbolic link. Lstat makes no attempt to follow the link.
 // If there is an error, it will be of type *PathError.
 func Lstat(name string) (FileInfo, error) {
        return Stat(name)
index 0b6c22c8e8233ec0c85e967eaa76e982ecbe9647..d65c58200f6967c2bb54c0e0a96497912ecab676 100644 (file)
@@ -68,7 +68,7 @@ func Stat(name string) (FileInfo, error) {
 
 // Lstat returns the FileInfo structure describing the named file.
 // If the file is a symbolic link, the returned FileInfo
-// describes the symbolic link.  Lstat makes no attempt to follow the link.
+// describes the symbolic link. Lstat makes no attempt to follow the link.
 // If there is an error, it will be of type *PathError.
 func Lstat(name string) (FileInfo, error) {
        if len(name) == 0 {
index 9d6f8e13d6f82d4e1174908c359e3b2b227a4b85..12b593fa1eb00b8cd4e25425d974e7cea25b189d 100644 (file)
@@ -25,7 +25,7 @@ type FileInfo interface {
 // A FileMode represents a file's mode and permission bits.
 // The bits have the same definition on all systems, so that
 // information about files can be moved from one system
-// to another portably.  Not all bits apply to all systems.
+// to another portably. Not all bits apply to all systems.
 // The only required bit is ModeDir for directories.
 type FileMode uint32
 
index e8a1eb1bbf97f74ee3d950151878d32f1e2330a6..87ad1e7427f1780d8f9ba873e5fa16185d29bbff 100644 (file)
@@ -108,7 +108,7 @@ func lookupUnix(uid int, username string, lookupByName bool) (*User, error) {
                Name:     C.GoString(pwd.pw_gecos),
                HomeDir:  C.GoString(pwd.pw_dir),
        }
-       // The pw_gecos field isn't quite standardized.  Some docs
+       // The pw_gecos field isn't quite standardized. Some docs
        // say: "It is expected to be a comma separated list of
        // personal data where the first item is the full name of the
        // user."
index dd6f3e7a994531116300bbaa8efdb36b6c7bfb06..4b70bf8824dab86101e9768bb741583726f47027 100644 (file)
@@ -61,7 +61,7 @@ const (
 )
 
 // Clean returns the shortest path name equivalent to path
-// by purely lexical processing.  It applies the following rules
+// by purely lexical processing. It applies the following rules
 // iteratively until no further processing can be done:
 //
 //     1. Replace multiple Separator elements with a single one.
@@ -229,7 +229,7 @@ func EvalSymlinks(path string) (string, error) {
 
 // Abs returns an absolute representation of path.
 // If the path is not absolute it will be joined with the current
-// working directory to turn it into an absolute path.  The absolute
+// working directory to turn it into an absolute path. The absolute
 // path name for a given file is not guaranteed to be unique.
 func Abs(path string) (string, error) {
        return abs(path)
index baeee97165f8c5aa6c2f2dc8d6c1ecb5360fa322..3622f9178e9d31e78f2e5ff0ed10459155810294 100644 (file)
@@ -449,7 +449,7 @@ func TestWalk(t *testing.T) {
        checkMarks(t, true)
        errors = errors[0:0]
 
-       // Test permission errors.  Only possible if we're not root
+       // Test permission errors. Only possible if we're not root
        // and only on some file systems (AFS, FAT).  To avoid errors during
        // all.bash on those file systems, skip during go test -short.
        if os.Getuid() > 0 && !testing.Short() {
index 01071a9a826b393ad4c8dc241b6c1ebc8bfd0f99..990fa3fcc5a0c52646b4728a0b3f5a784e244a37 100644 (file)
@@ -48,7 +48,7 @@ func (b *lazybuf) string() string {
 }
 
 // Clean returns the shortest path name equivalent to path
-// by purely lexical processing.  It applies the following rules
+// by purely lexical processing. It applies the following rules
 // iteratively until no further processing can be done:
 //
 //     1. Replace multiple slashes with a single slash.
index 2eb4f343f9808ea63ce4f9f9271b322fb40e9a77..5df228db1acd71b54a11e3e7d0fc9f25ef747e11 100644 (file)
@@ -4702,7 +4702,7 @@ func init() {
                        2 * PtrSize,
                        []byte{1},
                        []byte{1},
-                       // Note: this one is tricky, as the receiver is not a pointer.  But we
+                       // Note: this one is tricky, as the receiver is not a pointer. But we
                        // pass the receiver by reference to the autogenerated pointer-receiver
                        // version of the function.
                })
@@ -5004,7 +5004,7 @@ func TestChanAlloc(t *testing.T) {
                t.Errorf("allocs per chan send/recv: want 1 got %f", allocs)
        }
        // Note: there is one allocation in reflect.recv which seems to be
-       // a limitation of escape analysis.  If that is ever fixed the
+       // a limitation of escape analysis. If that is ever fixed the
        // allocs < 0.5 condition will trigger and this test should be fixed.
 }
 
index 3743e8042d3e5f74d38aa5970f86a9971ed4c100..9770358ae77d93ac05b3a7cf35f1e6bfe9bbb335 100644 (file)
@@ -9,7 +9,7 @@ package reflect
 import "unsafe"
 
 // During deepValueEqual, must keep track of checks that are
-// in progress.  The comparison algorithm assumes that all
+// in progress. The comparison algorithm assumes that all
 // checks in progress are true when it reencounters them.
 // Visited comparisons are stored in a map indexed by visit.
 type visit struct {
index 1367ba34e7fb130bc96b267001dcfef0cd591455..dd8084ed0f666062f7124708b1f3a17bda684883 100644 (file)
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // Package reflect implements run-time reflection, allowing a program to
-// manipulate objects with arbitrary types.  The typical use is to take a value
+// manipulate objects with arbitrary types. The typical use is to take a value
 // with static type interface{} and extract its dynamic type information by
 // calling TypeOf, which returns a Type.
 //
@@ -24,10 +24,10 @@ import (
 
 // Type is the representation of a Go type.
 //
-// Not all methods apply to all kinds of types.  Restrictions,
+// Not all methods apply to all kinds of types. Restrictions,
 // if any, are noted in the documentation for each method.
 // Use the Kind method to find out the kind of type before
-// calling kind-specific methods.  Calling a method
+// calling kind-specific methods. Calling a method
 // inappropriate to the kind of type causes a run-time panic.
 type Type interface {
        // Methods applicable to all types.
@@ -80,7 +80,7 @@ type Type interface {
        // String returns a string representation of the type.
        // The string representation may use shortened package names
        // (e.g., base64 instead of "encoding/base64") and is not
-       // guaranteed to be unique among types.  To test for equality,
+       // guaranteed to be unique among types. To test for equality,
        // compare the Types directly.
        String() string
 
@@ -121,7 +121,7 @@ type Type interface {
        ChanDir() ChanDir
 
        // IsVariadic reports whether a function type's final input parameter
-       // is a "..." parameter.  If so, t.In(t.NumIn() - 1) returns the parameter's
+       // is a "..." parameter. If so, t.In(t.NumIn() - 1) returns the parameter's
        // implicit actual type []T.
        //
        // For concreteness, if t represents func(x int, y ... float64), then
@@ -144,7 +144,7 @@ type Type interface {
        Field(i int) StructField
 
        // FieldByIndex returns the nested field corresponding
-       // to the index sequence.  It is equivalent to calling Field
+       // to the index sequence. It is equivalent to calling Field
        // successively for each index i.
        // It panics if the type's Kind is not Struct.
        FieldByIndex(index []int) StructField
@@ -384,7 +384,7 @@ type structType struct {
 type Method struct {
        // Name is the method name.
        // PkgPath is the package path that qualifies a lower case (unexported)
-       // method name.  It is empty for upper case (exported) method names.
+       // method name. It is empty for upper case (exported) method names.
        // The combination of PkgPath and Name uniquely identifies a method
        // in a method set.
        // See https://golang.org/ref/spec#Uniqueness_of_identifiers
@@ -754,7 +754,7 @@ type StructField struct {
        // Name is the field name.
        Name string
        // PkgPath is the package path that qualifies a lower case (unexported)
-       // field name.  It is empty for upper case (exported) field names.
+       // field name. It is empty for upper case (exported) field names.
        // See https://golang.org/ref/spec#Uniqueness_of_identifiers
        PkgPath string
 
@@ -859,12 +859,12 @@ func (t *structType) Field(i int) (f StructField) {
        f.Offset = p.offset
 
        // NOTE(rsc): This is the only allocation in the interface
-       // presented by a reflect.Type.  It would be nice to avoid,
+       // presented by a reflect.Type. It would be nice to avoid,
        // at least in the common cases, but we need to make sure
        // that misbehaving clients of reflect cannot affect other
-       // uses of reflect.  One possibility is CL 5371098, but we
+       // uses of reflect. One possibility is CL 5371098, but we
        // postponed that ugliness until there is a demonstrated
-       // need for the performance.  This is issue 2320.
+       // need for the performance. This is issue 2320.
        f.Index = []int{i}
        return
 }
@@ -1706,7 +1706,7 @@ func needKeyUpdate(t *rtype) bool {
 
 // Make sure these routines stay in sync with ../../runtime/hashmap.go!
 // These types exist only for GC, so we only fill out GC relevant info.
-// Currently, that's just size and the GC program.  We also fill in string
+// Currently, that's just size and the GC program. We also fill in string
 // for possible debugging use.
 const (
        bucketSize uintptr = 8
@@ -2065,7 +2065,7 @@ var layoutCache struct {
 // function arguments and return values for the function type t.
 // If rcvr != nil, rcvr specifies the type of the receiver.
 // The returned type exists only for GC, so we only fill out GC relevant info.
-// Currently, that's just size and the GC program.  We also fill in
+// Currently, that's just size and the GC program. We also fill in
 // the name for possible debugging use.
 func funcLayout(t *rtype, rcvr *rtype) (frametype *rtype, argSize, retOffset uintptr, stk *bitVector, framePool *sync.Pool) {
        if t.Kind() != Func {
index 182c45a1cec3c6a626edbd8c374237a060988741..8af39b12ac0c175ff31a5d5f7daf4aaa7871d90c 100644 (file)
@@ -15,10 +15,10 @@ const cannotSet = "cannot set value obtained from unexported struct field"
 
 // Value is the reflection interface to a Go value.
 //
-// Not all methods apply to all kinds of values.  Restrictions,
+// Not all methods apply to all kinds of values. Restrictions,
 // if any, are noted in the documentation for each method.
 // Use the Kind method to find out the kind of value before
-// calling kind-specific methods.  Calling a method
+// calling kind-specific methods. Calling a method
 // inappropriate to the kind of type causes a run time panic.
 //
 // The zero Value represents no value.
@@ -57,7 +57,7 @@ type Value struct {
        flag
 
        // A method value represents a curried method invocation
-       // like r.Read for some receiver r.  The typ+val+flag bits describe
+       // like r.Read for some receiver r. The typ+val+flag bits describe
        // the receiver r, but the flag's Kind bits say Func (methods are
        // functions), and the top bits of the flag give the method number
        // in r's type's method table.
@@ -115,14 +115,14 @@ func packEface(v Value) interface{} {
                }
                e.word = ptr
        case v.flag&flagIndir != 0:
-               // Value is indirect, but interface is direct.  We need
+               // Value is indirect, but interface is direct. We need
                // to load the data at v.ptr into the interface data word.
                e.word = *(*unsafe.Pointer)(v.ptr)
        default:
                // Value is direct, and so is the interface.
                e.word = v.ptr
        }
-       // Now, fill in the type portion.  We're very careful here not
+       // Now, fill in the type portion. We're very careful here not
        // to have any operation between the e.word and e.typ assignments
        // that would let the garbage collector observe the partially-built
        // interface value.
@@ -146,7 +146,7 @@ func unpackEface(i interface{}) Value {
 }
 
 // A ValueError occurs when a Value method is invoked on
-// a Value that does not support it.  Such cases are documented
+// a Value that does not support it. Such cases are documented
 // in the description of each method.
 type ValueError struct {
        Method string
@@ -272,7 +272,7 @@ func (v Value) runes() []rune {
 }
 
 // CanAddr reports whether the value's address can be obtained with Addr.
-// Such values are called addressable.  A value is addressable if it is
+// Such values are called addressable. A value is addressable if it is
 // an element of a slice, an element of an addressable array,
 // a field of an addressable struct, or the result of dereferencing a pointer.
 // If CanAddr returns false, calling Addr will panic.
@@ -581,7 +581,7 @@ func methodReceiver(op string, v Value, methodIndex int) (rcvrtype, t *rtype, fn
        return
 }
 
-// v is a method receiver.  Store at p the word which is used to
+// v is a method receiver. Store at p the word which is used to
 // encode that receiver at the start of the argument list.
 // Reflect uses the "interface" calling convention for
 // methods, which always uses one word to record the receiver.
@@ -1025,9 +1025,9 @@ func (v Value) MapIndex(key Value) Value {
 
        // Do not require key to be exported, so that DeepEqual
        // and other programs can use all the keys returned by
-       // MapKeys as arguments to MapIndex.  If either the map
+       // MapKeys as arguments to MapIndex. If either the map
        // or the key is unexported, though, the result will be
-       // considered unexported.  This is consistent with the
+       // considered unexported. This is consistent with the
        // behavior for structs, which allow read but not write
        // of unexported fields.
        key = key.assignTo("reflect.Value.MapIndex", tt.key, nil)
@@ -1079,7 +1079,7 @@ func (v Value) MapKeys() []Value {
                key := mapiterkey(it)
                if key == nil {
                        // Someone deleted an entry from the map since we
-                       // called maplen above.  It's a data race, but nothing
+                       // called maplen above. It's a data race, but nothing
                        // we can do about it.
                        break
                }
@@ -1226,7 +1226,7 @@ func (v Value) OverflowUint(x uint64) bool {
 // result is zero if and only if v is a nil func Value.
 //
 // If v's Kind is Slice, the returned pointer is to the first
-// element of the slice.  If the slice is nil the returned value
+// element of the slice. If the slice is nil the returned value
 // is 0.  If the slice is empty but non-nil the return value is non-zero.
 func (v Value) Pointer() uintptr {
        // TODO: deprecate
@@ -1883,7 +1883,7 @@ type runtimeSelect struct {
        val unsafe.Pointer // ptr to data (SendDir) or ptr to receive buffer (RecvDir)
 }
 
-// rselect runs a select.  It returns the index of the chosen case.
+// rselect runs a select. It returns the index of the chosen case.
 // If the case was a receive, val is filled in with the received value.
 // The conventional OK bool indicates whether the receive corresponds
 // to a sent value.
@@ -2080,14 +2080,14 @@ func Indirect(v Value) Value {
 }
 
 // ValueOf returns a new Value initialized to the concrete value
-// stored in the interface i.  ValueOf(nil) returns the zero Value.
+// stored in the interface i. ValueOf(nil) returns the zero Value.
 func ValueOf(i interface{}) Value {
        if i == nil {
                return Value{}
        }
 
        // TODO: Maybe allow contents of a Value to live on the stack.
-       // For now we make the contents always escape to the heap.  It
+       // For now we make the contents always escape to the heap. It
        // makes life easier in a few places (see chanrecv/mapassign
        // comment below).
        escapes(i)
@@ -2113,7 +2113,7 @@ func Zero(typ Type) Value {
 }
 
 // New returns a Value representing a pointer to a new zero value
-// for the specified type.  That is, the returned Value's Type is PtrTo(typ).
+// for the specified type. That is, the returned Value's Type is PtrTo(typ).
 func New(typ Type) Value {
        if typ == nil {
                panic("reflect: New(nil)")
@@ -2446,7 +2446,7 @@ func chanclose(ch unsafe.Pointer)
 func chanlen(ch unsafe.Pointer) int
 
 // Note: some of the noescape annotations below are technically a lie,
-// but safe in the context of this package.  Functions like chansend
+// but safe in the context of this package. Functions like chansend
 // and mapassign don't escape the referent, but may escape anything
 // the referent points to (they do shallow copies of the referent).
 // It is safe in this package because the referent may only point
index 3a1100dde8ea6c2ae5e6da3520074afca963366d..93334c3aff3c04594dd96c7cd15713d20ed2e267 100644 (file)
@@ -146,7 +146,7 @@ func (m *machine) tryBacktrack(b *bitState, i input, pc uint32, pos int) bool {
                // Optimization: rather than push and pop,
                // code that is going to Push and continue
                // the loop simply updates ip, p, and arg
-               // and jumps to CheckAndLoop.  We have to
+               // and jumps to CheckAndLoop. We have to
                // do the ShouldVisit check that Push
                // would have, but we avoid the stack
                // manipulation.
index 518272092ae9182e3b7c1ffd85cc75a708f39ee6..6c6329e0b0f3a0617d562945ffda6723fa1f5788 100644 (file)
@@ -19,7 +19,7 @@ type queue struct {
 // A entry is an entry on a queue.
 // It holds both the instruction pc and the actual thread.
 // Some queue entries are just place holders so that the machine
-// knows it has considered that pc.  Such entries have t == nil.
+// knows it has considered that pc. Such entries have t == nil.
 type entry struct {
        pc uint32
        t  *thread
index 0f95b95972b971dc9b05a7312e53a948ffe8caad..6ccf24e7e98a683152cf3bb3f52d158d294a4831 100644 (file)
@@ -22,7 +22,7 @@ import (
 // considered during RE2's exhaustive tests, which run all possible
 // regexps over a given set of atoms and operators, up to a given
 // complexity, over all possible strings over a given alphabet,
-// up to a given size.  Rather than try to link with RE2, we read a
+// up to a given size. Rather than try to link with RE2, we read a
 // log file containing the test cases and the expected matches.
 // The log file, re2-exhaustive.txt, is generated by running 'make log'
 // in the open source RE2 distribution https://github.com/google/re2/.
@@ -41,21 +41,21 @@ import (
 //     -;0-3 0-1 1-2 2-3
 //
 // The stanza begins by defining a set of strings, quoted
-// using Go double-quote syntax, one per line.  Then the
+// using Go double-quote syntax, one per line. Then the
 // regexps section gives a sequence of regexps to run on
-// the strings.  In the block that follows a regexp, each line
+// the strings. In the block that follows a regexp, each line
 // gives the semicolon-separated match results of running
 // the regexp on the corresponding string.
 // Each match result is either a single -, meaning no match, or a
 // space-separated sequence of pairs giving the match and
-// submatch indices.  An unmatched subexpression formats
+// submatch indices. An unmatched subexpression formats
 // its pair as a single - (not illustrated above).  For now
 // each regexp run produces two match results, one for a
 // ``full match'' that restricts the regexp to matching the entire
 // string or nothing, and one for a ``partial match'' that gives
 // the leftmost first match found in the string.
 //
-// Lines beginning with # are comments.  Lines beginning with
+// Lines beginning with # are comments. Lines beginning with
 // a capital letter are test names printed during RE2's test suite
 // and are echoed into t but otherwise ignored.
 //
@@ -155,9 +155,9 @@ func testRE2(t *testing.T, file string) {
                        if !isSingleBytes(text) && strings.Contains(re.String(), `\B`) {
                                // RE2's \B considers every byte position,
                                // so it sees 'not word boundary' in the
-                               // middle of UTF-8 sequences.  This package
+                               // middle of UTF-8 sequences. This package
                                // only considers the positions between runes,
-                               // so it disagrees.  Skip those cases.
+                               // so it disagrees. Skip those cases.
                                continue
                        }
                        res := strings.Split(line, ";")
index 628b57dc89c0e81f6bb405c8b84f2816151b4c23..5b82f9666e74485517fb2912a1029e27500725bd 100644 (file)
@@ -33,7 +33,7 @@ type onePassInst struct {
 }
 
 // OnePassPrefix returns a literal string that all matches for the
-// regexp must start with.  Complete is true if the prefix
+// regexp must start with. Complete is true if the prefix
 // is the entire match. Pc is the index of the last rune instruction
 // in the string. The OnePassPrefix skips over the mandatory
 // EmptyBeginText
index 42ae6e1d7a24fa42cc3ea9ec0bb817d6f7aa102c..e1da9ed421d69ac9edd90589dd8728d47b912466 100644 (file)
 // All characters are UTF-8-encoded code points.
 //
 // There are 16 methods of Regexp that match a regular expression and identify
-// the matched text.  Their names are matched by this regular expression:
+// the matched text. Their names are matched by this regular expression:
 //
 //     Find(All)?(String)?(Submatch)?(Index)?
 //
 // If 'All' is present, the routine matches successive non-overlapping
-// matches of the entire expression.  Empty matches abutting a preceding
-// match are ignored.  The return value is a slice containing the successive
-// return values of the corresponding non-'All' routine.  These routines take
+// matches of the entire expression. Empty matches abutting a preceding
+// match are ignored. The return value is a slice containing the successive
+// return values of the corresponding non-'All' routine. These routines take
 // an extra integer argument, n; if n >= 0, the function returns at most n
 // matches/submatches.
 //
@@ -45,9 +45,9 @@
 //
 // If 'Index' is present, matches and submatches are identified by byte index
 // pairs within the input string: result[2*n:2*n+1] identifies the indexes of
-// the nth submatch.  The pair for n==0 identifies the match of the entire
-// expression.  If 'Index' is not present, the match is identified by the
-// text of the match/submatch.  If an index is negative, it means that
+// the nth submatch. The pair for n==0 identifies the match of the entire
+// expression. If 'Index' is not present, the match is identified by the
+// text of the match/submatch. If an index is negative, it means that
 // subexpression did not match any string in the input.
 //
 // There is also a subset of the methods that can be applied to text read
@@ -55,7 +55,7 @@
 //
 //     MatchReader, FindReaderIndex, FindReaderSubmatchIndex
 //
-// This set may grow.  Note that regular expression matches may need to
+// This set may grow. Note that regular expression matches may need to
 // examine text beyond the text returned by a match, so the methods that
 // match text from a RuneReader may read arbitrarily far into the input
 // before returning.
@@ -258,10 +258,10 @@ func (re *Regexp) NumSubexp() int {
 }
 
 // SubexpNames returns the names of the parenthesized subexpressions
-// in this Regexp.  The name for the first sub-expression is names[1],
+// in this Regexp. The name for the first sub-expression is names[1],
 // so that if m is a match slice, the name for m[i] is SubexpNames()[i].
 // Since the Regexp as a whole cannot be named, names[0] is always
-// the empty string.  The slice should not be modified.
+// the empty string. The slice should not be modified.
 func (re *Regexp) SubexpNames() []string {
        return re.subexpNames
 }
@@ -394,7 +394,7 @@ func (i *inputReader) context(pos int) syntax.EmptyOp {
 }
 
 // LiteralPrefix returns a literal string that must begin any match
-// of the regular expression re.  It returns the boolean true if the
+// of the regular expression re. It returns the boolean true if the
 // literal string comprises the entire regular expression.
 func (re *Regexp) LiteralPrefix() (prefix string, complete bool) {
        return re.prefix, re.prefixComplete
@@ -417,7 +417,7 @@ func (re *Regexp) Match(b []byte) bool {
 }
 
 // MatchReader checks whether a textual regular expression matches the text
-// read by the RuneReader.  More complicated queries need to use Compile and
+// read by the RuneReader. More complicated queries need to use Compile and
 // the full Regexp interface.
 func MatchReader(pattern string, r io.RuneReader) (matched bool, err error) {
        re, err := Compile(pattern)
@@ -428,7 +428,7 @@ func MatchReader(pattern string, r io.RuneReader) (matched bool, err error) {
 }
 
 // MatchString checks whether a textual regular expression
-// matches a string.  More complicated queries need
+// matches a string. More complicated queries need
 // to use Compile and the full Regexp interface.
 func MatchString(pattern string, s string) (matched bool, err error) {
        re, err := Compile(pattern)
@@ -439,7 +439,7 @@ func MatchString(pattern string, s string) (matched bool, err error) {
 }
 
 // Match checks whether a textual regular expression
-// matches a byte slice.  More complicated queries need
+// matches a byte slice. More complicated queries need
 // to use Compile and the full Regexp interface.
 func Match(pattern string, b []byte) (matched bool, err error) {
        re, err := Compile(pattern)
@@ -450,7 +450,7 @@ func Match(pattern string, b []byte) (matched bool, err error) {
 }
 
 // ReplaceAllString returns a copy of src, replacing matches of the Regexp
-// with the replacement string repl.  Inside repl, $ signs are interpreted as
+// with the replacement string repl. Inside repl, $ signs are interpreted as
 // in Expand, so for instance $1 represents the text of the first submatch.
 func (re *Regexp) ReplaceAllString(src, repl string) string {
        n := 2
@@ -464,7 +464,7 @@ func (re *Regexp) ReplaceAllString(src, repl string) string {
 }
 
 // ReplaceAllLiteralString returns a copy of src, replacing matches of the Regexp
-// with the replacement string repl.  The replacement repl is substituted directly,
+// with the replacement string repl. The replacement repl is substituted directly,
 // without using Expand.
 func (re *Regexp) ReplaceAllLiteralString(src, repl string) string {
        return string(re.replaceAll(nil, src, 2, func(dst []byte, match []int) []byte {
@@ -474,7 +474,7 @@ func (re *Regexp) ReplaceAllLiteralString(src, repl string) string {
 
 // ReplaceAllStringFunc returns a copy of src in which all matches of the
 // Regexp have been replaced by the return value of function repl applied
-// to the matched substring.  The replacement returned by repl is substituted
+// to the matched substring. The replacement returned by repl is substituted
 // directly, without using Expand.
 func (re *Regexp) ReplaceAllStringFunc(src string, repl func(string) string) string {
        b := re.replaceAll(nil, src, 2, func(dst []byte, match []int) []byte {
@@ -530,7 +530,7 @@ func (re *Regexp) replaceAll(bsrc []byte, src string, nmatch int, repl func(dst
                        searchPos += width
                } else if searchPos+1 > a[1] {
                        // This clause is only needed at the end of the input
-                       // string.  In that case, DecodeRuneInString returns width=0.
+                       // string. In that case, DecodeRuneInString returns width=0.
                        searchPos++
                } else {
                        searchPos = a[1]
@@ -548,7 +548,7 @@ func (re *Regexp) replaceAll(bsrc []byte, src string, nmatch int, repl func(dst
 }
 
 // ReplaceAll returns a copy of src, replacing matches of the Regexp
-// with the replacement text repl.  Inside repl, $ signs are interpreted as
+// with the replacement text repl. Inside repl, $ signs are interpreted as
 // in Expand, so for instance $1 represents the text of the first submatch.
 func (re *Regexp) ReplaceAll(src, repl []byte) []byte {
        n := 2
@@ -566,7 +566,7 @@ func (re *Regexp) ReplaceAll(src, repl []byte) []byte {
 }
 
 // ReplaceAllLiteral returns a copy of src, replacing matches of the Regexp
-// with the replacement bytes repl.  The replacement repl is substituted directly,
+// with the replacement bytes repl. The replacement repl is substituted directly,
 // without using Expand.
 func (re *Regexp) ReplaceAllLiteral(src, repl []byte) []byte {
        return re.replaceAll(src, "", 2, func(dst []byte, match []int) []byte {
@@ -576,7 +576,7 @@ func (re *Regexp) ReplaceAllLiteral(src, repl []byte) []byte {
 
 // ReplaceAllFunc returns a copy of src in which all matches of the
 // Regexp have been replaced by the return value of function repl applied
-// to the matched byte slice.  The replacement returned by repl is substituted
+// to the matched byte slice. The replacement returned by repl is substituted
 // directly, without using Expand.
 func (re *Regexp) ReplaceAllFunc(src []byte, repl func([]byte) []byte) []byte {
        return re.replaceAll(src, "", 2, func(dst []byte, match []int) []byte {
@@ -592,7 +592,7 @@ func special(b byte) bool {
 
 // QuoteMeta returns a string that quotes all regular expression metacharacters
 // inside the argument text; the returned string is a regular expression matching
-// the literal text.  For example, QuoteMeta(`[foo]`) returns `\[foo\]`.
+// the literal text. For example, QuoteMeta(`[foo]`) returns `\[foo\]`.
 func QuoteMeta(s string) string {
        b := make([]byte, 2*len(s))
 
@@ -684,7 +684,7 @@ func (re *Regexp) Find(b []byte) []byte {
 }
 
 // FindIndex returns a two-element slice of integers defining the location of
-// the leftmost match in b of the regular expression.  The match itself is at
+// the leftmost match in b of the regular expression. The match itself is at
 // b[loc[0]:loc[1]].
 // A return value of nil indicates no match.
 func (re *Regexp) FindIndex(b []byte) (loc []int) {
@@ -696,9 +696,9 @@ func (re *Regexp) FindIndex(b []byte) (loc []int) {
 }
 
 // FindString returns a string holding the text of the leftmost match in s of the regular
-// expression.  If there is no match, the return value is an empty string,
+// expression. If there is no match, the return value is an empty string,
 // but it will also be empty if the regular expression successfully matches
-// an empty string.  Use FindStringIndex or FindStringSubmatch if it is
+// an empty string. Use FindStringIndex or FindStringSubmatch if it is
 // necessary to distinguish these cases.
 func (re *Regexp) FindString(s string) string {
        a := re.doExecute(nil, nil, s, 0, 2)
@@ -709,7 +709,7 @@ func (re *Regexp) FindString(s string) string {
 }
 
 // FindStringIndex returns a two-element slice of integers defining the
-// location of the leftmost match in s of the regular expression.  The match
+// location of the leftmost match in s of the regular expression. The match
 // itself is at s[loc[0]:loc[1]].
 // A return value of nil indicates no match.
 func (re *Regexp) FindStringIndex(s string) (loc []int) {
@@ -722,7 +722,7 @@ func (re *Regexp) FindStringIndex(s string) (loc []int) {
 
 // FindReaderIndex returns a two-element slice of integers defining the
 // location of the leftmost match of the regular expression in text read from
-// the RuneReader.  The match text was found in the input stream at
+// the RuneReader. The match text was found in the input stream at
 // byte offset loc[0] through loc[1]-1.
 // A return value of nil indicates no match.
 func (re *Regexp) FindReaderIndex(r io.RuneReader) (loc []int) {
@@ -754,14 +754,14 @@ func (re *Regexp) FindSubmatch(b []byte) [][]byte {
 
 // Expand appends template to dst and returns the result; during the
 // append, Expand replaces variables in the template with corresponding
-// matches drawn from src.  The match slice should have been returned by
+// matches drawn from src. The match slice should have been returned by
 // FindSubmatchIndex.
 //
 // In the template, a variable is denoted by a substring of the form
 // $name or ${name}, where name is a non-empty sequence of letters,
-// digits, and underscores.  A purely numeric name like $1 refers to
+// digits, and underscores. A purely numeric name like $1 refers to
 // the submatch with the corresponding index; other names refer to
-// capturing parentheses named with the (?P<name>...) syntax.  A
+// capturing parentheses named with the (?P<name>...) syntax. A
 // reference to an out of range or unmatched index or a name that is not
 // present in the regular expression is replaced with an empty slice.
 //
@@ -920,7 +920,7 @@ func (re *Regexp) FindStringSubmatchIndex(s string) []int {
 // FindReaderSubmatchIndex returns a slice holding the index pairs
 // identifying the leftmost match of the regular expression of text read by
 // the RuneReader, and the matches, if any, of its subexpressions, as defined
-// by the 'Submatch' and 'Index' descriptions in the package comment.  A
+// by the 'Submatch' and 'Index' descriptions in the package comment. A
 // return value of nil indicates no match.
 func (re *Regexp) FindReaderSubmatchIndex(r io.RuneReader) []int {
        return re.pad(re.doExecute(r, nil, "", 0, re.prog.NumCap))
index 95f6f15698d459139fdc2ec45a8b92a669230a67..83e53ba6ca0e6dbdfecdb4651dbfe032dc84a443 100644 (file)
@@ -8,11 +8,11 @@ import "unicode"
 
 // A patchList is a list of instruction pointers that need to be filled in (patched).
 // Because the pointers haven't been filled in yet, we can reuse their storage
-// to hold the list.  It's kind of sleazy, but works well in practice.
+// to hold the list. It's kind of sleazy, but works well in practice.
 // See http://swtch.com/~rsc/regexp/regexp1.html for inspiration.
 //
 // These aren't really pointers: they're integers, so we can reinterpret them
-// this way without using package unsafe.  A value l denotes
+// this way without using package unsafe. A value l denotes
 // p.inst[l>>1].Out (l&1==0) or .Arg (l&1==1).
 // l == 0 denotes the empty list, okay because we start every program
 // with a fail instruction, so we'll never want to point at its output link.
index 7505593a648eabbae069a9361db67cf2faf8bbe4..7278bba5ac5dd86c85fc67c1610713d173065e4f 100644 (file)
@@ -141,9 +141,9 @@ func (p *parser) push(re *Regexp) *Regexp {
 }
 
 // maybeConcat implements incremental concatenation
-// of literal runes into string nodes.  The parser calls this
+// of literal runes into string nodes. The parser calls this
 // before each push, so only the top fragment of the stack
-// might need processing.  Since this is called before a push,
+// might need processing. Since this is called before a push,
 // the topmost literal is no longer subject to operators like *
 // (Otherwise ab* would turn into (ab)*.)
 // If r >= 0 and there's a node left over, maybeConcat uses it
@@ -600,7 +600,7 @@ func (p *parser) leadingString(re *Regexp) ([]rune, Flags) {
 }
 
 // removeLeadingString removes the first n leading runes
-// from the beginning of re.  It returns the replacement for re.
+// from the beginning of re. It returns the replacement for re.
 func (p *parser) removeLeadingString(re *Regexp, n int) *Regexp {
        if re.Op == OpConcat && len(re.Sub) > 0 {
                // Removing a leading string in a concatenation
@@ -957,11 +957,11 @@ func (p *parser) parsePerlFlags(s string) (rest string, err error) {
        // Perl 5.10 gave in and implemented the Python version too,
        // but they claim that the last two are the preferred forms.
        // PCRE and languages based on it (specifically, PHP and Ruby)
-       // support all three as well.  EcmaScript 4 uses only the Python form.
+       // support all three as well. EcmaScript 4 uses only the Python form.
        //
        // In both the open source world (via Code Search) and the
        // Google source tree, (?P<expr>name) is the dominant form,
-       // so that's the one we implement.  One is enough.
+       // so that's the one we implement. One is enough.
        if len(t) > 4 && t[2] == 'P' && t[3] == '<' {
                // Pull out name.
                end := strings.IndexRune(t, '>')
@@ -989,7 +989,7 @@ func (p *parser) parsePerlFlags(s string) (rest string, err error) {
                return t[end+1:], nil
        }
 
-       // Non-capturing group.  Might also twiddle Perl flags.
+       // Non-capturing group. Might also twiddle Perl flags.
        var c rune
        t = t[2:] // skip (?
        flags := p.flags
@@ -1257,7 +1257,7 @@ Switch:
                if c < utf8.RuneSelf && !isalnum(c) {
                        // Escaped non-word characters are always themselves.
                        // PCRE is not quite so rigorous: it accepts things like
-                       // \q, but we don't.  We once rejected \_, but too many
+                       // \q, but we don't. We once rejected \_, but too many
                        // programs and people insist on using it, so allow \_.
                        return c, t, nil
                }
@@ -1292,7 +1292,7 @@ Switch:
                if c == '{' {
                        // Any number of digits in braces.
                        // Perl accepts any text at all; it ignores all text
-                       // after the first non-hex digit.  We require only hex digits,
+                       // after the first non-hex digit. We require only hex digits,
                        // and at least one.
                        nhex := 0
                        r = 0
@@ -1333,10 +1333,10 @@ Switch:
                }
                return x*16 + y, t, nil
 
-       // C escapes.  There is no case 'b', to avoid misparsing
+       // C escapes. There is no case 'b', to avoid misparsing
        // the Perl word-boundary \b as the C backspace \b
-       // when in POSIX mode.  In Perl, /\b/ means word-boundary
-       // but /[\b]/ means backspace.  We don't support that.
+       // when in POSIX mode. In Perl, /\b/ means word-boundary
+       // but /[\b]/ means backspace. We don't support that.
        // If you want a backspace, embed a literal backspace
        // character or use \x08.
        case 'a':
@@ -1377,7 +1377,7 @@ type charGroup struct {
 }
 
 // parsePerlClassEscape parses a leading Perl character class escape like \d
-// from the beginning of s.  If one is present, it appends the characters to r
+// from the beginning of s. If one is present, it appends the characters to r
 // and returns the new slice r and the remainder of the string.
 func (p *parser) parsePerlClassEscape(s string, r []rune) (out []rune, rest string) {
        if p.flags&PerlX == 0 || len(s) < 2 || s[0] != '\\' {
@@ -1391,7 +1391,7 @@ func (p *parser) parsePerlClassEscape(s string, r []rune) (out []rune, rest stri
 }
 
 // parseNamedClass parses a leading POSIX named character class like [:alnum:]
-// from the beginning of s.  If one is present, it appends the characters to r
+// from the beginning of s. If one is present, it appends the characters to r
 // and returns the new slice r and the remainder of the string.
 func (p *parser) parseNamedClass(s string, r []rune) (out []rune, rest string, err error) {
        if len(s) < 2 || s[0] != '[' || s[1] != ':' {
@@ -1454,7 +1454,7 @@ func unicodeTable(name string) (*unicode.RangeTable, *unicode.RangeTable) {
 }
 
 // parseUnicodeClass parses a leading Unicode character class like \p{Han}
-// from the beginning of s.  If one is present, it appends the characters to r
+// from the beginning of s. If one is present, it appends the characters to r
 // and returns the new slice r and the remainder of the string.
 func (p *parser) parseUnicodeClass(s string, r []rune) (out []rune, rest string, err error) {
        if p.flags&UnicodeGroups == 0 || len(s) < 2 || s[0] != '\\' || s[1] != 'p' && s[1] != 'P' {
@@ -1718,7 +1718,7 @@ func appendFoldedRange(r []rune, lo, hi rune) []rune {
                hi = maxFold
        }
 
-       // Brute force.  Depend on appendRange to coalesce ranges on the fly.
+       // Brute force. Depend on appendRange to coalesce ranges on the fly.
        for c := lo; c <= hi; c++ {
                r = appendRange(r, c, c)
                f := unicode.SimpleFold(c)
index ae6db31a44140eb4df2e81a8e442e784efd5ccee..c32ae8d9fac7d44a369a9e25e14a764d735ea76f 100644 (file)
@@ -144,7 +144,7 @@ func (i *Inst) op() InstOp {
 }
 
 // Prefix returns a literal string that all matches for the
-// regexp must start with.  Complete is true if the prefix
+// regexp must start with. Complete is true if the prefix
 // is the entire match.
 func (p *Prog) Prefix() (prefix string, complete bool) {
        i, _ := p.skipNop(uint32(p.Start))
@@ -164,7 +164,7 @@ func (p *Prog) Prefix() (prefix string, complete bool) {
 }
 
 // StartCond returns the leading empty-width conditions that must
-// be true in any match.  It returns ^EmptyOp(0) if no matches are possible.
+// be true in any match. It returns ^EmptyOp(0) if no matches are possible.
 func (p *Prog) StartCond() EmptyOp {
        var flag EmptyOp
        pc := uint32(p.Start)
index 329ca804c0c572f97992d8a93f59f17ba74f6310..0fe9269f255541ba1d8e16dd05a24780c1c10083 100644 (file)
@@ -139,7 +139,7 @@ func writeRegexp(b *bytes.Buffer, re *Regexp) {
                if len(re.Rune) == 0 {
                        b.WriteString(`^\x00-\x{10FFFF}`)
                } else if re.Rune[0] == 0 && re.Rune[len(re.Rune)-1] == unicode.MaxRune {
-                       // Contains 0 and MaxRune.  Probably a negated class.
+                       // Contains 0 and MaxRune. Probably a negated class.
                        // Print the gaps.
                        b.WriteRune('^')
                        for i := 1; i < len(re.Rune)-1; i += 2 {
index 6e5a226ed83f328e1259b602c3cb2c298323844d..e439325139932c87a2a4367cb58586b1e2b3ebdf 100644 (file)
@@ -8,7 +8,7 @@ package syntax
 // and with various other simplifications, such as rewriting /(?:a+)+/ to /a+/.
 // The resulting regexp will execute correctly but its string representation
 // will not produce the same parse tree, because capturing parentheses
-// may have been duplicated or removed.  For example, the simplified form
+// may have been duplicated or removed. For example, the simplified form
 // for /(x){1,2}/ is /(x)(x)?/ but both parentheses capture as $1.
 // The returned regexp may share structure with or be the original.
 func (re *Regexp) Simplify() *Regexp {
@@ -117,13 +117,13 @@ func (re *Regexp) Simplify() *Regexp {
 }
 
 // simplify1 implements Simplify for the unary OpStar,
-// OpPlus, and OpQuest operators.  It returns the simple regexp
+// OpPlus, and OpQuest operators. It returns the simple regexp
 // equivalent to
 //
 //     Regexp{Op: op, Flags: flags, Sub: {sub}}
 //
 // under the assumption that sub is already simple, and
-// without first allocating that structure.  If the regexp
+// without first allocating that structure. If the regexp
 // to be returned turns out to be equivalent to re, simplify1
 // returns re instead.
 //
index b9d79686a4354f99b045eb93db4b00c03a64fb9f..9877db3d0a312752aea8f8053fe9a01905e0b2e6 100644 (file)
@@ -59,7 +59,7 @@ var simplifyTests = []struct {
        {`a{0,1}`, `a?`},
        // The next three are illegible because Simplify inserts (?:)
        // parens instead of () parens to avoid creating extra
-       // captured subexpressions.  The comments show a version with fewer parens.
+       // captured subexpressions. The comments show a version with fewer parens.
        {`(a){0,2}`, `(?:(a)(a)?)?`},                       //       (aa?)?
        {`(a){0,4}`, `(?:(a)(?:(a)(?:(a)(a)?)?)?)?`},       //   (a(a(aa?)?)?)?
        {`(a){2,6}`, `(a)(a)(?:(a)(?:(a)(?:(a)(a)?)?)?)?`}, // aa(a(a(aa?)?)?)?
@@ -117,7 +117,7 @@ var simplifyTests = []struct {
        // Empty string as a regular expression.
        // The empty string must be preserved inside parens in order
        // to make submatches work right, so these tests are less
-       // interesting than they might otherwise be.  String inserts
+       // interesting than they might otherwise be. String inserts
        // explicit (?:) in place of non-parenthesized empty strings,
        // to make them easier to spot for other parsers.
        {`(a|b|)`, `([a-b]|(?:))`},
index e507e717158f7aaa9bef7c84637679e1d96b753e..7aacc8cf9bf793f2d40d538057c9a4709fa76160 100644 (file)
@@ -64,7 +64,7 @@ func memhash128(p unsafe.Pointer, h uintptr) uintptr {
 }
 
 // memhash_varlen is defined in assembly because it needs access
-// to the closure.  It appears here to provide an argument
+// to the closure. It appears here to provide an argument
 // signature for the assembly routine.
 func memhash_varlen(p unsafe.Pointer, h uintptr) uintptr
 
index 9237d57f24a407e51823711e20092fa458bdd6e3..2d16f4940a3f5608d45a4d9aa885d01950021583 100644 (file)
@@ -226,7 +226,7 @@ TEXT runtime·gogo(SB), NOSPLIT, $0-4
 
 // func mcall(fn func(*g))
 // Switch to m->g0's stack, call fn(g).
-// Fn must never return.  It should gogo(&g->sched)
+// Fn must never return. It should gogo(&g->sched)
 // to keep running g.
 TEXT runtime·mcall(SB), NOSPLIT, $0-4
        MOVL    fn+0(FP), DI
@@ -259,7 +259,7 @@ TEXT runtime·mcall(SB), NOSPLIT, $0-4
        RET
 
 // systemstack_switch is a dummy routine that systemstack leaves at the bottom
-// of the G stack.  We need to distinguish the routine that
+// of the G stack. We need to distinguish the routine that
 // lives at the bottom of the G stack from the one that lives
 // at the top of the system stack because the one at the top of
 // the system stack terminates the stack walk (see topofstack()).
@@ -291,7 +291,7 @@ TEXT runtime·systemstack(SB), NOSPLIT, $0-4
        CALL    AX
 
 switch:
-       // save our state in g->sched.  Pretend to
+       // save our state in g->sched. Pretend to
        // be systemstack_switch if the G stack is scanned.
        MOVL    $runtime·systemstack_switch(SB), (g_sched+gobuf_pc)(AX)
        MOVL    SP, (g_sched+gobuf_sp)(AX)
@@ -900,7 +900,7 @@ final1:
        RET
 
 endofpage:
-       // address ends in 1111xxxx.  Might be up against
+       // address ends in 1111xxxx. Might be up against
        // a page boundary, so load ending at last byte.
        // Then shift bytes down using pshufb.
        MOVOU   -32(AX)(BX*1), X1
@@ -1145,7 +1145,7 @@ DATA masks<>+0xfc(SB)/4, $0x00ffffff
 
 GLOBL masks<>(SB),RODATA,$256
 
-// these are arguments to pshufb.  They move data down from
+// these are arguments to pshufb. They move data down from
 // the high bytes of the register to the low bytes of the register.
 // index is how many bytes to move.
 DATA shifts<>+0x00(SB)/4, $0x00000000
@@ -1370,7 +1370,7 @@ small:
        MOVL    (SI), SI
        JMP     si_finish
 si_high:
-       // address ends in 111111xx.  Load up to bytes we want, move to correct position.
+       // address ends in 111111xx. Load up to bytes we want, move to correct position.
        MOVL    -4(SI)(BX*1), SI
        SHRL    CX, SI
 si_finish:
@@ -1606,7 +1606,7 @@ TEXT runtime·prefetcht2(SB),NOSPLIT,$0-4
 TEXT runtime·prefetchnta(SB),NOSPLIT,$0-4
        RET
 
-// Add a module's moduledata to the linked list of moduledata objects.  This
+// Add a module's moduledata to the linked list of moduledata objects. This
 // is called from .init_array by a function generated in the linker and so
 // follows the platform ABI wrt register preservation -- it only touches AX,
 // CX (implicitly) and DX, but it does not follow the ABI wrt arguments:
index ac4630c833a7fd206fd47c6069d31f1fcd679ec0..b4df1d80d7739fd10065ed3c0d2a671c760e2805 100644 (file)
@@ -203,7 +203,7 @@ TEXT runtime·gogo(SB), NOSPLIT, $0-8
 
 // func mcall(fn func(*g))
 // Switch to m->g0's stack, call fn(g).
-// Fn must never return.  It should gogo(&g->sched)
+// Fn must never return. It should gogo(&g->sched)
 // to keep running g.
 TEXT runtime·mcall(SB), NOSPLIT, $0-8
        MOVQ    fn+0(FP), DI
@@ -237,7 +237,7 @@ TEXT runtime·mcall(SB), NOSPLIT, $0-8
        RET
 
 // systemstack_switch is a dummy routine that systemstack leaves at the bottom
-// of the G stack.  We need to distinguish the routine that
+// of the G stack. We need to distinguish the routine that
 // lives at the bottom of the G stack from the one that lives
 // at the top of the system stack because the one at the top of
 // the system stack terminates the stack walk (see topofstack()).
@@ -268,7 +268,7 @@ TEXT runtime·systemstack(SB), NOSPLIT, $0-8
        CALL    AX
 
 switch:
-       // save our state in g->sched.  Pretend to
+       // save our state in g->sched. Pretend to
        // be systemstack_switch if the G stack is scanned.
        MOVQ    $runtime·systemstack_switch(SB), SI
        MOVQ    SI, (g_sched+gobuf_pc)(AX)
@@ -716,7 +716,7 @@ havem:
        CALL    runtime·cgocallbackg(SB)
        MOVQ    0(SP), R8
 
-       // Compute the size of the frame again.  FP and SP have
+       // Compute the size of the frame again. FP and SP have
        // completely different values here than they did above,
        // but only their difference matters.
        LEAQ    fv+0(FP), AX
@@ -909,7 +909,7 @@ final1:
        RET
 
 endofpage:
-       // address ends in 1111xxxx.  Might be up against
+       // address ends in 1111xxxx. Might be up against
        // a page boundary, so load ending at last byte.
        // Then shift bytes down using pshufb.
        MOVOU   -32(AX)(CX*1), X1
@@ -1232,7 +1232,7 @@ TEXT Â·checkASM(SB),NOSPLIT,$0-1
        SETEQ   ret+0(FP)
        RET
 
-// these are arguments to pshufb.  They move data down from
+// these are arguments to pshufb. They move data down from
 // the high bytes of the register to the low bytes of the register.
 // index is how many bytes to move.
 DATA shifts<>+0x00(SB)/8, $0x0000000000000000
@@ -1412,7 +1412,7 @@ small:
        MOVQ    (SI), SI
        JMP     si_finish
 si_high:
-       // address ends in 11111xxx.  Load up to bytes we want, move to correct position.
+       // address ends in 11111xxx. Load up to bytes we want, move to correct position.
        MOVQ    -8(SI)(BX*1), SI
        SHRQ    CX, SI
 si_finish:
@@ -1872,7 +1872,7 @@ sseloopentry:
        CMPQ    DI, AX
        JB      sseloop
 
-       // Search the last 16-byte chunk.  This chunk may overlap with the
+       // Search the last 16-byte chunk. This chunk may overlap with the
        // chunks we've already searched, but that's ok.
        MOVQ    AX, DI
        MOVOU   (AX), X1
index ae7a53821baad6fc0a1be5b8c86e81b6e83288d6..452ce04143adf833e13fd6188bd6767dd8993b71 100644 (file)
@@ -133,7 +133,7 @@ TEXT runtime·gogo(SB), NOSPLIT, $0-4
 
 // func mcall(fn func(*g))
 // Switch to m->g0's stack, call fn(g).
-// Fn must never return.  It should gogo(&g->sched)
+// Fn must never return. It should gogo(&g->sched)
 // to keep running g.
 TEXT runtime·mcall(SB), NOSPLIT, $0-4
        MOVL    fn+0(FP), DI
@@ -166,7 +166,7 @@ TEXT runtime·mcall(SB), NOSPLIT, $0-4
        RET
 
 // systemstack_switch is a dummy routine that systemstack leaves at the bottom
-// of the G stack.  We need to distinguish the routine that
+// of the G stack. We need to distinguish the routine that
 // lives at the bottom of the G stack from the one that lives
 // at the top of the system stack because the one at the top of
 // the system stack terminates the stack walk (see topofstack()).
@@ -198,7 +198,7 @@ TEXT runtime·systemstack(SB), NOSPLIT, $0-4
        CALL    AX
 
 switch:
-       // save our state in g->sched.  Pretend to
+       // save our state in g->sched. Pretend to
        // be systemstack_switch if the G stack is scanned.
        MOVL    $runtime·systemstack_switch(SB), SI
        MOVL    SI, (g_sched+gobuf_pc)(AX)
@@ -491,7 +491,7 @@ TEXT runtime·memclr(SB),NOSPLIT,$0-8
        REP
        STOSB
        // Note: we zero only 4 bytes at a time so that the tail is at most
-       // 3 bytes.  That guarantees that we aren't zeroing pointers with STOSB.
+       // 3 bytes. That guarantees that we aren't zeroing pointers with STOSB.
        // See issue 13160.
        RET
 
@@ -692,7 +692,7 @@ small:
        MOVQ    (SI), SI
        JMP     si_finish
 si_high:
-       // address ends in 11111xxx.  Load up to bytes we want, move to correct position.
+       // address ends in 11111xxx. Load up to bytes we want, move to correct position.
        MOVQ    BX, DX
        ADDQ    SI, DX
        MOVQ    -8(DX), SI
index 2fdfbea0e14f8e617380457bbb7a6cd736a41f6c..46f8474f54609e9af7f4e1fbcc41897c058fbe38 100644 (file)
@@ -153,7 +153,7 @@ TEXT runtime·gogo(SB),NOSPLIT,$-4-4
 
 // func mcall(fn func(*g))
 // Switch to m->g0's stack, call fn(g).
-// Fn must never return.  It should gogo(&g->sched)
+// Fn must never return. It should gogo(&g->sched)
 // to keep running g.
 TEXT runtime·mcall(SB),NOSPLIT,$-4-4
        // Save caller state in g->sched.
@@ -185,7 +185,7 @@ TEXT runtime·mcall(SB),NOSPLIT,$-4-4
        RET
 
 // systemstack_switch is a dummy routine that systemstack leaves at the bottom
-// of the G stack.  We need to distinguish the routine that
+// of the G stack. We need to distinguish the routine that
 // lives at the bottom of the G stack from the one that lives
 // at the top of the system stack because the one at the top of
 // the system stack terminates the stack walk (see topofstack()).
@@ -217,7 +217,7 @@ TEXT runtime·systemstack(SB),NOSPLIT,$0-4
        BL      (R0)
 
 switch:
-       // save our state in g->sched.  Pretend to
+       // save our state in g->sched. Pretend to
        // be systemstack_switch if the G stack is scanned.
        MOVW    $runtime·systemstack_switch(SB), R3
 #ifdef GOOS_nacl
@@ -973,7 +973,7 @@ yieldloop:
 // Called from cgo wrappers, this function returns g->m->curg.stack.hi.
 // Must obey the gcc calling convention.
 TEXT _cgo_topofstack(SB),NOSPLIT,$8
-       // R11 and g register are clobbered by load_g.  They are
+       // R11 and g register are clobbered by load_g. They are
        // callee-save in the gcc calling convention, so save them here.
        MOVW    R11, saveR11-4(SP)
        MOVW    g, saveG-8(SP)
index 5a5c64c27042c171072e6ae502e1dc8d5cb82187..e06aa11a5dc6229381e67e5a1c20de3bf121ae06 100644 (file)
@@ -149,7 +149,7 @@ TEXT runtime·gogo(SB), NOSPLIT, $-8-8
 
 // void mcall(fn func(*g))
 // Switch to m->g0's stack, call fn(g).
-// Fn must never return.  It should gogo(&g->sched)
+// Fn must never return. It should gogo(&g->sched)
 // to keep running g.
 TEXT runtime·mcall(SB), NOSPLIT, $-8-8
        // Save caller state in g->sched
@@ -178,7 +178,7 @@ TEXT runtime·mcall(SB), NOSPLIT, $-8-8
        B       runtime·badmcall2(SB)
 
 // systemstack_switch is a dummy routine that systemstack leaves at the bottom
-// of the G stack.  We need to distinguish the routine that
+// of the G stack. We need to distinguish the routine that
 // lives at the bottom of the G stack from the one that lives
 // at the top of the system stack because the one at the top of
 // the system stack terminates the stack walk (see topofstack()).
@@ -211,7 +211,7 @@ TEXT runtime·systemstack(SB), NOSPLIT, $0-8
        BL      (R3)
 
 switch:
-       // save our state in g->sched.  Pretend to
+       // save our state in g->sched. Pretend to
        // be systemstack_switch if the G stack is scanned.
        MOVD    $runtime·systemstack_switch(SB), R6
        ADD     $8, R6  // get past prologue
@@ -542,7 +542,7 @@ g0:
        BL      (R1)
        MOVD    R0, R9
 
-       // Restore g, stack pointer.  R0 is errno, so don't touch it
+       // Restore g, stack pointer. R0 is errno, so don't touch it
        MOVD    0(RSP), g
        BL      runtime·save_g(SB)
        MOVD    (g_stack+stack_hi)(g), R5
index 80cea8587a20e713338c326cb2c1ec6617476336..1ffa3ae3484d8bf03752533b2dd134af2e20540f 100644 (file)
@@ -130,7 +130,7 @@ TEXT runtime·gogo(SB), NOSPLIT, $-8-8
 
 // void mcall(fn func(*g))
 // Switch to m->g0's stack, call fn(g).
-// Fn must never return.  It should gogo(&g->sched)
+// Fn must never return. It should gogo(&g->sched)
 // to keep running g.
 TEXT runtime·mcall(SB), NOSPLIT, $-8-8
        // Save caller state in g->sched
@@ -156,7 +156,7 @@ TEXT runtime·mcall(SB), NOSPLIT, $-8-8
        JMP     runtime·badmcall2(SB)
 
 // systemstack_switch is a dummy routine that systemstack leaves at the bottom
-// of the G stack.  We need to distinguish the routine that
+// of the G stack. We need to distinguish the routine that
 // lives at the bottom of the G stack from the one that lives
 // at the top of the system stack because the one at the top of
 // the system stack terminates the stack walk (see topofstack()).
@@ -186,7 +186,7 @@ TEXT runtime·systemstack(SB), NOSPLIT, $0-8
        JAL     (R4)
 
 switch:
-       // save our state in g->sched.  Pretend to
+       // save our state in g->sched. Pretend to
        // be systemstack_switch if the G stack is scanned.
        MOVV    $runtime·systemstack_switch(SB), R4
        ADDV    $8, R4  // get past prologue
index d6ae67fab92a05e70e18afe5ad3b8f203d3ecc56..5e55055fdbc61ac00ef4003aee25e45c5f0412f4 100644 (file)
@@ -14,7 +14,7 @@
 // +---------------------+ <- R1
 //
 // So a function that sets up a stack frame at all uses as least FIXED_FRAME
-// bytes of stack.  This mostly affects assembly that calls other functions
+// bytes of stack. This mostly affects assembly that calls other functions
 // with arguments (the arguments should be stored at FIXED_FRAME+0(R1),
 // FIXED_FRAME+8(R1) etc) and some other low-level places.
 //
index f067b4a9b9c59e61af91e5256e5fd4a0f148ac82..59bc8a22dded3ac631c632c4f2344c6db74f9532 100644 (file)
@@ -155,7 +155,7 @@ TEXT runtime·gogo(SB), NOSPLIT|NOFRAME, $0-8
 
 // void mcall(fn func(*g))
 // Switch to m->g0's stack, call fn(g).
-// Fn must never return.  It should gogo(&g->sched)
+// Fn must never return. It should gogo(&g->sched)
 // to keep running g.
 TEXT runtime·mcall(SB), NOSPLIT|NOFRAME, $0-8
        // Save caller state in g->sched
@@ -187,7 +187,7 @@ TEXT runtime·mcall(SB), NOSPLIT|NOFRAME, $0-8
        BR      runtime·badmcall2(SB)
 
 // systemstack_switch is a dummy routine that systemstack leaves at the bottom
-// of the G stack.  We need to distinguish the routine that
+// of the G stack. We need to distinguish the routine that
 // lives at the bottom of the G stack from the one that lives
 // at the top of the system stack because the one at the top of
 // the system stack terminates the stack walk (see topofstack()).
@@ -226,7 +226,7 @@ TEXT runtime·systemstack(SB), NOSPLIT, $0-8
        BL      (CTR)
 
 switch:
-       // save our state in g->sched.  Pretend to
+       // save our state in g->sched. Pretend to
        // be systemstack_switch if the G stack is scanned.
        MOVD    $runtime·systemstack_switch(SB), R6
        ADD     $16, R6 // get past prologue (including r2-setting instructions when they're there)
index eea0371c8753eb09ac4748ebbf3cd9efab344d67..47bd2b0edc315aad9f31c77ee42c4c9a030c4421 100644 (file)
@@ -22,7 +22,7 @@ func _runtime_cgocallback(unsafe.Pointer, unsafe.Pointer, uintptr)
 //go:cgo_export_static crosscall2
 //go:cgo_export_dynamic crosscall2
 
-// Panic.  The argument is converted into a Go string.
+// Panic. The argument is converted into a Go string.
 
 // Call like this in code compiled with gcc:
 //   struct { const char *p; } a;
@@ -69,7 +69,7 @@ var _cgo_thread_start = &x_cgo_thread_start
 // Creates a new system thread without updating any Go state.
 //
 // This method is invoked during shared library loading to create a new OS
-// thread to perform the runtime initialization.  This method is similar to
+// thread to perform the runtime initialization. This method is similar to
 // _cgo_sys_thread_start except that it doesn't update any Go state.
 
 //go:cgo_import_static x_cgo_sys_thread_create
@@ -82,7 +82,7 @@ var _cgo_sys_thread_create = &x_cgo_sys_thread_create
 //
 // We currently block at every CGO entry point (via _cgo_wait_runtime_init_done)
 // to ensure that the runtime has been initialized before the CGO call is
-// executed.  This is necessary for shared libraries where we kickoff runtime
+// executed. This is necessary for shared libraries where we kickoff runtime
 // initialization in a separate thread and return without waiting for this
 // thread to complete the init.
 
index 5f26136916cd450cc8dc48b01b0f914bc9e1d13f..85c53ca707625b4cd49ed8167980a1ee46379ef0 100644 (file)
@@ -69,11 +69,11 @@ threadentry(void *v)
        setg_gcc((void*)ts.g);
 
        // On DragonFly, a new thread inherits the signal stack of the
-       // creating thread.  That confuses minit, so we remove that
-       // signal stack here before calling the regular mstart.  It's
+       // creating thread. That confuses minit, so we remove that
+       // signal stack here before calling the regular mstart. It's
        // a bit baroque to remove a signal stack here only to add one
        // in minit, but it's a simple change that keeps DragonFly
-       // working like other OS's.  At this point all signals are
+       // working like other OS's. At this point all signals are
        // blocked, so there is no race.
        memset(&ss, 0, sizeof ss);
        ss.ss_flags = SS_DISABLE;
index 8c294aa6d708c811ca4af15191945e11f7aada19..73f32792c55b54f3cf3c5f88d897337cf8becd6b 100644 (file)
@@ -53,7 +53,7 @@ _cgo_sys_thread_start(ThreadStart *ts)
 
        // Not sure why the memset is necessary here,
        // but without it, we get a bogus stack size
-       // out of pthread_attr_getstacksize.  C'est la Linux.
+       // out of pthread_attr_getstacksize. C'est la Linux.
        memset(&attr, 0, sizeof attr);
        pthread_attr_init(&attr);
        size = 0;
index 380441c0d46064e71a48b45617c96c829f9a4911..15e0a8a30253a83fd11ec2e67471ca9f2543b433 100644 (file)
@@ -48,7 +48,7 @@ _cgo_sys_thread_start(ThreadStart *ts)
 
        // Not sure why the memset is necessary here,
        // but without it, we get a bogus stack size
-       // out of pthread_attr_getstacksize.  C'est la Linux.
+       // out of pthread_attr_getstacksize. C'est la Linux.
        memset(&attr, 0, sizeof attr);
        pthread_attr_init(&attr);
        size = 0;
index fdcc343d196a4777a928928b00f096bd093527d5..f5524219570b09adbb60777e18cb9d43c248a417 100644 (file)
@@ -28,7 +28,7 @@ _cgo_sys_thread_start(ThreadStart *ts)
 
        // Not sure why the memset is necessary here,
        // but without it, we get a bogus stack size
-       // out of pthread_attr_getstacksize.  C'est la Linux.
+       // out of pthread_attr_getstacksize. C'est la Linux.
        memset(&attr, 0, sizeof attr);
        pthread_attr_init(&attr);
        size = 0;
index a7b5ddf5b6c1ff1f331c3e062609b7482870b6f0..84bd7c0b499cc5bc1ef694712dbc752f5b681900 100644 (file)
@@ -28,7 +28,7 @@ _cgo_sys_thread_start(ThreadStart *ts)
 
        // Not sure why the memset is necessary here,
        // but without it, we get a bogus stack size
-       // out of pthread_attr_getstacksize.  C'est la Linux.
+       // out of pthread_attr_getstacksize. C'est la Linux.
        memset(&attr, 0, sizeof attr);
        pthread_attr_init(&attr);
        size = 0;
index ba4fa6e425c9124f51c37bc5a6348b8df97eb722..32f2e156789d2cc734ca9f5bab7fe30656550968 100644 (file)
@@ -68,11 +68,11 @@ threadentry(void *v)
        setg_gcc((void*)ts.g);
 
        // On NetBSD, a new thread inherits the signal stack of the
-       // creating thread.  That confuses minit, so we remove that
-       // signal stack here before calling the regular mstart.  It's
+       // creating thread. That confuses minit, so we remove that
+       // signal stack here before calling the regular mstart. It's
        // a bit baroque to remove a signal stack here only to add one
        // in minit, but it's a simple change that keeps NetBSD
-       // working like other OS's.  At this point all signals are
+       // working like other OS's. At this point all signals are
        // blocked, so there is no race.
        memset(&ss, 0, sizeof ss);
        ss.ss_flags = SS_DISABLE;
index 035c4ff48208f5093ae3293a3c36b6e94d179ace..aa357459c725c8063f966a0b6345002f5f90354b 100644 (file)
@@ -69,11 +69,11 @@ threadentry(void *v)
        setg_gcc((void*)ts.g);
 
        // On NetBSD, a new thread inherits the signal stack of the
-       // creating thread.  That confuses minit, so we remove that
-       // signal stack here before calling the regular mstart.  It's
+       // creating thread. That confuses minit, so we remove that
+       // signal stack here before calling the regular mstart. It's
        // a bit baroque to remove a signal stack here only to add one
        // in minit, but it's a simple change that keeps NetBSD
-       // working like other OS's.  At this point all signals are
+       // working like other OS's. At this point all signals are
        // blocked, so there is no race.
        memset(&ss, 0, sizeof ss);
        ss.ss_flags = SS_DISABLE;
index 5b8553e830759f8a56015a951c51e04ecdd22dfa..9589780ac84041e66efcb84a980d59cdecd97855 100644 (file)
@@ -65,11 +65,11 @@ threadentry(void *v)
        free(v);
 
        // On NetBSD, a new thread inherits the signal stack of the
-       // creating thread.  That confuses minit, so we remove that
-       // signal stack here before calling the regular mstart.  It's
+       // creating thread. That confuses minit, so we remove that
+       // signal stack here before calling the regular mstart. It's
        // a bit baroque to remove a signal stack here only to add one
        // in minit, but it's a simple change that keeps NetBSD
-       // working like other OS's.  At this point all signals are
+       // working like other OS's. At this point all signals are
        // blocked, so there is no race.
        memset(&ss, 0, sizeof ss);
        ss.ss_flags = SS_DISABLE;
index 760413217089e3edcdf94668751deef669bf75ea..e12d0f4b9572825f2470f2def1888ea517eb791c 100644 (file)
@@ -3,10 +3,10 @@
 // license that can be found in the LICENSE file.
 
 // The runtime package contains an uninitialized definition
-// for runtime·iscgo.  Override it to tell the runtime we're here.
+// for runtime·iscgo. Override it to tell the runtime we're here.
 // There are various function pointers that should be set too,
 // but those depend on dynamic linker magic to get initialized
-// correctly, and sometimes they break.  This variable is a
+// correctly, and sometimes they break. This variable is a
 // backup: it depends only on old C style static linking rules.
 
 package cgo
index 6a4dc1562dee82997d18e472862f508a785640ea..ff983599be0d33ce958d92c3c29f9fdbd8b777d0 100644 (file)
@@ -10,8 +10,8 @@ package cgo
 import _ "unsafe"
 
 // When using cgo, call the C library for mmap, so that we call into
-// any sanitizer interceptors.  This supports using the memory
-// sanitizer with Go programs.  The memory sanitizer only applies to
+// any sanitizer interceptors. This supports using the memory
+// sanitizer with Go programs. The memory sanitizer only applies to
 // C/C++ code; this permits that code to see the Go code as normal
 // program addresses that have been initialized.
 
index dca1e22ad34f300200d12ecedfa3e7f3f4a73bdb..a23cc79b7e350e36f5ac99765435f54643b9b02b 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.
 
-// Support for memory sanitizer.  See runtime/cgo/mmap.go.
+// Support for memory sanitizer. See runtime/cgo/mmap.go.
 
 // +build linux,amd64
 
@@ -32,10 +32,10 @@ func mmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uint32) uns
        return sysMmap(addr, n, prot, flags, fd, off)
 }
 
-// sysMmap calls the mmap system call.  It is implemented in assembly.
+// sysMmap calls the mmap system call. It is implemented in assembly.
 func sysMmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uint32) unsafe.Pointer
 
 // cgoMmap calls the mmap function in the runtime/cgo package on the
 // callCgoMmap calls the mmap function in the runtime/cgo package
-// using the GCC calling convention.  It is implemented in assembly.
+// using the GCC calling convention. It is implemented in assembly.
 func callCgoMmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uint32) uintptr
index 5c9a73734c15b30253dc6d6a9e4c994ad74f5f3c..9514c0ba9ab88ecbe61f7481ce0512117de59cdb 100644 (file)
@@ -28,7 +28,7 @@
 // and then unlocks g from m.
 //
 // The above description skipped over the possibility of the gcc-compiled
-// function f calling back into Go.  If that happens, we continue down
+// function f calling back into Go. If that happens, we continue down
 // the rabbit hole during the execution of f.
 //
 // To make it possible for gcc-compiled C code to call a Go function p.GoF,
@@ -38,9 +38,9 @@
 // GoF calls crosscall2(_cgoexp_GoF, frame, framesize).  Crosscall2
 // (in cgo/gcc_$GOARCH.S, a gcc-compiled assembly file) is a two-argument
 // adapter from the gcc function call ABI to the 6c function call ABI.
-// It is called from gcc to call 6c functions.  In this case it calls
+// It is called from gcc to call 6c functions. In this case it calls
 // _cgoexp_GoF(frame, framesize), still running on m->g0's stack
-// and outside the $GOMAXPROCS limit.  Thus, this code cannot yet
+// and outside the $GOMAXPROCS limit. Thus, this code cannot yet
 // call arbitrary Go code directly and must be careful not to allocate
 // memory or use up m->g0's stack.
 //
@@ -317,8 +317,8 @@ var racecgosync uint64 // represents possible synchronization in C code
 
 // We want to detect all cases where a program that does not use
 // unsafe makes a cgo call passing a Go pointer to memory that
-// contains a Go pointer.  Here a Go pointer is defined as a pointer
-// to memory allocated by the Go runtime.  Programs that use unsafe
+// contains a Go pointer. Here a Go pointer is defined as a pointer
+// to memory allocated by the Go runtime. Programs that use unsafe
 // can evade this restriction easily, so we don't try to catch them.
 // The cgo program will rewrite all possibly bad pointer arguments to
 // call cgoCheckPointer, where we can catch cases of a Go pointer
@@ -326,14 +326,14 @@ var racecgosync uint64 // represents possible synchronization in C code
 
 // Complicating matters, taking the address of a slice or array
 // element permits the C program to access all elements of the slice
-// or array.  In that case we will see a pointer to a single element,
+// or array. In that case we will see a pointer to a single element,
 // but we need to check the entire data structure.
 
 // The cgoCheckPointer call takes additional arguments indicating that
-// it was called on an address expression.  An additional argument of
-// true means that it only needs to check a single element.  An
+// it was called on an address expression. An additional argument of
+// true means that it only needs to check a single element. An
 // additional argument of a slice or array means that it needs to
-// check the entire slice/array, but nothing else.  Otherwise, the
+// check the entire slice/array, but nothing else. Otherwise, the
 // pointer could be anything, and we check the entire heap object,
 // which is conservative but safe.
 
@@ -344,7 +344,7 @@ var racecgosync uint64 // represents possible synchronization in C code
 // pointers.)
 
 // cgoCheckPointer checks if the argument contains a Go pointer that
-// points to a Go pointer, and panics if it does.  It returns the pointer.
+// points to a Go pointer, and panics if it does. It returns the pointer.
 func cgoCheckPointer(ptr interface{}, args ...interface{}) interface{} {
        if debug.cgocheck == 0 {
                return ptr
@@ -395,9 +395,9 @@ func cgoCheckPointer(ptr interface{}, args ...interface{}) interface{} {
 const cgoCheckPointerFail = "cgo argument has Go pointer to Go pointer"
 const cgoResultFail = "cgo result has Go pointer"
 
-// cgoCheckArg is the real work of cgoCheckPointer.  The argument p
+// cgoCheckArg is the real work of cgoCheckPointer. The argument p
 // is either a pointer to the value (of type t), or the value itself,
-// depending on indir.  The top parameter is whether we are at the top
+// depending on indir. The top parameter is whether we are at the top
 // level, where Go pointers are allowed.
 func cgoCheckArg(t *_type, p unsafe.Pointer, indir, top bool, msg string) {
        if t.kind&kindNoPointers != 0 {
@@ -423,7 +423,7 @@ func cgoCheckArg(t *_type, p unsafe.Pointer, indir, top bool, msg string) {
                }
        case kindChan, kindMap:
                // These types contain internal pointers that will
-               // always be allocated in the Go heap.  It's never OK
+               // always be allocated in the Go heap. It's never OK
                // to pass them to C.
                panic(errorString(msg))
        case kindFunc:
@@ -440,7 +440,7 @@ func cgoCheckArg(t *_type, p unsafe.Pointer, indir, top bool, msg string) {
                        return
                }
                // A type known at compile time is OK since it's
-               // constant.  A type not known at compile time will be
+               // constant. A type not known at compile time will be
                // in the heap and will not be OK.
                if inheap(uintptr(unsafe.Pointer(it))) {
                        panic(errorString(msg))
@@ -507,8 +507,8 @@ func cgoCheckArg(t *_type, p unsafe.Pointer, indir, top bool, msg string) {
 }
 
 // cgoCheckUnknownPointer is called for an arbitrary pointer into Go
-// memory.  It checks whether that Go memory contains any other
-// pointer into Go memory.  If it does, we panic.
+// memory. It checks whether that Go memory contains any other
+// pointer into Go memory. If it does, we panic.
 // The return values are unused but useful to see in panic tracebacks.
 func cgoCheckUnknownPointer(p unsafe.Pointer, msg string) (base, i uintptr) {
        if cgoInRange(p, mheap_.arena_start, mheap_.arena_used) {
@@ -559,7 +559,7 @@ func cgoCheckUnknownPointer(p unsafe.Pointer, msg string) (base, i uintptr) {
 }
 
 // cgoIsGoPointer returns whether the pointer is a Go pointer--a
-// pointer to Go memory.  We only care about Go memory that might
+// pointer to Go memory. We only care about Go memory that might
 // contain pointers.
 //go:nosplit
 //go:nowritebarrierrec
@@ -589,7 +589,7 @@ func cgoInRange(p unsafe.Pointer, start, end uintptr) bool {
 }
 
 // cgoCheckResult is called to check the result parameter of an
-// exported Go function.  It panics if the result is or contains a Go
+// exported Go function. It panics if the result is or contains a Go
 // pointer.
 func cgoCheckResult(val interface{}) {
        if debug.cgocheck == 0 {
index 0d46dde59d33507d1ba4c6f5a273a0aecdac0adb..d85d5fe5a8ba15fd1276f28a4fc2b71b98058f21 100644 (file)
@@ -89,7 +89,7 @@ func cgoCheckSliceCopy(typ *_type, dst, src slice, n int) {
 }
 
 // cgoCheckTypedBlock checks the block of memory at src, for up to size bytes,
-// and throws if it finds a Go pointer.  The type of the memory is typ,
+// and throws if it finds a Go pointer. The type of the memory is typ,
 // and src is off bytes into that type.
 //go:nosplit
 //go:nowritebarrier
@@ -99,7 +99,7 @@ func cgoCheckTypedBlock(typ *_type, src unsafe.Pointer, off, size uintptr) {
                return
        }
 
-       // The type has a GC program.  Try to find GC bits somewhere else.
+       // The type has a GC program. Try to find GC bits somewhere else.
        for datap := &firstmoduledata; datap != nil; datap = datap.next {
                if cgoInRange(src, datap.data, datap.edata) {
                        doff := uintptr(src) - datap.data
@@ -148,8 +148,8 @@ func cgoCheckTypedBlock(typ *_type, src unsafe.Pointer, off, size uintptr) {
 }
 
 // cgoCheckBits checks the block of memory at src, for up to size
-// bytes, and throws if it finds a Go pointer.  The gcbits mark each
-// pointer value.  The src pointer is off bytes into the gcbits.
+// bytes, and throws if it finds a Go pointer. The gcbits mark each
+// pointer value. The src pointer is off bytes into the gcbits.
 //go:nosplit
 //go:nowritebarrier
 func cgoCheckBits(src unsafe.Pointer, gcbits *byte, off, size uintptr) {
@@ -186,7 +186,7 @@ func cgoCheckBits(src unsafe.Pointer, gcbits *byte, off, size uintptr) {
 // fall back to look for pointers in src using the type information.
 // We only this when looking at a value on the stack when the type
 // uses a GC program, because otherwise it's more efficient to use the
-// GC bits.  This is called on the system stack.
+// GC bits. This is called on the system stack.
 //go:nowritebarrier
 //go:systemstack
 func cgoCheckUsingType(typ *_type, src unsafe.Pointer, off, size uintptr) {
index f6f3ce4d90ec275f1deaf0fc3176048df4d2d3fd..2fc08396004ede117e72992f954f2a28ecf4bdc4 100644 (file)
@@ -175,7 +175,7 @@ func chansend(t *chantype, c *hchan, ep unsafe.Pointer, block bool, callerpc uin
        }
 
        if c.qcount < c.dataqsiz {
-               // Space is available in the channel buffer.  Enqueue the element to send.
+               // Space is available in the channel buffer. Enqueue the element to send.
                qp := chanbuf(c, c.sendx)
                if raceenabled {
                        raceacquire(qp)
@@ -196,7 +196,7 @@ func chansend(t *chantype, c *hchan, ep unsafe.Pointer, block bool, callerpc uin
                return false
        }
 
-       // Block on the channel.  Some receiver will complete our operation for us.
+       // Block on the channel. Some receiver will complete our operation for us.
        gp := getg()
        mysg := acquireSudog()
        mysg.releasetime = 0
@@ -245,7 +245,7 @@ func send(c *hchan, sg *sudog, ep unsafe.Pointer, unlockf func()) {
                        racesync(c, sg)
                } else {
                        // Pretend we go through the buffer, even though
-                       // we copy directly.  Note that we need to increment
+                       // we copy directly. Note that we need to increment
                        // the head/tail locations only when raceenabled.
                        qp := chanbuf(c, c.recvx)
                        raceacquire(qp)
@@ -422,8 +422,8 @@ func chanrecv(t *chantype, c *hchan, ep unsafe.Pointer, block bool) (selected, r
        }
 
        if sg := c.sendq.dequeue(); sg != nil {
-               // Found a waiting sender.  If buffer is size 0, receive value
-               // directly from sender.  Otherwise, receive from head of queue
+               // Found a waiting sender. If buffer is size 0, receive value
+               // directly from sender. Otherwise, receive from head of queue
                // and add sender's value to the tail of the queue (both map to
                // the same buffer slot because the queue is full).
                recv(c, sg, ep, func() { unlock(&c.lock) })
@@ -513,9 +513,9 @@ func recv(c *hchan, sg *sudog, ep unsafe.Pointer, unlockf func()) {
                        typedmemmove(c.elemtype, ep, sg.elem)
                }
        } else {
-               // Queue is full.  Take the item at the
-               // head of the queue.  Make the sender enqueue
-               // its item at the tail of the queue.  Since the
+               // Queue is full. Take the item at the
+               // head of the queue. Make the sender enqueue
+               // its item at the tail of the queue. Since the
                // queue is full, those are both the same slot.
                qp := chanbuf(c, c.recvx)
                if raceenabled {
index 47e80b15ff0141aafb4791169dba307329a92d7b..1ebc62dea1919a61fa4ceb6256329d4503493bb2 100644 (file)
@@ -5,7 +5,7 @@
 package runtime
 
 // Compiler is the name of the compiler toolchain that built the
-// running binary.  Known toolchains are:
+// running binary. Known toolchains are:
 //
 //     gc      Also known as cmd/compile.
 //     gccgo   The gccgo front end, part of the GCC compiler suite.
index 63341040037ced3910172fdb48a5141305f52c91..4b9dfafb909e06c229da5bad419514c70455e5ff 100644 (file)
 // writes to an operating system file.
 //
 // The signal handler for the profiling clock tick adds a new stack trace
-// to a hash table tracking counts for recent traces.  Most clock ticks
-// hit in the cache.  In the event of a cache miss, an entry must be
+// to a hash table tracking counts for recent traces. Most clock ticks
+// hit in the cache. In the event of a cache miss, an entry must be
 // evicted from the hash table, copied to a log that will eventually be
-// written as profile data.  The google-perftools code flushed the
-// log itself during the signal handler.  This code cannot do that, because
+// written as profile data. The google-perftools code flushed the
+// log itself during the signal handler. This code cannot do that, because
 // the io.Writer might block or need system calls or locks that are not
-// safe to use from within the signal handler.  Instead, we split the log
+// safe to use from within the signal handler. Instead, we split the log
 // into two halves and let the signal handler fill one half while a goroutine
-// is writing out the other half.  When the signal handler fills its half, it
-// offers to swap with the goroutine.  If the writer is not done with its half,
+// is writing out the other half. When the signal handler fills its half, it
+// offers to swap with the goroutine. If the writer is not done with its half,
 // we lose the stack trace for this clock tick (and record that loss).
 // The goroutine interacts with the signal handler by calling getprofile() to
 // get the next log piece to write, implicitly handing back the last log
 // piece it obtained.
 //
 // The state of this dance between the signal handler and the goroutine
-// is encoded in the Profile.handoff field.  If handoff == 0, then the goroutine
+// is encoded in the Profile.handoff field. If handoff == 0, then the goroutine
 // is not using either log half and is waiting (or will soon be waiting) for
 // a new piece by calling notesleep(&p.wait).  If the signal handler
 // changes handoff from 0 to non-zero, it must call notewakeup(&p.wait)
-// to wake the goroutine.  The value indicates the number of entries in the
-// log half being handed off.  The goroutine leaves the non-zero value in
+// to wake the goroutine. The value indicates the number of entries in the
+// log half being handed off. The goroutine leaves the non-zero value in
 // place until it has finished processing the log half and then flips the number
-// back to zero.  Setting the high bit in handoff means that the profiling is over,
+// back to zero. Setting the high bit in handoff means that the profiling is over,
 // and the goroutine is now in charge of flushing the data left in the hash table
 // to the log and returning that data.
 //
@@ -44,7 +44,7 @@
 // then the signal handler owns it and can change it to non-zero.
 // If handoff != 0 then the goroutine owns it and can change it to zero.
 // If that were the end of the story then we would not need to manipulate
-// handoff using atomic operations.  The operations are needed, however,
+// handoff using atomic operations. The operations are needed, however,
 // in order to let the log closer set the high bit to indicate "EOF" safely
 // in the situation when normally the goroutine "owns" handoff.
 
@@ -192,7 +192,7 @@ func SetCPUProfileRate(hz int) {
 // It is called from signal handlers and other limited environments
 // and cannot allocate memory or acquire locks that might be
 // held at the time of the signal, nor can it use substantial amounts
-// of stack.  It is allowed to call evict.
+// of stack. It is allowed to call evict.
 func (p *cpuProfile) add(pc []uintptr) {
        if len(pc) > maxCPUProfStack {
                pc = pc[:maxCPUProfStack]
@@ -232,7 +232,7 @@ Assoc:
        }
        if e.count > 0 {
                if !p.evict(e) {
-                       // Could not evict entry.  Record lost stack.
+                       // Could not evict entry. Record lost stack.
                        p.lost++
                        return
                }
@@ -248,7 +248,7 @@ Assoc:
 // evict copies the given entry's data into the log, so that
 // the entry can be reused.  evict is called from add, which
 // is called from the profiling signal handler, so it must not
-// allocate memory or block.  It is safe to call flushlog.
+// allocate memory or block. It is safe to call flushlog.
 // evict returns true if the entry was copied to the log,
 // false if there was no room available.
 func (p *cpuProfile) evict(e *cpuprofEntry) bool {
@@ -276,7 +276,7 @@ func (p *cpuProfile) evict(e *cpuprofEntry) bool {
 
 // flushlog tries to flush the current log and switch to the other one.
 // flushlog is called from evict, called from add, called from the signal handler,
-// so it cannot allocate memory or block.  It can try to swap logs with
+// so it cannot allocate memory or block. It can try to swap logs with
 // the writing goroutine, as explained in the comment at the top of this file.
 func (p *cpuProfile) flushlog() bool {
        if !atomic.Cas(&p.handoff, 0, uint32(p.nlog)) {
@@ -300,7 +300,7 @@ func (p *cpuProfile) flushlog() bool {
 }
 
 // getprofile blocks until the next block of profiling data is available
-// and returns it as a []byte.  It is called from the writing goroutine.
+// and returns it as a []byte. It is called from the writing goroutine.
 func (p *cpuProfile) getprofile() []byte {
        if p == nil {
                return nil
@@ -358,7 +358,7 @@ func (p *cpuProfile) getprofile() []byte {
        }
 
        // In flush mode.
-       // Add is no longer being called.  We own the log.
+       // Add is no longer being called. We own the log.
        // Also, p.handoff is non-zero, so flushlog will return false.
        // Evict the hash table into the log and return it.
 Flush:
@@ -367,7 +367,7 @@ Flush:
                for j := range b.entry {
                        e := &b.entry[j]
                        if e.count > 0 && !p.evict(e) {
-                               // Filled the log.  Stop the loop and return what we've got.
+                               // Filled the log. Stop the loop and return what we've got.
                                break Flush
                        }
                }
@@ -390,7 +390,7 @@ Flush:
                return uintptrBytes(eod[:])
        }
 
-       // Finally done.  Clean up and return nil.
+       // Finally done. Clean up and return nil.
        p.flushing = false
        if !atomic.Cas(&p.handoff, p.handoff, 0) {
                print("runtime: profile flush racing with something\n")
@@ -410,7 +410,7 @@ func uintptrBytes(p []uintptr) (ret []byte) {
 }
 
 // CPUProfile returns the next chunk of binary CPU profiling stack trace data,
-// blocking until data is available.  If profiling is turned off and all the profile
+// blocking until data is available. If profiling is turned off and all the profile
 // data accumulated while it was on has been returned, CPUProfile returns nil.
 // The caller must save the returned data before calling CPUProfile again.
 //
index 3c036df2bd2935517d710604a45e4d65b25eb6ba..91627460c3c05d920cab0e354775ba62a906d75a 100644 (file)
@@ -10,5 +10,5 @@
 package runtime
 
 // careful: cputicks is not guaranteed to be monotonic!  In particular, we have
-// noticed drift between cpus on certain os/arch combinations.  See issue 8976.
+// noticed drift between cpus on certain os/arch combinations. See issue 8976.
 func cputicks() int64
index de45e832f80b052c3511a8edc8fb775212b96875..85fcc69fedca65bbc6677ed311276a2939f7afca 100644 (file)
@@ -294,9 +294,9 @@ func TestRecoverBeforePanicAfterGoexit(t *testing.T) {
        // 1. defer a function that recovers
        // 2. defer a function that panics
        // 3. call goexit
-       // Goexit should run the #2 defer.  Its panic
+       // Goexit should run the #2 defer. Its panic
        // should be caught by the #1 defer, and execution
-       // should resume in the caller.  Like the Goexit
+       // should resume in the caller. Like the Goexit
        // never happened!
        defer func() {
                r := recover()
index 0f5936566e727cbdd349cf530d86a16b1776ea18..0e798fc6f5a0c7e15e7b1b24fb0ab8c5f1fd029c 100644 (file)
@@ -10,7 +10,7 @@ import (
 )
 
 // GOMAXPROCS sets the maximum number of CPUs that can be executing
-// simultaneously and returns the previous setting.  If n < 1, it does not
+// simultaneously and returns the previous setting. If n < 1, it does not
 // change the current setting.
 // The number of logical CPUs on the local machine can be queried with NumCPU.
 // This call will go away when the scheduler improves.
index 980df9ec31a3df8c7ac0dd1501ab8ba02d364e5c..9dea6a1f3ab4149729568acba03a459d89135df0 100644 (file)
@@ -32,7 +32,7 @@ package runtime
 #include <linux/eventpoll.h>
 
 // This is the sigaction structure from the Linux 2.1.68 kernel which
-//   is used with the rt_sigaction system call.  For 386 this is not
+//   is used with the rt_sigaction system call. For 386 this is not
 //   defined in any public header file.
 
 struct kernel_sigaction {
index 9c1f9f5a03ecc2dcda17a115acd79356007cbcda..984b0ca81712ec6d503b37ae7a71a0f7fcb52805 100644 (file)
@@ -147,11 +147,11 @@ package runtime
 import "runtime/internal/sys"
 
 // Caller reports file and line number information about function invocations on
-// the calling goroutine's stack.  The argument skip is the number of stack frames
+// the calling goroutine's stack. The argument skip is the number of stack frames
 // to ascend, with 0 identifying the caller of Caller.  (For historical reasons the
 // meaning of skip differs between Caller and Callers.) The return values report the
 // program counter, file name, and line number within the file of the corresponding
-// call.  The boolean ok is false if it was not possible to recover the information.
+// call. The boolean ok is false if it was not possible to recover the information.
 func Caller(skip int) (pc uintptr, file string, line int, ok bool) {
        // Ask for two PCs: the one we were asked for
        // and what it called, so that we can see if it
@@ -184,7 +184,7 @@ func Caller(skip int) (pc uintptr, file string, line int, ok bool) {
 }
 
 // Callers fills the slice pc with the return program counters of function invocations
-// on the calling goroutine's stack.  The argument skip is the number of stack frames
+// on the calling goroutine's stack. The argument skip is the number of stack frames
 // to skip before recording in pc, with 0 identifying the frame for Callers itself and
 // 1 identifying the caller of Callers.
 // It returns the number of entries written to pc.
@@ -196,7 +196,7 @@ func Caller(skip int) (pc uintptr, file string, line int, ok bool) {
 // To easily look up file/line information for the call sequence, use Frames.
 func Callers(skip int, pc []uintptr) int {
        // runtime.callers uses pc.array==nil as a signal
-       // to print a stack trace.  Pick off 0-length pc here
+       // to print a stack trace. Pick off 0-length pc here
        // so that we don't let a nil pc slice get to it.
        if len(pc) == 0 {
                return 0
index a787d8d367c65dd3c116259010e26662ce6274a1..7cceab86cc9610a20008ff8526f3163f3570cdc1 100644 (file)
@@ -17,7 +17,7 @@ import (
 // https://code.google.com/p/smhasher/
 // This code is a port of some of the Smhasher tests to Go.
 //
-// The current AES hash function passes Smhasher.  Our fallback
+// The current AES hash function passes Smhasher. Our fallback
 // hash functions don't, so we only enable the difficult tests when
 // we know the AES implementation is available.
 
@@ -349,7 +349,7 @@ func (k *EfaceKey) random(r *rand.Rand) {
        k.i = uint64(r.Int63())
 }
 func (k *EfaceKey) bits() int {
-       // use 64 bits.  This tests inlined interfaces
+       // use 64 bits. This tests inlined interfaces
        // on 64-bit targets and indirect interfaces on
        // 32-bit targets.
        return 64
@@ -381,7 +381,7 @@ func (k *IfaceKey) random(r *rand.Rand) {
        k.i = fInter(r.Int63())
 }
 func (k *IfaceKey) bits() int {
-       // use 64 bits.  This tests inlined interfaces
+       // use 64 bits. This tests inlined interfaces
        // on 64-bit targets and indirect interfaces on
        // 32-bit targets.
        return 64
@@ -443,7 +443,7 @@ func avalancheTest1(t *testing.T, k Key) {
 
        // Each entry in the grid should be about REP/2.
        // More precisely, we did N = k.bits() * hashSize experiments where
-       // each is the sum of REP coin flips.  We want to find bounds on the
+       // each is the sum of REP coin flips. We want to find bounds on the
        // sum of coin flips such that a truly random experiment would have
        // all sums inside those bounds with 99% probability.
        N := n * hashSize
@@ -563,19 +563,19 @@ func BenchmarkHash1024(b *testing.B)  { benchmarkHash(b, 1024) }
 func BenchmarkHash65536(b *testing.B) { benchmarkHash(b, 65536) }
 
 func TestArrayHash(t *testing.T) {
-       // Make sure that "" in arrays hash correctly.  The hash
+       // Make sure that "" in arrays hash correctly. The hash
        // should at least scramble the input seed so that, e.g.,
        // {"","foo"} and {"foo",""} have different hashes.
 
        // If the hash is bad, then all (8 choose 4) = 70 keys
        // have the same hash. If so, we allocate 70/8 = 8
-       // overflow buckets.  If the hash is good we don't
+       // overflow buckets. If the hash is good we don't
        // normally allocate any overflow buckets, and the
        // probability of even one or two overflows goes down rapidly.
-       // (There is always 1 allocation of the bucket array.  The map
+       // (There is always 1 allocation of the bucket array. The map
        // header is allocated on the stack.)
        f := func() {
-               // Make the key type at most 128 bytes.  Otherwise,
+               // Make the key type at most 128 bytes. Otherwise,
                // we get an allocation per key.
                type key [8]string
                m := make(map[key]bool, 70)
index 892a79a914364143124475e63001517f64928158..6f7451e02ccd0d0e0f0b0e2cb17981a1e8510aa2 100644 (file)
@@ -6,10 +6,10 @@ package runtime
 
 // This file contains the implementation of Go's map type.
 //
-// A map is just a hash table.  The data is arranged
-// into an array of buckets.  Each bucket contains up to
-// 8 key/value pairs.  The low-order bits of the hash are
-// used to select a bucket.  Each bucket contains a few
+// A map is just a hash table. The data is arranged
+// into an array of buckets. Each bucket contains up to
+// 8 key/value pairs. The low-order bits of the hash are
+// used to select a bucket. Each bucket contains a few
 // high-order bits of each hash to distinguish the entries
 // within a single bucket.
 //
@@ -17,7 +17,7 @@ package runtime
 // extra buckets.
 //
 // When the hashtable grows, we allocate a new array
-// of buckets twice as big.  Buckets are incrementally
+// of buckets twice as big. Buckets are incrementally
 // copied from the old bucket array to the new bucket array.
 //
 // Map iterators walk through the array of buckets and
@@ -31,7 +31,7 @@ package runtime
 // to the new table.
 
 // Picking loadFactor: too large and we have lots of overflow
-// buckets, too small and we waste a lot of space.  I wrote
+// buckets, too small and we waste a lot of space. I wrote
 // a simple program to check some stats for different loads:
 // (64-bit, 8 byte keys and values)
 //  loadFactor    %overflow  bytes/entry     hitprobe    missprobe
@@ -51,7 +51,7 @@ package runtime
 // missprobe   = # of entries to check when looking up an absent key
 //
 // Keep in mind this data is for maximally loaded tables, i.e. just
-// before the table grows.  Typical tables will be somewhat less loaded.
+// before the table grows. Typical tables will be somewhat less loaded.
 
 import (
        "runtime/internal/atomic"
@@ -75,14 +75,14 @@ const (
        maxValueSize = 128
 
        // data offset should be the size of the bmap struct, but needs to be
-       // aligned correctly.  For amd64p32 this means 64-bit alignment
+       // aligned correctly. For amd64p32 this means 64-bit alignment
        // even though pointers are 32 bit.
        dataOffset = unsafe.Offsetof(struct {
                b bmap
                v int64
        }{}.v)
 
-       // Possible tophash values.  We reserve a few possibilities for special marks.
+       // Possible tophash values. We reserve a few possibilities for special marks.
        // Each bucket (including its overflow buckets, if any) will have either all or none of its
        // entries in the evacuated* states (except during the evacuate() method, which only happens
        // during map writes and thus no one else can observe the map during that time).
@@ -104,7 +104,7 @@ const (
 // A header for a Go map.
 type hmap struct {
        // Note: the format of the Hmap is encoded in ../../cmd/internal/gc/reflect.go and
-       // ../reflect/type.go.  Don't change this structure without also changing that code!
+       // ../reflect/type.go. Don't change this structure without also changing that code!
        count int // # live cells == size of map.  Must be first (used by len() builtin)
        flags uint8
        B     uint8  // log_2 of # of buckets (can hold up to loadFactor * 2^B items)
@@ -212,7 +212,7 @@ func makemap(t *maptype, hint int64, h *hmap, bucket unsafe.Pointer) *hmap {
                throw("value size wrong")
        }
 
-       // invariants we depend on.  We should probably check these at compile time
+       // invariants we depend on. We should probably check these at compile time
        // somewhere, but for now we'll do it here.
        if t.key.align > bucketCnt {
                throw("key align too big")
@@ -380,7 +380,7 @@ func mapaccess2(t *maptype, h *hmap, key unsafe.Pointer) (unsafe.Pointer, bool)
        }
 }
 
-// returns both key and value.  Used by map iterator
+// returns both key and value. Used by map iterator
 func mapaccessK(t *maptype, h *hmap, key unsafe.Pointer) (unsafe.Pointer, unsafe.Pointer) {
        if h == nil || h.count == 0 {
                return nil, nil
@@ -485,7 +485,7 @@ again:
                        if !alg.equal(key, k2) {
                                continue
                        }
-                       // already have a mapping for key.  Update it.
+                       // already have a mapping for key. Update it.
                        if t.needkeyupdate {
                                typedmemmove(t.key, k2, key)
                        }
@@ -504,7 +504,7 @@ again:
                b = ovf
        }
 
-       // did not find mapping for key.  Allocate new cell & add entry.
+       // did not find mapping for key. Allocate new cell & add entry.
        if float32(h.count) >= loadFactor*float32((uintptr(1)<<h.B)) && h.count >= bucketCnt {
                hashGrow(t, h)
                goto again // Growing the table invalidates everything, so try again
@@ -718,9 +718,9 @@ next:
                if b.tophash[offi] != empty && b.tophash[offi] != evacuatedEmpty {
                        if checkBucket != noCheck {
                                // Special case: iterator was started during a grow and the
-                               // grow is not done yet.  We're working on a bucket whose
-                               // oldbucket has not been evacuated yet.  Or at least, it wasn't
-                               // evacuated when we started the bucket.  So we're iterating
+                               // grow is not done yet. We're working on a bucket whose
+                               // oldbucket has not been evacuated yet. Or at least, it wasn't
+                               // evacuated when we started the bucket. So we're iterating
                                // through the oldbucket, skipping any keys that will go
                                // to the other new bucket (each oldbucket expands to two
                                // buckets during a grow).
@@ -738,7 +738,7 @@ next:
                                } else {
                                        // Hash isn't repeatable if k != k (NaNs).  We need a
                                        // repeatable and randomish choice of which direction
-                                       // to send NaNs during evacuation.  We'll use the low
+                                       // to send NaNs during evacuation. We'll use the low
                                        // bit of tophash to decide which way NaNs go.
                                        // NOTE: this case is why we need two evacuate tophash
                                        // values, evacuatedX and evacuatedY, that differ in
@@ -779,7 +779,7 @@ next:
                                        it.value = rv
                                } else {
                                        // if key!=key then the entry can't be deleted or
-                                       // updated, so we can just return it.  That's lucky for
+                                       // updated, so we can just return it. That's lucky for
                                        // us because when key!=key we can't look it up
                                        // successfully in the current table.
                                        it.key = k2
@@ -882,12 +882,12 @@ func evacuate(t *maptype, h *hmap, oldbucket uintptr) {
                                if h.flags&iterator != 0 {
                                        if !t.reflexivekey && !alg.equal(k2, k2) {
                                                // If key != key (NaNs), then the hash could be (and probably
-                                               // will be) entirely different from the old hash.  Moreover,
-                                               // it isn't reproducible.  Reproducibility is required in the
+                                               // will be) entirely different from the old hash. Moreover,
+                                               // it isn't reproducible. Reproducibility is required in the
                                                // presence of iterators, as our evacuation decision must
                                                // match whatever decision the iterator made.
                                                // Fortunately, we have the freedom to send these keys either
-                                               // way.  Also, tophash is meaningless for these kinds of keys.
+                                               // way. Also, tophash is meaningless for these kinds of keys.
                                                // We let the low bit of tophash drive the evacuation decision.
                                                // We recompute a new random tophash for the next level so
                                                // these keys will get evenly distributed across all buckets
@@ -965,7 +965,7 @@ func evacuate(t *maptype, h *hmap, oldbucket uintptr) {
        if oldbucket == h.nevacuate {
                h.nevacuate = oldbucket + 1
                if oldbucket+1 == newbit { // newbit == # of oldbuckets
-                       // Growing is all done.  Free old main bucket array.
+                       // Growing is all done. Free old main bucket array.
                        h.oldbuckets = nil
                        // Can discard old overflow buckets as well.
                        // If they are still referenced by an iterator,
@@ -981,7 +981,7 @@ func ismapkey(t *_type) bool {
        return t.alg.hash != nil
 }
 
-// Reflect stubs.  Called from ../reflect/asm_*.s
+// Reflect stubs. Called from ../reflect/asm_*.s
 
 //go:linkname reflect_makemap reflect.makemap
 func reflect_makemap(t *maptype) *hmap {
index f95ea3e1b70cde9c23749e9fc09669c71028ec7a..6a5484edeecde4a9f54b38ea5e1241f76e7ec3db 100644 (file)
@@ -23,7 +23,7 @@ func mapaccess1_fast32(t *maptype, h *hmap, key uint32) unsafe.Pointer {
        }
        var b *bmap
        if h.B == 0 {
-               // One-bucket table.  No need to hash.
+               // One-bucket table. No need to hash.
                b = (*bmap)(h.buckets)
        } else {
                hash := t.key.alg.hash(noescape(unsafe.Pointer(&key)), uintptr(h.hash0))
@@ -68,7 +68,7 @@ func mapaccess2_fast32(t *maptype, h *hmap, key uint32) (unsafe.Pointer, bool) {
        }
        var b *bmap
        if h.B == 0 {
-               // One-bucket table.  No need to hash.
+               // One-bucket table. No need to hash.
                b = (*bmap)(h.buckets)
        } else {
                hash := t.key.alg.hash(noescape(unsafe.Pointer(&key)), uintptr(h.hash0))
@@ -113,7 +113,7 @@ func mapaccess1_fast64(t *maptype, h *hmap, key uint64) unsafe.Pointer {
        }
        var b *bmap
        if h.B == 0 {
-               // One-bucket table.  No need to hash.
+               // One-bucket table. No need to hash.
                b = (*bmap)(h.buckets)
        } else {
                hash := t.key.alg.hash(noescape(unsafe.Pointer(&key)), uintptr(h.hash0))
@@ -158,7 +158,7 @@ func mapaccess2_fast64(t *maptype, h *hmap, key uint64) (unsafe.Pointer, bool) {
        }
        var b *bmap
        if h.B == 0 {
-               // One-bucket table.  No need to hash.
+               // One-bucket table. No need to hash.
                b = (*bmap)(h.buckets)
        } else {
                hash := t.key.alg.hash(noescape(unsafe.Pointer(&key)), uintptr(h.hash0))
@@ -247,7 +247,7 @@ func mapaccess1_faststr(t *maptype, h *hmap, ky string) unsafe.Pointer {
                                continue
                        }
                        if keymaybe != bucketCnt {
-                               // Two keys are potential matches.  Use hash to distinguish them.
+                               // Two keys are potential matches. Use hash to distinguish them.
                                goto dohash
                        }
                        keymaybe = i
@@ -350,7 +350,7 @@ func mapaccess2_faststr(t *maptype, h *hmap, ky string) (unsafe.Pointer, bool) {
                                continue
                        }
                        if keymaybe != bucketCnt {
-                               // Two keys are potential matches.  Use hash to distinguish them.
+                               // Two keys are potential matches. Use hash to distinguish them.
                                goto dohash
                        }
                        keymaybe = i
index 3bff36bd78788ddf511572c18908d5879b8a9a46..e4ec302a195247ac8cee286181cc6ae645b22df6 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.
 
-// Implementation of runtime/debug.WriteHeapDump.  Writes all
+// Implementation of runtime/debug.WriteHeapDump. Writes all
 // objects in the heap plus additional info (roots, threads,
 // finalizers, etc.) to a file.
 
@@ -97,7 +97,7 @@ func flush() {
 // Inside a bucket, we keep a list of types that
 // have been serialized so far, most recently used first.
 // Note: when a bucket overflows we may end up
-// serializing a type more than once.  That's ok.
+// serializing a type more than once. That's ok.
 const (
        typeCacheBuckets = 256
        typeCacheAssoc   = 4
@@ -172,7 +172,7 @@ func dumptype(t *_type) {
                }
        }
 
-       // Might not have been dumped yet.  Dump it and
+       // Might not have been dumped yet. Dump it and
        // remember we did so.
        for j := typeCacheAssoc - 1; j > 0; j-- {
                b.t[j] = b.t[j-1]
@@ -254,7 +254,7 @@ func dumpframe(s *stkframe, arg unsafe.Pointer) bool {
        pcdata := pcdatavalue(f, _PCDATA_StackMapIndex, pc, nil)
        if pcdata == -1 {
                // We do not have a valid pcdata value but there might be a
-               // stackmap for this function.  It is likely that we are looking
+               // stackmap for this function. It is likely that we are looking
                // at the function prologue, assume so and hope for the best.
                pcdata = 0
        }
@@ -679,8 +679,8 @@ func dumpfields(bv bitvector) {
 }
 
 // The heap dump reader needs to be able to disambiguate
-// Eface entries.  So it needs to know every type that might
-// appear in such an entry.  The following routine accomplishes that.
+// Eface entries. So it needs to know every type that might
+// appear in such an entry. The following routine accomplishes that.
 // TODO(rsc, khr): Delete - no longer possible.
 
 // Dump all the types that appear in the type field of
index d9803678668f63f86dc8867961a5c25a126b7835..bad0156e612666ab83312ab57e750d832d591c5f 100644 (file)
@@ -140,7 +140,7 @@ func convT2E(t *_type, elem unsafe.Pointer, x unsafe.Pointer) (e eface) {
                        x = newobject(t)
                }
                // TODO: We allocate a zeroed object only to overwrite it with
-               // actual data.  Figure out how to avoid zeroing.  Also below in convT2I.
+               // actual data. Figure out how to avoid zeroing. Also below in convT2I.
                typedmemmove(t, x, elem)
                e._type = t
                e.data = x
index 4cab4342f955af67ae4f8ad83a0f2522e05c8323..a454f284ab950ece86987a46da6a43c267e0c907 100644 (file)
@@ -189,7 +189,7 @@ TEXT Â·Or8(SB), NOSPLIT, $0-9
        // R4 = ((ptr & 3) * 8)
        AND     $3, R1, R4
        SLLV    $3, R4
-       // Shift val for aligned ptr.  R2 = val << R4
+       // Shift val for aligned ptr. R2 = val << R4
        SLLV    R4, R2
 
        SYNC
@@ -215,7 +215,7 @@ TEXT Â·And8(SB), NOSPLIT, $0-9
        // R4 = ((ptr & 3) * 8)
        AND     $3, R1, R4
        SLLV    $3, R4
-       // Shift val for aligned ptr.  R2 = val << R4 | ^(0xFF << R4)
+       // Shift val for aligned ptr. R2 = val << R4 | ^(0xFF << R4)
        MOVV    $0xFF, R5
        SLLV    R4, R2
        SLLV    R4, R5
index 87f7f5d892a8eabadefa1e7794c8eea3522cb05f..45a48b62037ae7bc2bcc03602e59108ba2c71522 100644 (file)
@@ -181,7 +181,7 @@ TEXT runtime∕internal∕atomic·Or8(SB), NOSPLIT, $0-9
 #endif
        // R6 = ((ptr & 3) * 8) = (ptr << 3) & (3*8)
        RLDC    $3, R3, $(3*8), R6
-       // Shift val for aligned ptr.  R4 = val << R6
+       // Shift val for aligned ptr. R4 = val << R6
        SLD     R6, R4, R4
 
 again:
@@ -208,7 +208,7 @@ TEXT runtime∕internal∕atomic·And8(SB), NOSPLIT, $0-9
 #endif
        // R6 = ((ptr & 3) * 8) = (ptr << 3) & (3*8)
        RLDC    $3, R3, $(3*8), R6
-       // Shift val for aligned ptr.  R4 = val << R6 | ^(0xFF << R6)
+       // Shift val for aligned ptr. R4 = val << R6 | ^(0xFF << R6)
        MOVD    $0xFF, R7
        SLD     R6, R4
        SLD     R6, R7
index e8ec788d6a6460ef8cb5c4946e3209bc3c050fe7..d5dc552b9521353021b883f9681b6caa561a82ec 100644 (file)
@@ -48,7 +48,7 @@ func TestXadduintptr(t *testing.T) {
        }
 }
 
-// Tests that xadduintptr correctly updates 64-bit values.  The place where
+// Tests that xadduintptr correctly updates 64-bit values. The place where
 // we actually do so is mstats.go, functions mSysStat{Inc,Dec}.
 func TestXadduintptrOnUint64(t *testing.T) {
        /*      if runtime.BigEndian != 0 {
index fc480290cf355df95e193c3d4e1ce7248d9d37f2..d28fd927203e1a449708af4a59ada23dcf951e2f 100644 (file)
@@ -58,7 +58,7 @@ func lock(l *mutex) {
 
        // wait is either MUTEX_LOCKED or MUTEX_SLEEPING
        // depending on whether there is a thread sleeping
-       // on this mutex.  If we ever change l->key from
+       // on this mutex. If we ever change l->key from
        // MUTEX_SLEEPING to some other value, we must be
        // careful to change it back to MUTEX_SLEEPING before
        // returning, to ensure that the sleeping thread gets
index 1220674ab9252f2f009f09b6d89d3118a61da6f6..0fa0481733c866dd9e06a74f089f64ec1458a863 100644 (file)
@@ -81,7 +81,7 @@ Loop:
                                }
                        }
                        if v&locked != 0 {
-                               // Queued.  Wait.
+                               // Queued. Wait.
                                semasleep(-1)
                                i = 0
                        }
@@ -143,7 +143,7 @@ func notewakeup(n *note) {
                // Two notewakeups!  Not allowed.
                throw("notewakeup - double wakeup")
        default:
-               // Must be the waiting m.  Wake it up.
+               // Must be the waiting m. Wake it up.
                semawakeup((*m)(unsafe.Pointer(v)))
        }
 }
@@ -161,7 +161,7 @@ func notesleep(n *note) {
                }
                return
        }
-       // Queued.  Sleep.
+       // Queued. Sleep.
        gp.m.blocked = true
        semasleep(-1)
        gp.m.blocked = false
@@ -184,7 +184,7 @@ func notetsleep_internal(n *note, ns int64, gp *g, deadline int64) bool {
                return true
        }
        if ns < 0 {
-               // Queued.  Sleep.
+               // Queued. Sleep.
                gp.m.blocked = true
                semasleep(-1)
                gp.m.blocked = false
@@ -193,7 +193,7 @@ func notetsleep_internal(n *note, ns int64, gp *g, deadline int64) bool {
 
        deadline = nanotime() + ns
        for {
-               // Registered.  Sleep.
+               // Registered. Sleep.
                gp.m.blocked = true
                if semasleep(ns) >= 0 {
                        gp.m.blocked = false
@@ -202,15 +202,15 @@ func notetsleep_internal(n *note, ns int64, gp *g, deadline int64) bool {
                        return true
                }
                gp.m.blocked = false
-               // Interrupted or timed out.  Still registered.  Semaphore not acquired.
+               // Interrupted or timed out. Still registered. Semaphore not acquired.
                ns = deadline - nanotime()
                if ns <= 0 {
                        break
                }
-               // Deadline hasn't arrived.  Keep sleeping.
+               // Deadline hasn't arrived. Keep sleeping.
        }
 
-       // Deadline arrived.  Still registered.  Semaphore not acquired.
+       // Deadline arrived. Still registered. Semaphore not acquired.
        // Want to give up and return, but have to unregister first,
        // so that any notewakeup racing with the return does not
        // try to grant us the semaphore when we don't expect it.
index b520c68df0810c230ced3e68338420eec6a1fcb4..e5a5fe61d98587cd583caf33d11fe0945daf7f9d 100644 (file)
@@ -65,8 +65,8 @@
 // directly, bypassing the MCache and MCentral free lists.
 //
 // The small objects on the MCache and MCentral free lists
-// may or may not be zeroed.  They are zeroed if and only if
-// the second word of the object is zero.  A span in the
+// may or may not be zeroed. They are zeroed if and only if
+// the second word of the object is zero. A span in the
 // page heap is zeroed unless s->needzero is set. When a span
 // is allocated to break into small objects, it is zeroed if needed
 // and s->needzero is set. There are two main benefits to delaying the
@@ -113,9 +113,9 @@ const (
        // _64bit = 1 on 64-bit systems, 0 on 32-bit systems
        _64bit = 1 << (^uintptr(0) >> 63) / 2
 
-       // Computed constant.  The definition of MaxSmallSize and the
+       // Computed constant. The definition of MaxSmallSize and the
        // algorithm in msize.go produces some number of different allocation
-       // size classes.  NumSizeClasses is that number.  It's needed here
+       // size classes. NumSizeClasses is that number. It's needed here
        // because there are static arrays of this length; when msize runs its
        // size choosing algorithm it double-checks that NumSizeClasses agrees.
        _NumSizeClasses = 67
@@ -134,9 +134,9 @@ const (
        // Per-P, per order stack segment cache size.
        _StackCacheSize = 32 * 1024
 
-       // Number of orders that get caching.  Order 0 is FixedStack
+       // Number of orders that get caching. Order 0 is FixedStack
        // and each successive order is twice as large.
-       // We want to cache 2KB, 4KB, 8KB, and 16KB stacks.  Larger stacks
+       // We want to cache 2KB, 4KB, 8KB, and 16KB stacks. Larger stacks
        // will be allocated directly.
        // Since FixedStack is different on different systems, we
        // must vary NumStackOrders to keep the same maximum cached size.
@@ -165,7 +165,7 @@ const (
 
        // Max number of threads to run garbage collection.
        // 2, 3, and 4 are all plausible maximums depending
-       // on the hardware details of the machine.  The garbage
+       // on the hardware details of the machine. The garbage
        // collector scales well to 32 cpus.
        _MaxGcproc = 32
 )
@@ -192,14 +192,14 @@ const _MaxArena32 = 2 << 30
 //
 // SysFree returns it unconditionally; this is only used if
 // an out-of-memory error has been detected midway through
-// an allocation.  It is okay if SysFree is a no-op.
+// an allocation. It is okay if SysFree is a no-op.
 //
 // SysReserve reserves address space without allocating memory.
 // If the pointer passed to it is non-nil, the caller wants the
 // reservation there, but SysReserve can still choose another
-// location if that one is unavailable.  On some systems and in some
+// location if that one is unavailable. On some systems and in some
 // cases SysReserve will simply check that the address space is
-// available and not actually reserve it.  If SysReserve returns
+// available and not actually reserve it. If SysReserve returns
 // non-nil, it sets *reserved to true if the address space is
 // reserved, false if it has merely been checked.
 // NOTE: SysReserve returns OS-aligned memory, but the heap allocator
@@ -211,7 +211,7 @@ const _MaxArena32 = 2 << 30
 // reserved, not merely checked.
 //
 // SysFault marks a (already sysAlloc'd) region to fault
-// if accessed.  Used only for debugging the runtime.
+// if accessed. Used only for debugging the runtime.
 
 func mallocinit() {
        initSizes()
@@ -229,7 +229,7 @@ func mallocinit() {
        limit = 0
 
        // Set up the allocation arena, a contiguous area of memory where
-       // allocated data will be found.  The arena begins with a bitmap large
+       // allocated data will be found. The arena begins with a bitmap large
        // enough to hold 4 bits per allocated word.
        if sys.PtrSize == 8 && (limit == 0 || limit > 1<<30) {
                // On a 64-bit machine, allocate from a single contiguous reservation.
@@ -239,12 +239,12 @@ func mallocinit() {
                // SysReserve to use 0x0000XXc000000000 if possible (XX=00...7f).
                // Allocating a 512 GB region takes away 39 bits, and the amd64
                // doesn't let us choose the top 17 bits, so that leaves the 9 bits
-               // in the middle of 0x00c0 for us to choose.  Choosing 0x00c0 means
+               // in the middle of 0x00c0 for us to choose. Choosing 0x00c0 means
                // that the valid memory addresses will begin 0x00c0, 0x00c1, ..., 0x00df.
                // In little-endian, that's c0 00, c1 00, ..., df 00. None of those are valid
                // UTF-8 sequences, and they are otherwise as far away from
-               // ff (likely a common byte) as possible.  If that fails, we try other 0xXXc0
-               // addresses.  An earlier attempt to use 0x11f8 caused out of memory errors
+               // ff (likely a common byte) as possible. If that fails, we try other 0xXXc0
+               // addresses. An earlier attempt to use 0x11f8 caused out of memory errors
                // on OS X during thread allocations.  0x00c0 causes conflicts with
                // AddressSanitizer which reserves all memory up to 0x0100.
                // These choices are both for debuggability and to reduce the
@@ -321,10 +321,10 @@ func mallocinit() {
                        spansSize = round(spansSize, _PageSize)
 
                        // SysReserve treats the address we ask for, end, as a hint,
-                       // not as an absolute requirement.  If we ask for the end
+                       // not as an absolute requirement. If we ask for the end
                        // of the data segment but the operating system requires
                        // a little more space before we can start allocating, it will
-                       // give out a slightly higher pointer.  Except QEMU, which
+                       // give out a slightly higher pointer. Except QEMU, which
                        // is buggy, as usual: it won't adjust the pointer upward.
                        // So adjust it upward a little bit ourselves: 1/4 MB to get
                        // away from the running binary image and then round up
@@ -803,7 +803,7 @@ func reflect_unsafe_NewArray(typ *_type, n uintptr) unsafe.Pointer {
        return newarray(typ, n)
 }
 
-// rawmem returns a chunk of pointerless memory.  It is
+// rawmem returns a chunk of pointerless memory. It is
 // not zeroed.
 func rawmem(size uintptr) unsafe.Pointer {
        return mallocgc(size, nil, flagNoScan|flagNoZero)
index b06d354eb6beb381065c40075af79d6cc307ff61..2230c5c200d2cbd0de19001c13597419f0b886d7 100644 (file)
@@ -101,7 +101,7 @@ func freemcache(c *mcache) {
 }
 
 // Gets a span that has a free object in it and assigns it
-// to be the cached span for the given sizeclass.  Returns this span.
+// to be the cached span for the given sizeclass. Returns this span.
 func (c *mcache) refill(sizeclass int32) *mspan {
        _g_ := getg()
 
index 8a2fbe98c9328cc4651ec9c4142c8f44c19ddfad..4f0b86c228cbbbc4480bcac0069a027835b12ccf 100644 (file)
@@ -146,7 +146,7 @@ func (c *mcentral) uncacheSpan(s *mspan) {
 
 // Free n objects from a span s back into the central free list c.
 // Called during sweep.
-// Returns true if the span was returned to heap.  Sets sweepgen to
+// Returns true if the span was returned to heap. Sets sweepgen to
 // the latest generation.
 // If preserve=true, don't return the span to heap nor relink in MCentral lists;
 // caller takes care of it.
@@ -179,7 +179,7 @@ func (c *mcentral) freeSpan(s *mspan, n int32, start gclinkptr, end gclinkptr, p
                c.nonempty.insert(s)
        }
 
-       // delay updating sweepgen until here.  This is the signal that
+       // delay updating sweepgen until here. This is the signal that
        // the span may be used in an MCache, so it must come after the
        // linked list operations above (actually, just after the
        // lock of c above.)
index 6c24137f3c79d8d36e4a7ccd0bdc3ff112e56429..bf4f24426c0571c2d4b85d676c3b8296e445bfef 100644 (file)
@@ -44,7 +44,7 @@ func sysFault(v unsafe.Pointer, n uintptr) {
 
 func sysReserve(v unsafe.Pointer, n uintptr, reserved *bool) unsafe.Pointer {
        // On 64-bit, people with ulimit -v set complain if we reserve too
-       // much address space.  Instead, assume that the reservation is okay
+       // much address space. Instead, assume that the reservation is okay
        // and check the assumption in SysMap.
        if sys.PtrSize == 8 && uint64(n) > 1<<32 || sys.GoosNacl != 0 {
                *reserved = false
index 85a7f80efc2fedd8505650abfd14ab69736d7aa2..1ee13bd7e681b1c0df316219559a28aa57637503 100644 (file)
@@ -172,7 +172,7 @@ func sysFault(v unsafe.Pointer, n uintptr) {
 
 func sysReserve(v unsafe.Pointer, n uintptr, reserved *bool) unsafe.Pointer {
        // On 64-bit, people with ulimit -v set complain if we reserve too
-       // much address space.  Instead, assume that the reservation is okay
+       // much address space. Instead, assume that the reservation is okay
        // if we can reserve at least 64K and check the assumption in SysMap.
        // Only user-mode Linux (UML) rejects these requests.
        if sys.PtrSize == 8 && uint64(n) > 1<<32 {
index 8b5fe31c5193bc370a6f1736a8a65610252b66cb..c9b8586eae78582d88ebab8898be18a9a638ed07 100644 (file)
@@ -1,7 +1,7 @@
 // Inferno's libkern/memset-arm.s
 // http://code.google.com/p/inferno-os/source/browse/libkern/memset-arm.s
 //
-//         Copyright Â© 1994-1999 Lucent Technologies Inc.  All rights reserved.
+//         Copyright Â© 1994-1999 Lucent Technologies Inc. All rights reserved.
 //         Revisions Copyright Â© 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com).  All rights reserved.
 //         Portions Copyright 2009 The Go Authors. All rights reserved.
 //
index f72a73ae4f654cdb7a0bbe11de8310053a3e09af..9a21e841364309050f2882808cca76ddb8ab23f3 100644 (file)
@@ -1,7 +1,7 @@
 // Inferno's libkern/memmove-386.s
 // http://code.google.com/p/inferno-os/source/browse/libkern/memmove-386.s
 //
-//         Copyright Â© 1994-1999 Lucent Technologies Inc.  All rights reserved.
+//         Copyright Â© 1994-1999 Lucent Technologies Inc. All rights reserved.
 //         Revisions Copyright Â© 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com).  All rights reserved.
 //         Portions Copyright 2009 The Go Authors. All rights reserved.
 //
@@ -33,8 +33,8 @@ TEXT runtime·memmove(SB), NOSPLIT, $0-12
        MOVL    n+8(FP), BX
 
        // REP instructions have a high startup cost, so we handle small sizes
-       // with some straightline code.  The REP MOVSL instruction is really fast
-       // for large sizes.  The cutover is approximately 1K.  We implement up to
+       // with some straightline code. The REP MOVSL instruction is really fast
+       // for large sizes. The cutover is approximately 1K.  We implement up to
        // 128 because that is the maximum SSE register load (loading all data
        // into registers lets us ignore copy direction).
 tail:
index e14614d631473108287080d85f12e2ab132ead3d..ae95b155be3537741e403b2325989b8194d7dea1 100644 (file)
@@ -1,7 +1,7 @@
 // Derived from Inferno's libkern/memmove-386.s (adapted for amd64)
 // http://code.google.com/p/inferno-os/source/browse/libkern/memmove-386.s
 //
-//         Copyright Â© 1994-1999 Lucent Technologies Inc.  All rights reserved.
+//         Copyright Â© 1994-1999 Lucent Technologies Inc. All rights reserved.
 //         Revisions Copyright Â© 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com).  All rights reserved.
 //         Portions Copyright 2009 The Go Authors. All rights reserved.
 //
@@ -35,8 +35,8 @@ TEXT runtime·memmove(SB), NOSPLIT, $0-24
        MOVQ    n+16(FP), BX
 
        // REP instructions have a high startup cost, so we handle small sizes
-       // with some straightline code.  The REP MOVSQ instruction is really fast
-       // for large sizes.  The cutover is approximately 2K.
+       // with some straightline code. The REP MOVSQ instruction is really fast
+       // for large sizes. The cutover is approximately 2K.
 tail:
        // move_129through256 or smaller work whether or not the source and the
        // destination memory regions overlap because they load all data into
index 35f04a84bc73e3e5961f7b1b6d32332356765f17..6b880d5e6de9073867f049669e4997742137bc07 100644 (file)
@@ -1,7 +1,7 @@
 // Inferno's libkern/memmove-arm.s
 // http://code.google.com/p/inferno-os/source/browse/libkern/memmove-arm.s
 //
-//         Copyright Â© 1994-1999 Lucent Technologies Inc.  All rights reserved.
+//         Copyright Â© 1994-1999 Lucent Technologies Inc. All rights reserved.
 //         Revisions Copyright Â© 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com).  All rights reserved.
 //         Portions Copyright 2009 The Go Authors. All rights reserved.
 //
index 64b732e77719427d4b42b77c08169c6d9a2fd921..13907a90b2cb085c5d4c8adb1d1f6451b4e4e19e 100644 (file)
@@ -47,6 +47,6 @@ back:
        CLD
 
        // Note: we copy only 4 bytes at a time so that the tail is at most
-       // 3 bytes.  That guarantees that we aren't copying pointers with MOVSB.
+       // 3 bytes. That guarantees that we aren't copying pointers with MOVSB.
        // See issue 13160.
        RET
index 3b492eb6cda61687386cdd82a8c42c7388bfa7e4..c4d62ec946109b1fb9160e166374526daf508144 100644 (file)
@@ -1,7 +1,7 @@
 // Inferno's libkern/memmove-386.s
 // http://code.google.com/p/inferno-os/source/browse/libkern/memmove-386.s
 //
-//         Copyright Â© 1994-1999 Lucent Technologies Inc.  All rights reserved.
+//         Copyright Â© 1994-1999 Lucent Technologies Inc. All rights reserved.
 //         Revisions Copyright Â© 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com).  All rights reserved.
 //         Portions Copyright 2009 The Go Authors. All rights reserved.
 //
@@ -31,8 +31,8 @@ TEXT runtime·memmove(SB), NOSPLIT, $0-12
        MOVL    n+8(FP), BX
 
        // REP instructions have a high startup cost, so we handle small sizes
-       // with some straightline code.  The REP MOVSL instruction is really fast
-       // for large sizes.  The cutover is approximately 1K.
+       // with some straightline code. The REP MOVSL instruction is really fast
+       // for large sizes. The cutover is approximately 1K.
 tail:
        TESTL   BX, BX
        JEQ     move_0
index a1cc25567b9d706714b2a5d19929fc946fb46f17..9bef31d43ea6522071cc94231ca569442684ef22 100644 (file)
@@ -1,7 +1,7 @@
 // Derived from Inferno's libkern/memmove-386.s (adapted for amd64)
 // http://code.google.com/p/inferno-os/source/browse/libkern/memmove-386.s
 //
-//         Copyright Â© 1994-1999 Lucent Technologies Inc.  All rights reserved.
+//         Copyright Â© 1994-1999 Lucent Technologies Inc. All rights reserved.
 //         Revisions Copyright Â© 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com).  All rights reserved.
 //         Portions Copyright 2009 The Go Authors. All rights reserved.
 //
@@ -33,8 +33,8 @@ TEXT runtime·memmove(SB), NOSPLIT, $0-24
        MOVQ    n+16(FP), BX
 
        // REP instructions have a high startup cost, so we handle small sizes
-       // with some straightline code.  The REP MOVSQ instruction is really fast
-       // for large sizes.  The cutover is approximately 1K.
+       // with some straightline code. The REP MOVSQ instruction is really fast
+       // for large sizes. The cutover is approximately 1K.
 tail:
        TESTQ   BX, BX
        JEQ     move_0
index 9418e147bcd59c1411fd9c4793a3330b62366a1e..6142c2d53261aff88c73d5d0e0e22692ca35ca9b 100644 (file)
@@ -219,8 +219,8 @@ func runfinq() {
 // SetFinalizer sets the finalizer associated with x to f.
 // When the garbage collector finds an unreachable block
 // with an associated finalizer, it clears the association and runs
-// f(x) in a separate goroutine.  This makes x reachable again, but
-// now without an associated finalizer.  Assuming that SetFinalizer
+// f(x) in a separate goroutine. This makes x reachable again, but
+// now without an associated finalizer. Assuming that SetFinalizer
 // is not called again, the next time the garbage collector sees
 // that x is unreachable, it will free x.
 //
@@ -374,8 +374,8 @@ okarg:
        })
 }
 
-// Look up pointer v in heap.  Return the span containing the object,
-// the start of the object, and the size of the object.  If the object
+// Look up pointer v in heap. Return the span containing the object,
+// the start of the object, and the size of the object. If the object
 // does not exist, return nil, nil, 0.
 func findObject(v unsafe.Pointer) (s *mspan, x unsafe.Pointer, n uintptr) {
        c := gomcache()
index 569a304cf459524cb4ddcbfa77e12e9d82a5482f..c4ab6487a843d799165a473a979e669cd837b6ea 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.
 
-// Fixed-size object allocator.  Returned memory is not zeroed.
+// Fixed-size object allocator. Returned memory is not zeroed.
 //
 // See malloc.go for overview.
 
index 138a623ca55d712c8041bbeb91e2393b03a415e9..52936cec2cb5ad69593a82fb66aaa1e2e7c4d899 100644 (file)
@@ -1165,8 +1165,8 @@ func gcMarkTermination() {
        casgstatus(gp, _Grunning, _Gwaiting)
        gp.waitreason = "garbage collection"
 
-       // Run gc on the g0 stack.  We do this so that the g stack
-       // we're currently running on will no longer change.  Cuts
+       // Run gc on the g0 stack. We do this so that the g stack
+       // we're currently running on will no longer change. Cuts
        // the root set down a bit (g0 stacks are not scanned, and
        // we don't need to scan gc's internal state).  We also
        // need to switch to g0 so we can shrink the stack.
index 0be908bfe8c65761a5a6f5328ed9c200bfb5962e..241fbc81698061d0a46423294e64e16cdce84c8e 100644 (file)
@@ -704,7 +704,7 @@ func scanframeworker(frame *stkframe, cache *pcvalueCache, gcw *gcWork) {
        pcdata := pcdatavalue(f, _PCDATA_StackMapIndex, targetpc, cache)
        if pcdata == -1 {
                // We do not have a valid pcdata value but there might be a
-               // stackmap for this function.  It is likely that we are looking
+               // stackmap for this function. It is likely that we are looking
                // at the function prologue, assume so and hope for the best.
                pcdata = 0
        }
index 7bc4278195c374353ce7bf210e5dcef42307af33..63a3ade3a663f1158b44ae53985db37a6aba2654 100644 (file)
@@ -17,11 +17,11 @@ const (
 // Garbage collector work pool abstraction.
 //
 // This implements a producer/consumer model for pointers to grey
-// objects.  A grey object is one that is marked and on a work
-// queue.  A black object is marked and not on a work queue.
+// objects. A grey object is one that is marked and on a work
+// queue. A black object is marked and not on a work queue.
 //
 // Write barriers, root discovery, stack scanning, and object scanning
-// produce pointers to grey objects.  Scanning consumes pointers to
+// produce pointers to grey objects. Scanning consumes pointers to
 // grey objects, thus blackening them, and then scans them,
 // potentially producing new pointers to grey objects.
 
index e8189547f870792f29ef60a6df89b031eb55b080..06a7d88143a252ff37a77d54cf8af68be47e9221 100644 (file)
@@ -161,7 +161,7 @@ var h_allspans []*mspan // TODO: make this h.allspans once mheap can be defined
 
 // h_spans is a lookup table to map virtual address page IDs to *mspan.
 // For allocated spans, their pages map to the span itself.
-// For free spans, only the lowest and highest pages map to the span itself.  Internal
+// For free spans, only the lowest and highest pages map to the span itself. Internal
 // pages map to an arbitrary span.
 // For pages that have never been allocated, h_spans entries are nil.
 var h_spans []*mspan // TODO: make this h.spans once mheap can be defined in Go
@@ -689,7 +689,7 @@ func (h *mheap) lookup(v unsafe.Pointer) *mspan {
 // Address is *not* guaranteed to be in map
 // and may be anywhere in the span.
 // Map entries for the middle of a span are only
-// valid for allocated spans.  Free spans may have
+// valid for allocated spans. Free spans may have
 // other garbage in their middles, so we have to
 // check for that.
 func (h *mheap) lookupMaybe(v unsafe.Pointer) *mspan {
@@ -971,7 +971,7 @@ type special struct {
 }
 
 // Adds the special record s to the list of special records for
-// the object p.  All fields of s should be filled in except for
+// the object p. All fields of s should be filled in except for
 // offset & next, which this routine will fill in.
 // Returns true if the special was successfully added, false otherwise.
 // (The add will fail only if a record with the same p and s->kind
@@ -1069,7 +1069,7 @@ type specialfinalizer struct {
        ot      *ptrtype
 }
 
-// Adds a finalizer to the object p.  Returns true if it succeeded.
+// Adds a finalizer to the object p. Returns true if it succeeded.
 func addfinalizer(p unsafe.Pointer, f *funcval, nret uintptr, fint *_type, ot *ptrtype) bool {
        lock(&mheap_.speciallock)
        s := (*specialfinalizer)(mheap_.specialfinalizeralloc.alloc())
@@ -1138,7 +1138,7 @@ func setprofilebucket(p unsafe.Pointer, b *bucket) {
        }
 }
 
-// Do whatever cleanup needs to be done to deallocate s.  It has
+// Do whatever cleanup needs to be done to deallocate s. It has
 // already been unlinked from the MSpan specials list.
 func freespecial(s *special, p unsafe.Pointer, size uintptr) {
        switch s.kind {
index bcad065ea95c8ab594481c3d4c042de8f5def0ef..6363a902421097cef6895f851be8671477f9cd4e 100644 (file)
@@ -12,5 +12,5 @@ package runtime
 
 import "unsafe"
 
-// mmap calls the mmap system call.  It is implemented in assembly.
+// mmap calls the mmap system call. It is implemented in assembly.
 func mmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uint32) unsafe.Pointer
index d498a9328adc44952e428fed7c0ad1e91d269fba..7be3ee9bf9ad5b3f19c0b64a94ee7e5dd466f707 100644 (file)
@@ -262,7 +262,7 @@ func mProf_Free(b *bucket, size uintptr) {
 var blockprofilerate uint64 // in CPU ticks
 
 // SetBlockProfileRate controls the fraction of goroutine blocking events
-// that are reported in the blocking profile.  The profiler aims to sample
+// that are reported in the blocking profile. The profiler aims to sample
 // an average of one blocking event per rate nanoseconds spent blocked.
 //
 // To include every blocking event in the profile, pass rate = 1.
@@ -335,7 +335,7 @@ func (r *StackRecord) Stack() []uintptr {
 //
 // The tools that process the memory profiles assume that the
 // profile rate is constant across the lifetime of the program
-// and equal to the current value.  Programs that change the
+// and equal to the current value. Programs that change the
 // memory profiling rate should do so just once, as early as
 // possible in the execution of the program (for example,
 // at the beginning of main).
index 7eeeb30e6acc522ef3fbb2658f3d92ff45948ffb..7177c8e611b5dfdeff286b892b7f8a85e192c1c5 100644 (file)
@@ -24,10 +24,10 @@ func MSanWrite(addr unsafe.Pointer, len int) {
 const msanenabled = true
 
 // If we are running on the system stack, the C program may have
-// marked part of that stack as uninitialized.  We don't instrument
+// marked part of that stack as uninitialized. We don't instrument
 // the runtime, but operations like a slice copy can call msanread
-// anyhow for values on the stack.  Just ignore msanread when running
-// on the system stack.  The other msan functions are fine.
+// anyhow for values on the stack. Just ignore msanread when running
+// on the system stack. The other msan functions are fine.
 func msanread(addr unsafe.Pointer, sz uintptr) {
        g := getg()
        if g == g.m.g0 || g == g.m.gsignal {
index bc735beb42fb5e488a04e2608d4ca828c98b28f4..21fe2f4c615ca77c7f7e0482b732d62d812fc808 100644 (file)
@@ -13,7 +13,7 @@
 // and chopped up when new objects of the size class are needed.
 // That page count is chosen so that chopping up the run of
 // pages into objects of the given size wastes at most 12.5% (1.125x)
-// of the memory.  It is not necessary that the cutoff here be
+// of the memory. It is not necessary that the cutoff here be
 // the same as above.
 //
 // The two sources of waste multiply, so the worst possible case
@@ -27,7 +27,7 @@
 
 package runtime
 
-// Size classes.  Computed and initialized by InitSizes.
+// Size classes. Computed and initialized by InitSizes.
 //
 // SizeToClass(0 <= n <= MaxSmallSize) returns the size class,
 //     1 <= sizeclass < NumSizeClasses, for n.
index 0f821b7e10ccdcaceb28d952da5c29f428fe3fbd..1d9b41ed20b9e116fc266a93d9f90027cc2774f2 100644 (file)
@@ -371,7 +371,7 @@ func purgecachedstats(c *mcache) {
        }
 }
 
-// Atomically increases a given *system* memory stat.  We are counting on this
+// Atomically increases a given *system* memory stat. We are counting on this
 // stat never overflowing a uintptr, so this function must only be used for
 // system memory stats.
 //
@@ -395,7 +395,7 @@ func mSysStatInc(sysStat *uint64, n uintptr) {
        }
 }
 
-// Atomically decreases a given *system* memory stat.  Same comments as
+// Atomically decreases a given *system* memory stat. Same comments as
 // mSysStatInc apply.
 //go:nosplit
 func mSysStatDec(sysStat *uint64, n uintptr) {
index 36956bae7171b5439c2f3b2eff1d5044a6e0a9e6..337377a95b09d8c31e268b6bf0ae9fb3d345d115 100644 (file)
@@ -31,7 +31,7 @@ func netpollinit() {
 
 func netpollopen(fd uintptr, pd *pollDesc) int32 {
        // Arm both EVFILT_READ and EVFILT_WRITE in edge-triggered mode (EV_CLEAR)
-       // for the whole fd lifetime.  The notifications are automatically unregistered
+       // for the whole fd lifetime. The notifications are automatically unregistered
        // when fd is closed.
        var ev [2]keventt
        *(*uintptr)(unsafe.Pointer(&ev[0].ident)) = fd
index 19bb0f16e079fddbbd9b1b30e01d6c88206dacf3..01dc90f97ce06659167712535e11fe7a3ac2b697 100644 (file)
@@ -66,7 +66,7 @@ func goenvs() {
        goenvs_unix()
 
        // Register our thread-creation callback (see sys_darwin_{amd64,386}.s)
-       // but only if we're not using cgo.  If we are using cgo we need
+       // but only if we're not using cgo. If we are using cgo we need
        // to let the C pthread library install its own thread-creation callback.
        if !iscgo {
                if bsdthread_register() != 0 {
@@ -290,7 +290,7 @@ func machcall(h *machheader, maxsize int32, rxsize int32) int32 {
        // Look for a response giving the return value.
        // Any call can send this back with an error,
        // and some calls only have return values so they
-       // send it back on success too.  I don't quite see how
+       // send it back on success too. I don't quite see how
        // you know it's one of these and not the full response
        // format, so just look if the message is right.
        c := (*codemsg)(unsafe.Pointer(h))
index 7e4f84e6a3c9b7ca3d0569c64ced9a04a1a7f8dc..d7044ae4b06d9fb1a9229f2a316d9f4582812cb9 100644 (file)
@@ -143,9 +143,9 @@ func minit() {
        // Initialize signal handling.
 
        // On DragonFly a thread created by pthread_create inherits
-       // the signal stack of the creating thread.  We always create
+       // the signal stack of the creating thread. We always create
        // a new signal stack here, to avoid having two Go threads
-       // using the same signal stack.  This breaks the case of a
+       // using the same signal stack. This breaks the case of a
        // thread created in C that calls sigaltstack and then calls a
        // Go function, because we will lose track of the C code's
        // sigaltstack, but it's the best we can do.
@@ -191,7 +191,7 @@ func memlimit() uintptr {
                                        return 0;
 
                                // If there's not at least 16 MB left, we're probably
-                               // not going to be able to do much.  Treat as no limit.
+                               // not going to be able to do much. Treat as no limit.
                                rl.rlim_cur -= used;
                                if(rl.rlim_cur < (16<<20))
                                        return 0;
index f00fdf4389a3f404d84a84ad48f154cdcae67c94..0dafe02325b792d7b64e5347d087dbe3ab648b56 100644 (file)
@@ -201,7 +201,7 @@ func memlimit() uintptr {
                        return 0;
 
                // If there's not at least 16 MB left, we're probably
-               // not going to be able to do much.  Treat as no limit.
+               // not going to be able to do much. Treat as no limit.
                rl.rlim_cur -= used;
                if(rl.rlim_cur < (16<<20))
                        return 0;
index 2d53b934f56c77493acf9f32b516bc254988d874..1c1ead87905359f5aa4cd4c76ab6e12c83d91799 100644 (file)
@@ -33,7 +33,7 @@ func futexsleep(addr *uint32, val uint32, ns int64) {
 
        // Some Linux kernels have a bug where futex of
        // FUTEX_WAIT returns an internal error code
-       // as an errno.  Libpthread ignores the return value
+       // as an errno. Libpthread ignores the return value
        // here, and so can we: as it says a few lines up,
        // spurious wakeups are allowed.
        if ns < 0 {
@@ -138,7 +138,7 @@ func newosproc(mp *m, stk unsafe.Pointer) {
        }
 
        // Disable signals during clone, so that the new thread starts
-       // with signals disabled.  It will enable them in minit.
+       // with signals disabled. It will enable them in minit.
        var oset sigset
        rtsigprocmask(_SIG_SETMASK, &sigset_all, &oset, int32(unsafe.Sizeof(oset)))
        ret := clone(cloneFlags, stk, unsafe.Pointer(mp), unsafe.Pointer(mp.g0), unsafe.Pointer(funcPC(mstart)))
@@ -288,7 +288,7 @@ func memlimit() uintptr {
                        return 0;
 
                // If there's not at least 16 MB left, we're probably
-               // not going to be able to do much.  Treat as no limit.
+               // not going to be able to do much. Treat as no limit.
                rl.rlim_cur -= used;
                if(rl.rlim_cur < (16<<20))
                        return 0;
index 4cafaf2ebc3793d2e0f42a6010e848cb02c1b241..6fc2819cddf338bfc82dd1ea0c11fd348af96d53 100644 (file)
@@ -172,7 +172,7 @@ func memlimit() uintptr {
        return 0
 }
 
-// This runs on a foreign stack, without an m or a g.  No stack split.
+// This runs on a foreign stack, without an m or a g. No stack split.
 //go:nosplit
 func badsignal2() {
        write(2, unsafe.Pointer(&badsignal1[0]), int32(len(badsignal1)))
index e32df9585c664f38802484bffc6e2147f0560004..3c3b64186d8345b0e7ecad02d3026e94b27f4710 100644 (file)
@@ -114,9 +114,9 @@ func newosproc(mp *m, stk unsafe.Pointer) {
 }
 
 // netbsdMStart is the function call that starts executing a newly
-// created thread.  On NetBSD, a new thread inherits the signal stack
-// of the creating thread.  That confuses minit, so we remove that
-// signal stack here before calling the regular mstart.  It's a bit
+// created thread. On NetBSD, a new thread inherits the signal stack
+// of the creating thread. That confuses minit, so we remove that
+// signal stack here before calling the regular mstart. It's a bit
 // baroque to remove a signal stack here only to add one in minit, but
 // it's a simple change that keeps NetBSD working like other OS's.
 // At this point all signals are blocked, so there is no race.
@@ -175,9 +175,9 @@ func minit() {
        // Initialize signal handling.
 
        // On NetBSD a thread created by pthread_create inherits the
-       // signal stack of the creating thread.  We always create a
+       // signal stack of the creating thread. We always create a
        // new signal stack here, to avoid having two Go threads using
-       // the same signal stack.  This breaks the case of a thread
+       // the same signal stack. This breaks the case of a thread
        // created in C that calls sigaltstack and then calls a Go
        // function, because we will lose track of the C code's
        // sigaltstack, but it's the best we can do.
index a6cefa20392ef12806d6a8fc307e5c9e618cf8c7..447dff81938e4a0f5291dd46109bb07e6c191e7c 100644 (file)
@@ -80,7 +80,7 @@ func semasleep(ns int64) int32 {
                //
                // From OpenBSD's __thrsleep(2) manual:
                // "The abort argument, if not NULL, points to an int that will
-               // be examined [...] immediately before blocking.  If that int
+               // be examined [...] immediately before blocking. If that int
                // is non-zero then __thrsleep() will immediately return EINTR
                // without blocking."
                ret := thrsleep(uintptr(unsafe.Pointer(&_g_.m.waitsemacount)), _CLOCK_MONOTONIC, tsp, 0, &_g_.m.waitsemacount)
index f35a39a4183021e87868d5d4a56e2d6896ecc881..c114b1db628af53dcf565ddc3dc14b61d40f9540 100644 (file)
@@ -257,7 +257,7 @@ func memlimit() uint64 {
 
 var _badsignal = []byte("runtime: signal received on thread not created by Go.\n")
 
-// This runs on a foreign stack, without an m or a g.  No stack split.
+// This runs on a foreign stack, without an m or a g. No stack split.
 //go:nosplit
 func badsignal2() {
        pwrite(2, unsafe.Pointer(&_badsignal[0]), int32(len(_badsignal)), -1)
index fdc817d3f7916dbdfdd85b128ed9d1887a8f1c3e..349f4abbcf028d784f52dafbb2e83b9f8ba8774e 100644 (file)
@@ -159,7 +159,7 @@ func newosproc(mp *m, _ unsafe.Pointer) {
        }
 
        // Disable signals during create, so that the new thread starts
-       // with signals disabled.  It will enable them in minit.
+       // with signals disabled. It will enable them in minit.
        sigprocmask(_SIG_SETMASK, &sigset_all, &oset)
        ret = pthread_create(&tid, &attr, funcPC(tstart_sysvicall), unsafe.Pointer(mp))
        sigprocmask(_SIG_SETMASK, &oset, nil)
@@ -266,7 +266,7 @@ func memlimit() uintptr {
                        return 0;
 
                // If there's not at least 16 MB left, we're probably
-               // not going to be able to do much.  Treat as no limit.
+               // not going to be able to do much. Treat as no limit.
                rl.rlim_cur -= used;
                if(rl.rlim_cur < (16<<20))
                        return 0;
@@ -357,8 +357,8 @@ func semacreate(mp *m) {
        var sem *semt
        _g_ := getg()
 
-       // Call libc's malloc rather than malloc.  This will
-       // allocate space on the C heap.  We can't call malloc
+       // Call libc's malloc rather than malloc. This will
+       // allocate space on the C heap. We can't call malloc
        // here because it could cause a deadlock.
        _g_.m.libcall.fn = uintptr(unsafe.Pointer(&libc_malloc))
        _g_.m.libcall.n = 1
index 402dfe905984ab6456035f7e6dfbc7979904c750..6f126b4770505e4fed38971d96da9ae5f765b4b8 100644 (file)
@@ -63,7 +63,7 @@ func sigpanic() {
 func raiseproc(sig int32) {
 }
 
-// Stubs so tests can link correctly.  These should never be called.
+// Stubs so tests can link correctly. These should never be called.
 func open(name *byte, mode, perm int32) int32
 func closefd(fd int32) int32
 func read(fd int32, p unsafe.Pointer, n int32) int32
index cab405e804c072dd4b1bd641737f97b963a59c5c..8bdf5a271f1e83995b7b7b2087e800ac9c93aabc 100644 (file)
@@ -17,7 +17,7 @@ func os_sigpipe() {
        throw("too many writes on closed pipe")
 }
 
-// Stubs so tests can link correctly.  These should never be called.
+// Stubs so tests can link correctly. These should never be called.
 func open(name *byte, mode, perm int32) int32 {
        throw("unimplemented")
        return -1
index 349e997395ef9b732f6fc833a4d0ad477130705a..10065c1803f4271dd3c04e7effb867496a5f767a 100644 (file)
@@ -62,10 +62,10 @@ func deferproc(siz int32, fn *funcval) { // arguments of fn follow fn
                throw("defer on system stack")
        }
 
-       // the arguments of fn are in a perilous state.  The stack map
-       // for deferproc does not describe them.  So we can't let garbage
+       // the arguments of fn are in a perilous state. The stack map
+       // for deferproc does not describe them. So we can't let garbage
        // collection or stack copying trigger until we've copied them out
-       // to somewhere safe.  The memmove below does that.
+       // to somewhere safe. The memmove below does that.
        // Until the copy completes, we can only call nosplit routines.
        sp := getcallersp(unsafe.Pointer(&siz))
        argp := uintptr(unsafe.Pointer(&fn)) + unsafe.Sizeof(fn)
@@ -255,7 +255,7 @@ func freedeferfn() {
 // If there is a deferred function, this will call runtime·jmpdefer,
 // which will jump to the deferred function such that it appears
 // to have been called by the caller of deferreturn at the point
-// just before deferreturn was called.  The effect is that deferreturn
+// just before deferreturn was called. The effect is that deferreturn
 // is called again and again until there are no more deferred functions.
 // Cannot split the stack because we reuse the caller's frame to
 // call the deferred function.
@@ -291,8 +291,8 @@ func deferreturn(arg0 uintptr) {
        jmpdefer(fn, uintptr(unsafe.Pointer(&arg0)))
 }
 
-// Goexit terminates the goroutine that calls it.  No other goroutine is affected.
-// Goexit runs all deferred calls before terminating the goroutine.  Because Goexit
+// Goexit terminates the goroutine that calls it. No other goroutine is affected.
+// Goexit runs all deferred calls before terminating the goroutine. Because Goexit
 // is not panic, however, any recover calls in those deferred functions will return nil.
 //
 // Calling Goexit from the main goroutine terminates that goroutine
@@ -348,7 +348,7 @@ func preprintpanics(p *_panic) {
        }
 }
 
-// Print all currently active panics.  Used when crashing.
+// Print all currently active panics. Used when crashing.
 func printpanics(p *_panic) {
        if p.link != nil {
                printpanics(p.link)
@@ -449,7 +449,7 @@ func gopanic(e interface{}) {
                d.fn = nil
                gp._defer = d.link
 
-               // trigger shrinkage to test stack copy.  See stack_test.go:TestStackPanic
+               // trigger shrinkage to test stack copy. See stack_test.go:TestStackPanic
                //GC()
 
                pc := d.pc
@@ -554,7 +554,7 @@ func throw(s string) {
 var paniclk mutex
 
 // Unwind the stack after a deferred function calls recover
-// after a panic.  Then arrange to continue running as though
+// after a panic. Then arrange to continue running as though
 // the caller of the deferred function returned normally.
 func recovery(gp *g) {
        // Info about defer passed in G struct.
index f4a4a90c84ebe24f66f811d8add622117fa9ea8e..b702fd345d4dee0b10458afa10a56fe1bb12ab81 100644 (file)
@@ -31,7 +31,7 @@ import (
 //
 // A Profile's methods can be called from multiple goroutines simultaneously.
 //
-// Each Profile has a unique name.  A few profiles are predefined:
+// Each Profile has a unique name. A few profiles are predefined:
 //
 //     goroutine    - stack traces of all current goroutines
 //     heap         - a sampling of all heap allocations
@@ -48,7 +48,7 @@ import (
 // all known allocations. This exception helps mainly in programs running
 // without garbage collection enabled, usually for debugging purposes.
 //
-// The CPU profile is not available as a Profile.  It has a special API,
+// The CPU profile is not available as a Profile. It has a special API,
 // the StartCPUProfile and StopCPUProfile functions, because it streams
 // output to a writer during profiling.
 //
@@ -173,11 +173,11 @@ func (p *Profile) Count() int {
 // Add adds the current execution stack to the profile, associated with value.
 // Add stores value in an internal map, so value must be suitable for use as
 // a map key and will not be garbage collected until the corresponding
-// call to Remove.  Add panics if the profile already contains a stack for value.
+// call to Remove. Add panics if the profile already contains a stack for value.
 //
 // The skip parameter has the same meaning as runtime.Caller's skip
-// and controls where the stack trace begins.  Passing skip=0 begins the
-// trace in the function calling Add.  For example, given this
+// and controls where the stack trace begins. Passing skip=0 begins the
+// trace in the function calling Add. For example, given this
 // execution stack:
 //
 //     Add
@@ -266,7 +266,7 @@ func (x stackProfile) Less(i, j int) bool {
 }
 
 // A countProfile is a set of stack traces to be printed as counts
-// grouped by stack trace.  There are multiple implementations:
+// grouped by stack trace. There are multiple implementations:
 // all that matters is that we can find out how many traces there are
 // and obtain each trace in turn.
 type countProfile interface {
@@ -500,7 +500,7 @@ func writeGoroutine(w io.Writer, debug int) error {
 
 func writeGoroutineStacks(w io.Writer) error {
        // We don't know how big the buffer needs to be to collect
-       // all the goroutines.  Start with 1 MB and try a few times, doubling each time.
+       // all the goroutines. Start with 1 MB and try a few times, doubling each time.
        // Give up and use a truncated trace if 64 MB is not enough.
        buf := make([]byte, 1<<20)
        for i := 0; ; i++ {
@@ -563,7 +563,7 @@ var cpu struct {
 // Go code built with -buildmode=c-archive or -buildmode=c-shared.
 // StartCPUProfile relies on the SIGPROF signal, but that signal will
 // be delivered to the main program's SIGPROF signal handler (if any)
-// not to the one used by Go.  To make it work, call os/signal.Notify
+// not to the one used by Go. To make it work, call os/signal.Notify
 // for syscall.SIGPROF, but note that doing so may break any profiling
 // being done by the main program.
 func StartCPUProfile(w io.Writer) error {
@@ -574,7 +574,7 @@ func StartCPUProfile(w io.Writer) error {
        // 100 Hz is a reasonable choice: it is frequent enough to
        // produce useful data, rare enough not to bog down the
        // system, and a nice round number to make it easy to
-       // convert sample counts to seconds.  Instead of requiring
+       // convert sample counts to seconds. Instead of requiring
        // each client to specify the frequency, we hard code it.
        const hz = 100
 
index 16237e98ec1cbcb74548e79aa0133c36e5fc3e6b..4aa6b3600e9e151de00c1bd869e2743aafc0d7c1 100644 (file)
@@ -126,7 +126,7 @@ func main() {
        })
 
        // Lock the main goroutine onto this, the main OS thread,
-       // during initialization.  Most programs won't care, but a few
+       // during initialization. Most programs won't care, but a few
        // do require certain calls to be made by the main thread.
        // Those can arrange for main.main to run in the main thread
        // by calling runtime.LockOSThread during initialization
@@ -237,7 +237,7 @@ func forcegchelper() {
 
 //go:nosplit
 
-// Gosched yields the processor, allowing other goroutines to run.  It does not
+// Gosched yields the processor, allowing other goroutines to run. It does not
 // suspend the current goroutine, so execution resumes automatically.
 func Gosched() {
        mcall(gosched_m)
@@ -424,7 +424,7 @@ func schedinit() {
 
        sched.maxmcount = 10000
 
-       // Cache the framepointer experiment.  This affects stack unwinding.
+       // Cache the framepointer experiment. This affects stack unwinding.
        framepointer_enabled = haveexperiment("framepointer")
 
        tracebackinit()
@@ -454,7 +454,7 @@ func schedinit() {
        }
 
        if buildVersion == "" {
-               // Condition should never trigger.  This code just serves
+               // Condition should never trigger. This code just serves
                // to ensure runtime·buildVersion is kept in the resulting binary.
                buildVersion = "unknown"
        }
@@ -1014,7 +1014,7 @@ func startTheWorldWithSema() {
                // in the hope that it will be available next time.
                // It would have been even better to start it before the collection,
                // but doing so requires allocating memory, so it's tricky to
-               // coordinate.  This lazy approach works out in practice:
+               // coordinate. This lazy approach works out in practice:
                // we don't mind if the first couple gc rounds don't have quite
                // the maximum number of procs.
                newm(mhelpgc, nil)
@@ -1470,7 +1470,7 @@ func unlockextra(mp *m) {
        atomic.Storeuintptr(&extram, uintptr(unsafe.Pointer(mp)))
 }
 
-// Create a new m.  It will start off with a call to fn, or else the scheduler.
+// Create a new m. It will start off with a call to fn, or else the scheduler.
 // fn needs to be static and not a heap allocated closure.
 // May run with m.p==nil, so write barriers are not allowed.
 //go:nowritebarrier
@@ -2641,7 +2641,7 @@ func newproc(siz int32, fn *funcval) {
 
 // Create a new g running fn with narg bytes of arguments starting
 // at argp and returning nret bytes of results.  callerpc is the
-// address of the go statement that created this.  The new g is put
+// address of the go statement that created this. The new g is put
 // on the queue of g's waiting to run.
 func newproc1(fn *funcval, argp *uint8, narg int32, nret int32, callerpc uintptr) *g {
        _g_ := getg()
@@ -2792,7 +2792,7 @@ retry:
                _p_.gfree = gp.schedlink.ptr()
                _p_.gfreecnt--
                if gp.stack.lo == 0 {
-                       // Stack was deallocated in gfput.  Allocate a new one.
+                       // Stack was deallocated in gfput. Allocate a new one.
                        systemstack(func() {
                                gp.stack, gp.stkbar = stackalloc(_FixedStack)
                        })
@@ -3128,7 +3128,7 @@ func setcpuprofilerate_m(hz int32) {
        _g_.m.locks--
 }
 
-// Change number of processors.  The world is stopped, sched is locked.
+// Change number of processors. The world is stopped, sched is locked.
 // gcworkbufs are not being modified by either the GC or
 // the write barrier code.
 // Returns list of Ps with local work, they need to be scheduled by the caller.
@@ -3334,7 +3334,7 @@ func incidlelocked(v int32) {
 // The check is based on number of running M's, if 0 -> deadlock.
 func checkdead() {
        // For -buildmode=c-shared or -buildmode=c-archive it's OK if
-       // there are no running goroutines.  The calling program is
+       // there are no running goroutines. The calling program is
        // assumed to be running.
        if islibrary || isarchive {
                return
@@ -3579,7 +3579,7 @@ func retake(now int64) uint32 {
 }
 
 // Tell all goroutines that they have been preempted and they should stop.
-// This function is purely best-effort.  It can fail to inform a goroutine if a
+// This function is purely best-effort. It can fail to inform a goroutine if a
 // processor just started running it.
 // No locks need to be held.
 // Returns true if preemption request was issued to at least one goroutine.
@@ -3598,8 +3598,8 @@ func preemptall() bool {
 }
 
 // Tell the goroutine running on processor P to stop.
-// This function is purely best-effort.  It can incorrectly fail to inform the
-// goroutine.  It can send inform the wrong goroutine.  Even if it informs the
+// This function is purely best-effort. It can incorrectly fail to inform the
+// goroutine. It can send inform the wrong goroutine. Even if it informs the
 // correct goroutine, that goroutine might ignore the request if it is
 // simultaneously executing newstack.
 // No lock needs to be held.
index d28c15a43af0aab4ab9c94f48cab74b9e6d455b4..a4419b898e31ef5a85ff5a65ac5e5b86ea7a3731 100644 (file)
@@ -13,7 +13,7 @@ TEXT _rt0_arm_linux(SB),NOSPLIT,$-4
 // When building with -buildmode=c-shared, this symbol is called when the shared
 // library is loaded.
 TEXT _rt0_arm_linux_lib(SB),NOSPLIT,$32
-       // Preserve callee-save registers.  Raspberry Pi's dlopen(), for example,
+       // Preserve callee-save registers. Raspberry Pi's dlopen(), for example,
        // actually cares that R11 is preserved.
        MOVW    R4, 12(R13)
        MOVW    R5, 16(R13)
index 400ea296a9b3bba93b65164c29b19221726618b1..0d539c829c65a76d018aa5d55acef6e277069dac 100644 (file)
@@ -77,7 +77,7 @@ func goargs() {
 
 func goenvs_unix() {
        // TODO(austin): ppc64 in dynamic linking mode doesn't
-       // guarantee env[] will immediately follow argv.  Might cause
+       // guarantee env[] will immediately follow argv. Might cause
        // problems.
        n := int32(0)
        for argv_index(argv, argc+1+n) != nil {
index 5f22afd863dc01779b29fb9dea1a5ab14073703f..6230b69e807549fc5b7b92c67ef2b2251c9b304c 100644 (file)
@@ -539,7 +539,7 @@ const (
        _Structrnd = sys.RegSize
 )
 
-// startup_random_data holds random bytes initialized at startup.  These come from
+// startup_random_data holds random bytes initialized at startup. These come from
 // the ELF AT_RANDOM auxiliary vector (vdso_linux_amd64.go or os_linux_386.go).
 var startupRandomData []byte
 
index f9d8f9dc9fbaab34ebe49b525fc8d95d0f819027..cd078c7eac25583618da2cdf35f53397c6bc6a11 100644 (file)
@@ -247,8 +247,8 @@ func TestBadOpen(t *testing.T) {
        if GOOS == "windows" || GOOS == "nacl" {
                t.Skip("skipping OS that doesn't have open/read/write/close")
        }
-       // make sure we get the correct error code if open fails.  Same for
-       // read/write/close on the resulting -1 fd.  See issue 10052.
+       // make sure we get the correct error code if open fails. Same for
+       // read/write/close on the resulting -1 fd. See issue 10052.
        nonfile := []byte("/notreallyafile")
        fd := Open(&nonfile[0], 0, 0)
        if fd != -1 {
index b315dde6c616f3858027540320189d280d4cacae..4e87dba3e72e99000a1682cd83ac48ac7b122441 100644 (file)
@@ -239,7 +239,7 @@ func selectgoImpl(sel *hselect) (uintptr, uint16) {
        // only 0 or 1 cases plus default into simpler constructs.
        // The only way we can end up with such small sel.ncase
        // values here is for a larger select in which most channels
-       // have been nilled out.  The general code handles those
+       // have been nilled out. The general code handles those
        // cases correctly, and they are rare enough not to bother
        // optimizing (and needing to test).
 
@@ -649,8 +649,8 @@ func (q *waitq) dequeueSudoG(sgp *sudog) {
                return
        }
 
-       // x==y==nil.  Either sgp is the only element in the queue,
-       // or it has already been removed.  Use q.first to disambiguate.
+       // x==y==nil. Either sgp is the only element in the queue,
+       // or it has already been removed. Use q.first to disambiguate.
        if q.first == sgp {
                q.first = nil
                q.last = nil
index c848b129ce1a90d0222d41801ecac88e04930f59..8e4d425fde95d19eafb38623f87cbb098e7ccf9d 100644 (file)
@@ -212,11 +212,11 @@ func raisebadsignal(sig int32) {
 
        // Reset the signal handler and raise the signal.
        // We are currently running inside a signal handler, so the
-       // signal is blocked.  We need to unblock it before raising the
+       // signal is blocked. We need to unblock it before raising the
        // signal, or the signal we raise will be ignored until we return
-       // from the signal handler.  We know that the signal was unblocked
+       // from the signal handler. We know that the signal was unblocked
        // before entering the handler, or else we would not have received
-       // it.  That means that we don't have to worry about blocking it
+       // it. That means that we don't have to worry about blocking it
        // again.
        unblocksig(sig)
        setsig(sig, handler, false)
@@ -294,14 +294,14 @@ func ensureSigM() {
 
 // This is called when we receive a signal when there is no signal stack.
 // This can only happen if non-Go code calls sigaltstack to disable the
-// signal stack.  This is called via cgocallback to establish a stack.
+// signal stack. This is called via cgocallback to establish a stack.
 func noSignalStack(sig uint32) {
        println("signal", sig, "received on thread with no signal stack")
        throw("non-Go code disabled sigaltstack")
 }
 
 // This is called if we receive a signal when there is a signal stack
-// but we are not on it.  This can only happen if non-Go code called
+// but we are not on it. This can only happen if non-Go code called
 // sigaction without setting the SS_ONSTACK flag.
 func sigNotOnStack(sig uint32) {
        println("signal", sig, "received but handler not on signal stack")
index e8c57b38ee01494cbf538b4d7e967f59ee168fe9..b137169940759de0fef239c28e18e62a57f35131 100644 (file)
@@ -12,7 +12,7 @@ import "unsafe"
 func sigfwd(fn uintptr, sig uint32, info *siginfo, ctx unsafe.Pointer)
 
 // Determines if the signal should be handled by Go and if not, forwards the
-// signal to the handler that was installed before Go's.  Returns whether the
+// signal to the handler that was installed before Go's. Returns whether the
 // signal was forwarded.
 // This is called by the signal handler, and the world may be stopped.
 //go:nosplit
@@ -54,7 +54,7 @@ func sigfwdgo(sig uint32, info *siginfo, ctx unsafe.Pointer) bool {
        if c.sigcode() == _SI_USER || flags&_SigPanic == 0 {
                return false
        }
-       // Determine if the signal occurred inside Go code.  We test that:
+       // Determine if the signal occurred inside Go code. We test that:
        //   (1) we were in a goroutine (i.e., m.curg != nil), and
        //   (2) we weren't in CGO (i.e., m.curg.syscallsp == 0).
        g := getg()
index 967f2b5299d666a7891861010988158f480fcf00..f27cf9d8e2aae307eb0df56253b1ad385e5db5b1 100644 (file)
@@ -84,7 +84,7 @@ func sighandler(sig uint32, info *siginfo, ctxt unsafe.Pointer, gp *g) {
 
                // Only push runtime.sigpanic if pc != 0.
                // If pc == 0, probably panicked because of a
-               // call to a nil func.  Not pushing that onto sp will
+               // call to a nil func. Not pushing that onto sp will
                // make the trace look like a call to runtime.sigpanic instead.
                // (Otherwise the trace will end at runtime.sigpanic and we
                // won't get to see who faulted.)
index e5d4389d893ed4a3cf52b05a912d1945f1b11d75..7b51fcc4810f5f7588ed8d060bff2bb9f2b3ea0b 100644 (file)
@@ -116,7 +116,7 @@ func sighandler(sig uint32, info *siginfo, ctxt unsafe.Pointer, gp *g) {
 
                // Only push runtime.sigpanic if pc != 0.
                // If pc == 0, probably panicked because of a
-               // call to a nil func.  Not pushing that onto sp will
+               // call to a nil func. Not pushing that onto sp will
                // make the trace look like a call to runtime.sigpanic instead.
                // (Otherwise the trace will end at runtime.sigpanic and we
                // won't get to see who faulted.)
index ab7183fe6b5692d0e1ac94daf7f3296bee87cbb6..6a53cf645254be0b895a2cbedca34ea3f18407ec 100644 (file)
@@ -82,7 +82,7 @@ func exceptionhandler(info *exceptionrecord, r *context, gp *g) int32 {
 
        // Only push runtime·sigpanic if r.ip() != 0.
        // If r.ip() == 0, probably panicked because of a
-       // call to a nil func.  Not pushing that onto sp will
+       // call to a nil func. Not pushing that onto sp will
        // make the trace look like a call to runtime·sigpanic instead.
        // (Otherwise the trace will end at runtime·sigpanic and we
        // won't get to see who faulted.)
index 546d3abb248c02dae48563dfb4e85fa17d872ee7..e86e6a56369a7edc6a0039cf752a44974d56bc6b 100644 (file)
@@ -12,7 +12,7 @@
 // sigsend is called by the signal handler to queue a new signal.
 // signal_recv is called by the Go program to receive a newly queued signal.
 // Synchronization between sigsend and signal_recv is based on the sig.state
-// variable.  It can be in 3 states: sigIdle, sigReceiving and sigSending.
+// variable. It can be in 3 states: sigIdle, sigReceiving and sigSending.
 // sigReceiving means that signal_recv is blocked on sig.Note and there are no
 // new pending signals.
 // sigSending means that sig.mask *may* contain new pending signals,
@@ -136,7 +136,7 @@ func signal_recv() uint32 {
 func signal_enable(s uint32) {
        if !sig.inuse {
                // The first call to signal_enable is for us
-               // to use for initialization.  It does not pass
+               // to use for initialization. It does not pass
                // signal information in m.
                sig.inuse = true // enable reception of signals; cannot disable
                noteclear(&sig.note)
@@ -177,7 +177,7 @@ func signal_ignored(s uint32) bool {
        return sig.ignored[s/32]&(1<<(s&31)) != 0
 }
 
-// This runs on a foreign stack, without an m or a g.  No stack split.
+// This runs on a foreign stack, without an m or a g. No stack split.
 //go:nosplit
 //go:norace
 //go:nowritebarrierrec
index 89f96be2e9806f41138cf6bfba3da0b946ec8b78..575d26afb4e78664587fd97fc9c24f31d7938620 100644 (file)
@@ -115,7 +115,7 @@ func signal_recv() string {
 func signal_enable(s uint32) {
        if !sig.inuse {
                // The first call to signal_enable is for us
-               // to use for initialization.  It does not pass
+               // to use for initialization. It does not pass
                // signal information in m.
                sig.inuse = true // enable reception of signals; cannot disable
                noteclear(&sig.note)
index 1b130e3b019db5e11474a8ad8e400f6eb9ce6dd8..d71a498c0af9d9c35dbf866927b8f584ef0148f5 100644 (file)
@@ -11,7 +11,7 @@ package runtime
 
 // The original C code and the long comment below are
 // from FreeBSD's /usr/src/lib/msun/src/e_sqrt.c and
-// came with this notice.  The go code is a simplified
+// came with this notice. The go code is a simplified
 // version of the original C.
 //
 // ====================================================
index d2466de6535268e30c70dd9f2cded3071fee6da7..f7865144d785a31496ff791be8195ab634ad9397 100644 (file)
@@ -93,7 +93,7 @@ const (
        _StackGuard = 720*sys.StackGuardMultiplier + _StackSystem
 
        // After a stack split check the SP is allowed to be this
-       // many bytes below the stack guard.  This saves an instruction
+       // many bytes below the stack guard. This saves an instruction
        // in the checking sequence for tiny frames.
        _StackSmall = 128
 
@@ -180,13 +180,13 @@ func stacklog2(n uintptr) int {
        return log2
 }
 
-// Allocates a stack from the free pool.  Must be called with
+// Allocates a stack from the free pool. Must be called with
 // stackpoolmu held.
 func stackpoolalloc(order uint8) gclinkptr {
        list := &stackpool[order]
        s := list.first
        if s == nil {
-               // no free stacks.  Allocate another span worth.
+               // no free stacks. Allocate another span worth.
                s = mheap_.allocStack(_StackCacheSize >> _PageShift)
                if s == nil {
                        throw("out of memory")
@@ -217,7 +217,7 @@ func stackpoolalloc(order uint8) gclinkptr {
        return x
 }
 
-// Adds stack x to the free pool.  Must be called with stackpoolmu held.
+// Adds stack x to the free pool. Must be called with stackpoolmu held.
 func stackpoolfree(x gclinkptr, order uint8) {
        s := mheap_.lookup(unsafe.Pointer(x))
        if s.state != _MSpanStack {
index 9702e1e91314bacf9c2cb7d52c722416e676a51c..a32b68b630033a99f6804089f1a7d1fb6d045c49 100644 (file)
@@ -416,9 +416,9 @@ func TestStackAllOutput(t *testing.T) {
 }
 
 func TestStackPanic(t *testing.T) {
-       // Test that stack copying copies panics correctly.  This is difficult
+       // Test that stack copying copies panics correctly. This is difficult
        // to test because it is very unlikely that the stack will be copied
-       // in the middle of gopanic.  But it can happen.
+       // in the middle of gopanic. But it can happen.
        // To make this test effective, edit panic.go:gopanic and uncomment
        // the GC() call just before freedefer(d).
        defer func() {
index 37b75c1a89fefad2c0de775e2a0dc5a58d1fdb09..292d5595e31401ce0855f04a9b774812a0eecb90 100644 (file)
@@ -237,7 +237,7 @@ func TestRangeStringCast(t *testing.T) {
 func TestString2Slice(t *testing.T) {
        // Make sure we don't return slices that expose
        // an unzeroed section of stack-allocated temp buf
-       // between len and cap.  See issue 14232.
+       // between len and cap. See issue 14232.
        s := "foož"
        b := ([]byte)(s)
        if cap(b) != 5 {
index afea41448fd97473fd77d72f3f3bf779e053399e..f1df93f9e4b0c58cdd6423442dd78d3ab359af9c 100644 (file)
@@ -163,8 +163,8 @@ const pcbucketsize = 256 * minfunc // size of bucket in the pc->func lookup tabl
 // Each bucket represents 4096 bytes of the text segment.
 // Each subbucket represents 256 bytes of the text segment.
 // To find a function given a pc, locate the bucket and subbucket for
-// that pc.  Add together the idx and subbucket value to obtain a
-// function index.  Then scan the functab array starting at that
+// that pc. Add together the idx and subbucket value to obtain a
+// function index. Then scan the functab array starting at that
 // index to find the target function.
 // This table uses 20 bytes for every 4096 bytes of code, or ~0.5% overhead.
 type findfuncbucket struct {
index ad3dca444a830cf0028b07473e1cb7b80bf8eeb1..9e45f8a0024651e50777d707a93be9fcb469e605 100644 (file)
@@ -377,7 +377,7 @@ TEXT runtime·bsdthread_start(SB),NOSPLIT,$0
        POPL    AX
        POPAL
 
-       // Now segment is established.  Initialize m, g.
+       // Now segment is established. Initialize m, g.
        get_tls(BP)
        MOVL    m_g0(DX), AX
        MOVL    AX, g(BP)
index 4e4d793c43b7387ddfe5b7d5b1cb1ee649a66bf1..be964cb3ece4207690ee1b2ef7a5707e0192cdec 100644 (file)
@@ -52,11 +52,11 @@ TEXT runtime·lwp_start(SB),NOSPLIT,$0
        MOVQ    DI, g(CX)
 
        // On DragonFly, a new thread inherits the signal stack of the
-       // creating thread.  That confuses minit, so we remove that
-       // signal stack here before calling the regular mstart.  It's
+       // creating thread. That confuses minit, so we remove that
+       // signal stack here before calling the regular mstart. It's
        // a bit baroque to remove a signal stack here only to add one
        // in minit, but it's a simple change that keeps DragonFly
-       // working like other OS's.  At this point all signals are
+       // working like other OS's. At this point all signals are
        // blocked, so there is no race.
        SUBQ    $8, SP
        MOVQ    $0, 0(SP)
index 4a74196032d76699d679954074451135b4adb23b..3c7b17f927582b3f6c9116eae60d8bfe0ab5bbb5 100644 (file)
@@ -355,7 +355,7 @@ TEXT runtime·clone(SB),NOSPLIT,$0
        POPL    AX
        POPAL
 
-       // Now segment is established.  Initialize m, g.
+       // Now segment is established. Initialize m, g.
        get_tls(AX)
        MOVL    DX, g(AX)
        MOVL    BX, g_m(DX)
index f407078176ad39b3e44629dae722d45eafc45bcf..7cab6492382c9a3bbfa9fc314c2ef1da4bffb188 100644 (file)
@@ -357,7 +357,7 @@ nog:
        // Call fn
        CALL    R12
 
-       // It shouldn't return.  If it does, exit that thread.
+       // It shouldn't return. If it does, exit that thread.
        MOVL    $111, DI
        MOVL    $60, AX
        SYSCALL
index 6a3b924330dc1304eb9273d98806cedcca7afdd1..50a551320a30147436c79a4fed1795f68f6eafa1 100644 (file)
@@ -313,7 +313,7 @@ nog:
        MOVW    $16(R13), R13
        BL      (R0)
 
-       // It shouldn't return.  If it does, exit that thread.
+       // It shouldn't return. If it does, exit that thread.
        SUB     $16, R13 // restore the stack pointer to avoid memory corruption
        MOVW    $0, R0
        MOVW    R0, 4(R13)
index 3b3c1095f02086e891c144540f7a33c83eded077..0322c36d1cbe64e08be213d9fe29657987b92d2e 100644 (file)
@@ -262,7 +262,7 @@ TEXT runtime·lwp_tramp(SB),NOSPLIT,$0
        POPL    AX
        POPAL
 
-       // Now segment is established.  Initialize m, g.
+       // Now segment is established. Initialize m, g.
        get_tls(AX)
        MOVL    DX, g(AX)
        MOVL    BX, g_m(DX)
index fb21f1155ab4b01f56c70b08c93d45ff0496d9ac..d6b5d3523235436f5f1af96bfd61bd0669d77919 100644 (file)
@@ -37,7 +37,7 @@ TEXT runtime·lwp_tramp(SB),NOSPLIT,$0
        // Call fn
        CALL    R12
 
-       // It shouldn't return.  If it does, exit.
+       // It shouldn't return. If it does, exit.
        MOVL    $310, AX                // sys__lwp_exit
        SYSCALL
        JMP     -3(PC)                  // keep exiting
index 769b2f9455f5c8cbfbbc337ba9b3dc5426810bd3..f80a85fb67767b327b534cb5d6481e5d1a4d3d2c 100644 (file)
@@ -279,7 +279,7 @@ TEXT runtime·tfork(SB),NOSPLIT,$12
        POPL    AX
        POPAL
        
-       // Now segment is established.  Initialize m, g.
+       // Now segment is established. Initialize m, g.
        get_tls(AX)
        MOVL    DX, g(AX)
        MOVL    BX, g_m(DX)
index ed368babc086a1621e4409b373be4e972be40aa1..c9fb8322c549788770861d79bfea725513de37cd 100644 (file)
@@ -50,7 +50,7 @@ TEXT runtime·tfork(SB),NOSPLIT,$32
        // Call fn
        CALL    R12
 
-       // It shouldn't return.  If it does, exit
+       // It shouldn't return. If it does, exit
        MOVQ    $0, DI                  // arg 1 - notdead
        MOVL    $302, AX                // sys___threxit
        SYSCALL
index 97296717250f84454c728ee239c42172dce4fb66..f6e45cc2dca0637d45bf861287b5726198db0956 100644 (file)
@@ -40,13 +40,13 @@ func rewindmorestack(buf *gobuf) {
                return
        }
        if pc[0] == 0xcc {
-               // This is a breakpoint inserted by gdb.  We could use
-               // runtime·findfunc to find the function.  But if we
+               // This is a breakpoint inserted by gdb. We could use
+               // runtime·findfunc to find the function. But if we
                // do that, then we will continue execution at the
                // function entry point, and we will not hit the gdb
-               // breakpoint.  So for this case we don't change
+               // breakpoint. So for this case we don't change
                // buf.pc, so that when we return we will execute
-               // the jump instruction and carry on.  This means that
+               // the jump instruction and carry on. This means that
                // stack unwinding may not work entirely correctly
                // (https://golang.org/issue/5723) but the user is
                // running under gdb anyhow.
index 4739781530582d9ad26cbf94d2e5793873d03d74..e11c5dc3a2aca352c41862891d5dc7eb9dbffa49 100644 (file)
@@ -3,12 +3,12 @@
 // license that can be found in the LICENSE file.
 
 // This file defines flags attached to various functions
-// and data objects.  The compilers, assemblers, and linker must
+// and data objects. The compilers, assemblers, and linker must
 // all agree on these values.
 
-// Don't profile the marked routine.  This flag is deprecated.
+// Don't profile the marked routine. This flag is deprecated.
 #define NOPROF 1
-// It is ok for the linker to get multiple of these symbols.  It will
+// It is ok for the linker to get multiple of these symbols. It will
 // pick one of the duplicates to use.
 #define DUPOK  2
 // Don't insert stack check preamble.
index 3f8f6968c2ab2c17f46ce5aecf3122b5b20c714d..8df185dc8fd6056d2c9986fdbbcb5d6bbab5e01e 100644 (file)
@@ -202,7 +202,7 @@ func timerproc() {
                        goparkunlock(&timers.lock, "timer goroutine (idle)", traceEvGoBlock, 1)
                        continue
                }
-               // At least one timer pending.  Sleep until then.
+               // At least one timer pending. Sleep until then.
                timers.sleeping = true
                noteclear(&timers.waitnote)
                unlock(&timers.lock)
index 1d76947380e5fe84b40201f2c3875ffe5715b349..1717624c1c2219f56e702e263538f8116531dcd3 100644 (file)
@@ -115,7 +115,7 @@ func tracebackdefers(gp *g, callback func(*stkframe, unsafe.Pointer) bool, v uns
        }
 }
 
-// Generic traceback.  Handles runtime stack prints (pcbuf == nil),
+// Generic traceback. Handles runtime stack prints (pcbuf == nil),
 // the runtime.Callers function (pcbuf != nil), as well as the garbage
 // collector (callback != nil).  A little clunky to merge these, but avoids
 // duplicating the code and all its subtlety.
@@ -706,7 +706,7 @@ func tracebackothers(me *g) {
                goroutineheader(gp)
                // Note: gp.m == g.m occurs when tracebackothers is
                // called from a signal handler initiated during a
-               // systemstack call.  The original G is still in the
+               // systemstack call. The original G is still in the
                // running state, and we want to print its stack.
                if gp.m != g.m && readgstatus(gp)&^_Gscan == _Grunning {
                        print("\tgoroutine running on other thread; stack unavailable\n")
index ce8e7d064360f748ec77b27b1b72b3b55be6a68d..92232d57bcce58fe0b5bafae2a3dfc30ae7dd244 100644 (file)
@@ -1,7 +1,7 @@
 // Inferno's libkern/vlop-386.s
 // http://code.google.com/p/inferno-os/source/browse/libkern/vlop-386.s
 //
-//         Copyright Â© 1994-1999 Lucent Technologies Inc.  All rights reserved.
+//         Copyright Â© 1994-1999 Lucent Technologies Inc. All rights reserved.
 //         Revisions Copyright Â© 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com).  All rights reserved.
 //         Portions Copyright 2009 The Go Authors. All rights reserved.
 //
index ae1f58254ad3243a062d082020bdbea184272b02..338d9d5d09406f9548895182519d36b932fe4ef1 100644 (file)
@@ -1,7 +1,7 @@
 // Inferno's libkern/vlop-arm.s
 // http://code.google.com/p/inferno-os/source/browse/libkern/vlop-arm.s
 //
-//         Copyright Â© 1994-1999 Lucent Technologies Inc.  All rights reserved.
+//         Copyright Â© 1994-1999 Lucent Technologies Inc. All rights reserved.
 //         Revisions Copyright Â© 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com).  All rights reserved.
 //         Portions Copyright 2009 The Go Authors. All rights reserved.
 //
index 6370732ca0d387effbb9ff0ac0ca9ba6a1ece624..2419f78ce2c0ced27cfa523fadcda8248c46930c 100644 (file)
@@ -1,7 +1,7 @@
 // Inferno's libkern/vlrt-arm.c
 // http://code.google.com/p/inferno-os/source/browse/libkern/vlrt-arm.c
 //
-//         Copyright Â© 1994-1999 Lucent Technologies Inc.  All rights reserved.
+//         Copyright Â© 1994-1999 Lucent Technologies Inc. All rights reserved.
 //         Revisions Copyright Â© 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com).  All rights reserved.
 //         Portions Copyright 2009 The Go Authors. All rights reserved.
 //
index de8178ff484ef43f4a01281a243857bbb5a83cbd..b9640a40aff88e90f3ca9b48aed1a9ce69071ae8 100644 (file)
@@ -8,10 +8,10 @@ package sort
 
 // Search uses binary search to find and return the smallest index i
 // in [0, n) at which f(i) is true, assuming that on the range [0, n),
-// f(i) == true implies f(i+1) == true.  That is, Search requires that
+// f(i) == true implies f(i+1) == true. That is, Search requires that
 // f is false for some (possibly empty) prefix of the input range [0, n)
 // and then true for the (possibly empty) remainder; Search returns
-// the first true index.  If there is no such index, Search returns n.
+// the first true index. If there is no such index, Search returns n.
 // (Note that the "not found" return value is not -1 as in, for instance,
 // strings.Index.)
 // Search calls f(i) only for i in the range [0, n).
@@ -85,7 +85,7 @@ func SearchInts(a []int, x int) int {
 }
 
 // SearchFloat64s searches for x in a sorted slice of float64s and returns the index
-// as specified by Search.  The return value is the index to insert x if x is not
+// as specified by Search. The return value is the index to insert x if x is not
 // present (it could be len(a)).
 // The slice must be sorted in ascending order.
 //
@@ -94,7 +94,7 @@ func SearchFloat64s(a []float64, x float64) int {
 }
 
 // SearchStrings searches for x in a sorted slice of strings and returns the index
-// as specified by Search.  The return value is the index to insert x if x is not
+// as specified by Search. The return value is the index to insert x if x is not
 // present (it could be len(a)).
 // The slice must be sorted in ascending order.
 //
index 29b8d62dfed9dc6b393c79bd1cae828d92c8490e..ded68ebde0a2b38c237d090f28c9a1874853f269 100644 (file)
@@ -147,7 +147,7 @@ func BenchmarkSearchWrappers(b *testing.B) {
 }
 
 // Abstract exhaustive test: all sizes up to 100,
-// all possible return values.  If there are any small
+// all possible return values. If there are any small
 // corner cases, this test exercises them.
 func TestSearchExhaustive(t *testing.T) {
        for size := 0; size <= 100; size++ {
index ce3dc06f8868945c036317939a4538711d545e13..b322c0eddffd059c7318ee5eca2001bdbc4f53da 100644 (file)
@@ -7,7 +7,7 @@
 package sort
 
 // A type, typically a collection, that satisfies sort.Interface can be
-// sorted by the routines in this package.  The methods require that the
+// sorted by the routines in this package. The methods require that the
 // elements of the collection be enumerated by an integer index.
 type Interface interface {
        // Len is the number of elements in the collection.
@@ -315,7 +315,7 @@ func StringsAreSorted(a []string) bool { return IsSorted(StringSlice(a)) }
 
 // Notes on stable sorting:
 // The used algorithms are simple and provable correct on all input and use
-// only logarithmic additional stack space.  They perform well if compared
+// only logarithmic additional stack space. They perform well if compared
 // experimentally to other stable in-place sorting algorithms.
 //
 // Remarks on other algorithms evaluated:
index ba4933218b0a0abd3ee4d8bbf562064c98e9b031..9f70cc1fd7d4905b2213bf6b717cb3404de25be0 100644 (file)
@@ -196,7 +196,7 @@ var (
 
 func init() {
        // The atof routines return NumErrors wrapping
-       // the error and the string.  Convert the table above.
+       // the error and the string. Convert the table above.
        for i := range atoftests {
                test := &atoftests[i]
                if test.err != nil {
index e6febcb7d82f7d0eea4b8a683c3a744e415e6834..8fd966eaf8bc454d4d0477cc8946ce4ef11452af 100644 (file)
@@ -138,16 +138,16 @@ Error:
 }
 
 // ParseInt interprets a string s in the given base (2 to 36) and
-// returns the corresponding value i.  If base == 0, the base is
+// returns the corresponding value i. If base == 0, the base is
 // implied by the string's prefix: base 16 for "0x", base 8 for
 // "0", and base 10 otherwise.
 //
 // The bitSize argument specifies the integer type
-// that the result must fit into.  Bit sizes 0, 8, 16, 32, and 64
+// that the result must fit into. Bit sizes 0, 8, 16, 32, and 64
 // correspond to int, int8, int16, int32, and int64.
 //
 // The errors that ParseInt returns have concrete type *NumError
-// and include err.Num = s.  If s is empty or contains invalid
+// and include err.Num = s. If s is empty or contains invalid
 // digits, err.Err = ErrSyntax and the returned value is 0;
 // if the value corresponding to s cannot be represented by a
 // signed integer of the given size, err.Err = ErrRange and the
index bd6a6a01fa1d238fbda9e39036a721d501bae919..d608505da216ff3ceaeb51b06b62a82a6dd0e777 100644 (file)
@@ -196,7 +196,7 @@ var numErrorTests = []numErrorTest{
 
 func init() {
        // The atoi routines return NumErrors wrapping
-       // the error and the string.  Convert the tables above.
+       // the error and the string. Convert the tables above.
        for i := range atoui64tests {
                test := &atoui64tests[i]
                if test.err != nil {
index 6de2f8bc6f2f10741c456948527580f3e8722546..39dd9c4a581539376c5421ce88728e690fa01955 100644 (file)
@@ -41,7 +41,7 @@ func myatof64(s string) (f float64, ok bool) {
                }
                v := float64(n)
                // We expect that v*pow2(e) fits in a float64,
-               // but pow2(e) by itself may not.  Be careful.
+               // but pow2(e) by itself may not. Be careful.
                if e <= -1000 {
                        v *= pow2(-1000)
                        e += 1000
index 9ff5d1056aa2164171eac806e774629f55f7d697..8b3d33e4e77498ca3db8b87165dfd6fdf516b980 100644 (file)
@@ -23,7 +23,7 @@ var float32info = floatInfo{23, 8, -127}
 var float64info = floatInfo{52, 11, -1023}
 
 // FormatFloat converts the floating-point number f to a string,
-// according to the format fmt and precision prec.  It rounds the
+// according to the format fmt and precision prec. It rounds the
 // result assuming that the original was obtained from a floating-point
 // value of bitSize bits (32 for float32, 64 for float64).
 //
index 8a60159d41fc9554b556605676a1fc45a08f14fd..becfe1df075669aa845e1904398895729c5fe7e3 100644 (file)
@@ -104,7 +104,7 @@ func appendEscapedRune(buf []byte, r rune, width int, quote byte, ASCIIonly, gra
        return buf
 }
 
-// Quote returns a double-quoted Go string literal representing s.  The
+// Quote returns a double-quoted Go string literal representing s. The
 // returned string uses Go escape sequences (\t, \n, \xFF, \u0100) for
 // control characters and non-printable characters as defined by
 // IsPrint.
index 68fc88e143165b629ca9ae926f4e8cae9ab90245..bc12e421b0dd7919b680a641da1b96c5bb951631 100644 (file)
@@ -56,7 +56,7 @@ func TestCompareStrings(t *testing.T) {
        a := make([]byte, n+1)
        b := make([]byte, n+1)
        for len := 0; len < 128; len++ {
-               // randomish but deterministic data.  No 0 or 255.
+               // randomish but deterministic data. No 0 or 255.
                for i := 0; i < len; i++ {
                        a[i] = byte(1 + 31*i%254)
                        b[i] = byte(1 + 31*i%254)
index 37d5647ffd620a16bb82d869572f4c8168f3184e..c24c77b9dd0fc711f9788831b74fd500eb58bf93 100644 (file)
@@ -346,7 +346,7 @@ func FieldsFunc(s string, f func(rune) bool) []string {
        return a
 }
 
-// Join concatenates the elements of a to create a single string.   The separator string
+// Join concatenates the elements of a to create a single string. The separator string
 // sep is placed between elements in the resulting string.
 func Join(a []string, sep string) string {
        if len(a) == 0 {
@@ -384,8 +384,8 @@ func HasSuffix(s, suffix string) bool {
 // dropped from the string with no replacement.
 func Map(mapping func(rune) rune, s string) string {
        // In the worst case, the string can grow when mapped, making
-       // things unpleasant.  But it's so rare we barge in assuming it's
-       // fine.  It could also shrink but that falls out naturally.
+       // things unpleasant. But it's so rare we barge in assuming it's
+       // fine. It could also shrink but that falls out naturally.
        maxbytes := len(s) // length of b
        nbytes := 0        // number of bytes encoded in b
        // The output buffer b is initialized on demand, the first
@@ -714,7 +714,7 @@ func EqualFold(s, t string) bool {
                        return false
                }
 
-               // General case.  SimpleFold(x) returns the next equivalent rune > x
+               // General case. SimpleFold(x) returns the next equivalent rune > x
                // or wraps around to smaller values.
                r := unicode.SimpleFold(sr)
                for r != sr && r < tr {
@@ -726,6 +726,6 @@ func EqualFold(s, t string) bool {
                return false
        }
 
-       // One string is empty.  Are both?
+       // One string is empty. Are both?
        return s == t
 }
index 49f55fe38c764d9c7e2cd43884b515298ccb326f..0572adbdd90431dff364a33bde7d0556bc3ed25a 100644 (file)
@@ -492,7 +492,7 @@ func rot13(r rune) rune {
 func TestMap(t *testing.T) {
        // Run a couple of awful growth/shrinkage tests
        a := tenRunes('a')
-       // 1.  Grow.  This triggers two reallocations in Map.
+       // 1.  Grow. This triggers two reallocations in Map.
        maxRune := func(rune) rune { return unicode.MaxRune }
        m := Map(maxRune, a)
        expect := tenRunes(unicode.MaxRune)
index 6cdc8fbc3630c4dc35e136f15d7159586fafcf21..d35ea2a4e0b40059e2172b36fce5c062ba2885ba 100644 (file)
@@ -208,7 +208,7 @@ loop:
 ok:
        RET
 
-// Fast, cached version of check.  No frame, just MOVW CMP RET after first time.
+// Fast, cached version of check. No frame, just MOVW CMP RET after first time.
 TEXT   fastCheck64<>(SB),NOSPLIT,$-4
        MOVW    ok64<>(SB), R0
        CMP     $0, R0  // have we been here before?
index 23650abae9b79abd20737b7d721c890bf4427901..deb3ccb55be795fea20a4d07c9fd860b1b4e3b0e 100644 (file)
@@ -747,7 +747,7 @@ func TestStorePointer(t *testing.T) {
 // (Is the function atomic?)
 //
 // For each function, we write a "hammer" function that repeatedly
-// uses the atomic operation to add 1 to a value.  After running
+// uses the atomic operation to add 1 to a value. After running
 // multiple hammers in parallel, check that we end with the correct
 // total.
 // Swap can't add 1, so it uses a different scheme.
index 0aefcda9084f3ed4f1da11654c01ca080ecfd0f5..273884767f7f79ac88f2c43a8143aebf567324fb 100644 (file)
@@ -35,13 +35,13 @@ func NewCond(l Locker) *Cond {
 }
 
 // Wait atomically unlocks c.L and suspends execution
-// of the calling goroutine.  After later resuming execution,
-// Wait locks c.L before returning.  Unlike in other systems,
+// of the calling goroutine. After later resuming execution,
+// Wait locks c.L before returning. Unlike in other systems,
 // Wait cannot return unless awoken by Broadcast or Signal.
 //
 // Because c.L is not locked when Wait first resumes, the caller
 // typically cannot assume that the condition is true when
-// Wait returns.  Instead, the caller should Wait in a loop:
+// Wait returns. Instead, the caller should Wait in a loop:
 //
 //    c.L.Lock()
 //    for !condition() {
index eb526144c52a4999572b3013a301215e250af794..78b115cf5a197279717838c4a24138b815cb1669 100644 (file)
@@ -3,8 +3,8 @@
 // license that can be found in the LICENSE file.
 
 // Package sync provides basic synchronization primitives such as mutual
-// exclusion locks.  Other than the Once and WaitGroup types, most are intended
-// for use by low-level library routines.  Higher-level synchronization is
+// exclusion locks. Other than the Once and WaitGroup types, most are intended
+// for use by low-level library routines. Higher-level synchronization is
 // better done via channels and communication.
 //
 // Values containing the types defined in this package should not be copied.
index 10b42fddc2f2e2ab50cec49176f6f6a1f1002278..d8ef952ea5489762cdf17712b321668dfdc8da32 100644 (file)
@@ -18,10 +18,10 @@ type Once struct {
 // first time for this instance of Once. In other words, given
 //     var once Once
 // if once.Do(f) is called multiple times, only the first call will invoke f,
-// even if f has a different value in each invocation.  A new instance of
+// even if f has a different value in each invocation. A new instance of
 // Once is required for each function to execute.
 //
-// Do is intended for initialization that must be run exactly once.  Since f
+// Do is intended for initialization that must be run exactly once. Since f
 // is niladic, it may be necessary to use a function literal to capture the
 // arguments to a function to be invoked by Do:
 //     config.once.Do(func() { config.init(filename) })
index d438c93c88e074428d981e013ca6366a9d819f9c..9fc6e3bd2c5151ec27cac36295962123e96a0716 100644 (file)
@@ -94,11 +94,11 @@ func (rw *RWMutex) Lock() {
        }
 }
 
-// Unlock unlocks rw for writing.  It is a run-time error if rw is
+// Unlock unlocks rw for writing. It is a run-time error if rw is
 // not locked for writing on entry to Unlock.
 //
 // As with Mutexes, a locked RWMutex is not associated with a particular
-// goroutine.  One goroutine may RLock (Lock) an RWMutex and then
+// goroutine. One goroutine may RLock (Lock) an RWMutex and then
 // arrange for another goroutine to RUnlock (Unlock) it.
 func (rw *RWMutex) Unlock() {
        if race.Enabled {
index c77fec306c06937dca7f3ec7428b7c4dfee1b896..029e6077cde7144b321cd1c8d90fe339cd26a4fc 100644 (file)
@@ -12,8 +12,8 @@ import (
 
 // A WaitGroup waits for a collection of goroutines to finish.
 // The main goroutine calls Add to set the number of
-// goroutines to wait for.  Then each of the goroutines
-// runs and calls Done when finished.  At the same time,
+// goroutines to wait for. Then each of the goroutines
+// runs and calls Done when finished. At the same time,
 // Wait can be used to block until all goroutines have finished.
 type WaitGroup struct {
        // 64-bit value: high 32 bits are counter, low 32 bits are waiter count.
index d182896a537e789900f89acd9b33aa04e253ec2b..47adffd60c8f44b82a26c05d8358d13c7780895a 100644 (file)
@@ -32,7 +32,7 @@ func runtime_AfterFork()
 // If a dup or exec fails, write the errno error to pipe.
 // (Pipe is close-on-exec so if exec succeeds, it will be closed.)
 // In the child, this function must not acquire any locks, because
-// they might have been locked at the time of the fork.  This means
+// they might have been locked at the time of the fork. This means
 // no rescheduling, no malloc calls, and no new stack segments.
 // For the same reason compiler does not race instrument it.
 // The calls to RawSyscall are okay because they are assembly
index 3e08d43bed64c1757594ea41e71f7d8b3d35da3d..0ea9283bf680d6b2a06eb99c9b3a677120895e76 100644 (file)
@@ -48,7 +48,7 @@ func runtime_AfterFork()
 // If a dup or exec fails, write the errno error to pipe.
 // (Pipe is close-on-exec so if exec succeeds, it will be closed.)
 // In the child, this function must not acquire any locks, because
-// they might have been locked at the time of the fork.  This means
+// they might have been locked at the time of the fork. This means
 // no rescheduling, no malloc calls, and no new stack segments.
 // For the same reason compiler does not race instrument it.
 // The calls to RawSyscall are okay because they are assembly
index d342cb02bc1b43bd5126e92ddd306895481c5fb9..b9e78c5ab476edbb26e82ed4ac8e4b5096e7c710 100644 (file)
@@ -15,31 +15,31 @@ import (
 // Lock synchronizing creation of new file descriptors with fork.
 //
 // We want the child in a fork/exec sequence to inherit only the
-// file descriptors we intend.  To do that, we mark all file
+// file descriptors we intend. To do that, we mark all file
 // descriptors close-on-exec and then, in the child, explicitly
 // unmark the ones we want the exec'ed program to keep.
 // Unix doesn't make this easy: there is, in general, no way to
-// allocate a new file descriptor close-on-exec.  Instead you
+// allocate a new file descriptor close-on-exec. Instead you
 // have to allocate the descriptor and then mark it close-on-exec.
 // If a fork happens between those two events, the child's exec
 // will inherit an unwanted file descriptor.
 //
 // This lock solves that race: the create new fd/mark close-on-exec
 // operation is done holding ForkLock for reading, and the fork itself
-// is done holding ForkLock for writing.  At least, that's the idea.
+// is done holding ForkLock for writing. At least, that's the idea.
 // There are some complications.
 //
 // Some system calls that create new file descriptors can block
 // for arbitrarily long times: open on a hung NFS server or named
-// pipe, accept on a socket, and so on.  We can't reasonably grab
+// pipe, accept on a socket, and so on. We can't reasonably grab
 // the lock across those operations.
 //
 // It is worse to inherit some file descriptors than others.
 // If a non-malicious child accidentally inherits an open ordinary file,
-// that's not a big deal.  On the other hand, if a long-lived child
+// that's not a big deal. On the other hand, if a long-lived child
 // accidentally inherits the write end of a pipe, then the reader
 // of that pipe will not see EOF until that child exits, potentially
-// causing the parent program to hang.  This is a common problem
+// causing the parent program to hang. This is a common problem
 // in threaded C programs that use popen.
 //
 // Luckily, the file descriptors that are most important not to
@@ -49,13 +49,13 @@ import (
 // The rules for which file descriptor-creating operations use the
 // ForkLock are as follows:
 //
-// 1) Pipe.    Does not block.  Use the ForkLock.
-// 2) Socket.  Does not block.  Use the ForkLock.
-// 3) Accept.  If using non-blocking mode, use the ForkLock.
+// 1) Pipe. Does not block. Use the ForkLock.
+// 2) Socket. Does not block. Use the ForkLock.
+// 3) Accept. If using non-blocking mode, use the ForkLock.
 //             Otherwise, live with the race.
-// 4) Open.    Can block.  Use O_CLOEXEC if available (Linux).
+// 4) Open. Can block. Use O_CLOEXEC if available (Linux).
 //             Otherwise, live with the race.
-// 5) Dup.     Does not block.  Use the ForkLock.
+// 5) Dup. Does not block. Use the ForkLock.
 //             On Linux, could use fcntl F_DUPFD_CLOEXEC
 //             instead of the ForkLock, but only for dup(fd, -1).
 
@@ -169,7 +169,7 @@ func init() {
 // (The pipe write end is close-on-exec so if exec succeeds, it will be closed.)
 //
 // In the child, this function must not acquire any locks, because
-// they might have been locked at the time of the fork.  This means
+// they might have been locked at the time of the fork. This means
 // no rescheduling, no malloc calls, and no new stack segments.
 // The calls to RawSyscall are okay because they are assembly
 // functions that do not grow the stack.
index 63fa8482da3dcc28c933e75bbe4760b0cb370459..c2b294946209ed2fa811ec6885010c463e74aee3 100644 (file)
@@ -44,7 +44,7 @@ func write1(fd uintptr, buf uintptr, nbyte uintptr) (n uintptr, err Errno)
 // If a dup or exec fails, write the errno error to pipe.
 // (Pipe is close-on-exec so if exec succeeds, it will be closed.)
 // In the child, this function must not acquire any locks, because
-// they might have been locked at the time of the fork.  This means
+// they might have been locked at the time of the fork. This means
 // no rescheduling, no malloc calls, and no new stack segments.
 //
 // We call hand-crafted syscalls, implemented in
index 565252cb4a98e731333928348bead8b93a5ca3e5..82e33124e2e721f46f0976c0afdea4296346c5e7 100644 (file)
@@ -17,31 +17,31 @@ import (
 // Lock synchronizing creation of new file descriptors with fork.
 //
 // We want the child in a fork/exec sequence to inherit only the
-// file descriptors we intend.  To do that, we mark all file
+// file descriptors we intend. To do that, we mark all file
 // descriptors close-on-exec and then, in the child, explicitly
 // unmark the ones we want the exec'ed program to keep.
 // Unix doesn't make this easy: there is, in general, no way to
-// allocate a new file descriptor close-on-exec.  Instead you
+// allocate a new file descriptor close-on-exec. Instead you
 // have to allocate the descriptor and then mark it close-on-exec.
 // If a fork happens between those two events, the child's exec
 // will inherit an unwanted file descriptor.
 //
 // This lock solves that race: the create new fd/mark close-on-exec
 // operation is done holding ForkLock for reading, and the fork itself
-// is done holding ForkLock for writing.  At least, that's the idea.
+// is done holding ForkLock for writing. At least, that's the idea.
 // There are some complications.
 //
 // Some system calls that create new file descriptors can block
 // for arbitrarily long times: open on a hung NFS server or named
-// pipe, accept on a socket, and so on.  We can't reasonably grab
+// pipe, accept on a socket, and so on. We can't reasonably grab
 // the lock across those operations.
 //
 // It is worse to inherit some file descriptors than others.
 // If a non-malicious child accidentally inherits an open ordinary file,
-// that's not a big deal.  On the other hand, if a long-lived child
+// that's not a big deal. On the other hand, if a long-lived child
 // accidentally inherits the write end of a pipe, then the reader
 // of that pipe will not see EOF until that child exits, potentially
-// causing the parent program to hang.  This is a common problem
+// causing the parent program to hang. This is a common problem
 // in threaded C programs that use popen.
 //
 // Luckily, the file descriptors that are most important not to
@@ -51,13 +51,13 @@ import (
 // The rules for which file descriptor-creating operations use the
 // ForkLock are as follows:
 //
-// 1) Pipe.    Does not block.  Use the ForkLock.
-// 2) Socket.  Does not block.  Use the ForkLock.
-// 3) Accept.  If using non-blocking mode, use the ForkLock.
+// 1) Pipe. Does not block. Use the ForkLock.
+// 2) Socket. Does not block. Use the ForkLock.
+// 3) Accept. If using non-blocking mode, use the ForkLock.
 //             Otherwise, live with the race.
-// 4) Open.    Can block.  Use O_CLOEXEC if available (Linux).
+// 4) Open. Can block. Use O_CLOEXEC if available (Linux).
 //             Otherwise, live with the race.
-// 5) Dup.     Does not block.  Use the ForkLock.
+// 5) Dup. Does not block. Use the ForkLock.
 //             On Linux, could use fcntl F_DUPFD_CLOEXEC
 //             instead of the ForkLock, but only for dup(fd, -1).
 
index 769e6b9fd53172fb04a2c14b2b74d0b220d68e82..bb102c6e135e198b11a1a508d6a14ac65249039d 100644 (file)
@@ -3,10 +3,10 @@
 // license that can be found in the LICENSE file.
 
 // Package syscall contains an interface to the low-level operating system
-// primitives.  The details vary depending on the underlying system, and
+// primitives. The details vary depending on the underlying system, and
 // by default, godoc will display the syscall documentation for the current
-// system.  If you want godoc to display syscall documentation for another
-// system, set $GOOS and $GOARCH to the desired system.  For example, if
+// system. If you want godoc to display syscall documentation for another
+// system, set $GOOS and $GOARCH to the desired system. For example, if
 // you want to view documentation for freebsd/arm on linux/amd64, set $GOOS
 // to freebsd and $GOARCH to arm.
 // The primary use of syscall is inside other packages that provide a more
index af563910b197c6284e0b8752ed4f5988d1ab29a4..9370dd487ef358793aa233b399617e48670c0f19 100644 (file)
@@ -33,7 +33,7 @@ func Getgroups() (gids []int, err error) {
                return nil, nil
        }
 
-       // Sanity check group count.  Max is 16 on BSD.
+       // Sanity check group count. Max is 16 on BSD.
        if n < 0 || n > 1000 {
                return nil, EINVAL
        }
index 52fd4e7094cbe5cd4c825192c9e48bbfd61f4e89..1a3efd1e8f4f519c295fdaac9c99215c183e07f2 100644 (file)
@@ -53,7 +53,7 @@ func nametomib(name string) (mib []_C_int, err error) {
 
        // NOTE(rsc): It seems strange to set the buffer to have
        // size CTL_MAXNAME+2 but use only CTL_MAXNAME
-       // as the size.  I don't know why the +2 is here, but the
+       // as the size. I don't know why the +2 is here, but the
        // kernel uses +2 for its own implementation of this function.
        // I am scared that if we don't include the +2 here, the kernel
        // will silently write 2 words farther than we specify
@@ -76,7 +76,7 @@ func nametomib(name string) (mib []_C_int, err error) {
 }
 
 // ParseDirent parses up to max directory entries in buf,
-// appending the names to names.  It returns the number
+// appending the names to names. It returns the number
 // bytes consumed from buf, the number of entries added
 // to names, and the new names slice.
 func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
index 2074e7ac2ede4b3ab2d68fb9333d0f430986df1a..7dbb1c3d64c3b4d4ddc1d8d9bfc3333be5092886 100644 (file)
@@ -28,7 +28,7 @@ func NsecToTimeval(nsec int64) (tv Timeval) {
 //sysnb        gettimeofday(tp *Timeval) (sec int32, usec int32, err error)
 func Gettimeofday(tv *Timeval) (err error) {
        // The tv passed to gettimeofday must be non-nil
-       // but is otherwise unused.  The answers come back
+       // but is otherwise unused. The answers come back
        // in the two registers.
        sec, usec, err := gettimeofday(tv)
        tv.Sec = int32(sec)
index 70b53b87f4e38b53453148df7f95eedb8816b314..80e6024aeba4d00aec31d52f84b700934197f215 100644 (file)
@@ -28,7 +28,7 @@ func NsecToTimeval(nsec int64) (tv Timeval) {
 //sysnb        gettimeofday(tp *Timeval) (sec int64, usec int32, err error)
 func Gettimeofday(tv *Timeval) (err error) {
        // The tv passed to gettimeofday must be non-nil
-       // but is otherwise unused.  The answers come back
+       // but is otherwise unused. The answers come back
        // in the two registers.
        sec, usec, err := gettimeofday(tv)
        tv.Sec = sec
index 2a7d4f2db638bf6bc797526a7c8f12ccda3b0f0d..c302d8313198d60cd2b1c9912cac95c445918aa6 100644 (file)
@@ -28,7 +28,7 @@ func NsecToTimeval(nsec int64) (tv Timeval) {
 //sysnb        gettimeofday(tp *Timeval) (sec int32, usec int32, err error)
 func Gettimeofday(tv *Timeval) (err error) {
        // The tv passed to gettimeofday must be non-nil
-       // but is otherwise unused.  The answers come back
+       // but is otherwise unused. The answers come back
        // in the two registers.
        sec, usec, err := gettimeofday(tv)
        tv.Sec = int32(sec)
index de7a08bee0162b9b4c07743ddf448bfc5b0d0064..29f40d4229ce330fb736246b43dd57abad62d257 100644 (file)
@@ -28,7 +28,7 @@ func NsecToTimeval(nsec int64) (tv Timeval) {
 //sysnb        gettimeofday(tp *Timeval) (sec int64, usec int32, err error)
 func Gettimeofday(tv *Timeval) (err error) {
        // The tv passed to gettimeofday must be non-nil
-       // but is otherwise unused.  The answers come back
+       // but is otherwise unused. The answers come back
        // in the two registers.
        sec, usec, err := gettimeofday(tv)
        tv.Sec = sec
index c25963c437571658aa63aa84ba00e7231c11d6c9..7e693290a88fd35a4e0ad968765a6e88863c17f1 100644 (file)
@@ -34,7 +34,7 @@ func nametomib(name string) (mib []_C_int, err error) {
 
        // NOTE(rsc): It seems strange to set the buffer to have
        // size CTL_MAXNAME+2 but use only CTL_MAXNAME
-       // as the size.  I don't know why the +2 is here, but the
+       // as the size. I don't know why the +2 is here, but the
        // kernel uses +2 for its own implementation of this function.
        // I am scared that if we don't include the +2 here, the kernel
        // will silently write 2 words farther than we specify
@@ -57,7 +57,7 @@ func nametomib(name string) (mib []_C_int, err error) {
 }
 
 // ParseDirent parses up to max directory entries in buf,
-// appending the names to names.  It returns the number
+// appending the names to names. It returns the number
 // bytes consumed from buf, the number of entries added
 // to names, and the new names slice.
 func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
index 257d41960fe12959f1aac50a28ebf8c81c9961b0..7bb163a53b8dab48a55eaab1a366c50f56299c11 100644 (file)
@@ -32,7 +32,7 @@ func nametomib(name string) (mib []_C_int, err error) {
 
        // NOTE(rsc): It seems strange to set the buffer to have
        // size CTL_MAXNAME+2 but use only CTL_MAXNAME
-       // as the size.  I don't know why the +2 is here, but the
+       // as the size. I don't know why the +2 is here, but the
        // kernel uses +2 for its own implementation of this function.
        // I am scared that if we don't include the +2 here, the kernel
        // will silently write 2 words farther than we specify
@@ -55,7 +55,7 @@ func nametomib(name string) (mib []_C_int, err error) {
 }
 
 // ParseDirent parses up to max directory entries in buf,
-// appending the names to names.  It returns the number
+// appending the names to names. It returns the number
 // bytes consumed from buf, the number of entries added
 // to names, and the new names slice.
 func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
index 2875067df72dd962643fbc26716c71bcbd28b17f..73a16f895942964cb5bd1a9d44394bdc2b472499 100644 (file)
@@ -163,7 +163,7 @@ func Getgroups() (gids []int, err error) {
                return nil, nil
        }
 
-       // Sanity check group count.  Max is 1<<16 on Linux.
+       // Sanity check group count. Max is 1<<16 on Linux.
        if n < 0 || n > 1<<20 {
                return nil, EINVAL
        }
@@ -198,8 +198,8 @@ type WaitStatus uint32
 // 0x7F (stopped), or a signal number that caused an exit.
 // The 0x80 bit is whether there was a core dump.
 // An extra number (exit code, signal causing a stop)
-// is in the high bits.  At least that's the idea.
-// There are various irregularities.  For example, the
+// is in the high bits. At least that's the idea.
+// There are various irregularities. For example, the
 // "continued" status is 0xFFFF, distinguishing itself
 // from stopped via the core dump bit.
 
@@ -620,7 +620,7 @@ func ptracePeek(req int, pid int, addr uintptr, out []byte) (count int, err erro
 
        var buf [sizeofPtr]byte
 
-       // Leading edge.  PEEKTEXT/PEEKDATA don't require aligned
+       // Leading edge. PEEKTEXT/PEEKDATA don't require aligned
        // access (PEEKUSER warns that it might), but if we don't
        // align our reads, we might straddle an unmapped page
        // boundary and not get the bytes leading up to the page
index 0e637b47d3c78d1168b9b7f742fcaaef69926b51..d9e0ed57edd6fe80f680b6d2b18ea38f825068f5 100644 (file)
@@ -182,9 +182,9 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
 
 // On x86 Linux, all the socket calls go through an extra indirection,
 // I think because the 5-register system call interface can't handle
-// the 6-argument calls like sendto and recvfrom.  Instead the
+// the 6-argument calls like sendto and recvfrom. Instead the
 // arguments to the underlying system call are the number below
-// and a pointer to an array of uintptr.  We hide the pointer in the
+// and a pointer to an array of uintptr. We hide the pointer in the
 // socketcall assembly to avoid allocation on every system call.
 
 const (
index bbeb22a66c81779152ca8c43daef71749395c1c1..ba6eafed1c529faeed435eded562c2a77103fea2 100644 (file)
@@ -59,7 +59,7 @@ func clen(n []byte) int {
 const PathMax = 256
 
 // An Errno is an unsigned number describing an error condition.
-// It implements the error interface.  The zero Errno is by convention
+// It implements the error interface. The zero Errno is by convention
 // a non-error, so code to convert from Errno to error should use:
 //     err = nil
 //     if errno != 0 {
index 2f68760ed1518b9f9f6865f0068fd236af145a3e..b307a80d28fe2f925dfa25cc1025dafe81c0ff72 100644 (file)
@@ -39,7 +39,7 @@ func clen(n []byte) int {
 }
 
 // ParseDirent parses up to max directory entries in buf,
-// appending the names to names.  It returns the number
+// appending the names to names. It returns the number
 // bytes consumed from buf, the number of entries added
 // to names, and the new names slice.
 func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
@@ -176,7 +176,7 @@ func Getgroups() (gids []int, err error) {
                return nil, nil
        }
 
-       // Sanity check group count.  Max is 16 on BSD.
+       // Sanity check group count. Max is 16 on BSD.
        if n < 0 || n > 1000 {
                return nil, EINVAL
        }
index 570313394c6ccaa9c607280563257a0992b1a49b..4dae9d9b18c9f543a4b5be1966d21bac57bb5c66 100644 (file)
@@ -91,7 +91,7 @@ func (m *mmapper) Munmap(data []byte) (err error) {
 }
 
 // An Errno is an unsigned number describing an error condition.
-// It implements the error interface.  The zero Errno is by convention
+// It implements the error interface. The zero Errno is by convention
 // a non-error, so code to convert from Errno to error should use:
 //     err = nil
 //     if errno != 0 {
index 5845e44f01af6bb169116c21eb60802bc014063a..14b5bd154ff53a0fc0717779200f99d716ae140b 100644 (file)
@@ -162,7 +162,7 @@ func (f *decompressor) readHuffman() {
 
 // Decode a single Huffman block from f.
 // hl and hd are the Huffman states for the lit/length values
-// and the distance values, respectively.  If hd == nil, using the
+// and the distance values, respectively. If hd == nil, using the
 // fixed distance encoding associated with fixed Huffman blocks.
 func (f *decompressor) huffmanBlock(hl, hd *huffmanDecoder) {
        for {
index 80c8658acf70ab48cd6da482ab5da50d67ddd0ca..1eeb2d4802c31c538fec745dd8dea46a151ecd33 100644 (file)
@@ -12,7 +12,7 @@ import (
 // Although the return value has type float64, it will always be an integral value.
 //
 // To compute the number of allocations, the function will first be run once as
-// a warm-up.  The average number of allocations over the specified number of
+// a warm-up. The average number of allocations over the specified number of
 // runs will then be measured and returned.
 //
 // AllocsPerRun sets GOMAXPROCS to 1 during its measurement and will restore
index 39b8cff4d358898dd3f23d37e81d406bea183404..a5b163201e0958971314ebd11bc1a4224c7615ac 100644 (file)
@@ -63,7 +63,7 @@ type B struct {
        netBytes  uint64
 }
 
-// StartTimer starts timing a test.  This function is called automatically
+// StartTimer starts timing a test. This function is called automatically
 // before a benchmark starts, but it can also used to resume timing after
 // a call to StopTimer.
 func (b *B) StartTimer() {
@@ -76,7 +76,7 @@ func (b *B) StartTimer() {
        }
 }
 
-// StopTimer stops timing a test.  This can be used to pause the timer
+// StopTimer stops timing a test. This can be used to pause the timer
 // while performing complex initialization that you don't
 // want to measure.
 func (b *B) StopTimer() {
@@ -192,7 +192,7 @@ func (b *B) run() BenchmarkResult {
        return b.result
 }
 
-// launch launches the benchmark function.  It gradually increases the number
+// launch launches the benchmark function. It gradually increases the number
 // of benchmark iterations until the benchmark runs for the requested benchtime.
 // It prints timing information in this form
 //             testing.BenchmarkHello  100000          19 ns/op
index a5bccca9063cde9bdd25e4c3dbeb14223b263715..8d82018fd6cdcbb1cc298e54273d21cdb2ee0549 100644 (file)
@@ -71,7 +71,7 @@ func (r *dataErrReader) Read(p []byte) (n int, err error) {
 var ErrTimeout = errors.New("timeout")
 
 // TimeoutReader returns ErrTimeout on the second read
-// with no data.  Subsequent calls to read succeed.
+// with no data. Subsequent calls to read succeed.
 func TimeoutReader(r io.Reader) io.Reader { return &timeoutReader{r, 0} }
 
 type timeoutReader struct {
index 1056aa24886d57b620bbadb8b84499951e009204..4bc8e3fc2e14796c8dd410603d52f3fc947aa441 100644 (file)
@@ -248,8 +248,8 @@ func (s *CheckEqualError) Error() string {
 }
 
 // Check looks for an input to f, any function that returns bool,
-// such that f returns false.  It calls f repeatedly, with arbitrary
-// values for each argument.  If f returns false on a given input,
+// such that f returns false. It calls f repeatedly, with arbitrary
+// values for each argument. If f returns false on a given input,
 // Check returns that input as a *CheckError.
 // For example:
 //
index 95182076ef11b0b8af39a96ca5465b57e3d627ec..981883e07afea0da1f0ca8f7efd9fdffdcc7ae8f 100644 (file)
@@ -45,7 +45,7 @@
 //
 // The benchmark function must run the target code b.N times.
 // During benchmark execution, b.N is adjusted until the benchmark function lasts
-// long enough to be timed reliably.  The output
+// long enough to be timed reliably. The output
 //     BenchmarkHello    10000000    282 ns/op
 // means that the loop ran 10000000 times at a speed of 282 ns per loop.
 //
@@ -160,8 +160,8 @@ import (
 
 var (
        // The short flag requests that tests run more quickly, but its functionality
-       // is provided by test writers themselves.  The testing package is just its
-       // home.  The all.bash installation script sets it to make installation more
+       // is provided by test writers themselves. The testing package is just its
+       // home. The all.bash installation script sets it to make installation more
        // efficient, but by default the flag is off so a plain "go test" will do a
        // full test of the package.
        short = flag.Bool("test.short", false, "run smaller test suite to save time")
@@ -337,9 +337,9 @@ func (c *common) FailNow() {
        // This previous version duplicated code (those lines are in
        // tRunner no matter what), but worse the goroutine teardown
        // implicit in runtime.Goexit was not guaranteed to complete
-       // before the test exited.  If a test deferred an important cleanup
+       // before the test exited. If a test deferred an important cleanup
        // function (like removing temporary files), there was no guarantee
-       // it would run on a test failure.  Because we send on c.signal during
+       // it would run on a test failure. Because we send on c.signal during
        // a top-of-stack deferred function now, we know that the send
        // only happens after any other stacked defers have completed.
        c.finished = true
index dd87850fcd3538bf870cd45a1edd3ba864dc37d5..a3da1fdabf445570a20f0006419daea83b45502e 100644 (file)
@@ -4,12 +4,12 @@
 
 // Package scanner provides a scanner and tokenizer for UTF-8-encoded text.
 // It takes an io.Reader providing the source, which then can be tokenized
-// through repeated calls to the Scan function.  For compatibility with
+// through repeated calls to the Scan function. For compatibility with
 // existing tools, the NUL character is not allowed. If the first character
 // in the source is a UTF-8 encoded byte order mark (BOM), it is discarded.
 //
 // By default, a Scanner skips white space and Go comments and recognizes all
-// literals as defined by the Go language specification.  It may be
+// literals as defined by the Go language specification. It may be
 // customized to recognize only a subset of those literals and to recognize
 // different identifier and white space characters.
 package scanner
index e5be4fe7c73201ea791ea709bdb2430da64be02d..a169e62ab018e4f155d4e5e1aae4665ecd5ac1b1 100644 (file)
@@ -440,7 +440,7 @@ func (s *state) evalCommand(dot reflect.Value, cmd *parse.CommandNode, final ref
 
 // idealConstant is called to return the value of a number in a context where
 // we don't know the type. In that case, the syntax of the number tells us
-// its type, and we use Go rules to resolve.  Note there is no such thing as
+// its type, and we use Go rules to resolve. Note there is no such thing as
 // a uint ideal constant in this situation - the value must be of int type.
 func (s *state) idealConstant(constant *parse.NumberNode) reflect.Value {
        // These are ideal constants but we don't know the type
@@ -588,7 +588,7 @@ var (
 )
 
 // evalCall executes a function or method call. If it's a method, fun already has the receiver bound, so
-// it looks just like a function call.  The arg list, if non-nil, includes (in the manner of the shell), arg[0]
+// it looks just like a function call. The arg list, if non-nil, includes (in the manner of the shell), arg[0]
 // as the function itself.
 func (s *state) evalCall(dot, fun reflect.Value, node parse.Node, name string, args []parse.Node, final reflect.Value) reflect.Value {
        if args != nil {
index 58b8ea372de4f2466cab676c2415129a98296593..0bfcffa795d595a8ef7b3bab222077b93fe8a27b 100644 (file)
@@ -142,7 +142,7 @@ func prepareArg(value reflect.Value, argType reflect.Type) (reflect.Value, error
 // Indexing.
 
 // index returns the result of indexing its first argument by the following
-// arguments.  Thus "index x 1 2 3" is, in Go syntax, x[1][2][3]. Each
+// arguments. Thus "index x 1 2 3" is, in Go syntax, x[1][2][3]. Each
 // indexed item must be a map, slice, or array.
 func index(item interface{}, indices ...interface{}) (interface{}, error) {
        v := reflect.ValueOf(item)
index a53e8ff77148e4c47636b437c4d4a1cd0ddfa2e9..86705e5a379d6f775d5d84af57542104cd294c75 100644 (file)
@@ -556,7 +556,7 @@ func (t *Tree) blockControl() Node {
 
 // Template:
 //     {{template stringValue pipeline}}
-// Template keyword is past.  The name must be something that can evaluate
+// Template keyword is past. The name must be something that can evaluate
 // to a string.
 func (t *Tree) templateControl() Node {
        const context = "template clause"
index b4512d3160045624fd8660277644d6744e76e128..9d856bcb3dfd927ce6019c8a249f7e6c43f8420d 100644 (file)
@@ -76,7 +76,7 @@ var numberTests = []numberTest{
 
 func TestNumberParse(t *testing.T) {
        for _, test := range numberTests {
-               // If fmt.Sscan thinks it's complex, it's complex.  We can't trust the output
+               // If fmt.Sscan thinks it's complex, it's complex. We can't trust the output
                // because imaginary comes out as a number.
                var c complex128
                typ := itemNumber
index e616feb048fba087248ae3180c8d7c8b99382314..13c2bb6e521907f8100f2c69dbd04e4c4d12fa0d 100644 (file)
@@ -23,7 +23,7 @@ import "errors"
 // compatibility with fixed-width Unix time formats.
 //
 // A decimal point followed by one or more zeros represents a fractional
-// second, printed to the given number of decimal places.  A decimal point
+// second, printed to the given number of decimal places. A decimal point
 // followed by one or more nines represents a fractional second, printed to
 // the given number of decimal places, with trailing zeros removed.
 // When parsing (only), the input may contain a fractional second
@@ -37,7 +37,7 @@ import "errors"
 //     -07    Â±hh
 // Replacing the sign in the format with a Z triggers
 // the ISO 8601 behavior of printing Z instead of an
-// offset for the UTC zone.  Thus:
+// offset for the UTC zone. Thus:
 //     Z0700  Z or Â±hhmm
 //     Z07:00 Z or Â±hh:mm
 //     Z07    Z or Â±hh
@@ -551,7 +551,7 @@ func (t Time) AppendFormat(b []byte, layout string) []byte {
                                b = append(b, "am"...)
                        }
                case stdISO8601TZ, stdISO8601ColonTZ, stdISO8601SecondsTZ, stdISO8601ShortTZ, stdISO8601ColonSecondsTZ, stdNumTZ, stdNumColonTZ, stdNumSecondsTz, stdNumShortTZ, stdNumColonSecondsTZ:
-                       // Ugly special case.  We cheat and take the "Z" variants
+                       // Ugly special case. We cheat and take the "Z" variants
                        // to mean "the time zone as formatted for ISO 8601".
                        if offset == 0 && (std == stdISO8601TZ || std == stdISO8601ColonTZ || std == stdISO8601SecondsTZ || std == stdISO8601ShortTZ || std == stdISO8601ColonSecondsTZ) {
                                b = append(b, 'Z')
index e7a2ee2059867bd545d3f36d46f01efba3934155..c348366604e6dbe33b8910d4e2a86b4f077094a2 100644 (file)
@@ -24,7 +24,7 @@ type runtimeTimer struct {
 
 // when is a helper function for setting the 'when' field of a runtimeTimer.
 // It returns what the time will be, in nanoseconds, Duration d in the future.
-// If d is negative, it is ignored.  If the returned value would be less than
+// If d is negative, it is ignored. If the returned value would be less than
 // zero because of an overflow, MaxInt64 is returned.
 func when(d Duration) int64 {
        if d <= 0 {
index ccc2d9b4791c1dcc245b16599cb01aa648e8b302..3d693206a532189305cecd7565b712d644319d65 100644 (file)
@@ -39,7 +39,7 @@ func NewTicker(d Duration) *Ticker {
        return t
 }
 
-// Stop turns off a ticker.  After Stop, no more ticks will be sent.
+// Stop turns off a ticker. After Stop, no more ticks will be sent.
 // Stop does not close the channel, to prevent a read from the channel succeeding
 // incorrectly.
 func (t *Ticker) Stop() {
index 32f4740ad93cbcaad8e2460fef270eef9046994c..2ab77f60255fe06878e3f3bbb6f5736e5bdc79bf 100644 (file)
@@ -35,7 +35,7 @@ func TestTicker(t *testing.T) {
        }
 }
 
-// Test that a bug tearing down a ticker has been fixed.  This routine should not deadlock.
+// Test that a bug tearing down a ticker has been fixed. This routine should not deadlock.
 func TestTeardown(t *testing.T) {
        Delta := 100 * Millisecond
        if testing.Short() {
index 5744200d8c5171ac912c0eb5dec8eaa515e8cd60..9693286fd5e31d0559a8d40cef23e4b548360084 100644 (file)
@@ -12,8 +12,8 @@ import "errors"
 // A Time represents an instant in time with nanosecond precision.
 //
 // Programs using times should typically store and pass them as values,
-// not pointers.  That is, time variables and struct fields should be of
-// type time.Time, not *time.Time.  A Time value can be used by
+// not pointers. That is, time variables and struct fields should be of
+// type time.Time, not *time.Time. A Time value can be used by
 // multiple goroutines simultaneously.
 //
 // Time instants can be compared using the Before, After, and Equal methods.
@@ -146,7 +146,7 @@ func (d Weekday) String() string { return days[d] }
 // 00:00:00 UTC, which would be 12-31-(-1) 19:00:00 in New York.
 //
 // The zero Time value does not force a specific epoch for the time
-// representation.  For example, to use the Unix epoch internally, we
+// representation. For example, to use the Unix epoch internally, we
 // could define that to distinguish a zero value from Jan 1 1970, that
 // time would be represented by sec=-1, nsec=1e9.  However, it does
 // suggest a representation, namely using 1-1-1 00:00:00 UTC as the
@@ -155,17 +155,17 @@ func (d Weekday) String() string { return days[d] }
 // The Add and Sub computations are oblivious to the choice of epoch.
 //
 // The presentation computations - year, month, minute, and so on - all
-// rely heavily on division and modulus by positive constants.  For
+// rely heavily on division and modulus by positive constants. For
 // calendrical calculations we want these divisions to round down, even
 // for negative values, so that the remainder is always positive, but
 // Go's division (like most hardware division instructions) rounds to
-// zero.  We can still do those computations and then adjust the result
+// zero. We can still do those computations and then adjust the result
 // for a negative numerator, but it's annoying to write the adjustment
-// over and over.  Instead, we can change to a different epoch so long
+// over and over. Instead, we can change to a different epoch so long
 // ago that all the times we care about will be positive, and then round
-// to zero and round down coincide.  These presentation routines already
+// to zero and round down coincide. These presentation routines already
 // have to add the zone offset, so adding the translation to the
-// alternate epoch is cheap.  For example, having a non-negative time t
+// alternate epoch is cheap. For example, having a non-negative time t
 // means that we can write
 //
 //     sec = t % 60
@@ -181,9 +181,9 @@ func (d Weekday) String() string { return days[d] }
 //
 // The calendar runs on an exact 400 year cycle: a 400-year calendar
 // printed for 1970-2469 will apply as well to 2370-2769.  Even the days
-// of the week match up.  It simplifies the computations to choose the
+// of the week match up. It simplifies the computations to choose the
 // cycle boundaries so that the exceptional years are always delayed as
-// long as possible.  That means choosing a year equal to 1 mod 400, so
+// long as possible. That means choosing a year equal to 1 mod 400, so
 // that the first leap year is the 4th year, the first missed leap year
 // is the 100th year, and the missed missed leap year is the 400th year.
 // So we'd prefer instead to print a calendar for 2001-2400 and reuse it
@@ -209,7 +209,7 @@ func (d Weekday) String() string { return days[d] }
 // routines would then be invalid when displaying the epoch in time zones
 // west of UTC, since it is year 0.  It doesn't seem tenable to say that
 // printing the zero time correctly isn't supported in half the time
-// zones.  By comparison, it's reasonable to mishandle some times in
+// zones. By comparison, it's reasonable to mishandle some times in
 // the year -292277022399.
 //
 // All this is opaque to clients of the API and can be changed if a
@@ -425,7 +425,7 @@ func (t Time) YearDay() int {
 }
 
 // A Duration represents the elapsed time between two instants
-// as an int64 nanosecond count.  The representation limits the
+// as an int64 nanosecond count. The representation limits the
 // largest representable duration to approximately 290 years.
 type Duration int64
 
@@ -434,7 +434,7 @@ const (
        maxDuration Duration = 1<<63 - 1
 )
 
-// Common durations.  There is no definition for units of Day or larger
+// Common durations. There is no definition for units of Day or larger
 // to avoid confusion across daylight savings time zone transitions.
 //
 // To count the number of units in a Duration, divide:
@@ -455,9 +455,9 @@ const (
 )
 
 // String returns a string representing the duration in the form "72h3m0.5s".
-// Leading zero units are omitted.  As a special case, durations less than one
+// Leading zero units are omitted. As a special case, durations less than one
 // second format use a smaller unit (milli-, micro-, or nanoseconds) to ensure
-// that the leading digit is non-zero.  The zero duration formats as 0,
+// that the leading digit is non-zero. The zero duration formats as 0,
 // with no unit.
 func (d Duration) String() string {
        // Largest time is 2540400h10m10.000000000s
@@ -749,7 +749,7 @@ func absDate(abs uint64, full bool) (year int, month Month, day int, yday int) {
 }
 
 // daysBefore[m] counts the number of days in a non-leap year
-// before month m begins.  There is an entry for m=12, counting
+// before month m begins. There is an entry for m=12, counting
 // the number of days before January of next year (365).
 var daysBefore = [...]int32{
        0,
@@ -1021,7 +1021,7 @@ func norm(hi, lo, base int) (nhi, nlo int) {
 //
 // A daylight savings time transition skips or repeats times.
 // For example, in the United States, March 13, 2011 2:15am never occurred,
-// while November 6, 2011 1:15am occurred twice.  In such cases, the
+// while November 6, 2011 1:15am occurred twice. In such cases, the
 // choice of time zone, and therefore the time, is not well-defined.
 // Date returns a time that is correct in one of the two zones involved
 // in the transition, but it does not guarantee which.
index a925e98a838e2981e40d7ec3a8affc3b437c3c73..5a5451b5b80ea27c5c1aaa4bc9d6eae970b434bf 100644 (file)
@@ -22,7 +22,7 @@ import (
 // the subsequent tests fail.
 func TestZoneData(t *testing.T) {
        lt := Now()
-       // PST is 8 hours west, PDT is 7 hours west.  We could use the name but it's not unique.
+       // PST is 8 hours west, PDT is 7 hours west. We could use the name but it's not unique.
        if name, off := lt.Zone(); off != -8*60*60 && off != -7*60*60 {
                t.Errorf("Unable to find US Pacific time zone data for testing; time zone is %q offset %d", name, off)
                t.Error("Likely problem: the time zone files have not been installed.")
index de9ebb41c827f4c25ae69ff92c20815a455f7abb..66777f6d736151a93320013aa6c0685b48653c95 100644 (file)
@@ -210,10 +210,10 @@ func loadZoneFile(dir, name string) (l *Location, err error) {
        return loadZoneData(buf)
 }
 
-// There are 500+ zoneinfo files.  Rather than distribute them all
+// There are 500+ zoneinfo files. Rather than distribute them all
 // individually, we ship them in an uncompressed zip file.
 // Used this way, the zip file format serves as a commonly readable
-// container for the individual small files.  We choose zip over tar
+// container for the individual small files. We choose zip over tar
 // because zip files have a contiguous table of contents, making
 // individual file lookups faster, and because the per-file overhead
 // in a zip file is considerably less than tar's 512 bytes.
index 4ca7fad938c17c819a2217c7e12da04f2896a600..0b7584ab9c2ffdc2927fe6a37506fcab05cea2c9 100644 (file)
@@ -19,7 +19,7 @@ func TestVersion3(t *testing.T) {
 }
 
 // Test that we get the correct results for times before the first
-// transition time.  To do this we explicitly check early dates in a
+// transition time. To do this we explicitly check early dates in a
 // couple of specific timezones.
 func TestFirstZone(t *testing.T) {
        time.ForceZipFileForTesting(true)
index 81eae3e762347608f31a26af379afe37385ae93d..ca6241949a23f156eb61633481fce1dc4871017a 100644 (file)
@@ -45,7 +45,7 @@ func IsGraphic(r rune) bool {
 // IsPrint reports whether the rune is defined as printable by Go. Such
 // characters include letters, marks, numbers, punctuation, symbols, and the
 // ASCII space character, from categories L, M, N, P, S and the ASCII space
-// character.  This categorization is the same as IsGraphic except that the
+// character. This categorization is the same as IsGraphic except that the
 // only spacing character is ASCII space, U+0020.
 func IsPrint(r rune) bool {
        if uint32(r) <= MaxLatin1 {
index 7fe4241eddf419d381527f09e1272278c69b3df4..8443ee51a2f210bf509028aff980d905441fa402 100644 (file)
@@ -27,7 +27,7 @@ type RangeTable struct {
        LatinOffset int // number of entries in R16 with Hi <= MaxLatin1
 }
 
-// Range16 represents of a range of 16-bit Unicode code points.  The range runs from Lo to Hi
+// Range16 represents of a range of 16-bit Unicode code points. The range runs from Lo to Hi
 // inclusive and has the specified stride.
 type Range16 struct {
        Lo     uint16
@@ -36,7 +36,7 @@ type Range16 struct {
 }
 
 // Range32 represents of a range of Unicode code points and is used when one or
-// more of the values will not fit in 16 bits.  The range runs from Lo to Hi
+// more of the values will not fit in 16 bits. The range runs from Lo to Hi
 // inclusive and has the specified stride. Lo and Hi must always be >= 1<<16.
 type Range32 struct {
        Lo     uint32
@@ -48,10 +48,10 @@ type Range32 struct {
 // code point to one code point) case conversion.
 // The range runs from Lo to Hi inclusive, with a fixed stride of 1.  Deltas
 // are the number to add to the code point to reach the code point for a
-// different case for that character.  They may be negative.  If zero, it
+// different case for that character. They may be negative. If zero, it
 // means the character is in the corresponding case. There is a special
 // case representing sequences of alternating corresponding Upper and Lower
-// pairs.  It appears with a fixed Delta of
+// pairs. It appears with a fixed Delta of
 //     {UpperLower, UpperLower, UpperLower}
 // The constant UpperLower has an otherwise impossible delta value.
 type CaseRange struct {
@@ -307,7 +307,7 @@ func (special SpecialCase) ToLower(r rune) rune {
        return r1
 }
 
-// caseOrbit is defined in tables.go as []foldPair.  Right now all the
+// caseOrbit is defined in tables.go as []foldPair. Right now all the
 // entries fit in uint16, so use uint16.  If that changes, compilation
 // will fail (the constants in the composite literal will not fit in uint16)
 // and the types here can change to uint32.
@@ -317,7 +317,7 @@ type foldPair struct {
 }
 
 // SimpleFold iterates over Unicode code points equivalent under
-// the Unicode-defined simple case folding.  Among the code points
+// the Unicode-defined simple case folding. Among the code points
 // equivalent to rune (including rune itself), SimpleFold returns the
 // smallest rune > r if one exists, or else the smallest rune >= 0.
 //
@@ -347,7 +347,7 @@ func SimpleFold(r rune) rune {
                return rune(caseOrbit[lo].To)
        }
 
-       // No folding specified.  This is a one- or two-element
+       // No folding specified. This is a one- or two-element
        // equivalence class containing rune and ToLower(rune)
        // and ToUpper(rune) if they are different from rune.
        if l := ToLower(r); l != r {
index e0110c9536d1122dd270718261d2741b94a7cb83..328c75ed6396645a966e243abae146392106d32d 100644 (file)
@@ -485,7 +485,7 @@ func printCategories() {
                        logger.Fatal("unknown category", name)
                }
                // We generate an UpperCase name to serve as concise documentation and an _UnderScored
-               // name to store the data.  This stops godoc dumping all the tables but keeps them
+               // name to store the data. This stops godoc dumping all the tables but keeps them
                // available to clients.
                // Cases deserving special comments
                varDecl := ""
@@ -964,7 +964,7 @@ func getCaseState(i rune) (c *caseState) {
                c._case = CaseTitle
        }
        // Some things such as roman numeral U+2161 don't describe themselves
-       // as upper case, but have a lower case.  Second-guess them.
+       // as upper case, but have a lower case. Second-guess them.
        if c._case == CaseNone && ch.lowerCase != 0 {
                c._case = CaseUpper
        }
index bbaf14aab8ff66eeae190193271630a36a6fcb82..9d35be6c065400e32fce4cfd3b2e816656b8480a 100644 (file)
@@ -341,7 +341,7 @@ func RuneLen(r rune) int {
 // EncodeRune writes into p (which must be large enough) the UTF-8 encoding of the rune.
 // It returns the number of bytes written.
 func EncodeRune(p []byte, r rune) int {
-       // Negative values are erroneous.  Making it unsigned addresses the problem.
+       // Negative values are erroneous. Making it unsigned addresses the problem.
        switch i := uint32(r); {
        case i <= rune1Max:
                p[0] = byte(r)
@@ -367,7 +367,7 @@ func EncodeRune(p []byte, r rune) int {
        }
 }
 
-// RuneCount returns the number of runes in p.  Erroneous and short
+// RuneCount returns the number of runes in p. Erroneous and short
 // encodings are treated as single runes of width 1 byte.
 func RuneCount(p []byte) int {
        np := len(p)
@@ -441,7 +441,7 @@ func RuneCountInString(s string) (n int) {
 }
 
 // RuneStart reports whether the byte could be the first byte of an encoded,
-// possibly invalid rune.  Second and subsequent bytes always have the top two
+// possibly invalid rune. Second and subsequent bytes always have the top two
 // bits set to 10.
 func RuneStart(b byte) bool { return b&0xC0 != 0x80 }
 
index 532fa4aa2294560f95d6df0631dceb47ed612920..8f43e72775a071afe597eb0ec074d7b39d93bbd8 100644 (file)
 package unsafe
 
 // ArbitraryType is here for the purposes of documentation only and is not actually
-// part of the unsafe package.  It represents the type of an arbitrary Go expression.
+// part of the unsafe package. It represents the type of an arbitrary Go expression.
 type ArbitraryType int
 
-// Pointer represents a pointer to an arbitrary type.  There are four special operations
+// Pointer represents a pointer to an arbitrary type. There are four special operations
 // available for type Pointer that are not available for other types:
 //     - A pointer value of any type can be converted to a Pointer.
 //     - A Pointer can be converted to a pointer value of any type.
@@ -179,7 +179,7 @@ type Pointer *ArbitraryType
 func Sizeof(x ArbitraryType) uintptr
 
 // Offsetof returns the offset within the struct of the field represented by x,
-// which must be of the form structValue.field.  In other words, it returns the
+// which must be of the form structValue.field. In other words, it returns the
 // number of bytes between the start of the struct and the start of the field.
 func Offsetof(x ArbitraryType) uintptr
 
@@ -189,6 +189,6 @@ func Offsetof(x ArbitraryType) uintptr
 // It is the same as the value returned by reflect.TypeOf(x).Align().
 // As a special case, if a variable s is of struct type and f is a field
 // within that struct, then Alignof(s.f) will return the required alignment
-// of a field of that type within a struct.  This case is the same as the
+// of a field of that type within a struct. This case is the same as the
 // value returned by reflect.TypeOf(s.f).FieldAlign().
 func Alignof(x ArbitraryType) uintptr