]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: add Buffer.Grow to TestIntendedInlining
authorDaniel Martí <mvdan@mvdan.cc>
Sat, 1 Dec 2018 16:28:27 +0000 (16:28 +0000)
committerDaniel Martí <mvdan@mvdan.cc>
Sat, 1 Dec 2018 17:31:02 +0000 (17:31 +0000)
golang.org/cl/151977 slightly decreased the cost of inlining an extra
call from 60 to 57, since it was a safe change that could help in some
scenarios.

One notable change spotted in that CL is that bytes.Buffer.Grow is now
inlinable, meaning that a fixedbugs test needed updating.

For consistency, add the test case to TestIntendedInlining too,
alongside other commonly used bytes.Buffer methods.

Change-Id: I4fb402fc684ef4c543fc65aea343ca1a4d73a189
Reviewed-on: https://go-review.googlesource.com/c/151979
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/compile/internal/gc/inl_test.go

index ba74981e9afbee67cc547de9dfb08721cfd8063b..58d13f2dcf5f52be43fd7e62136cc37f9e63eeac 100644 (file)
@@ -104,6 +104,7 @@ func TestIntendedInlining(t *testing.T) {
                        "(*Buffer).Bytes",
                        "(*Buffer).Cap",
                        "(*Buffer).Len",
+                       "(*Buffer).Grow",
                        "(*Buffer).Next",
                        "(*Buffer).Read",
                        "(*Buffer).ReadByte",