]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.regabi] cmd/compile: ir.Node is no longer an ssa.Aux
authorMatthew Dempsky <mdempsky@google.com>
Mon, 7 Dec 2020 02:25:41 +0000 (18:25 -0800)
committerMatthew Dempsky <mdempsky@google.com>
Tue, 8 Dec 2020 01:47:04 +0000 (01:47 +0000)
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>
src/cmd/compile/internal/ir/mini.go
src/cmd/compile/internal/ir/name.go
src/cmd/compile/internal/ir/node.go

index edb3b197da1b5a174fc601d1951baf6cc1d8948d..7ecdcbf32f0af1ff528402b88d259051dc1dcfea 100644 (file)
@@ -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() {}
index c527ba281dd3b966e847540fa807933aedaccae0..319c40e4e93733029ac9e59573110f5f86340fce 100644 (file)
@@ -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 {
index b878b005464406b5ebf761b05470da8b9a8cbc4e..d6dab0b9e21bd963df1ed9774ba979ce0235a932 100644 (file)
@@ -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,