cmd/internal/gc: convert yet more Node fields to bools
Convert Embedded, Method, and Colas to bools.
I believe that this is the last of the Node fields
that can be trivially converted to bools.
No functional changes. Passes toolstash -cmp.
Change-Id: I81962ee47866596341fc60d24d6959c20cd7fc1c
Reviewed-on: https://go-review.googlesource.com/8440
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
diff --git a/src/cmd/internal/gc/gen.go b/src/cmd/internal/gc/gen.go
index e0659fc..e52ff65 100644
--- a/src/cmd/internal/gc/gen.go
+++ b/src/cmd/internal/gc/gen.go
@@ -61,7 +61,7 @@
n.Stackparam = Nod(OPARAM, n, nil)
n.Stackparam.Type = n.Type
- n.Stackparam.Addable = 1
+ n.Stackparam.Addable = true
if n.Xoffset == BADWIDTH {
Fatal("addrescapes before param assignment")
}
@@ -73,7 +73,7 @@
case PAUTO:
n.Class |= PHEAP
- n.Addable = 0
+ n.Addable = false
n.Ullman = 2
n.Xoffset = 0
@@ -332,7 +332,7 @@
var z Node
z.Op = OLITERAL
z.Type = n.Type
- z.Addable = 1
+ z.Addable = true
switch Simtype[n.Type.Etype] {
case TCOMPLEX64, TCOMPLEX128:
@@ -749,7 +749,7 @@
s.Def = n
n.Type = t
n.Class = PAUTO
- n.Addable = 1
+ n.Addable = true
n.Ullman = 1
n.Esc = EscNever
n.Curfn = Curfn
@@ -1373,7 +1373,7 @@
}
func cadable(n *Node) bool {
- if n.Addable == 0 {
+ if !n.Addable {
// dont know how it happens,
// but it does
return false