aboutsummaryrefslogtreecommitdiff
path: root/test/escape_reflect.go
AgeCommit message (Collapse)Author
2023-09-08cmd/compile/internal/noder: stop preserving original const stringsMatthew Dempsky
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>
2023-05-12test: add escape test for reflect.Value operationsCherry Mui
With CL 408826 reflect.Value does not always escape. We need to make sure Value operations does (or does not) escape the Value correctly. This CL adds a test. There are still a few unfortunate cases, where some Value operations escape more than necessary (comparing to a non-reflect version of the code), but hard to fix. These are mostly that a Value would escape conditionally (mostly on the type of the Value), but currently we don't have a good way to express that. Change-Id: I9fdfc7584670aa09c5a01f6b2803f2043aaddb65 Reviewed-on: https://go-review.googlesource.com/c/go/+/441938 Run-TryBot: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>