mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.regabi] cmd/compile: implement doChildren for nodes
Put each node in charge of its DoChildren implementation. This removes a generic use of Left, Right, and so on in func DoChildren, heading toward removing those even from being used in package ir. Passes buildall w/ toolstash -cmp. Change-Id: Ibdf56f36801217cf24549e063da0078c1820a56b Reviewed-on: https://go-review.googlesource.com/c/go/+/275375 Trust: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
18f2df7e81
commit
4725c3ffd1
8 changed files with 419 additions and 67 deletions
|
|
@ -30,6 +30,8 @@ type Node interface {
|
|||
// For making copies. For Copy and SepCopy.
|
||||
copy() Node
|
||||
|
||||
doChildren(func(Node) error) error
|
||||
|
||||
// Abstract graph structure, for generic traversals.
|
||||
Op() Op
|
||||
SetOp(x Op)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue