]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile/internal/noder: stop preserving original const strings
authorMatthew Dempsky <mdempsky@google.com>
Wed, 6 Sep 2023 21:00:30 +0000 (14:00 -0700)
committerGopher Robot <gobot@golang.org>
Fri, 8 Sep 2023 18:50:24 +0000 (18:50 +0000)
commit18c6ec1e4a62d25ce9801174c1c17360eb95233c
treeadfcf0d69f611aae2a688fa38db1dd3babf3ca54
parentc6d550a6683cebb2a11d7fa91823edf7db1d58a5
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>
src/cmd/compile/internal/ir/expr.go
src/cmd/compile/internal/ir/fmt.go
src/cmd/compile/internal/ir/node_gen.go
src/cmd/compile/internal/noder/expr.go [deleted file]
src/cmd/compile/internal/noder/helpers.go
src/cmd/compile/internal/noder/reader.go
src/cmd/compile/internal/noder/writer.go
test/escape5.go
test/escape_reflect.go
test/escape_slice.go
test/fixedbugs/issue13799.go