diff options
| author | Matthew Dempsky <mdempsky@google.com> | 2023-08-17 14:15:04 -0700 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2023-08-18 11:58:37 +0000 |
| commit | 925d2fb36c8e4c9c0e6e240a1621db36c34e5d31 (patch) | |
| tree | 2394fb00600d937042524a80e59da78d540e8ffe /src/encoding/json/encode.go | |
| parent | 243c8c0eec20d981d8e76a3aac82f97cca991571 (diff) | |
| download | go-925d2fb36c8e4c9c0e6e240a1621db36c34e5d31.tar.xz | |
cmd/compile: restore zero-copy string->[]byte optimization
This CL implements the remainder of the zero-copy string->[]byte
conversion optimization initially attempted in go.dev/cl/520395, but
fixes the tracking of mutations due to ODEREF/ODOTPTR assignments, and
adds more comprehensive tests that I should have included originally.
However, this CL also keeps it behind the -d=zerocopy flag. The next
CL will enable it by default (for easier rollback).
Updates #2205.
Change-Id: Ic330260099ead27fc00e2680a59c6ff23cb63c2b
Reviewed-on: https://go-review.googlesource.com/c/go/+/520599
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Diffstat (limited to 'src/encoding/json/encode.go')
0 files changed, 0 insertions, 0 deletions
