Commit a90fc6d2 authored by Martin Möhrmann's avatar Martin Möhrmann

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/88815Reviewed-by: 's avatarDaniel Martí <mvdan@mvdan.cc>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent d009679d
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment