mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: remove Addable flag
This flag is supposed to indicate whether the expression is "addressable"; but in practice, we infer this from other attributes about the expression (e.g., n.Op and n.Class()). Passes toolstash-check. Change-Id: I19352ca07ab5646e232d98e8a7c1c9aec822ddd0 Reviewed-on: https://go-review.googlesource.com/c/go/+/200897 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
9f4fb68152
commit
46be01f4e0
9 changed files with 2 additions and 18 deletions
|
|
@ -388,7 +388,7 @@ func isLiteral(n *Node) bool {
|
|||
}
|
||||
|
||||
func (n *Node) isSimpleName() bool {
|
||||
return n.Op == ONAME && n.Addable() && n.Class() != PAUTOHEAP && n.Class() != PEXTERN
|
||||
return n.Op == ONAME && n.Class() != PAUTOHEAP && n.Class() != PEXTERN
|
||||
}
|
||||
|
||||
func litas(l *Node, r *Node, init *Nodes) {
|
||||
|
|
@ -1018,7 +1018,7 @@ func stataddr(nam *Node, n *Node) bool {
|
|||
switch n.Op {
|
||||
case ONAME:
|
||||
*nam = *n
|
||||
return n.Addable()
|
||||
return true
|
||||
|
||||
case ODOT:
|
||||
if !stataddr(nam, n.Left) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue