aboutsummaryrefslogtreecommitdiff
path: root/test/codegen
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2022-07-19 11:09:01 -0700
committerKeith Randall <khr@golang.org>2022-08-31 22:09:44 +0000
commit5f5c018ca46b6634da9372f5af759cb36fcaed5f (patch)
treef252edc670cdec8c480de1cf27dfdcbb36092bf7 /test/codegen
parent69aed4712d73c9c1b70be3e2e222eb55391e2fb0 (diff)
downloadgo-5f5c018ca46b6634da9372f5af759cb36fcaed5f.tar.xz
cmd/compile: redo mknode.go
The current mknode has a few problems: 1) It tends not to run successfully if the tree is in a broken state. 2) It requires that it be run by the go tool in the tree (somewhat related to 1) 3) It requires setting GOROOT 4) It imports code outside the tree (x/packages) This makes mknode.go very fragile. In particular, I've spent lots of time fighting mknode when adding or removing code, related to 1. Rewrite to just use go/ast and friends. No typechecking, no importing, etc. It can run with any go version, it doesn't need to be the one corresponding to the code in which it is run. (e.g. you can use go 1.16 to run mknode). It will work as long as the ir package is parseable. When run, it generates identical output to the old mknode. Fixes #53959 Change-Id: I5ce0b55572ebcd2fcd11af57a5f29bbf9fa4ed33 Reviewed-on: https://go-review.googlesource.com/c/go/+/418375 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Heschi Kreinick <heschi@google.com>
Diffstat (limited to 'test/codegen')
0 files changed, 0 insertions, 0 deletions