mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: use a Sym type instead of interface{} for symbolic offsets
Will help with strongly typed rewrite rules. Change-Id: Ifbf316a49f4081322b3b8f13bc962713437d9aba Reviewed-on: https://go-review.googlesource.com/c/go/+/227785 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
This commit is contained in:
parent
782fcb44b9
commit
ea7126fe14
9 changed files with 81 additions and 53 deletions
|
|
@ -601,12 +601,14 @@ func (a Attribute) TextAttrString() string {
|
|||
return s
|
||||
}
|
||||
|
||||
// The compiler needs LSym to satisfy fmt.Stringer, because it stores
|
||||
// an LSym in ssa.ExternSymbol.
|
||||
func (s *LSym) String() string {
|
||||
return s.Name
|
||||
}
|
||||
|
||||
// The compiler needs *LSym to be assignable to cmd/compile/internal/ssa.Sym.
|
||||
func (s *LSym) CanBeAnSSASym() {
|
||||
}
|
||||
|
||||
type Pcln struct {
|
||||
Pcsp Pcdata
|
||||
Pcfile Pcdata
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue