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
|
|
@ -311,6 +311,10 @@ func (n *Node) pkgFuncName() string {
|
|||
return p + "." + s.Name
|
||||
}
|
||||
|
||||
// The compiler needs *Node to be assignable to cmd/compile/internal/ssa.Sym.
|
||||
func (n *Node) CanBeAnSSASym() {
|
||||
}
|
||||
|
||||
// Name holds Node fields used only by named nodes (ONAME, OTYPE, OPACK, OLABEL, some OLITERAL).
|
||||
type Name struct {
|
||||
Pack *Node // real package for import . names
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue