[dev.regabi] cmd/compile: rename NameOffsetExpr to LinksymOffsetExpr

Updates #43737

[git-generate]

cd src/cmd/compile/internal/ir

rf '
  mv NameOffsetExpr LinksymOffsetExpr
  mv ONAMEOFFSET OLINKSYMOFFSET
'

go generate

Change-Id: I8c6b8aa576e88278c0320d16bb2e8e424a15b907
Reviewed-on: https://go-review.googlesource.com/c/go/+/284120
Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
Cuong Manh Le 2021-01-17 00:47:12 +07:00
parent 82b9cae700
commit 59ff93fe64
10 changed files with 51 additions and 51 deletions

View file

@ -462,22 +462,22 @@ func NewResultExpr(pos src.XPos, typ *types.Type, offset int64) *ResultExpr {
return n
}
// A NameOffsetExpr refers to an offset within a global variable.
// A LinksymOffsetExpr refers to an offset within a global variable.
// It is like a SelectorExpr but without the field name.
type NameOffsetExpr struct {
type LinksymOffsetExpr struct {
miniExpr
Linksym *obj.LSym
Offset_ int64
}
func NewLinksymOffsetExpr(pos src.XPos, lsym *obj.LSym, offset int64, typ *types.Type) *NameOffsetExpr {
n := &NameOffsetExpr{Linksym: lsym, Offset_: offset}
func NewLinksymOffsetExpr(pos src.XPos, lsym *obj.LSym, offset int64, typ *types.Type) *LinksymOffsetExpr {
n := &LinksymOffsetExpr{Linksym: lsym, Offset_: offset}
n.typ = typ
n.op = ONAMEOFFSET
n.op = OLINKSYMOFFSET
return n
}
func NewNameOffsetExpr(pos src.XPos, name *Name, offset int64, typ *types.Type) *NameOffsetExpr {
func NewNameOffsetExpr(pos src.XPos, name *Name, offset int64, typ *types.Type) *LinksymOffsetExpr {
if name == nil || IsBlank(name) || !(name.Op() == ONAME && name.Class == PEXTERN) {
base.FatalfAt(pos, "cannot take offset of nil, blank name or non-global variable: %v", name)
}
@ -731,7 +731,7 @@ func IsAddressable(n Node) bool {
}
return true
case ONAMEOFFSET:
case OLINKSYMOFFSET:
return true
}