cmd/compile: more Isfoo Type cleanups

Replace isideal(t) with t.IsUntyped().
Replace Istype(t, k) with t.IsKind(k).
Replace isnilinter(t) with t.IsEmptyInterface().

Also replace a lot of t.IsKind(TFOO) with t.IsFoo().

Replacements prepared mechanically with gofmt -w -r.

Passes toolstash -cmp.

Change-Id: Iba48058f3cc863e15af14277b5ff5e729e67e043
Reviewed-on: https://go-review.googlesource.com/21424
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
Matthew Dempsky 2016-04-01 13:36:24 -07:00
parent 5dd129bcff
commit 00e5a68c3e
17 changed files with 72 additions and 70 deletions

View file

@ -131,7 +131,7 @@ func Import(in *bufio.Reader) {
}
func idealType(typ *Type) *Type {
if isideal(typ) {
if typ.IsUntyped() {
// canonicalize ideal types
typ = Types[TIDEAL]
}
@ -519,7 +519,7 @@ func (p *importer) value(typ *Type) (x Val) {
}
// verify ideal type
if isideal(typ) && untype(x.Ctype()) != typ {
if typ.IsUntyped() && untype(x.Ctype()) != typ {
Fatalf("importer: value %v and type %v don't match", x, typ)
}