mirror of
https://github.com/golang/go
synced 2024-11-19 12:54:45 -07:00
cmd/compile: replace range loop over list of nodes with orderexprlistinplace
Replace explicit range loop that applies orderexprinplace on a list of nodes with existing helper function orderexprlistinplace. Passes toolstash -cmp. Change-Id: Ic8098ed08cf67f319de3faa83b00a5b73bbde95d Reviewed-on: https://go-review.googlesource.com/88815 Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
d009679d42
commit
a90fc6d2d4
@ -762,9 +762,7 @@ func orderstmt(n *Node, order *Order) {
|
||||
// hiter contains pointers and needs to be zeroed.
|
||||
prealloc[n] = ordertemp(hiter(n.Type), order, true)
|
||||
}
|
||||
for i, n1 := range n.List.Slice() {
|
||||
n.List.SetIndex(i, orderexprinplace(n1, order))
|
||||
}
|
||||
orderexprlistinplace(n.List, order)
|
||||
orderblockNodes(&n.Nbody)
|
||||
order.out = append(order.out, n)
|
||||
cleantemp(t, order)
|
||||
|
Loading…
Reference in New Issue
Block a user