aboutsummaryrefslogtreecommitdiff
path: root/test/codegen
diff options
context:
space:
mode:
authorKeith Randall <khr@google.com>2018-10-30 10:56:02 -0700
committerKeith Randall <khr@golang.org>2018-10-30 20:03:54 +0000
commit56b7c61c5e88e684c1bdb3b9ae61dadbeda96fd0 (patch)
tree9651f046cea2082ca590f82dac768170194039e2 /test/codegen
parentf14067f3c10e15343f29aed439ff60af856eb323 (diff)
downloadgo-56b7c61c5e88e684c1bdb3b9ae61dadbeda96fd0.tar.xz
strings: declare IndexByte as noescape
This lets []byte->string conversions which are used as arguments to strings.IndexByte and friends have their backing store allocated on the stack. It only prevents allocation when the string is small enough (32 bytes), so it isn't perfect. But reusing the []byte backing store directly requires a bunch more compiler analysis (see #2205 and related issues). Fixes #25864. Change-Id: Ie52430422196e3c91e5529d6e56a8435ced1fc4c Reviewed-on: https://go-review.googlesource.com/c/146018 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'test/codegen')
0 files changed, 0 insertions, 0 deletions