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

@ -592,7 +592,7 @@ func Isinter(t *Type) bool {
}
func isnilinter(t *Type) bool {
return Isinter(t) && countfield(t) == 0
return Isinter(t) && t.NumFields() == 0
}
func isideal(t *Type) bool {
@ -2388,7 +2388,7 @@ func isdirectiface(t *Type) bool {
case TSTRUCT:
// Struct with 1 field of direct iface type can be direct.
return countfield(t) == 1 && isdirectiface(t.Field(0).Type)
return t.NumFields() == 1 && isdirectiface(t.Field(0).Type)
}
return false