diff options
| author | Russ Cox <rsc@golang.org> | 2022-01-30 20:13:43 -0500 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2022-04-05 17:54:15 +0000 |
| commit | 9839668b5619f45e293dd40339bf0ac614ea6bee (patch) | |
| tree | a836ea07d0a9ec5e32638d060cdeb6b4ded636dc /src/cmd/compile/internal/test/testdata | |
| parent | 81431c7aa7c5d782e72dec342442ea7664ef1783 (diff) | |
| download | go-9839668b5619f45e293dd40339bf0ac614ea6bee.tar.xz | |
all: separate doc comment from //go: directives
A future change to gofmt will rewrite
// Doc comment.
//go:foo
to
// Doc comment.
//
//go:foo
Apply that change preemptively to all comments (not necessarily just doc comments).
For #51082.
Change-Id: Iffe0285418d1e79d34526af3520b415a12203ca9
Reviewed-on: https://go-review.googlesource.com/c/go/+/384260
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/test/testdata')
5 files changed, 9 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/test/testdata/addressed_test.go b/src/cmd/compile/internal/test/testdata/addressed_test.go index cdabf978f0..4cc9ac4d5b 100644 --- a/src/cmd/compile/internal/test/testdata/addressed_test.go +++ b/src/cmd/compile/internal/test/testdata/addressed_test.go @@ -145,6 +145,7 @@ func (v V) val() int64 { // 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. +// //go:noinline func (v V) autos_ssa(which, w1, x1, w2, x2 int64) (y, z V) { fill_ssa(v.w, v.x, &v, v.p) // gratuitous no-op to force addressing @@ -191,6 +192,7 @@ func (v V) autos_ssa(which, w1, x1, w2, x2 int64) (y, z V) { // gets is an address-mentioning way of implementing // structure assignment. +// //go:noinline func (to *V) gets(from *V) { *to = *from @@ -198,12 +200,14 @@ func (to *V) gets(from *V) { // gets is an address-and-interface-mentioning way of // implementing structure assignment. +// //go:noinline func (to *V) getsI(from interface{}) { *to = *from.(*V) } // fill_ssa initializes r with V{w:w, x:x, p:p} +// //go:noinline func fill_ssa(w, x int64, r, p *V) { *r = V{w: w, x: x, p: p} diff --git a/src/cmd/compile/internal/test/testdata/arith_test.go b/src/cmd/compile/internal/test/testdata/arith_test.go index 7d54a9181d..253142a0fb 100644 --- a/src/cmd/compile/internal/test/testdata/arith_test.go +++ b/src/cmd/compile/internal/test/testdata/arith_test.go @@ -225,6 +225,7 @@ func testArithConstShift(t *testing.T) { // overflowConstShift_ssa verifes that constant folding for shift // doesn't wrap (i.e. x << MAX_INT << 1 doesn't get folded to x << 0). +// //go:noinline func overflowConstShift64_ssa(x int64) int64 { return x << uint64(0xffffffffffffffff) << uint64(1) diff --git a/src/cmd/compile/internal/test/testdata/ctl_test.go b/src/cmd/compile/internal/test/testdata/ctl_test.go index 16d571ce2c..ff3a1609c5 100644 --- a/src/cmd/compile/internal/test/testdata/ctl_test.go +++ b/src/cmd/compile/internal/test/testdata/ctl_test.go @@ -117,6 +117,7 @@ type junk struct { // flagOverwrite_ssa is intended to reproduce an issue seen where a XOR // was scheduled between a compare and branch, clearing flags. +// //go:noinline func flagOverwrite_ssa(s *junk, c int) int { if '0' <= c && c <= '9' { diff --git a/src/cmd/compile/internal/test/testdata/fp_test.go b/src/cmd/compile/internal/test/testdata/fp_test.go index 7d61a8063e..b96ce84a6c 100644 --- a/src/cmd/compile/internal/test/testdata/fp_test.go +++ b/src/cmd/compile/internal/test/testdata/fp_test.go @@ -14,6 +14,7 @@ import ( // manysub_ssa is designed to tickle bugs that depend on register // pressure or unfriendly operand ordering in registers (and at // least once it succeeded in this). +// //go:noinline func manysub_ssa(a, b, c, d float64) (aa, ab, ac, ad, ba, bb, bc, bd, ca, cb, cc, cd, da, db, dc, dd float64) { aa = a + 11.0 - a @@ -37,6 +38,7 @@ func manysub_ssa(a, b, c, d float64) (aa, ab, ac, ad, ba, bb, bc, bd, ca, cb, cc // fpspill_ssa attempts to trigger a bug where phis with floating point values // were stored in non-fp registers causing an error in doasm. +// //go:noinline func fpspill_ssa(a int) float64 { diff --git a/src/cmd/compile/internal/test/testdata/loadstore_test.go b/src/cmd/compile/internal/test/testdata/loadstore_test.go index 57571f5d17..052172819a 100644 --- a/src/cmd/compile/internal/test/testdata/loadstore_test.go +++ b/src/cmd/compile/internal/test/testdata/loadstore_test.go @@ -73,6 +73,7 @@ var b int // testDeadStorePanic_ssa ensures that we don't optimize away stores // that could be read by after recover(). Modeled after fixedbugs/issue1304. +// //go:noinline func testDeadStorePanic_ssa(a int) (r int) { defer func() { |
