mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: change visitBottomUp from post-order traversal to pre-order
No meaningful change, but allows the followup CL to pass toolstash-check. Change-Id: I1d852c97838be3f84cf795bc9daec9b15c705956 Reviewed-on: https://go-review.googlesource.com/c/go/+/173320 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
415da714fa
commit
ef2806e4ab
1 changed files with 7 additions and 7 deletions
|
|
@ -117,13 +117,6 @@ func (v *bottomUpVisitor) visitcode(n *Node, min uint32) uint32 {
|
|||
return min
|
||||
}
|
||||
|
||||
min = v.visitcodelist(n.Ninit, min)
|
||||
min = v.visitcode(n.Left, min)
|
||||
min = v.visitcode(n.Right, min)
|
||||
min = v.visitcodelist(n.List, min)
|
||||
min = v.visitcodelist(n.Nbody, min)
|
||||
min = v.visitcodelist(n.Rlist, min)
|
||||
|
||||
switch n.Op {
|
||||
case OCALLFUNC, OCALLMETH:
|
||||
fn := asNode(n.Left.Type.Nname())
|
||||
|
|
@ -141,5 +134,12 @@ func (v *bottomUpVisitor) visitcode(n *Node, min uint32) uint32 {
|
|||
}
|
||||
}
|
||||
|
||||
min = v.visitcodelist(n.Ninit, min)
|
||||
min = v.visitcode(n.Left, min)
|
||||
min = v.visitcode(n.Right, min)
|
||||
min = v.visitcodelist(n.List, min)
|
||||
min = v.visitcodelist(n.Nbody, min)
|
||||
min = v.visitcodelist(n.Rlist, min)
|
||||
|
||||
return min
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue