mirror of
https://github.com/golang/go
synced 2024-11-19 16:14:49 -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.
|
// hiter contains pointers and needs to be zeroed.
|
||||||
prealloc[n] = ordertemp(hiter(n.Type), order, true)
|
prealloc[n] = ordertemp(hiter(n.Type), order, true)
|
||||||
}
|
}
|
||||||
for i, n1 := range n.List.Slice() {
|
orderexprlistinplace(n.List, order)
|
||||||
n.List.SetIndex(i, orderexprinplace(n1, order))
|
|
||||||
}
|
|
||||||
orderblockNodes(&n.Nbody)
|
orderblockNodes(&n.Nbody)
|
||||||
order.out = append(order.out, n)
|
order.out = append(order.out, n)
|
||||||
cleantemp(t, order)
|
cleantemp(t, order)
|
||||||
|
Loading…
Reference in New Issue
Block a user