mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.regabi] cmd/compile: add ir.PkgName
OPACK was using a whole Node and Name and Param to hold about three fields. Give it its own implementation. Passes buildall w/ toolstash -cmp. Change-Id: I85a28b43d37183b2062d337b0b1b2eea52884e8c Reviewed-on: https://go-review.googlesource.com/c/go/+/274093 Trust: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
420809ab08
commit
f6106d195d
6 changed files with 44 additions and 29 deletions
|
|
@ -1339,12 +1339,7 @@ func NodAt(pos src.XPos, op Op, nleft, nright Node) Node {
|
|||
n.SetFunc(&x.f)
|
||||
n.Func().Decl = n
|
||||
case OPACK:
|
||||
var x struct {
|
||||
n node
|
||||
m Name
|
||||
}
|
||||
n = &x.n
|
||||
n.SetName(&x.m)
|
||||
return NewPkgName(pos, nil, nil)
|
||||
case OEMPTY:
|
||||
return NewEmptyStmt(pos)
|
||||
case OBREAK, OCONTINUE, OFALL, OGOTO:
|
||||
|
|
@ -1462,7 +1457,6 @@ var okForNod = [OEND]bool{
|
|||
OOFFSETOF: true,
|
||||
OOR: true,
|
||||
OOROR: true,
|
||||
OPACK: true,
|
||||
OPANIC: true,
|
||||
OPAREN: true,
|
||||
OPLUS: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue