[dev.regabi] cmd/compile: remove DeepCopyNode interface

The only reason for the DeepCopyNode interface was to
allow the type syntaxes to avoid being constrained by
Left, Right etc. methods. Now those are gone, so the
general traversal methods they implement (doChildren, editChildren)
do the right thing for DeepCopy.

Passes buildall w/ toolstash -cmp.

Change-Id: I54672c011114a95efabff32dbcf02e6071f91b9e
Reviewed-on: https://go-review.googlesource.com/c/go/+/275379
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
Russ Cox 2020-12-04 00:30:53 -05:00
parent 9ab3d854ad
commit 5dbd2e8e44
3 changed files with 0 additions and 91 deletions

View file

@ -1163,17 +1163,6 @@ func (n *StarExpr) SetOTYPE(t *types.Type) {
t.SetNod(n)
}
func (n *StarExpr) DeepCopy(pos src.XPos) Node {
if n.op == OTYPE {
// Can't change types and no node references left.
return n
}
c := SepCopy(n).(*StarExpr)
c.pos = n.posOr(pos)
c.X = DeepCopy(pos, n.X)
return c
}
// A TypeAssertionExpr is a selector expression X.(Type).
// Before type-checking, the type is Ntype.
type TypeAssertExpr struct {