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:
Matthew Dempsky 2016-03-17 01:32:18 -07:00
parent 517b6131b2
commit f6bca3f32d
17 changed files with 69 additions and 76 deletions

View file

@ -528,7 +528,7 @@ func makepartialcall(fn *Node, t0 *Type, meth *Node) *Node {
Curfn = xfunc
var fld *Node
var n *Node
for t, it := IterFields(t0.Params()); t != nil; t = it.Next() {
for _, t := range t0.Params().Fields().Slice() {
n = newname(Lookupf("a%d", i))
i++
n.Class = PPARAM
@ -547,7 +547,7 @@ func makepartialcall(fn *Node, t0 *Type, meth *Node) *Node {
i = 0
l = nil
var retargs []*Node
for t, it := IterFields(t0.Results()); t != nil; t = it.Next() {
for _, t := range t0.Results().Fields().Slice() {
n = newname(Lookupf("r%d", i))
i++
n.Class = PPARAMOUT