cmd/compile: use IsSlice and IsArray instead of checking Bound

Changes generated by eg and manually checked.

Isfixedarray, Isslice, and many other
Type-related functions in subr.go should
either be deleted or moved to type.go.
Later, though; the game now is cleanup via encapsulation.

Passes toolstash -cmp.

Change-Id: I83dd8816f6263b74367d23c2719a08c362e330f9
Reviewed-on: https://go-review.googlesource.com/21303
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Josh Bleecher Snyder 2016-03-29 09:14:19 -07:00
parent d7f7ea6ea8
commit 331f962508
8 changed files with 20 additions and 19 deletions

View file

@ -506,7 +506,7 @@ func (p *exporter) typ(t *Type) {
if t.isDDDArray() {
Fatalf("array bounds should be known at export time: %v", t)
}
if t.Bound >= 0 {
if t.IsArray() {
p.tag(arrayTag)
p.int64(t.Bound)
} else {