]> Cypherpunks.ru repositories - gostls13.git/commitdiff
all: add missing periods in comments
authorcui fliter <imcusg@gmail.com>
Fri, 11 Nov 2022 11:22:35 +0000 (19:22 +0800)
committerGopher Robot <gobot@golang.org>
Fri, 18 Nov 2022 17:59:44 +0000 (17:59 +0000)
Change-Id: I69065f8adf101fdb28682c55997f503013a50e29
Reviewed-on: https://go-review.googlesource.com/c/go/+/449757
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Joedian Reid <joedian@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Joedian Reid <joedian@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
97 files changed:
src/archive/tar/reader.go
src/cmd/asm/internal/arch/arm.go
src/cmd/cgo/gcc.go
src/cmd/compile/internal/abi/abiutils.go
src/cmd/compile/internal/arm/ssa.go
src/cmd/compile/internal/arm64/ssa.go
src/cmd/compile/internal/base/print.go
src/cmd/compile/internal/escape/leaks.go
src/cmd/compile/internal/ir/func.go
src/cmd/compile/internal/liveness/plive.go
src/cmd/compile/internal/logopt/log_opts.go
src/cmd/compile/internal/loong64/ssa.go
src/cmd/compile/internal/mips/ssa.go
src/cmd/compile/internal/mips64/ssa.go
src/cmd/compile/internal/ssa/dom.go
src/cmd/compile/internal/ssa/loopreschedchecks.go
src/cmd/compile/internal/ssa/lower.go
src/cmd/compile/internal/ssa/op.go
src/cmd/compile/internal/ssa/opt.go
src/cmd/compile/internal/ssa/prove.go
src/cmd/compile/internal/ssa/rewrite.go
src/cmd/compile/internal/ssa/sparseset.go
src/cmd/compile/internal/ssa/sparsetree.go
src/cmd/compile/internal/ssa/trim.go
src/cmd/compile/internal/ssa/writebarrier.go
src/cmd/compile/internal/ssagen/nowb.go
src/cmd/compile/internal/ssagen/phi.go
src/cmd/compile/internal/ssagen/ssa.go
src/cmd/compile/internal/typecheck/dcl.go
src/cmd/compile/internal/typecheck/export.go
src/cmd/compile/internal/typecheck/typecheck.go
src/cmd/compile/internal/walk/builtin.go
src/cmd/compile/internal/walk/expr.go
src/cmd/dist/util.go
src/cmd/go/internal/modfetch/fetch.go
src/cmd/internal/dwarf/dwarf.go
src/cmd/internal/obj/arm64/asm7.go
src/cmd/internal/obj/loong64/asm.go
src/cmd/internal/obj/ppc64/asm9.go
src/cmd/internal/obj/s390x/asmz.go
src/cmd/link/internal/arm/asm.go
src/cmd/link/internal/arm64/asm.go
src/cmd/link/internal/ld/data.go
src/cmd/link/internal/ld/elf.go
src/cmd/link/internal/ld/xcoff.go
src/cmd/link/internal/ppc64/asm.go
src/cmd/pprof/pprof.go
src/compress/flate/deflate.go
src/compress/flate/huffman_code.go
src/compress/flate/token.go
src/crypto/des/block.go
src/crypto/internal/boring/boring.go
src/crypto/x509/internal/macos/corefoundation.go
src/encoding/json/scanner.go
src/go/doc/example.go
src/go/doc/reader.go
src/go/types/gotype.go
src/hash/crc32/crc32_ppc64le.go
src/html/template/content.go
src/internal/fuzz/coverage.go
src/internal/profile/filter.go
src/math/big/int.go
src/math/big/intconv.go
src/math/big/natconv.go
src/math/cmplx/sin.go
src/net/http/client.go
src/net/http/cookie.go
src/net/http/transfer.go
src/net/http/transport.go
src/net/http/triv.go
src/net/lookup_windows.go
src/net/mail/message.go
src/net/smtp/smtp.go
src/os/env.go
src/plugin/plugin_dlopen.go
src/regexp/onepass.go
src/regexp/regexp.go
src/runtime/cgocall.go
src/runtime/chan.go
src/runtime/debug/mod.go
src/runtime/heapdump.go
src/runtime/lock_futex.go
src/runtime/lock_sema.go
src/runtime/malloc.go
src/runtime/map.go
src/runtime/mfinal.go
src/runtime/mgcwork.go
src/runtime/os_aix.go
src/runtime/os_openbsd_syscall2.go
src/runtime/pprof/pprof.go
src/runtime/proc.go
src/runtime/race.go
src/runtime/runtime1.go
src/runtime/stubs2.go
src/runtime/stubs_ppc64.go
src/syscall/fs_js.go
src/time/format.go

index 44166b4cdf9db294d85c3c4986e772bcb5f9be54..3495f083e35f71f1ec48728bbfa960a93a6c0eb6 100644 (file)
@@ -304,7 +304,7 @@ func mergePAX(hdr *Header, paxHdrs map[string]string) (err error) {
 }
 
 // parsePAX parses PAX headers.
-// If an extended header (type 'x') is invalid, ErrHeader is returned
+// If an extended header (type 'x') is invalid, ErrHeader is returned.
 func parsePAX(r io.Reader) (map[string]string, error) {
        buf, err := readSpecialFile(r)
        if err != nil {
index b0e985f0bc92a5ac5b11d06483b029692dcfa534..22ac483b9222ac9289bf9e5a712e5b9953c911d5 100644 (file)
@@ -113,7 +113,7 @@ func IsARMSTREX(op obj.As) bool {
 const aMCR = arm.ALAST + 1
 
 // IsARMMRC reports whether the op (as defined by an arm.A* constant) is
-// MRC or MCR
+// MRC or MCR.
 func IsARMMRC(op obj.As) bool {
        switch op {
        case arm.AMRC, aMCR: // Note: aMCR is defined in this package.
index c25aa0c7f8d5de8ff7267bedb82b3d5e33539f4c..5df4a8c4ad53c86f0073a08a740f0e9325bc77c1 100644 (file)
@@ -2222,7 +2222,7 @@ func (c *typeConv) Init(ptrSize, intSize int64) {
        }
 }
 
-// base strips away qualifiers and typedefs to get the underlying type
+// base strips away qualifiers and typedefs to get the underlying type.
 func base(dt dwarf.Type) dwarf.Type {
        for {
                if d, ok := dt.(*dwarf.QualType); ok {
index 09bc0fbf85fdc35f5b80a792142d64814fe0a63f..a88f8c4b0642cba1116f3a00fb3944b3e197ce79 100644 (file)
@@ -529,7 +529,7 @@ type assignState struct {
        spillOffset int64      // current spill offset
 }
 
-// align returns a rounded up to t's alignment
+// align returns a rounded up to t's alignment.
 func align(a int64, t *types.Type) int64 {
        return alignTo(a, int(uint8(t.Alignment())))
 }
index a53f51bd1373bb320d635db02ed8e1771b367c2c..fd0da344187b161bfd895da4541ce39e5b1844ce 100644 (file)
@@ -72,7 +72,7 @@ func storeByType(t *types.Type) obj.As {
        panic("bad store type")
 }
 
-// shift type is used as Offset in obj.TYPE_SHIFT operands to encode shifted register operands
+// shift type is used as Offset in obj.TYPE_SHIFT operands to encode shifted register operands.
 type shift int64
 
 // copied from ../../../internal/obj/util.go:/TYPE_SHIFT
@@ -87,7 +87,7 @@ func (v shift) String() string {
        }
 }
 
-// makeshift encodes a register shifted by a constant
+// makeshift encodes a register shifted by a constant.
 func makeshift(v *ssa.Value, reg int16, typ int64, s int64) shift {
        if s < 0 || s >= 32 {
                v.Fatalf("shift out of range: %d", s)
@@ -95,7 +95,7 @@ func makeshift(v *ssa.Value, reg int16, typ int64, s int64) shift {
        return shift(int64(reg&0xf) | typ | (s&31)<<7)
 }
 
-// genshift generates a Prog for r = r0 op (r1 shifted by n)
+// genshift generates a Prog for r = r0 op (r1 shifted by n).
 func genshift(s *ssagen.State, v *ssa.Value, as obj.As, r0, r1, r int16, typ int64, n int64) *obj.Prog {
        p := s.Prog(as)
        p.From.Type = obj.TYPE_SHIFT
@@ -108,12 +108,12 @@ func genshift(s *ssagen.State, v *ssa.Value, as obj.As, r0, r1, r int16, typ int
        return p
 }
 
-// makeregshift encodes a register shifted by a register
+// makeregshift encodes a register shifted by a register.
 func makeregshift(r1 int16, typ int64, r2 int16) shift {
        return shift(int64(r1&0xf) | typ | int64(r2&0xf)<<8 | 1<<4)
 }
 
-// genregshift generates a Prog for r = r0 op (r1 shifted by r2)
+// genregshift generates a Prog for r = r0 op (r1 shifted by r2).
 func genregshift(s *ssagen.State, as obj.As, r0, r1, r2, r int16, typ int64) *obj.Prog {
        p := s.Prog(as)
        p.From.Type = obj.TYPE_SHIFT
@@ -903,13 +903,13 @@ var blockJump = map[ssa.BlockKind]struct {
        ssa.BlockARMGEnoov: {arm.ABPL, arm.ABMI},
 }
 
-// To model a 'LEnoov' ('<=' without overflow checking) branching
+// To model a 'LEnoov' ('<=' without overflow checking) branching.
 var leJumps = [2][2]ssagen.IndexJump{
        {{Jump: arm.ABEQ, Index: 0}, {Jump: arm.ABPL, Index: 1}}, // next == b.Succs[0]
        {{Jump: arm.ABMI, Index: 0}, {Jump: arm.ABEQ, Index: 0}}, // next == b.Succs[1]
 }
 
-// To model a 'GTnoov' ('>' without overflow checking) branching
+// To model a 'GTnoov' ('>' without overflow checking) branching.
 var gtJumps = [2][2]ssagen.IndexJump{
        {{Jump: arm.ABMI, Index: 1}, {Jump: arm.ABEQ, Index: 1}}, // next == b.Succs[0]
        {{Jump: arm.ABEQ, Index: 1}, {Jump: arm.ABPL, Index: 0}}, // next == b.Succs[1]
index 8299cb1de4c96067c1949398f14f1ce7b43e7c16..88856558aad3ef2a345cd9a148780f4b29de84c4 100644 (file)
@@ -78,7 +78,7 @@ func storeByType(t *types.Type) obj.As {
        panic("bad store type")
 }
 
-// makeshift encodes a register shifted by a constant, used as an Offset in Prog
+// makeshift encodes a register shifted by a constant, used as an Offset in Prog.
 func makeshift(v *ssa.Value, reg int16, typ int64, s int64) int64 {
        if s < 0 || s >= 64 {
                v.Fatalf("shift out of range: %d", s)
@@ -86,7 +86,7 @@ func makeshift(v *ssa.Value, reg int16, typ int64, s int64) int64 {
        return int64(reg&31)<<16 | typ | (s&63)<<10
 }
 
-// genshift generates a Prog for r = r0 op (r1 shifted by n)
+// genshift generates a Prog for r = r0 op (r1 shifted by n).
 func genshift(s *ssagen.State, v *ssa.Value, as obj.As, r0, r1, r int16, typ int64, n int64) *obj.Prog {
        p := s.Prog(as)
        p.From.Type = obj.TYPE_SHIFT
@@ -1223,13 +1223,13 @@ var blockJump = map[ssa.BlockKind]struct {
        ssa.BlockARM64GEnoov: {arm64.ABPL, arm64.ABMI},
 }
 
-// To model a 'LEnoov' ('<=' without overflow checking) branching
+// To model a 'LEnoov' ('<=' without overflow checking) branching.
 var leJumps = [2][2]ssagen.IndexJump{
        {{Jump: arm64.ABEQ, Index: 0}, {Jump: arm64.ABPL, Index: 1}}, // next == b.Succs[0]
        {{Jump: arm64.ABMI, Index: 0}, {Jump: arm64.ABEQ, Index: 0}}, // next == b.Succs[1]
 }
 
-// To model a 'GTnoov' ('>' without overflow checking) branching
+// To model a 'GTnoov' ('>' without overflow checking) branching.
 var gtJumps = [2][2]ssagen.IndexJump{
        {{Jump: arm64.ABMI, Index: 1}, {Jump: arm64.ABEQ, Index: 1}}, // next == b.Succs[0]
        {{Jump: arm64.ABEQ, Index: 1}, {Jump: arm64.ABPL, Index: 0}}, // next == b.Succs[1]
index 70a9e9fb74eb4d5dcc2a546bcc5abd7313ae8dfd..21fa0014573f006fec1a3f9d4edd9230d8b98eb7 100644 (file)
@@ -36,7 +36,7 @@ func Errors() int {
        return numErrors
 }
 
-// SyntaxErrors returns the number of syntax errors reported
+// SyntaxErrors returns the number of syntax errors reported.
 func SyntaxErrors() int {
        return numSyntaxErrors
 }
index 4c848a5ee7859d0f2bfe3adf4118df263c0bd1f9..1432607c2dbd8180aa8fa2bb42b62c7ea098dad3 100644 (file)
@@ -94,7 +94,7 @@ func (l leaks) Encode() string {
        return s
 }
 
-// parseLeaks parses a binary string representing a leaks
+// parseLeaks parses a binary string representing a leaks.
 func parseLeaks(s string) leaks {
        var l leaks
        if !strings.HasPrefix(s, "esc:") {
index 2bbacfc2c3cee37b86a41cc09797c72364cbd192..31c11f8297ec19891a7521adb01c9e8dcc9cd342 100644 (file)
@@ -299,7 +299,7 @@ func MarkFunc(n *Name) {
 }
 
 // ClosureDebugRuntimeCheck applies boilerplate checks for debug flags
-// and compiling runtime
+// and compiling runtime.
 func ClosureDebugRuntimeCheck(clo *ClosureExpr) {
        if base.Debug.Closure > 0 {
                if clo.Esc() == EscHeap {
index 20342e292c83421e7c1126608f4501a69db42e3e..689b5286c6e1e69ce3c967ddda518ddb1a487bbc 100644 (file)
@@ -296,7 +296,7 @@ func (lv *liveness) valueEffects(v *ssa.Value) (int32, liveEffect) {
        return -1, 0
 }
 
-// affectedVar returns the *ir.Name node affected by v
+// affectedVar returns the *ir.Name node affected by v.
 func affectedVar(v *ssa.Value) (*ir.Name, ssa.SymEffect) {
        // Special cases.
        switch v.Op {
index 5c7f580f0b2b70356df795a0900ed4b7bc3cd08e..1e83227816feac0b924f40af9efda90bfd0856a0 100644 (file)
@@ -304,7 +304,7 @@ func parseLogPath(destination string) (string, string) {
 
 // checkLogPath does superficial early checking of the string specifying
 // the directory to which optimizer logging is directed, and if
-// it passes the test, stores the string in LO_dir
+// it passes the test, stores the string in LO_dir.
 func checkLogPath(destination string) string {
        path, complaint := parseLogPath(destination)
        if complaint != "" {
@@ -331,7 +331,7 @@ func NewLoggedOpt(pos src.XPos, what, pass, funcName string, args ...interface{}
 
 // LogOpt logs information about a (usually missed) optimization performed by the compiler.
 // Pos is the source position (including inlining), what is the message, pass is which pass created the message,
-// funcName is the name of the function
+// funcName is the name of the function.
 func LogOpt(pos src.XPos, what, pass, funcName string, args ...interface{}) {
        if Format == None {
                return
@@ -499,13 +499,13 @@ func newPointRange(p src.Pos) Range {
                End: Position{p.Line(), p.Col()}}
 }
 
-// newLocation returns the Location for the compiler source location p
+// newLocation returns the Location for the compiler source location p.
 func newLocation(p src.Pos) Location {
        loc := Location{URI: uriIfy(uprootedPath(p.Filename())), Range: newPointRange(p)}
        return loc
 }
 
-// appendInlinedPos extracts inlining information from posTmp and append it to diagnostic
+// appendInlinedPos extracts inlining information from posTmp and append it to diagnostic.
 func appendInlinedPos(posTmp []src.Pos, diagnostic *Diagnostic) {
        for i := 1; i < len(posTmp); i++ {
                p := posTmp[i]
index a1cebdca560104eb82f7b6831a137aacdc137e6f..59f9e189bd27b686891451eb267c090e16dff814 100644 (file)
@@ -17,7 +17,7 @@ import (
        "cmd/internal/obj/loong64"
 )
 
-// isFPreg reports whether r is an FP register
+// isFPreg reports whether r is an FP register.
 func isFPreg(r int16) bool {
        return loong64.REG_F0 <= r && r <= loong64.REG_F31
 }
index 0411756c8d71c66a211a98684e72946dd10064b2..2ad75207e11fef385105b18313e3d10d16cf8c30 100644 (file)
@@ -17,12 +17,12 @@ import (
        "cmd/internal/obj/mips"
 )
 
-// isFPreg reports whether r is an FP register
+// isFPreg reports whether r is an FP register.
 func isFPreg(r int16) bool {
        return mips.REG_F0 <= r && r <= mips.REG_F31
 }
 
-// isHILO reports whether r is HI or LO register
+// isHILO reports whether r is HI or LO register.
 func isHILO(r int16) bool {
        return r == mips.REG_HI || r == mips.REG_LO
 }
index f3e372c3bcb8f42b2f63bba101a19397c0daa82f..8612763ced0af0467268fcf1f0c8c30dedabdd19 100644 (file)
@@ -17,12 +17,12 @@ import (
        "cmd/internal/obj/mips"
 )
 
-// isFPreg reports whether r is an FP register
+// isFPreg reports whether r is an FP register.
 func isFPreg(r int16) bool {
        return mips.REG_F0 <= r && r <= mips.REG_F31
 }
 
-// isHILO reports whether r is HI or LO register
+// isHILO reports whether r is HI or LO register.
 func isHILO(r int16) bool {
        return r == mips.REG_HI || r == mips.REG_LO
 }
index dd40b2ae818c9b3d4a723bfbfc124b91d4afc61d..347038bf823c3f70c862ef0e22ec840da3efe3e5 100644 (file)
@@ -179,7 +179,7 @@ func (f *Func) dfsOrig(entry *Block, succFn linkedBlocks, semi, vertex, label, p
        return n
 }
 
-// compressOrig is the "simple" compress function from LT paper
+// compressOrig is the "simple" compress function from LT paper.
 func compressOrig(v ID, ancestor, semi, label []ID) {
        if ancestor[ancestor[v]] != 0 {
                compressOrig(ancestor[v], ancestor, semi, label)
@@ -190,7 +190,7 @@ func compressOrig(v ID, ancestor, semi, label []ID) {
        }
 }
 
-// evalOrig is the "simple" eval function from LT paper
+// evalOrig is the "simple" eval function from LT paper.
 func evalOrig(v ID, ancestor, semi, label []ID) ID {
        if ancestor[v] == 0 {
                return v
index 5a4f0b23d6e822d3026ccc84da8316c1badaae8b..7c56523ad82fa044f0b7a1cd35aa3218392ea4d5 100644 (file)
@@ -401,7 +401,7 @@ outer:
        }
 }
 
-// findLastMems maps block ids to last memory-output op in a block, if any
+// findLastMems maps block ids to last memory-output op in a block, if any.
 func findLastMems(f *Func) []*Value {
 
        var stores []*Value
index df25ac9f1abeda3209aff8b7a935d896c62511e1..0b79d77c504b73c3e6107da34680e7da5771d0b2 100644 (file)
@@ -4,7 +4,7 @@
 
 package ssa
 
-// convert to machine-dependent ops
+// convert to machine-dependent ops.
 func lower(f *Func) {
        // repeat rewrites until we find no more rewrites
        applyRewrite(f, f.Config.lowerBlock, f.Config.lowerValue, removeDeadValues)
index 9157733cfc02dbe96771300d64c42208e97cf0cb..9434c0ef16ff1cd60041a78f5c8fc3188bcca08f 100644 (file)
@@ -269,7 +269,7 @@ func (a *AuxCall) SizeOfArg(which int64) int64 {
        return a.TypeOfArg(which).Size()
 }
 
-// NResults returns the number of results
+// NResults returns the number of results.
 func (a *AuxCall) NResults() int64 {
        return int64(len(a.abiInfo.OutParams()))
 }
@@ -335,7 +335,7 @@ func ClosureAuxCall(paramResultInfo *abi.ABIParamResultInfo) *AuxCall {
 
 func (*AuxCall) CanBeAnSSAAux() {}
 
-// OwnAuxCall returns a function's own AuxCall
+// OwnAuxCall returns a function's own AuxCall.
 func OwnAuxCall(fn *obj.LSym, paramResultInfo *abi.ABIParamResultInfo) *AuxCall {
        // TODO if this remains identical to ClosureAuxCall above after new ABI is done, should deduplicate.
        var reg *regInfo
index 128e6141750dd39c7696d4ab5e558391d196133c..0f15c3db4a7ddb4124df2b40ad7f5ef176a13505 100644 (file)
@@ -4,7 +4,7 @@
 
 package ssa
 
-// machine-independent optimization
+// machine-independent optimization.
 func opt(f *Func) {
        applyRewrite(f, rewriteBlockgeneric, rewriteValuegeneric, removeDeadValues)
 }
index eca04e0bf052978779e2a05ee6669f035bacb23a..908fb5af465e9b8db478d65b9008eb9347226ddf 100644 (file)
@@ -1604,7 +1604,7 @@ func isConstDelta(v *Value) (w *Value, delta int64) {
 }
 
 // isCleanExt reports whether v is the result of a value-preserving
-// sign or zero extension
+// sign or zero extension.
 func isCleanExt(v *Value) bool {
        switch v.Op {
        case OpSignExt8to16, OpSignExt8to32, OpSignExt8to64,
index bf0135c2c8cfd04cad833b8ae79c78195cbf4686..99dc779c90c7f1af987c4cb806833d910f93a815 100644 (file)
@@ -412,13 +412,13 @@ func canMergeLoad(target, load *Value) bool {
        return true
 }
 
-// isSameCall reports whether sym is the same as the given named symbol
+// isSameCall reports whether sym is the same as the given named symbol.
 func isSameCall(sym interface{}, name string) bool {
        fn := sym.(*AuxCall).Fn
        return fn != nil && fn.String() == name
 }
 
-// canLoadUnaligned reports if the architecture supports unaligned load operations
+// canLoadUnaligned reports if the architecture supports unaligned load operations.
 func canLoadUnaligned(c *Config) bool {
        return c.ctxt.Arch.Alignment == 1
 }
@@ -797,7 +797,7 @@ func loadLSymOffset(lsym *obj.LSym, offset int64) *obj.LSym {
 }
 
 // de-virtualize an InterLECall
-// 'sym' is the symbol for the itab
+// 'sym' is the symbol for the itab.
 func devirtLESym(v *Value, aux Aux, sym Sym, offset int64) *obj.LSym {
        n, ok := sym.(*obj.LSym)
        if !ok {
@@ -898,7 +898,7 @@ func disjoint(p1 *Value, n1 int64, p2 *Value, n2 int64) bool {
        return false
 }
 
-// moveSize returns the number of bytes an aligned MOV instruction moves
+// moveSize returns the number of bytes an aligned MOV instruction moves.
 func moveSize(align int64, c *Config) int64 {
        switch {
        case align%8 == 0 && c.PtrSize == 8:
@@ -1019,7 +1019,7 @@ func warnRule(cond bool, v *Value, s string) bool {
        return true
 }
 
-// for a pseudo-op like (LessThan x), extract x
+// for a pseudo-op like (LessThan x), extract x.
 func flagArg(v *Value) *Value {
        if len(v.Args) != 1 || !v.Args[0].Type.IsFlags() {
                return nil
@@ -1250,7 +1250,7 @@ func reciprocalExact32(c float32) bool {
        }
 }
 
-// check if an immediate can be directly encoded into an ARM's instruction
+// check if an immediate can be directly encoded into an ARM's instruction.
 func isARMImmRot(v uint32) bool {
        for i := 0; i < 16; i++ {
                if v&^0xff == 0 {
@@ -1312,7 +1312,7 @@ func zeroUpper32Bits(x *Value, depth int) bool {
        return false
 }
 
-// zeroUpper48Bits is similar to zeroUpper32Bits, but for upper 48 bits
+// zeroUpper48Bits is similar to zeroUpper32Bits, but for upper 48 bits.
 func zeroUpper48Bits(x *Value, depth int) bool {
        switch x.Op {
        case OpAMD64MOVWQZX, OpAMD64MOVWload, OpAMD64MOVWloadidx1, OpAMD64MOVWloadidx2:
@@ -1336,7 +1336,7 @@ func zeroUpper48Bits(x *Value, depth int) bool {
        return false
 }
 
-// zeroUpper56Bits is similar to zeroUpper32Bits, but for upper 56 bits
+// zeroUpper56Bits is similar to zeroUpper32Bits, but for upper 56 bits.
 func zeroUpper56Bits(x *Value, depth int) bool {
        switch x.Op {
        case OpAMD64MOVBQZX, OpAMD64MOVBload, OpAMD64MOVBloadidx1:
@@ -1486,7 +1486,7 @@ func encodePPC64RotateMask(rotate, mask, nbits int64) int64 {
        return int64(me) | int64(mb<<8) | int64(rotate<<16) | int64(nbits<<24)
 }
 
-// The inverse operation of encodePPC64RotateMask.  The values returned as
+// DecodePPC64RotateMask is the inverse operation of encodePPC64RotateMask.  The values returned as
 // mb and me satisfy the POWER ISA definition of MASK(x,y) where MASK(mb,me) = mask.
 func DecodePPC64RotateMask(sauxint int64) (rotate, mb, me int64, mask uint64) {
        auxint := uint64(sauxint)
@@ -1625,7 +1625,7 @@ func isARM64BFMask(lsb, mask, rshift int64) bool {
        return shiftedMask != 0 && isPowerOfTwo64(shiftedMask+1) && nto(shiftedMask)+lsb < 64
 }
 
-// returns the bitfield width of mask >> rshift for arm64 bitfield ops
+// returns the bitfield width of mask >> rshift for arm64 bitfield ops.
 func arm64BFWidth(mask, rshift int64) int64 {
        shiftedMask := int64(uint64(mask) >> uint64(rshift))
        if shiftedMask == 0 {
index 395931d1ff1488ef97d50f7df28f782b91e5960c..07d40dc948cc2faabbd558e23d4635e3afe448f3 100644 (file)
@@ -13,7 +13,7 @@ type sparseSet struct {
 }
 
 // newSparseSet returns a sparseSet that can represent
-// integers between 0 and n-1
+// integers between 0 and n-1.
 func newSparseSet(n int) *sparseSet {
        return &sparseSet{dense: nil, sparse: make([]int32, n)}
 }
index 9f4e0007d3a9317f8f1f75903ec6f62ffe2c1a92..6f2bd040375a83c129f69d8a021b13e4a55803f6 100644 (file)
@@ -55,7 +55,7 @@ const (
 // such as whether one block dominates another.
 type SparseTree []SparseTreeNode
 
-// newSparseTree creates a SparseTree from a block-to-parent map (array indexed by Block.ID)
+// newSparseTree creates a SparseTree from a block-to-parent map (array indexed by Block.ID).
 func newSparseTree(f *Func, parentOf []*Block) SparseTree {
        t := make(SparseTree, f.NumBlocks())
        for _, b := range f.Blocks {
@@ -184,7 +184,7 @@ func (t SparseTree) Parent(x *Block) *Block {
        return t[x.ID].parent
 }
 
-// isAncestorEq reports whether x is an ancestor of or equal to y.
+// IsAncestorEq reports whether x is an ancestor of or equal to y.
 func (t SparseTree) IsAncestorEq(x, y *Block) bool {
        if x == y {
                return true
index 1fd7b33d5f2d5b97b32ff3c2a1aa2869125eb8f6..13798c6c397eb82513cb29b68607cc7ea46e58bc 100644 (file)
@@ -118,7 +118,7 @@ func trim(f *Func) {
 }
 
 // emptyBlock reports whether the block does not contain actual
-// instructions
+// instructions.
 func emptyBlock(b *Block) bool {
        for _, v := range b.Values {
                if v.Op != OpPhi {
@@ -130,11 +130,11 @@ func emptyBlock(b *Block) bool {
 
 // trimmableBlock reports whether the block can be trimmed from the CFG,
 // subject to the following criteria:
-//   - it should not be the first block
-//   - it should be BlockPlain
-//   - it should not loop back to itself
+//   - it should not be the first block.
+//   - it should be BlockPlain.
+//   - it should not loop back to itself.
 //   - it either is the single predecessor of the successor block or
-//     contains no actual instructions
+//     contains no actual instructions.
 func trimmableBlock(b *Block) bool {
        if b.Kind != BlockPlain || b == b.Func.Entry {
                return false
index 2e7fc769df686f5dacac0bca26b4799044fdb1db..3b2f781cbe305565a6c616a00f190b860ad92dd6 100644 (file)
@@ -536,7 +536,7 @@ func wbcall(pos src.XPos, b *Block, fn, typ *obj.LSym, ptr, val, mem, sp, sb *Va
        return b.NewValue1I(pos, OpSelectN, types.TypeMem, 0, call)
 }
 
-// round to a multiple of r, r is a power of 2
+// round to a multiple of r, r is a power of 2.
 func round(o int64, r int64) int64 {
        return (o + r - 1) &^ (r - 1)
 }
index 2085618b889d37ef5b6873ac7aea416c39c400fe..909319dcbfc917c5bb8e4b15e217670a34b6b770 100644 (file)
@@ -45,7 +45,7 @@ type nowritebarrierrecCall struct {
 }
 
 // newNowritebarrierrecChecker creates a nowritebarrierrecChecker. It
-// must be called before walk
+// must be called before walk.
 func newNowritebarrierrecChecker() *nowritebarrierrecChecker {
        c := &nowritebarrierrecChecker{
                extraCalls: make(map[*ir.Func][]nowritebarrierrecCall),
index 3e31ac7fd61fad0ff26aa3fc0368725433c6a4be..19b6920913d83c9f0bdd42a9bebb92cc8d01393d 100644 (file)
@@ -424,7 +424,7 @@ type sparseSet struct {
 }
 
 // newSparseSet returns a sparseSet that can represent
-// integers between 0 and n-1
+// integers between 0 and n-1.
 func newSparseSet(n int) *sparseSet {
        return &sparseSet{dense: nil, sparse: make([]int32, n)}
 }
index 7966cd486075cbb627975d6cf2e108f81e03a0f7..c6d6e0deeef24e42c701c420fb914d590fdcfcbd 100644 (file)
@@ -252,7 +252,7 @@ func abiForFunc(fn *ir.Func, abi0, abi1 *abi.ABIConfig) *abi.ABIConfig {
        return a
 }
 
-// dvarint writes a varint v to the funcdata in symbol x and returns the new offset
+// dvarint writes a varint v to the funcdata in symbol x and returns the new offset.
 func dvarint(x *obj.LSym, off int, v int64) int {
        if v < 0 || v > 1e9 {
                panic(fmt.Sprintf("dvarint: bad offset for funcdata - %v", v))
index 4001fa5f5ea6628467da673924766cf981ccdb28..fce7d3d889f73249e58a3f22e7554b2839b4f00d 100644 (file)
@@ -238,7 +238,7 @@ func Temp(t *types.Type) *ir.Name {
        return TempAt(base.Pos, ir.CurFunc, t)
 }
 
-// make a new Node off the books
+// make a new Node off the books.
 func TempAt(pos src.XPos, curfn *ir.Func, t *types.Type) *ir.Name {
        if curfn == nil {
                base.Fatalf("no curfn for TempAt")
index 30726d4327f7ce8edf3d0879d73d939f094d90b0..af56ea8d986735411e0c35a35b96f5ae11074b43 100644 (file)
@@ -14,13 +14,13 @@ import (
 )
 
 // importalias declares symbol s as an imported type alias with type t.
-// ipkg is the package being imported
+// ipkg is the package being imported.
 func importalias(pos src.XPos, s *types.Sym, t *types.Type) *ir.Name {
        return importobj(pos, s, ir.OTYPE, ir.PEXTERN, t)
 }
 
 // importconst declares symbol s as an imported constant with type t and value val.
-// ipkg is the package being imported
+// ipkg is the package being imported.
 func importconst(pos src.XPos, s *types.Sym, t *types.Type, val constant.Value) *ir.Name {
        n := importobj(pos, s, ir.OLITERAL, ir.PEXTERN, t)
        n.SetVal(val)
@@ -28,7 +28,7 @@ func importconst(pos src.XPos, s *types.Sym, t *types.Type, val constant.Value)
 }
 
 // importfunc declares symbol s as an imported function with type t.
-// ipkg is the package being imported
+// ipkg is the package being imported.
 func importfunc(pos src.XPos, s *types.Sym, t *types.Type) *ir.Name {
        n := importobj(pos, s, ir.ONAME, ir.PFUNC, t)
        n.Func = ir.NewFunc(pos)
@@ -37,7 +37,7 @@ func importfunc(pos src.XPos, s *types.Sym, t *types.Type) *ir.Name {
 }
 
 // importobj declares symbol s as an imported object representable by op.
-// ipkg is the package being imported
+// ipkg is the package being imported.
 func importobj(pos src.XPos, s *types.Sym, op ir.Op, ctxt ir.Class, t *types.Type) *ir.Name {
        n := importsym(pos, s, op, ctxt)
        n.SetType(t)
@@ -60,7 +60,7 @@ func importsym(pos src.XPos, s *types.Sym, op ir.Op, ctxt ir.Class) *ir.Name {
 
 // importtype returns the named type declared by symbol s.
 // If no such type has been declared yet, a forward declaration is returned.
-// ipkg is the package being imported
+// ipkg is the package being imported.
 func importtype(pos src.XPos, s *types.Sym) *ir.Name {
        n := importsym(pos, s, ir.OTYPE, ir.PEXTERN)
        n.SetType(types.NewNamed(n))
@@ -68,7 +68,7 @@ func importtype(pos src.XPos, s *types.Sym) *ir.Name {
 }
 
 // importvar declares symbol s as an imported variable with type t.
-// ipkg is the package being imported
+// ipkg is the package being imported.
 func importvar(pos src.XPos, s *types.Sym, t *types.Type) *ir.Name {
        return importobj(pos, s, ir.ONAME, ir.PEXTERN, t)
 }
index f4174d1a600b2b1a65d20607d171d88bb899ae2c..1857994b620ecc83d570784c4b4126e13986359d 100644 (file)
@@ -1484,7 +1484,7 @@ func fmtSignature(nl ir.Nodes, isddd bool) string {
        return fmt.Sprintf("(%s)", strings.Join(typeStrings, ", "))
 }
 
-// type check composite
+// type check composite.
 func fielddup(name string, hash map[string]bool) {
        if hash[name] {
                base.Errorf("duplicate field name in struct literal: %s", name)
index 7d554947374a273f63cf110a716b56257a030ca5..31c4b060d5064d12a54973483bbf5d57c05d3f8a 100644 (file)
@@ -513,7 +513,7 @@ func walkNew(n *ir.UnaryExpr, init *ir.Nodes) ir.Node {
        return n
 }
 
-// generate code for print
+// generate code for print.
 func walkPrint(nn *ir.CallExpr, init *ir.Nodes) ir.Node {
        // Hoist all the argument evaluation up before the lock.
        walkExprListCheap(nn.Args, init)
index 7205107f6fa2af6503f0dcbbd8f755f87230e934..24fe0d0b9f639d17a1333b261df8f81eff188c73 100644 (file)
@@ -346,7 +346,7 @@ func walkExpr1(n ir.Node, init *ir.Nodes) ir.Node {
 // expression or simple statement.
 // the types expressions are calculated.
 // compile-time constants are evaluated.
-// complex side effects like statements are appended to init
+// complex side effects like statements are appended to init.
 func walkExprList(s []ir.Node, init *ir.Nodes) {
        for i := range s {
                s[i] = walkExpr(s[i], init)
@@ -867,7 +867,7 @@ func walkStringHeader(n *ir.StringHeaderExpr, init *ir.Nodes) ir.Node {
        return n
 }
 
-// return 1 if integer n must be in range [0, max), 0 otherwise
+// return 1 if integer n must be in range [0, max), 0 otherwise.
 func bounded(n ir.Node, max int64) bool {
        if n.Type() == nil || !n.Type().IsInteger() {
                return false
index a4d49f4614588538f454384e5fc325fdad4b3e92..a8efa513d243df960ef6d1061bd889f293032380 100644 (file)
@@ -379,7 +379,7 @@ func errprintf(format string, args ...interface{}) {
        fmt.Fprintf(os.Stderr, format, args...)
 }
 
-// xsamefile reports whether f1 and f2 are the same file (or dir)
+// xsamefile reports whether f1 and f2 are the same file (or dir).
 func xsamefile(f1, f2 string) bool {
        fi1, err1 := os.Stat(f1)
        fi2, err2 := os.Stat(f2)
index 003bc79fe959bfef3199dcc53aaa5f6cc57a7586..dfe5da677e32eee963ef595949a2af4293d9d0d1 100644 (file)
@@ -408,7 +408,7 @@ type modSumStatus struct {
 }
 
 // Reset resets globals in the modfetch package, so previous loads don't affect
-// contents of go.sum files
+// contents of go.sum files.
 func Reset() {
        GoSumFile = ""
        WorkspaceGoSumFiles = nil
index 045fc9c263303137d6800a3a6f40f68dab3fe934..a6d19c61d1d04f3bd41edf157e795ec7506f3e27 100644 (file)
@@ -1159,8 +1159,8 @@ func isEmptyInlinedCall(slot int, calls *InlCalls) bool {
        return !live
 }
 
-// Slot -1:    return top-level inlines
-// Slot >= 0:  return children of that slot
+// Slot -1:    return top-level inlines.
+// Slot >= 0:  return children of that slot.
 func inlChildren(slot int, calls *InlCalls) []int {
        var kids []int
        if slot != -1 {
index 3d5abedc1e131f85d8ac95d92e7e22e9d8734025..d7a28388e51c57640491274f582d69ab79ebb432 100644 (file)
@@ -1525,7 +1525,7 @@ func isbitcon(x uint64) bool {
        return sequenceOfOnes(x) || sequenceOfOnes(^x)
 }
 
-// sequenceOfOnes tests whether a constant is a sequence of ones in binary, with leading and trailing zeros
+// sequenceOfOnes tests whether a constant is a sequence of ones in binary, with leading and trailing zeros.
 func sequenceOfOnes(x uint64) bool {
        y := x & -x // lowest set bit of x. x is good iff x+y is a power of 2
        y += x
@@ -1778,7 +1778,7 @@ func (c *ctxt7) offsetshift(p *obj.Prog, v int64, cls int) int64 {
 /*
  * if v contains a single 16-bit value aligned
  * on a 16-bit field, and thus suitable for movk/movn,
- * return the field index 0 to 3; otherwise return -1
+ * return the field index 0 to 3; otherwise return -1.
  */
 func movcon(v int64) int {
        for s := 0; s < 64; s += 16 {
index 2ac4d3e50eaeefec728cfd700e0f13d10bba73a0..df3e9bf8668954cc8eef7aad7678318b3e4b3076 100644 (file)
@@ -1092,7 +1092,7 @@ func OP_IR(op uint32, i uint32, r2 uint32) uint32 {
        return op | (i&0xFFFFF)<<5 | (r2&0x1F)<<0 // ui20, rd5
 }
 
-// Encoding for the 'b' or 'bl' instruction
+// Encoding for the 'b' or 'bl' instruction.
 func OP_B_BL(op uint32, i uint32) uint32 {
        return op | ((i & 0xFFFF) << 10) | ((i >> 16) & 0x3FF)
 }
index 3e7b7b4913c6060889c934b69f0bf5a5104a5a24..9469edaf4c8052e38d7aa285049cccefeabe41c7 100644 (file)
@@ -539,7 +539,7 @@ var oprange [ALAST & obj.AMask][]Optab
 
 var xcmp [C_NCLASS][C_NCLASS]bool
 
-// padding bytes to add to align code as requested
+// padding bytes to add to align code as requested.
 func addpad(pc, a int64, ctxt *obj.Link, cursym *obj.LSym) int {
        // For 16 and 32 byte alignment, there is a tradeoff
        // between aligning the code and adding too many NOPs.
@@ -2105,7 +2105,7 @@ func OPMD(o, xo, rc uint32) uint32 {
        return o<<26 | xo<<2 | rc&1
 }
 
-/* the order is dest, a/s, b/imm for both arithmetic and logical operations */
+/* the order is dest, a/s, b/imm for both arithmetic and logical operations. */
 func AOP_RRR(op uint32, d uint32, a uint32, b uint32) uint32 {
        return op | (d&31)<<21 | (a&31)<<16 | (b&31)<<11
 }
index 5760847bcd4dbdb3ed4db7fa123e1755ab7b2096..d8a36c4e9cf6c1c50b1a469b6aca9d74ec720ac6 100644 (file)
@@ -4374,12 +4374,12 @@ func (c *ctxtz) regoff(a *obj.Addr) int32 {
        return int32(c.vregoff(a))
 }
 
-// find if the displacement is within 12 bit
+// find if the displacement is within 12 bit.
 func isU12(displacement int32) bool {
        return displacement >= 0 && displacement < DISP12
 }
 
-// zopload12 returns the RX op with 12 bit displacement for the given load
+// zopload12 returns the RX op with 12 bit displacement for the given load.
 func (c *ctxtz) zopload12(a obj.As) (uint32, bool) {
        switch a {
        case AFMOVD:
@@ -4390,7 +4390,7 @@ func (c *ctxtz) zopload12(a obj.As) (uint32, bool) {
        return 0, false
 }
 
-// zopload returns the RXY op for the given load
+// zopload returns the RXY op for the given load.
 func (c *ctxtz) zopload(a obj.As) uint32 {
        switch a {
        // fixed point load
@@ -4428,7 +4428,7 @@ func (c *ctxtz) zopload(a obj.As) uint32 {
        return 0
 }
 
-// zopstore12 returns the RX op with 12 bit displacement for the given store
+// zopstore12 returns the RX op with 12 bit displacement for the given store.
 func (c *ctxtz) zopstore12(a obj.As) (uint32, bool) {
        switch a {
        case AFMOVD:
@@ -4445,7 +4445,7 @@ func (c *ctxtz) zopstore12(a obj.As) (uint32, bool) {
        return 0, false
 }
 
-// zopstore returns the RXY op for the given store
+// zopstore returns the RXY op for the given store.
 func (c *ctxtz) zopstore(a obj.As) uint32 {
        switch a {
        // fixed point store
@@ -4477,7 +4477,7 @@ func (c *ctxtz) zopstore(a obj.As) uint32 {
        return 0
 }
 
-// zoprre returns the RRE op for the given a
+// zoprre returns the RRE op for the given a.
 func (c *ctxtz) zoprre(a obj.As) uint32 {
        switch a {
        case ACMP:
@@ -4495,7 +4495,7 @@ func (c *ctxtz) zoprre(a obj.As) uint32 {
        return 0
 }
 
-// zoprr returns the RR op for the given a
+// zoprr returns the RR op for the given a.
 func (c *ctxtz) zoprr(a obj.As) uint32 {
        switch a {
        case ACMPW:
@@ -4507,7 +4507,7 @@ func (c *ctxtz) zoprr(a obj.As) uint32 {
        return 0
 }
 
-// zopril returns the RIL op for the given a
+// zopril returns the RIL op for the given a.
 func (c *ctxtz) zopril(a obj.As) uint32 {
        switch a {
        case ACMP:
index 347932c6e1dbf97cf8985c5e14d9f509077331d4..9eaa7b9eea7f3756af41892f524252d4fa5a81ba 100644 (file)
@@ -91,7 +91,7 @@ func gentext(ctxt *ld.Link, ldr *loader.Loader) {
 }
 
 // Preserve highest 8 bits of a, and do addition to lower 24-bit
-// of a and b; used to adjust ARM branch instruction's target
+// of a and b; used to adjust ARM branch instruction's target.
 func braddoff(a int32, b int32) int32 {
        return int32((uint32(a))&0xff000000 | 0x00ffffff&uint32(a+b))
 }
@@ -363,7 +363,7 @@ func pereloc1(arch *sys.Arch, out *ld.OutBuf, ldr *loader.Loader, s loader.Sym,
        return true
 }
 
-// sign extend a 24-bit integer
+// sign extend a 24-bit integer.
 func signext24(x int64) int32 {
        return (int32(x) << 8) >> 8
 }
@@ -379,7 +379,7 @@ func immrot(v uint32) uint32 {
        return 0
 }
 
-// Convert the direct jump relocation r to refer to a trampoline if the target is too far
+// Convert the direct jump relocation r to refer to a trampoline if the target is too far.
 func trampoline(ctxt *ld.Link, ldr *loader.Loader, ri int, rs, s loader.Sym) {
        relocs := ldr.Relocs(s)
        r := relocs.At(ri)
@@ -459,7 +459,7 @@ func trampoline(ctxt *ld.Link, ldr *loader.Loader, ri int, rs, s loader.Sym) {
        }
 }
 
-// generate a trampoline to target+offset
+// generate a trampoline to target+offset.
 func gentramp(arch *sys.Arch, linkmode ld.LinkMode, ldr *loader.Loader, tramp *loader.SymbolBuilder, target loader.Sym, offset int64) {
        tramp.SetSize(12) // 3 instructions
        P := make([]byte, tramp.Size())
@@ -481,7 +481,7 @@ func gentramp(arch *sys.Arch, linkmode ld.LinkMode, ldr *loader.Loader, tramp *l
        }
 }
 
-// generate a trampoline to target+offset in position independent code
+// generate a trampoline to target+offset in position independent code.
 func gentramppic(arch *sys.Arch, tramp *loader.SymbolBuilder, target loader.Sym, offset int64) {
        tramp.SetSize(16) // 4 instructions
        P := make([]byte, tramp.Size())
@@ -502,7 +502,7 @@ func gentramppic(arch *sys.Arch, tramp *loader.SymbolBuilder, target loader.Sym,
        r.SetAdd(offset + 4)
 }
 
-// generate a trampoline to target+offset in dynlink mode (using GOT)
+// generate a trampoline to target+offset in dynlink mode (using GOT).
 func gentrampdyn(arch *sys.Arch, tramp *loader.SymbolBuilder, target loader.Sym, offset int64) {
        tramp.SetSize(20)                               // 5 instructions
        o1 := uint32(0xe5900000 | 12<<12 | 15<<16 | 8)  // MOVW 8(R15), R12 // R15 is actual pc + 8
index e0fdc202f5759217b89538ad19e90b2bc0b9abcb..fc0ad3fb4e4d2438cbf4ecd95fc11978f2d1fd02 100644 (file)
@@ -1271,7 +1271,7 @@ func offsetLabelName(ldr *loader.Loader, s loader.Sym, off int64) string {
        return fmt.Sprintf("%s+%d", ldr.SymExtname(s), off)
 }
 
-// Convert the direct jump relocation r to refer to a trampoline if the target is too far
+// Convert the direct jump relocation r to refer to a trampoline if the target is too far.
 func trampoline(ctxt *ld.Link, ldr *loader.Loader, ri int, rs, s loader.Sym) {
        relocs := ldr.Relocs(s)
        r := relocs.At(ri)
index 0f2fd214a7134712a0790923722c63231aee390b..daf96f0c4f37b8f48a536bda3c2af474081364d2 100644 (file)
@@ -51,7 +51,7 @@ import (
        "sync/atomic"
 )
 
-// isRuntimeDepPkg reports whether pkg is the runtime package or its dependency
+// isRuntimeDepPkg reports whether pkg is the runtime package or its dependency.
 func isRuntimeDepPkg(pkg string) bool {
        switch pkg {
        case "runtime",
@@ -2349,7 +2349,7 @@ func (ctxt *Link) textaddress() {
        }
 }
 
-// assigns address for a text symbol, returns (possibly new) section, its number, and the address
+// assigns address for a text symbol, returns (possibly new) section, its number, and the address.
 func assignAddress(ctxt *Link, sect *sym.Section, n int, s loader.Sym, va uint64, isTramp, big bool) (*sym.Section, int, uint64) {
        ldr := ctxt.loader
        if thearch.AssignAddress != nil {
index 41fc9ab76fd59f9e08be88e93228a22dd4162b3e..082adcc3c7f7a8ec2e7ae74ad01ffb0462432c9f 100644 (file)
@@ -458,7 +458,7 @@ func elfwritehdr(out *OutBuf) uint32 {
        return elf32writehdr(out)
 }
 
-/* Taken directly from the definition document for ELF64 */
+/* Taken directly from the definition document for ELF64. */
 func elfhash(name string) uint32 {
        var h uint32
        for i := 0; i < len(name); i++ {
@@ -1097,7 +1097,7 @@ func elfshname(name string) *ElfShdr {
 }
 
 // Create an ElfShdr for the section with name.
-// Create a duplicate if one already exists with that name
+// Create a duplicate if one already exists with that name.
 func elfshnamedup(name string) *ElfShdr {
        for i := 0; i < nelfstr; i++ {
                if name == elfstr[i].s {
index 133858c76477fb9b3abe9263d75e7bdb8ec6aad6..1265c458feff142451c7f840b1bfda85753529bc 100644 (file)
@@ -539,7 +539,7 @@ func (f *xcoffFile) getXCOFFscnum(sect *sym.Section) int16 {
 }
 
 // Xcoffinit initialised some internal value and setups
-// already known header information
+// already known header information.
 func Xcoffinit(ctxt *Link) {
        xfile.dynLibraries = make(map[string]int)
 
@@ -872,7 +872,7 @@ func (f *xcoffFile) writeSymbolFunc(ctxt *Link, x loader.Sym) []xcoffSym {
        return syms
 }
 
-// put function used by genasmsym to write symbol table
+// put function used by genasmsym to write symbol table.
 func putaixsym(ctxt *Link, x loader.Sym, t SymbolType) {
        // All XCOFF symbols generated by this GO symbols
        // Can be a symbol entry or a auxiliary entry
@@ -1355,7 +1355,7 @@ func (ctxt *Link) doxcoff() {
 // Currently, this section is created from scratch when assembling the XCOFF file
 // according to information retrieved in xfile object.
 
-// Create loader section and returns its size
+// Create loader section and returns its size.
 func Loaderblk(ctxt *Link, off uint64) {
        xfile.writeLdrScn(ctxt, off)
 }
@@ -1582,7 +1582,7 @@ func xcoffwrite(ctxt *Link) {
        }
 }
 
-// Generate XCOFF assembly file
+// Generate XCOFF assembly file.
 func asmbXcoff(ctxt *Link) {
        ctxt.Out.SeekSet(0)
        fileoff := int64(Segdwarf.Fileoff + Segdwarf.Filelen)
index 71c8ca23c4bc2a7318737e7242b2bc8f28e31bf7..7413599f4d50e34049fb5e89fc71414ec9f4152c 100644 (file)
@@ -133,7 +133,7 @@ func genpltstub(ctxt *ld.Link, ldr *loader.Loader, r loader.Reloc, s loader.Sym)
        return stub.Sym(), firstUse
 }
 
-// Scan relocs and generate PLT stubs and generate/fixup ABI defined functions created by the linker
+// Scan relocs and generate PLT stubs and generate/fixup ABI defined functions created by the linker.
 func genstubs(ctxt *ld.Link, ldr *loader.Loader) {
        var stubs []loader.Sym
        var abifuncs []loader.Sym
@@ -933,7 +933,7 @@ func archrelocaddr(ldr *loader.Loader, target *ld.Target, syms *ld.ArchSyms, r l
        return packInstPair(target, o1, o2)
 }
 
-// Determine if the code was compiled so that the TOC register R2 is initialized and maintained
+// Determine if the code was compiled so that the TOC register R2 is initialized and maintained.
 func r2Valid(ctxt *ld.Link) bool {
        switch ctxt.BuildMode {
        case ld.BuildModeCArchive, ld.BuildModeCShared, ld.BuildModePIE, ld.BuildModeShared, ld.BuildModePlugin:
@@ -943,7 +943,7 @@ func r2Valid(ctxt *ld.Link) bool {
        return ctxt.IsSharedGoLink()
 }
 
-// resolve direct jump relocation r in s, and add trampoline if necessary
+// resolve direct jump relocation r in s, and add trampoline if necessary.
 func trampoline(ctxt *ld.Link, ldr *loader.Loader, ri int, rs, s loader.Sym) {
 
        // Trampolines are created if the branch offset is too large and the linker cannot insert a call stub to handle it.
@@ -1462,7 +1462,7 @@ func addpltsym(ctxt *ld.Link, ldr *loader.Loader, s loader.Sym) {
        }
 }
 
-// Generate the glink resolver stub if necessary and return the .glink section
+// Generate the glink resolver stub if necessary and return the .glink section.
 func ensureglinkresolver(ctxt *ld.Link, ldr *loader.Loader) *loader.SymbolBuilder {
        glink := ldr.CreateSymForUpdate(".glink", 0)
        if glink.Size() != 0 {
index 147b3ad41862c5ddb1117e2b51204e9b78739e2b..bc1a4cf9f75a186916bf9a76a9460c03201ed2dd 100644 (file)
@@ -104,7 +104,7 @@ func statusCodeError(resp *http.Response) error {
 // cpuProfileHandler is the Go pprof CPU profile handler URL.
 const cpuProfileHandler = "/debug/pprof/profile"
 
-// adjustURL applies the duration/timeout values and Go specific defaults
+// adjustURL applies the duration/timeout values and Go specific defaults.
 func adjustURL(source string, duration, timeout time.Duration) (string, time.Duration) {
        u, err := url.Parse(source)
        if err != nil || (u.Host == "" && u.Scheme != "" && u.Scheme != "file") {
index 93efd7cafb82d356a0b1b787fe0353d1ab93efbd..b53764b552c9112d2907f14716d2ec2ba0e33859 100644 (file)
@@ -297,7 +297,7 @@ func hash4(b []byte) uint32 {
 }
 
 // bulkHash4 will compute hashes using the same
-// algorithm as hash4
+// algorithm as hash4.
 func bulkHash4(b []byte, dst []uint32) {
        if len(b) < minMatchLength {
                return
index 6b1aaea2b2b6beb926cb5d8ec6154f7d0ceaa3b4..ade4c8fb281795d004a31bb0bb894aa85b6fc61e 100644 (file)
@@ -60,7 +60,7 @@ func newHuffmanEncoder(size int) *huffmanEncoder {
        return &huffmanEncoder{codes: make([]hcode, size)}
 }
 
-// Generates a HuffmanCode corresponding to the fixed literal table
+// Generates a HuffmanCode corresponding to the fixed literal table.
 func generateFixedLiteralEncoding() *huffmanEncoder {
        h := newHuffmanEncoder(maxNumLit)
        codes := h.codes
index ae01391f9cfc3d7b8c4f8623fed3472776b7801b..fc0e4941e7bcd2a1fed78690c92f57407b0c2784 100644 (file)
@@ -75,17 +75,17 @@ func matchToken(xlength uint32, xoffset uint32) token {
        return token(matchType + xlength<<lengthShift + xoffset)
 }
 
-// Returns the literal of a literal token
+// Returns the literal of a literal token.
 func (t token) literal() uint32 { return uint32(t - literalType) }
 
-// Returns the extra offset of a match token
+// Returns the extra offset of a match token.
 func (t token) offset() uint32 { return uint32(t) & offsetMask }
 
 func (t token) length() uint32 { return uint32((t - matchType) >> lengthShift) }
 
 func lengthCode(len uint32) uint32 { return lengthCodes[len] }
 
-// Returns the offset code corresponding to a specific offset
+// Returns the offset code corresponding to a specific offset.
 func offsetCode(off uint32) uint32 {
        if off < uint32(len(offsetCodes)) {
                return offsetCodes[off]
index c649dee94f5826e732a0204de18a9410ecccc545..192913094eeca9a8fc1ef1b0f8cf352cd2cce3e6 100644 (file)
@@ -83,7 +83,7 @@ var feistelBox [8][64]uint32
 
 var feistelBoxOnce sync.Once
 
-// general purpose function to perform DES block permutations
+// general purpose function to perform DES block permutations.
 func permuteBlock(src uint64, permutation []uint8) (block uint64) {
        for position, n := range permutation {
                bit := (src >> n) & 1
@@ -209,7 +209,7 @@ func permuteFinalBlock(block uint64) uint64 {
 }
 
 // creates 16 28-bit blocks rotated according
-// to the rotation schedule
+// to the rotation schedule.
 func ksRotate(in uint32) (out []uint32) {
        out = make([]uint32, 16)
        last := in
@@ -223,7 +223,7 @@ func ksRotate(in uint32) (out []uint32) {
        return
 }
 
-// creates 16 56-bit subkeys from the original key
+// creates 16 56-bit subkeys from the original key.
 func (c *desCipher) generateSubkeys(keyBytes []byte) {
        feistelBoxOnce.Do(initFeistelBox)
 
index 7ea438d3a7ad75a8685f40b5e7ebfee17072625b..102380a839f51697a471d7c994eadc4e99147294 100644 (file)
@@ -36,7 +36,7 @@ func Unreachable() {
        panic("boringcrypto: invalid code execution")
 }
 
-// provided by runtime to avoid os import
+// provided by runtime to avoid os import.
 func runtime_arg0() string
 
 func hasSuffix(s, t string) bool {
index 352eb8eecc9161f891e03d2eb61994112ed4e17d..5387c5a015834ecb6c74b4bc82e5ec8de6399c7d 100644 (file)
@@ -47,7 +47,7 @@ func CFStringToString(ref CFRef) string {
        return string(b)
 }
 
-// TimeToCFDateRef converts a time.Time into an apple CFDateRef
+// TimeToCFDateRef converts a time.Time into an apple CFDateRef.
 func TimeToCFDateRef(t time.Time) CFRef {
        secs := t.Sub(time.Date(2001, 1, 1, 0, 0, 0, 0, time.UTC)).Seconds()
        ref := CFDateCreate(secs)
index 22fc6922da988b637437ac13700fcfea22b77045..4c43f5f98c44881da7a45327eb97e5448d5a89a3 100644 (file)
@@ -594,7 +594,7 @@ func (s *scanner) error(c byte, context string) int {
        return scanError
 }
 
-// quoteChar formats c as a quoted character literal
+// quoteChar formats c as a quoted character literal.
 func quoteChar(c byte) string {
        // special cases - different from quoted strings
        if c == '\'' {
index 6d0459ec5bb615d2d6f95f8055f1b800bbb79719..65ca88540fa3f279faf28a1c32d2200f33993e2c 100644 (file)
@@ -112,7 +112,7 @@ func Examples(testFiles ...*ast.File) []*Example {
 
 var outputPrefix = lazyregexp.New(`(?i)^[[:space:]]*(unordered )?output:`)
 
-// Extracts the expected output and whether there was a valid output comment
+// Extracts the expected output and whether there was a valid output comment.
 func exampleOutput(b *ast.BlockStmt, comments []*ast.CommentGroup) (output string, unordered, ok bool) {
        if _, last := lastComment(b, comments); last != nil {
                // test that it begins with the correct prefix
index 492e03970340e342e344e828e0450feef7c17f24..8f9fda41ff637affb1824647d552254eafd69f81 100644 (file)
@@ -826,7 +826,7 @@ func (d *data) Len() int           { return d.n }
 func (d *data) Swap(i, j int)      { d.swap(i, j) }
 func (d *data) Less(i, j int) bool { return d.less(i, j) }
 
-// sortBy is a helper function for sorting
+// sortBy is a helper function for sorting.
 func sortBy(less func(i, j int) bool, swap func(i, j int), n int) {
        sort.Sort(&data{n, swap, less})
 }
index e8ff9658daff50ff909ca3cbc5c7379904070af7..ee9c12c447a414d3cc7dce33ddbb373e3218d25c 100644 (file)
@@ -180,7 +180,7 @@ func report(err error) {
        errorCount++
 }
 
-// parse may be called concurrently
+// parse may be called concurrently.
 func parse(filename string, src any) (*ast.File, error) {
        if *verbose {
                fmt.Println(filename)
index dcd32351a5b69e16157baf4b98a7ba23b8c18575..c22e38e00947f834c3d08379f354be11df97ce54 100644 (file)
@@ -18,7 +18,7 @@ const (
 //go:noescape
 func ppc64SlicingUpdateBy8(crc uint32, table8 *slicing8Table, p []byte) uint32
 
-// this function requires the buffer to be 16 byte aligned and > 16 bytes long
+// this function requires the buffer to be 16 byte aligned and > 16 bytes long.
 //
 //go:noescape
 func vectorCrc32(crc uint32, poly uint32, p []byte) uint32
index b104267177e1c9d44fdad6325b6a19f7e90bbbb8..49d2f261af22f7e6a9417ed8ceff70f104c27986 100644 (file)
@@ -134,7 +134,7 @@ var (
 
 // indirectToStringerOrError returns the value, after dereferencing as many times
 // as necessary to reach the base type (or nil) or an implementation of fmt.Stringer
-// or error,
+// or error.
 func indirectToStringerOrError(a any) any {
        if a == nil {
                return nil
index 0d96be2f7a2fd789a157867f1b58abc503d7f66a..0c5e17e3bb248476ccd63d9eda5ca1f8b009f40a 100644 (file)
@@ -67,7 +67,7 @@ func countNewCoverageBits(base, snapshot []byte) int {
 }
 
 // isCoverageSubset returns true if all the base coverage bits are set in
-// snapshot
+// snapshot.
 func isCoverageSubset(base, snapshot []byte) bool {
        for i, v := range base {
                if v&snapshot[i] != v {
index 65e50db99d5fda5b98605211616b1b768692a85a..141dd1f405f9d1c8563287cd814dc0bb3cfd4994 100644 (file)
@@ -131,7 +131,7 @@ func (p *Profile) FilterSamplesByTag(focus, ignore TagMatch) (fm, im bool) {
 }
 
 // focusedSample checks a sample against focus and ignore regexps.
-// Returns whether the focus/ignore regexps match any tags
+// Returns whether the focus/ignore regexps match any tags.
 func focusedSample(s *Sample, focus, ignore TagMatch) (fm, im bool) {
        fm = focus == nil
        for key, vals := range s.Label {
index 29b5ddf3a5e528432f2adb424f834dfcb58839ae..d747078e23c5cfdde06f2ccf3981e2f109981c48 100644 (file)
@@ -671,7 +671,7 @@ func lehmerSimulate(A, B *Int) (u0, u1, v0, v1 Word, even bool) {
 // where the signs of u0, u1, v0, v1 are given by even
 // For even == true: u0, v1 >= 0 && u1, v0 <= 0
 // For even == false: u0, v1 <= 0 && u1, v0 >= 0
-// q, r, s, t are temporary variables to avoid allocations in the multiplication
+// q, r, s, t are temporary variables to avoid allocations in the multiplication.
 func lehmerUpdate(A, B, q, r, s, t *Int, u0, u1, v0, v1 Word, even bool) {
 
        t.abs = t.abs.setWord(u0)
@@ -695,7 +695,7 @@ func lehmerUpdate(A, B, q, r, s, t *Int, u0, u1, v0, v1 Word, even bool) {
 }
 
 // euclidUpdate performs a single step of the Euclidean GCD algorithm
-// if extended is true, it also updates the cosequence Ua, Ub
+// if extended is true, it also updates the cosequence Ua, Ub.
 func euclidUpdate(A, B, Ua, Ub, q, r, s, t *Int, extended bool) {
        q, r = q.QuoRem(A, B, r)
 
index a3a4023caa69749eaeeadc7ff8146e74fee6c917..04e8c24ed52c98e6b58aa52da2c7bbf6e54a4d75 100644 (file)
@@ -40,7 +40,7 @@ func (x *Int) String() string {
        return x.Text(10)
 }
 
-// write count copies of text to s
+// write count copies of text to s.
 func writeMultiple(s fmt.State, text string, count int) {
        if len(text) > 0 {
                b := []byte(text)
index da59bd6e4c5755909f607fcf12f7f64004a78dd4..ce94f2cf72e9a1b3fb385c01ac4dd10694f3fb8c 100644 (file)
@@ -455,7 +455,7 @@ func (z nat) expWW(x, y Word) nat {
        return z.expNN(nat(nil).setWord(x), nat(nil).setWord(y), nil, false)
 }
 
-// construct table of powers of bb*leafSize to use in subdivisions
+// construct table of powers of bb*leafSize to use in subdivisions.
 func divisors(m int, b Word, ndigits int, bb Word) []divisor {
        // only compute table when recursive conversion is enabled and x is large
        if leafSize == 0 || m <= leafSize {
index febac0e0bbdec63672ed910af6abf2b027dee27f..51cf40566dc6129279ac3c454ce3563731f1242f 100644 (file)
@@ -172,7 +172,7 @@ func Cosh(x complex128) complex128 {
        return complex(c*ch, s*sh)
 }
 
-// calculate sinh and cosh
+// calculate sinh and cosh.
 func sinhcosh(x float64) (sh, ch float64) {
        if math.Abs(x) <= 0.5 {
                return math.Sinh(x), math.Cosh(x)
index 617446b030794aeb736296c2d7189cf4b3fa0e01..122e8d030d0cde6797ad26742737a0f27d9efa27 100644 (file)
@@ -499,7 +499,7 @@ func (c *Client) checkRedirect(req *Request, via []*Request) error {
 }
 
 // redirectBehavior describes what should happen when the
-// client encounters a 3xx status code from the server
+// client encounters a 3xx status code from the server.
 func redirectBehavior(reqMethod string, resp *Response, ireq *Request) (redirectMethod string, shouldRedirect, includeBody bool) {
        switch resp.StatusCode {
        case 301, 302, 303:
index b7b0455ee1653ed7afdb7975707d224fbbbc3a7a..912fde6b9580d88bc611601af841a0cd2dc7c8e2 100644 (file)
@@ -273,7 +273,7 @@ func (c *Cookie) Valid() error {
 // readCookies parses all "Cookie" values from the header h and
 // returns the successfully parsed Cookies.
 //
-// if filter isn't empty, only cookies of that name are returned
+// if filter isn't empty, only cookies of that name are returned.
 func readCookies(h Header, filter string) []*Cookie {
        lines := h["Cookie"]
        if len(lines) == 0 {
index 09b42c188aba22a05f63b32648cb759205e109fe..7c7afd7de422648c17f74486fbff77c94c78a05f 100644 (file)
@@ -600,7 +600,7 @@ func readTransfer(msg any, r *bufio.Reader) (err error) {
        return nil
 }
 
-// Checks whether chunked is part of the encodings stack
+// Checks whether chunked is part of the encodings stack.
 func chunked(te []string) bool { return len(te) > 0 && te[0] == "chunked" }
 
 // Checks whether the encoding is explicitly "identity".
@@ -738,7 +738,7 @@ func fixLength(isResponse bool, status int, requestMethod string, header Header,
 
 // Determine whether to hang up after sending a request and body, or
 // receiving a response and body
-// 'header' is the request headers
+// 'header' is the request headers.
 func shouldClose(major, minor int, header Header, removeCloseHeader bool) bool {
        if major < 1 {
                return true
@@ -757,7 +757,7 @@ func shouldClose(major, minor int, header Header, removeCloseHeader bool) bool {
        return hasClose
 }
 
-// Parse the trailer header
+// Parse the trailer header.
 func fixTrailer(header Header, chunked bool) (Header, error) {
        vv, ok := header["Trailer"]
        if !ok {
@@ -1081,7 +1081,7 @@ var nopCloserWriterToType = reflect.TypeOf(io.NopCloser(struct {
 }{}))
 
 // unwrapNopCloser return the underlying reader and true if r is a NopCloser
-// else it return false
+// else it return false.
 func unwrapNopCloser(r io.Reader) (underlyingReader io.Reader, isNopCloser bool) {
        switch reflect.TypeOf(r) {
        case nopCloserType, nopCloserWriterToType:
index e4434e8076c489e42d91fdad769be77afa63b2fa..ddcb64815c627e2b8eb749e820e55bbec566eade 100644 (file)
@@ -2743,7 +2743,7 @@ var portMap = map[string]string{
        "socks5": "1080",
 }
 
-// canonicalAddr returns url.Host but always with a ":port" suffix
+// canonicalAddr returns url.Host but always with a ":port" suffix.
 func canonicalAddr(url *url.URL) string {
        addr := url.Hostname()
        if v, err := idnaASCII(addr); err == nil {
index 1e2eea22b7718cc35159ab9b246a8c347419de79..32edbbb3440edbcff4d84c44c822304183613c0a 100644 (file)
@@ -101,7 +101,7 @@ func (ch Chan) ServeHTTP(w http.ResponseWriter, req *http.Request) {
        io.WriteString(w, fmt.Sprintf("channel send #%d\n", <-ch))
 }
 
-// exec a program, redirecting output
+// exec a program, redirecting output.
 func DateServer(rw http.ResponseWriter, req *http.Request) {
        rw.Header().Set("Content-Type", "text/plain; charset=utf-8")
 
index 218523f28daeb3008cbbd65fde8247e130fd7c66..4ee728196b31e424397f6854e245163ec05dad23 100644 (file)
@@ -383,7 +383,7 @@ func (r *Resolver) lookupAddr(ctx context.Context, addr string) ([]string, error
 
 const dnsSectionMask = 0x0003
 
-// returns only results applicable to name and resolves CNAME entries
+// returns only results applicable to name and resolves CNAME entries.
 func validRecs(r *syscall.DNSRecord, dnstype uint16, name string) []*syscall.DNSRecord {
        cname := syscall.StringToUTF16Ptr(name)
        if dnstype != syscall.DNS_TYPE_CNAME {
@@ -406,7 +406,7 @@ func validRecs(r *syscall.DNSRecord, dnstype uint16, name string) []*syscall.DNS
        return rec
 }
 
-// returns the last CNAME in chain
+// returns the last CNAME in chain.
 func resolveCNAME(name *uint16, r *syscall.DNSRecord) *uint16 {
        // limit cname resolving to 10 in case of an infinite CNAME loop
 Cname:
index 5de47eb45b69900cd746a7febab5830d2814196d..6268c08f47dd07591d535baf837610ef77bb1c9b 100644 (file)
@@ -850,7 +850,7 @@ func isVchar(r rune) bool {
 }
 
 // isMultibyte reports whether r is a multi-byte UTF-8 character
-// as supported by RFC 6532
+// as supported by RFC 6532.
 func isMultibyte(r rune) bool {
        return r >= utf8.RuneSelf
 }
index 3bd2061b0c907c9f7f4be4530a43937934e545d3..b5a025ef2a5fcd2b13acbfcd42287baa7f38ea02 100644 (file)
@@ -423,7 +423,7 @@ func (c *Client) Quit() error {
        return c.Text.Close()
 }
 
-// validateLine checks to see if a line has CR or LF as per RFC 5321
+// validateLine checks to see if a line has CR or LF as per RFC 5321.
 func validateLine(line string) error {
        if strings.ContainsAny(line, "\n\r") {
                return errors.New("smtp: A line must not contain CR or LF")
index 330297b36ac58ce81f67fdef6e8b5dd1b88b0200..63ad5ab4bd5f7f8e44752dce31b28067877d1c74 100644 (file)
@@ -61,7 +61,7 @@ func isShellSpecialVar(c uint8) bool {
        return false
 }
 
-// isAlphaNum reports whether the byte is an ASCII letter, number, or underscore
+// isAlphaNum reports whether the byte is an ASCII letter, number, or underscore.
 func isAlphaNum(c uint8) bool {
        return c == '_' || '0' <= c && c <= '9' || 'a' <= c && c <= 'z' || 'A' <= c && c <= 'Z'
 }
index 6ba0f780657a482ef6de52c35d06fc2327b48818..b4c4e4061cc60ae4c6f93f62e288f25b85213ef3 100644 (file)
@@ -146,10 +146,10 @@ var (
        plugins   map[string]*Plugin
 )
 
-// lastmoduleinit is defined in package runtime
+// lastmoduleinit is defined in package runtime.
 func lastmoduleinit() (pluginpath string, syms map[string]any, errstr string)
 
-// doInit is defined in package runtime
+// doInit is defined in package runtime.
 //
 //go:linkname doInit runtime.doInit
 func doInit(t unsafe.Pointer) // t should be a *runtime.initTask
index 89040d7b0e78c0df797364e1c73cb14ef24e2202..b3066e88ee436bddc9f364d4c452f4f64c5c5613 100644 (file)
@@ -37,7 +37,7 @@ type onePassInst struct {
 // 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
+// EmptyBeginText.
 func onePassPrefix(p *syntax.Prog) (prefix string, complete bool, pc uint32) {
        i := &p.Inst[p.Start]
        if i.Op != syntax.InstEmptyWidth || (syntax.EmptyOp(i.Arg))&syntax.EmptyBeginText == 0 {
@@ -218,7 +218,7 @@ func cleanupOnePass(prog *onePassProg, original *syntax.Prog) {
        }
 }
 
-// onePassCopy creates a copy of the original Prog, as we'll be modifying it
+// onePassCopy creates a copy of the original Prog, as we'll be modifying it.
 func onePassCopy(prog *syntax.Prog) *onePassProg {
        p := &onePassProg{
                Start:  prog.Start,
index 7958a397285d3587f33a99685c24baaee2939f5d..990c06e89132b00771aa563067be464e4ea38878 100644 (file)
@@ -270,7 +270,7 @@ func (re *Regexp) put(m *machine) {
        matchPool[re.mpool].Put(m)
 }
 
-// minInputLen walks the regexp to find the minimum length of any matchable input
+// minInputLen walks the regexp to find the minimum length of any matchable input.
 func minInputLen(re *syntax.Regexp) int {
        switch re.Op {
        default:
index 0a25cb65629023eb76d3d7076d8b394cd2c81320..9c75280d6259415735c18237b30049f1e3c78d60 100644 (file)
@@ -346,12 +346,12 @@ func unwindm(restore *bool) {
        }
 }
 
-// called from assembly
+// called from assembly.
 func badcgocallback() {
        throw("misaligned stack in cgocallback")
 }
 
-// called from (incomplete) assembly
+// called from (incomplete) assembly.
 func cgounimpl() {
        throw("cgo not implemented")
 }
index a9ef0781cef9a040192efeff867df70b29b27e8d..6a0ad35b8694ee2f44fee374702a99b489162dac 100644 (file)
@@ -138,7 +138,7 @@ func full(c *hchan) bool {
        return c.qcount == c.dataqsiz
 }
 
-// entry point for c <- x from compiled code
+// entry point for c <- x from compiled code.
 //
 //go:nosplit
 func chansend1(c *hchan, elem unsafe.Pointer) {
@@ -435,7 +435,7 @@ func empty(c *hchan) bool {
        return atomic.Loaduint(&c.qcount) == 0
 }
 
-// entry points for <- c from compiled code
+// entry points for <- c from compiled code.
 //
 //go:nosplit
 func chanrecv1(c *hchan, elem unsafe.Pointer) {
index 688e2581ed89e66238e7e07ef92134cc193b6315..3ef8cfb5dea1017cb104d7dcf3d3e434cd1db97d 100644 (file)
@@ -11,7 +11,7 @@ import (
        "strings"
 )
 
-// exported from runtime
+// exported from runtime.
 func modinfo() string
 
 // ReadBuildInfo returns the build information embedded
index 6fcc2323136836b8ac2e1749864d679ebfc5b45a..f57a1a1e17abe377c5c3f73526917b598b05ef26 100644 (file)
@@ -120,7 +120,7 @@ type typeCacheBucket struct {
 
 var typecache [typeCacheBuckets]typeCacheBucket
 
-// dump a uint64 in a varint format parseable by encoding/binary
+// dump a uint64 in a varint format parseable by encoding/binary.
 func dumpint(v uint64) {
        var buf [10]byte
        var n int
@@ -142,7 +142,7 @@ func dumpbool(b bool) {
        }
 }
 
-// dump varint uint64 length followed by memory contents
+// dump varint uint64 length followed by memory contents.
 func dumpmemrange(data unsafe.Pointer, len uintptr) {
        dumpint(uint64(len))
        dwrite(data, len)
@@ -159,7 +159,7 @@ func dumpstr(s string) {
        dumpmemrange(unsafe.Pointer(unsafe.StringData(s)), uintptr(len(s)))
 }
 
-// dump information for a type
+// dump information for a type.
 func dumptype(t *_type) {
        if t == nil {
                return
@@ -206,7 +206,7 @@ func dumptype(t *_type) {
        dumpbool(t.kind&kindDirectIface == 0 || t.ptrdata != 0)
 }
 
-// dump an object
+// dump an object.
 func dumpobj(obj unsafe.Pointer, size uintptr, bv bitvector) {
        dumpint(tagObject)
        dumpint(uint64(uintptr(obj)))
@@ -239,7 +239,7 @@ type childInfo struct {
        depth  uintptr   // depth in call stack (0 == most recent)
 }
 
-// dump kinds & offsets of interesting fields in bv
+// dump kinds & offsets of interesting fields in bv.
 func dumpbv(cbv *bitvector, offset uintptr) {
        for i := uintptr(0); i < uintptr(cbv.n); i++ {
                if cbv.ptrbit(i) == 1 {
index 1578984ce238a4f383318e71073f8ca29c7e04a8..cc7d465ef1fc18c44ea56f40f7585bf39b673a2f 100644 (file)
@@ -226,7 +226,7 @@ func notetsleep(n *note, ns int64) bool {
 }
 
 // same as runtimeĀ·notetsleep, but called on user g (not g0)
-// calls only nosplit functions between entersyscallblock/exitsyscall
+// calls only nosplit functions between entersyscallblock/exitsyscall.
 func notetsleepg(n *note, ns int64) bool {
        gp := getg()
        if gp == gp.m.g0 {
index c5e8cfe24a7f17e39b1a60e8f9f38a8e20289544..e15bbf79ae982924d504864a79a39d2a4c1a48e4 100644 (file)
@@ -284,7 +284,7 @@ func notetsleep(n *note, ns int64) bool {
 }
 
 // same as runtimeĀ·notetsleep, but called on user g (not g0)
-// calls only nosplit functions between entersyscallblock/exitsyscall
+// calls only nosplit functions between entersyscallblock/exitsyscall.
 func notetsleepg(n *note, ns int64) bool {
        gp := getg()
        if gp == gp.m.g0 {
index 3b9828fe540bbffa54301db1a5f4d1c3eed3ecbc..7ff2190876dd1bc803146e6280bb980dbc3434fa 100644 (file)
@@ -1249,7 +1249,7 @@ func memclrNoHeapPointersChunked(size uintptr, x unsafe.Pointer) {
 
 // implementation of new builtin
 // compiler (both frontend and SSA backend) knows the signature
-// of this function
+// of this function.
 func newobject(typ *_type) unsafe.Pointer {
        return mallocgc(typ.size, typ, true)
 }
index 65be4727fdee7faa7cb7287b841d7f2455abdddd..f546ce8609007a47058cee10ed4ed4cb980a12fa 100644 (file)
@@ -514,7 +514,7 @@ bucketloop:
        return unsafe.Pointer(&zeroVal[0]), false
 }
 
-// returns both key and elem. Used by map iterator
+// returns both key and elem. 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
index 257e9d15602a43a011cab2faa91f921bd4563922..d4d4f1f302f25ccc03aa4d9d588b6d5c2dcd9996 100644 (file)
@@ -172,7 +172,7 @@ func finalizercommit(gp *g, lock unsafe.Pointer) bool {
        return true
 }
 
-// This is the goroutine that runs all of the finalizers
+// This is the goroutine that runs all of the finalizers.
 func runfinq() {
        var (
                frame    unsafe.Pointer
index 65ac0a6fc7af5318998a5eaec41237f15493c1df..7ab89754d42a2668964159d4e1ad05252ff64bd6 100644 (file)
@@ -421,7 +421,7 @@ func putfull(b *workbuf) {
 }
 
 // trygetfull tries to get a full or partially empty workbuffer.
-// If one is not immediately available return nil
+// If one is not immediately available return nil.
 //
 //go:nowritebarrier
 func trygetfull() *workbuf {
index 7c5947d06f5294a661d2214da0c9a4da21084744..e07c7f1da665b5717b8df1b4966c9f83f60300d3 100644 (file)
@@ -163,7 +163,7 @@ func mpreinit(mp *m) {
 }
 
 // errno address must be retrieved by calling _Errno libc function.
-// This will return a pointer to errno
+// This will return a pointer to errno.
 func miniterrno() {
        mp := getg().m
        r, _ := syscall0(&libc__Errno)
index 2fed794d7ae5cc9462a34afd2ec016e54feb89e1..ebf478badf8652bb56c1bf3200f00dccd0b0be14 100644 (file)
@@ -47,7 +47,7 @@ func write1(fd uintptr, p unsafe.Pointer, n int32) int32
 //go:noescape
 func open(name *byte, mode, perm int32) int32
 
-// return value is only set on linux to be used in osinit()
+// return value is only set on linux to be used in osinit().
 func madvise(addr unsafe.Pointer, n uintptr, flags int32) int32
 
 // exitThread terminates the current thread, writing *wait = freeMStack when
index 725fd26c13769001052a810a7672ecb8c5c5aed0..17a490efeda35a96deaec6409fb562af5e8049cd 100644 (file)
@@ -861,7 +861,7 @@ func writeMutex(w io.Writer, debug int) error {
        return writeProfileInternal(w, debug, "mutex", runtime.MutexProfile)
 }
 
-// writeProfileInternal writes the current blocking or mutex profile depending on the passed parameters
+// writeProfileInternal writes the current blocking or mutex profile depending on the passed parameters.
 func writeProfileInternal(w io.Writer, debug int, name string, runtimeProfile func([]runtime.BlockProfileRecord) (int, bool)) error {
        var p []runtime.BlockProfileRecord
        n, ok := runtimeProfile(nil)
index 176399c7ebcb92248ebdc23fdf4f48b93e944497..56565479e018d38ea0be121df5fdbfb042c0005a 100644 (file)
@@ -481,7 +481,7 @@ func releaseSudog(s *sudog) {
        releasem(mp)
 }
 
-// called from assembly
+// called from assembly.
 func badmcall(fn func(*g)) {
        throw("runtime: mcall called on m->g0 stack")
 }
@@ -3534,7 +3534,7 @@ func gosched_m(gp *g) {
        goschedImpl(gp)
 }
 
-// goschedguarded is a forbidden-states-avoided version of gosched_m
+// goschedguarded is a forbidden-states-avoided version of gosched_m.
 func goschedguarded_m(gp *g) {
 
        if !canPreemptM(gp.m) {
index 40b6e00398108c0821360a39d39d32b8aa62c6cf..f83a04db4a6d896aa88a4841615c8a55f98a90af 100644 (file)
@@ -350,7 +350,7 @@ func racecallbackthunk(uintptr)
 // with up to 4 uintptr arguments.
 func racecall(fn *byte, arg0, arg1, arg2, arg3 uintptr)
 
-// checks if the address has shadow (i.e. heap or data/bss)
+// checks if the address has shadow (i.e. heap or data/bss).
 //
 //go:nosplit
 func isvalidaddr(addr unsafe.Pointer) bool {
index 76dca9ca7709890dea585cafac4e166a16023045..277f18a5a6733a0dfe1fbd6c5be0626c976e1d27 100644 (file)
@@ -56,7 +56,7 @@ var (
        argv **byte
 )
 
-// nosplit for use in linux startup sysargs
+// nosplit for use in linux startup sysargs.
 //
 //go:nosplit
 func argv_index(argv **byte, i int32) *byte {
index c245c9c1a11eff2f7120c219199e9fe0617d2d88..0d83deb2aff235173510564ab1624fb055f6c0a6 100644 (file)
@@ -34,7 +34,7 @@ func write1(fd uintptr, p unsafe.Pointer, n int32) int32
 //go:noescape
 func open(name *byte, mode, perm int32) int32
 
-// return value is only set on linux to be used in osinit()
+// return value is only set on linux to be used in osinit().
 func madvise(addr unsafe.Pointer, n uintptr, flags int32) int32
 
 // exitThread terminates the current thread, writing *wait = freeMStack when
index 6919b748f0c5fbe223423536c5e80d1fb6d15388..e23e33871b344da4df0116d0e4f919be0ebb74a7 100644 (file)
@@ -6,7 +6,7 @@
 
 package runtime
 
-// This is needed for vet
+// This is needed for vet.
 //
 //go:noescape
 func callCgoSigaction(sig uintptr, new, old *sigactiont) int32
index 3541446b0bd31ac1a7b75b94bf45fd5a9462f658..ce0aa88828ff7456c89c3c82310b68acf9dccd71 100644 (file)
@@ -544,7 +544,7 @@ func recoverErr(errPtr *error) {
        }
 }
 
-// mapJSError maps an error given by Node.js to the appropriate Go error
+// mapJSError maps an error given by Node.js to the appropriate Go error.
 func mapJSError(jsErr js.Value) error {
        errno, ok := errnoByCode[jsErr.Get("code").String()]
        if !ok {
index e4f5750b0c92327c613d58e3ac4ddc55b348fcfe..f94d68ee024491f9064f66be4055c95a78af3f3e 100644 (file)
@@ -1469,7 +1469,7 @@ func parseGMT(value string) int {
 
 // parseSignedOffset parses a signed timezone offset (e.g. "+03" or "-04").
 // The function checks for a signed number in the range -23 through +23 excluding zero.
-// Returns length of the found offset string or 0 otherwise
+// Returns length of the found offset string or 0 otherwise.
 func parseSignedOffset(value string) int {
        sign := value[0]
        if sign != '-' && sign != '+' {