]> Cypherpunks repositories - gostls13.git/commit
strings: prevent copyCheck from forcing Builder to escape and allocate
authorBrad Fitzpatrick <bradfitz@golang.org>
Tue, 9 Jan 2018 18:08:43 +0000 (18:08 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 9 Jan 2018 22:01:28 +0000 (22:01 +0000)
commit484586c81a0196e42ac52f651bc56017ca454280
tree69983a55b34bb5354421f3ace5a16848dc769fe7
parentb26c88db2f338d6529e1021db59f0faa75af5934
strings: prevent copyCheck from forcing Builder to escape and allocate

All credit and blame goes to Ian for this suggestion, copied from the
runtime.

Fixes #23382
Updates #7921

Change-Id: I3d5a9ee4ab730c87e0f3feff3e7fceff9bcf9e18
Reviewed-on: https://go-review.googlesource.com/86976
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/strings/builder.go
src/strings/builder_test.go