From: Matthew Dempsky Date: Mon, 7 Dec 2020 02:25:41 +0000 (-0800) Subject: [dev.regabi] cmd/compile: ir.Node is no longer an ssa.Aux X-Git-Tag: go1.17beta1~1539^2~339 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=bb31c75343;p=gostls13.git [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 --- 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,