mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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:
parent
d7f7ea6ea8
commit
331f962508
8 changed files with 20 additions and 19 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue