mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile/internal/noder: stop preserving original const strings
One of the more tedious quirks of the original frontend (i.e., typecheck) to preserve was that it preserved the original representation of constants into the backend. To fit into the unified IR model, I ended up implementing a fairly heavyweight workaround: simply record the original constant's string expression in the export data, so that diagnostics could still report it back, and match the old test expectations. But now that there's just a single frontend to support, it's easy enough to just update the test expectations and drop this support for "raw" constant expressions. Change-Id: I1d859c5109d679879d937a2b213e777fbddf4f2f Reviewed-on: https://go-review.googlesource.com/c/go/+/526376 Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
This commit is contained in:
parent
c6d550a668
commit
18c6ec1e4a
11 changed files with 12 additions and 96 deletions
|
|
@ -137,7 +137,7 @@ const (
|
|||
var v4InV6Prefix = []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff}
|
||||
|
||||
func IPv4(a, b, c, d byte) IP {
|
||||
p := make(IP, IPv6len) // ERROR "make\(IP, IPv6len\) escapes to heap"
|
||||
p := make(IP, IPv6len) // ERROR "make\(IP, 16\) escapes to heap"
|
||||
copy(p, v4InV6Prefix)
|
||||
p[12] = a
|
||||
p[13] = b
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue