aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/typecheck/typecheck.go
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2021-01-02 01:04:19 -0800
committerMatthew Dempsky <mdempsky@google.com>2021-01-02 10:57:23 +0000
commit2f2d4b4e68ab2fc448a1c2daf793b11ccde2fb16 (patch)
tree1c95a61ad6bbed6518f99f84e1e0cf77dce57f10 /src/cmd/compile/internal/typecheck/typecheck.go
parent1544a03198139656ef4ebc287f2287ad19c19a51 (diff)
downloadgo-2f2d4b4e68ab2fc448a1c2daf793b11ccde2fb16.tar.gz
go-2f2d4b4e68ab2fc448a1c2daf793b11ccde2fb16.zip
[dev.regabi] cmd/compile: remove {Ptr,Set}Init from Node interface
This CL separates out PtrInit and SetInit into a new InitNode extension interface, and adds a new TakeInit helper function for taking and clearing the Init list (if any) from a Node. This allows removing miniNode.SetInit and miniNode.PtrInit, which in turn allow getting rid of immutableEmptyNodes, and will allow simplification of the Nodes API. It would be nice to get rid of the default Init method too, but there's way more code that expects to be able to call that at the moment, so that'll have to wait. Passes toolstash -cmp. Change-Id: Ia8c18fab9555b774376f7f43eeecfde4f07b5946 Reviewed-on: https://go-review.googlesource.com/c/go/+/281001 Trust: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Diffstat (limited to 'src/cmd/compile/internal/typecheck/typecheck.go')
-rw-r--r--src/cmd/compile/internal/typecheck/typecheck.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/typecheck/typecheck.go b/src/cmd/compile/internal/typecheck/typecheck.go
index 0822a4624c..0ee66df2cf 100644
--- a/src/cmd/compile/internal/typecheck/typecheck.go
+++ b/src/cmd/compile/internal/typecheck/typecheck.go
@@ -914,7 +914,7 @@ func typecheck1(n ir.Node, top int) ir.Node {
// Each must execute its own return n.
}
-func typecheckargs(n ir.Node) {
+func typecheckargs(n ir.InitNode) {
var list []ir.Node
switch n := n.(type) {
default: