cmd/compile: eliminate NumFields wrapper functions

Change-Id: I3c6035559288cfdc33857216f50241b81932c8a4
Reviewed-on: https://go-review.googlesource.com/20811
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Matthew Dempsky 2016-03-17 13:26:08 -07:00
parent 15ed37d7b7
commit dbed1c6361
8 changed files with 19 additions and 24 deletions

View file

@ -1071,7 +1071,7 @@ func anylit(ctxt int, n *Node, var_ *Node, init *Nodes) {
}
// initialize of not completely specified
if var_.isSimpleName() || n.List.Len() < structcount(t) {
if var_.isSimpleName() || n.List.Len() < t.NumFields() {
a := Nod(OAS, var_, nil)
typecheck(&a, Etop)
walkexpr(&a, init)