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 <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Russ Cox <rsc@golang.org>
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() {}
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 {
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,