cmd/compile: remove uncommonType.name

Reduces binary size of cmd/go by 0.5%.
For #6853.

Change-Id: I5a4b814049580ab5098ad252d979f80b70d8a5f9
Reviewed-on: https://go-review.googlesource.com/19694
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
David Crawshaw 2016-02-17 13:03:21 -05:00
parent c8ae2e82c7
commit 0231f5420f
6 changed files with 84 additions and 21 deletions

View file

@ -183,11 +183,12 @@ func dumptype(t *_type) {
dumpint(tagType)
dumpint(uint64(uintptr(unsafe.Pointer(t))))
dumpint(uint64(t.size))
if t.x == nil || t.x.pkgpath == nil || t.x.name == nil {
if t.x == nil || t.x.pkgpath == nil {
dumpstr(t._string)
} else {
pkgpath := stringStructOf(t.x.pkgpath)
name := stringStructOf(t.x.name)
namestr := t.name()
name := stringStructOf(&namestr)
dumpint(uint64(uintptr(pkgpath.len) + 1 + uintptr(name.len)))
dwrite(pkgpath.str, uintptr(pkgpath.len))
dwritebyte('.')