Skip to content

Commit

Permalink
cmd/compile: add Buffer.Grow to TestIntendedInlining
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
mvdan committed Dec 1, 2018
1 parent 624e197 commit b397248
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/cmd/compile/internal/gc/inl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ func TestIntendedInlining(t *testing.T) {
"(*Buffer).Bytes",
"(*Buffer).Cap",
"(*Buffer).Len",
"(*Buffer).Grow",
"(*Buffer).Next",
"(*Buffer).Read",
"(*Buffer).ReadByte",
Expand Down

0 comments on commit b397248

Please sign in to comment.