diff options
author | Matthew Dempsky <mdempsky@google.com> | 2021-01-22 01:46:42 -0800 |
---|---|---|
committer | Matthew Dempsky <mdempsky@google.com> | 2021-01-22 19:23:32 +0000 |
commit | e4ef30a66751c39bdd24764763531f1a4c325845 (patch) | |
tree | 90f5ba028e2d0c70c39d1257324276c3b9ca5a36 /src/cmd/compile/internal/noder/decl.go | |
parent | 626406b703a418acd41c4163b5c58d832c09e1e4 (diff) | |
download | go-e4ef30a66751c39bdd24764763531f1a4c325845.tar.gz go-e4ef30a66751c39bdd24764763531f1a4c325845.zip |
[dev.typeparams] cmd/compile: refactor irgen's handling of ":="
The previous code was stylized after noder, which was written when it
was more idiomatic to simple create a gc.Node and then populate and
shuffle around its fields as appropriate.
Now with package ir, it's somewhat nicer to compute all the fields up
front and pass them to the constructor functions, rather than passing
nil and populating the fields afterwards.
Net addition of lines of code, but I think the new code is overall
still somewhat simpler, and will be easier to refactor out into code
for helpers.go.
Change-Id: I8c6f6b65e0a8317129655a0fc493d8af75527b97
Reviewed-on: https://go-review.googlesource.com/c/go/+/285732
Trust: Matthew Dempsky <mdempsky@google.com>
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
Diffstat (limited to 'src/cmd/compile/internal/noder/decl.go')
0 files changed, 0 insertions, 0 deletions