From bb31c75343de2114f541cd66870ace3f33047550 Mon Sep 17 00:00:00 2001 From: Matthew Dempsky Date: Sun, 6 Dec 2020 18:25:41 -0800 Subject: [PATCH] [dev.regabi] cmd/compile: ir.Node is no longer an ssa.Aux After the previous rewrite, we can now remove CanBeAnSSASym and CanBeAnSSAAux from the generic Node interface, and declare them just on *ir.Name. Updates #42982. Change-Id: I865771fd30c95c009740410844f20ade08648343 Reviewed-on: https://go-review.googlesource.com/c/go/+/275790 Run-TryBot: Matthew Dempsky TryBot-Result: Go Bot Trust: Matthew Dempsky Reviewed-by: Cuong Manh Le Reviewed-by: Russ Cox --- src/cmd/compile/internal/ir/mini.go | 4 ---- src/cmd/compile/internal/ir/name.go | 4 +++- src/cmd/compile/internal/ir/node.go | 5 ----- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/cmd/compile/internal/ir/mini.go b/src/cmd/compile/internal/ir/mini.go index edb3b197da..7ecdcbf32f 100644 --- a/src/cmd/compile/internal/ir/mini.go +++ b/src/cmd/compile/internal/ir/mini.go @@ -197,7 +197,3 @@ func (n *miniNode) SetOpt(interface{}) { panic(n.no("SetOpt")) } func (n *miniNode) MarkReadonly() { panic(n.no("MarkReadonly")) } func (n *miniNode) TChanDir() types.ChanDir { panic(n.no("TChanDir")) } func (n *miniNode) SetTChanDir(types.ChanDir) { panic(n.no("SetTChanDir")) } - -// TODO: Delete when these are removed from Node itself. -func (*miniNode) CanBeAnSSASym() {} -func (*miniNode) CanBeAnSSAAux() {} diff --git a/src/cmd/compile/internal/ir/name.go b/src/cmd/compile/internal/ir/name.go index c527ba281d..319c40e4e9 100644 --- a/src/cmd/compile/internal/ir/name.go +++ b/src/cmd/compile/internal/ir/name.go @@ -165,7 +165,9 @@ func (n *Name) SetOffset(x int64) { n.offset = x } func (n *Name) Iota() int64 { return n.offset } func (n *Name) SetIota(x int64) { n.offset = x } -func (*Name) CanBeNtype() {} +func (*Name) CanBeNtype() {} +func (*Name) CanBeAnSSASym() {} +func (*Name) CanBeAnSSAAux() {} func (n *Name) SetOp(op Op) { if n.op != ONONAME { diff --git a/src/cmd/compile/internal/ir/node.go b/src/cmd/compile/internal/ir/node.go index b878b00546..d6dab0b9e2 100644 --- a/src/cmd/compile/internal/ir/node.go +++ b/src/cmd/compile/internal/ir/node.go @@ -109,11 +109,6 @@ type Node interface { MarkNonNil() HasCall() bool SetHasCall(x bool) - - // Only for SSA and should be removed when SSA starts - // using a more specific type than Node. - CanBeAnSSASym() - CanBeAnSSAAux() } // Line returns n's position as a string. If n has been inlined, -- 2.48.1