mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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:
parent
8f5fb95db6
commit
786a2ef380
15 changed files with 39 additions and 42 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue