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:
Matthew Dempsky 2019-10-12 16:05:34 -07:00
parent 9f4fb68152
commit 46be01f4e0
9 changed files with 2 additions and 18 deletions

View file

@ -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) {