cmd/compile: use t.IsFoo() instead of Isfoo[t.Etype]

This allows us to get rid of Isptr and Issigned. Still some code to
clean up for Isint, Isfloat, and Iscomplex.

CL produced mechanically using gofmt -w -r.

Passes toolstash -cmp.

Change-Id: If4f807bb7f2b357288d2547be2380eb511875786
Reviewed-on: https://go-review.googlesource.com/21339
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
This commit is contained in:
Matthew Dempsky 2016-03-30 15:09:25 -07:00
parent 3efefd9395
commit e76fc1b921
34 changed files with 160 additions and 171 deletions

View file

@ -38,7 +38,7 @@ func typecheckrange(n *Node) {
}
}
if Isptr[t.Etype] && t.Elem().IsArray() {
if t.IsPtr() && t.Elem().IsArray() {
t = t.Elem()
}
n.Type = t