cmd/compile: use a uint8-sized named type for Addr.Type

No immediate reduction in the size of Addr.

Passes toolstash -cmp.

Change-Id: I78ea4c6e181b6e571ce70a5f1ae8158844eb197d
Reviewed-on: https://go-review.googlesource.com/20276
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
Josh Bleecher Snyder 2015-05-14 20:11:28 -07:00
parent 8f5fb95db6
commit 786a2ef380
15 changed files with 39 additions and 42 deletions

View file

@ -66,7 +66,7 @@ func savedata(ctxt *Link, s *LSym, p *Prog, file string) {
}
Symgrow(ctxt, s, int64(off+siz))
switch int(p.To.Type) {
switch p.To.Type {
default:
ctxt.Diag("bad data: %v", p)
@ -88,7 +88,7 @@ func savedata(ctxt *Link, s *LSym, p *Prog, file string) {
copy(s.P[off:off+siz], p.To.Val.(string))
case TYPE_CONST, TYPE_ADDR:
if p.To.Sym != nil || int(p.To.Type) == TYPE_ADDR {
if p.To.Sym != nil || p.To.Type == TYPE_ADDR {
r := Addrel(s)
r.Off = off
r.Siz = uint8(siz)