1
0
mirror of https://github.com/golang/go synced 2024-11-22 14:54:46 -07:00

cmd/compile: enable -d=zerocopy by default

Fixes #2205.

Change-Id: Ib0802fee2b274798b35f0ebbd0b736b1be5ae00a
Reviewed-on: https://go-review.googlesource.com/c/go/+/520600
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
This commit is contained in:
Matthew Dempsky 2023-08-17 17:04:10 -07:00 committed by Gopher Robot
parent 925d2fb36c
commit d63c88d695
3 changed files with 3 additions and 2 deletions

View File

@ -181,6 +181,7 @@ func ParseFlags() {
Debug.PGOInline = 1
Debug.PGODevirtualize = 1
Debug.SyncFrames = -1 // disable sync markers by default
Debug.ZeroCopy = 1
Debug.Checkptr = -1 // so we can tell whether it is set explicitly

View File

@ -1729,7 +1729,7 @@ func intstring2() {
func stringtoslicebyte0() {
s := "foo"
x := []byte(s) // ERROR "\(\[\]byte\)\(s\) does not escape$"
x := []byte(s) // ERROR "\(\[\]byte\)\(s\) does not escape$" "zero-copy string->\[\]byte conversion"
_ = x
}

View File

@ -1729,7 +1729,7 @@ func intstring2() {
func stringtoslicebyte0() {
s := "foo"
x := []byte(s) // ERROR "\(\[\]byte\)\(s\) does not escape$"
x := []byte(s) // ERROR "\(\[\]byte\)\(s\) does not escape$" "zero-copy string->\[\]byte conversion"
_ = x
}