mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: eliminate a bunch of IterFields/IterMethods calls
This is an automated rewrite of all the calls of the form:
for f, it := IterFields(t); f != nil; f = it.Next() { ... }
Followup CLs will work on cleaning up the remaining cases.
Change-Id: Ic1005ad45ae0b50c63e815e34e507e2d2644ba1a
Reviewed-on: https://go-review.googlesource.com/20794
Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
parent
517b6131b2
commit
f6bca3f32d
17 changed files with 69 additions and 76 deletions
|
|
@ -338,7 +338,7 @@ func copyret(n *Node, order *Order) []*Node {
|
|||
|
||||
var l1 []*Node
|
||||
var l2 []*Node
|
||||
for t, it := IterFields(n.Type); t != nil; t = it.Next() {
|
||||
for _, t := range n.Type.Fields().Slice() {
|
||||
tmp := temp(t.Type)
|
||||
l1 = append(l1, tmp)
|
||||
l2 = append(l2, tmp)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue