mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/internal/obj: add AddrName type and cleanup AddrType values
Passes toolstash -cmp. Change-Id: Ida3eda9bd9d79a34c1c3f18cb41aea9392698076 Reviewed-on: https://go-review.googlesource.com/36950 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
This commit is contained in:
parent
e2948f7efe
commit
02de5ed748
2 changed files with 9 additions and 8 deletions
|
|
@ -442,7 +442,7 @@ func gendebug(fn *obj.LSym, decls []*Node) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
var name int16
|
var name obj.AddrName
|
||||||
switch n.Class {
|
switch n.Class {
|
||||||
case PAUTO:
|
case PAUTO:
|
||||||
if !n.Used {
|
if !n.Used {
|
||||||
|
|
|
||||||
|
|
@ -157,7 +157,7 @@ type Addr struct {
|
||||||
Index int16
|
Index int16
|
||||||
Scale int16 // Sometimes holds a register.
|
Scale int16 // Sometimes holds a register.
|
||||||
Type AddrType
|
Type AddrType
|
||||||
Name int8
|
Name AddrName
|
||||||
Class int8
|
Class int8
|
||||||
Offset int64
|
Offset int64
|
||||||
Sym *LSym
|
Sym *LSym
|
||||||
|
|
@ -172,10 +172,10 @@ type Addr struct {
|
||||||
Node interface{} // for use by compiler
|
Node interface{} // for use by compiler
|
||||||
}
|
}
|
||||||
|
|
||||||
type AddrType uint8
|
type AddrName int8
|
||||||
|
|
||||||
const (
|
const (
|
||||||
NAME_NONE = 0 + iota
|
NAME_NONE AddrName = iota
|
||||||
NAME_EXTERN
|
NAME_EXTERN
|
||||||
NAME_STATIC
|
NAME_STATIC
|
||||||
NAME_AUTO
|
NAME_AUTO
|
||||||
|
|
@ -185,10 +185,11 @@ const (
|
||||||
NAME_GOTREF
|
NAME_GOTREF
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
type AddrType uint8
|
||||||
TYPE_NONE AddrType = 0
|
|
||||||
|
|
||||||
TYPE_BRANCH AddrType = 5 + iota
|
const (
|
||||||
|
TYPE_NONE AddrType = iota
|
||||||
|
TYPE_BRANCH
|
||||||
TYPE_TEXTSIZE
|
TYPE_TEXTSIZE
|
||||||
TYPE_MEM
|
TYPE_MEM
|
||||||
TYPE_CONST
|
TYPE_CONST
|
||||||
|
|
@ -691,7 +692,7 @@ type Auto struct {
|
||||||
Asym *LSym
|
Asym *LSym
|
||||||
Link *Auto
|
Link *Auto
|
||||||
Aoffset int32
|
Aoffset int32
|
||||||
Name int16
|
Name AddrName
|
||||||
Gotype *LSym
|
Gotype *LSym
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue