]> Cypherpunks repositories - gostls13.git/commitdiff
all: gofmt
authorDamien Neil <dneil@google.com>
Mon, 20 Mar 2023 20:01:14 +0000 (13:01 -0700)
committerDamien Neil <dneil@google.com>
Mon, 20 Mar 2023 22:54:22 +0000 (22:54 +0000)
Change-Id: I926388ee5aeeff11f765cbd4558b66645d1bbc08
Reviewed-on: https://go-review.googlesource.com/c/go/+/477836
Run-TryBot: Damien Neil <dneil@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
src/cmd/compile/internal/ssa/regalloc.go
src/internal/godebug/godebug.go
src/runtime/cgocheck.go
src/runtime/internal/atomic/types.go
src/runtime/mbarrier.go
src/runtime/metrics/description_test.go
src/runtime/start_line_test.go

index 26dcda2c62512f2c6a5793b20bbb5698f1e56478..2e121df3cc058534564140c0d32be4cfaf304de3 100644 (file)
@@ -474,8 +474,8 @@ func (s *regAllocState) allocReg(mask regMask, v *Value) register {
        // If the evicted register isn't used between the start of the block
        // and now then there is no reason to even request it on entry. We can
        // drop from startRegs in that case.
-       if s.usedSinceBlockStart&(regMask(1) << r) == 0 {
-               if s.startRegsMask&(regMask(1) << r) == 1 {
+       if s.usedSinceBlockStart&(regMask(1)<<r) == 0 {
+               if s.startRegsMask&(regMask(1)<<r) == 1 {
                        if s.f.pass.debug > regDebug {
                                fmt.Printf("dropped from startRegs: %s\n", &s.registers[r])
                        }
@@ -1918,7 +1918,7 @@ func (s *regAllocState) regalloc(f *Func) {
                if c := countRegs(s.startRegsMask); c != len(s.startRegs[b.ID]) {
                        regs := make([]startReg, 0, c)
                        for _, sr := range s.startRegs[b.ID] {
-                               if s.startRegsMask&(regMask(1) << sr.r) == 0 {
+                               if s.startRegsMask&(regMask(1)<<sr.r) == 0 {
                                        continue
                                }
                                regs = append(regs, sr)
index fc6fcb92e225cc29972b146791b29a57f23ef897..679e3df8d69bda9ad8e36df7d97c10bcc12747e1 100644 (file)
@@ -73,9 +73,9 @@ func (s *Setting) String() string {
 // Any GODEBUG setting that can call IncNonDefault must be listed
 // in three more places:
 //
-//     - the table in ../runtime/metrics.go (search for non-default-behavior)
-//     - the table in ../../runtime/metrics/description.go (search for non-default-behavior; run 'go generate' afterward)
-//     - the table in ../../cmd/go/internal/load/godebug.go (search for defaultGodebugs)
+//   - the table in ../runtime/metrics.go (search for non-default-behavior)
+//   - the table in ../../runtime/metrics/description.go (search for non-default-behavior; run 'go generate' afterward)
+//   - the table in ../../cmd/go/internal/load/godebug.go (search for defaultGodebugs)
 func (s *Setting) IncNonDefault() {
        s.nonDefaultOnce.Do(s.register)
        s.nonDefault.Add(1)
@@ -149,9 +149,13 @@ func registerMetric(name string, read func() uint64)
 
 // setNewNonDefaultInc is provided by package runtime.
 // The runtime can do
+//
 //     inc := newNonDefaultInc(name)
+//
 // instead of
+//
 //     inc := godebug.New(name).IncNonDefault
+//
 // since it cannot import godebug.
 //
 //go:linkname setNewIncNonDefault
index af75b5c0b44d091bc81d41d39de643ed001d946c..ee8537e2a616b934429ec93264e0307ae5eb16bf 100644 (file)
@@ -78,6 +78,7 @@ func cgoCheckMemmove(typ *_type, dst, src unsafe.Pointer) {
 // size is the number of bytes to copy.
 // It throws if the program is copying a block that contains a Go pointer
 // into non-Go memory.
+//
 //go:nosplit
 //go:nowritebarrier
 func cgoCheckMemmove2(typ *_type, dst, src unsafe.Pointer, off, size uintptr) {
index 0d75226b19193da166f3305236dce84812d0a0b6..287742fee5ce5006b7e3e7c7121e86163ce5f5c1 100644 (file)
@@ -485,6 +485,7 @@ func (u *UnsafePointer) Store(value unsafe.Pointer) {
 }
 
 // provided by runtime
+//
 //go:linkname storePointer
 func storePointer(ptr *unsafe.Pointer, new unsafe.Pointer)
 
@@ -539,6 +540,7 @@ func (p *Pointer[T]) StoreNoWB(value *T) {
 }
 
 // Store updates the value atomically.
+//
 //go:nosplit
 func (p *Pointer[T]) Store(value *T) {
        p.u.Store(unsafe.Pointer(value))
index c9e06d443d86a401b4ddbd21fe4f0e726ed8020f..6d2ff229306183b0b0895e4f2a0fe224c083babc 100644 (file)
@@ -178,6 +178,7 @@ func typedmemmove(typ *_type, dst, src unsafe.Pointer) {
 // wbZero performs the write barrier operations necessary before
 // zeroing a region of memory at address dst of type typ.
 // Does not actually do the zeroing.
+//
 //go:nowritebarrierrec
 //go:nosplit
 func wbZero(typ *_type, dst unsafe.Pointer) {
@@ -187,6 +188,7 @@ func wbZero(typ *_type, dst unsafe.Pointer) {
 // wbMove performs the write barrier operations necessary before
 // copying a region of memory from src to dst of type typ.
 // Does not actually do the copying.
+//
 //go:nowritebarrierrec
 //go:nosplit
 func wbMove(typ *_type, dst, src unsafe.Pointer) {
index 3df3acf8b0dfc5cd040c2a1df014f337316f8943..4fc652362ecc0cf2860daf3bf9230b36612aba97 100644 (file)
@@ -25,6 +25,7 @@ import (
 )
 
 // Implemented in the runtime.
+//
 //go:linkname runtime_readMetricNames
 func runtime_readMetricNames() []string
 
index 6c4faa87a8cbf923e4a39ac3c377d1e737675786..0762351b0c6f2269c293cf14245c8d9eb4c1ed11 100644 (file)
@@ -71,7 +71,7 @@ func TestStartLine(t *testing.T) {
        // optimizations are disabled.
        testenv.SkipIfOptimizationOff(t)
 
-       testCases := []struct{
+       testCases := []struct {
                name string
                fn   func() int
                want int