cmd/{5,6,8,9}g, cmd/internal/gc: use bools for is* and okfor*
No functional changes.
This diff was generated as follows:
* Manually edit cmd/internal/gc/go.go to update types and group variables.
* Manually edit initialization in cmd/internal/gc/align.go--localized s/1/true.
* Manually fix the handling of sign in cmd/internal/gc/walk.go in func bounded (near line 4000).
* Manually update go.y and regenerate y.go.
* Run gofmt -r many times to do the rest, using https://gist.github.com/josharian/0f61dbb2dff81f938e70.
toolstash -cmp on the stdlib comes back green.
Change-Id: I19766ed551714e51b325133e7138818d117b3a9a
Reviewed-on: https://go-review.googlesource.com/6530
Reviewed-by: Russ Cox <rsc@golang.org>
diff --git a/src/cmd/9g/ggen.go b/src/cmd/9g/ggen.go
index bd22771..dc98963 100644
--- a/src/cmd/9g/ggen.go
+++ b/src/cmd/9g/ggen.go
@@ -391,7 +391,7 @@
*/
func cgen_aret(n *gc.Node, res *gc.Node) {
t := n.Left.Type
- if gc.Isptr[t.Etype] != 0 {
+ if gc.Isptr[t.Etype] {
t = t.Type
}
@@ -459,7 +459,7 @@
t0 := t
check := 0
- if gc.Issigned[t.Etype] != 0 {
+ if gc.Issigned[t.Etype] {
check = 1
if gc.Isconst(nl, gc.CTINT) && gc.Mpgetfix(nl.Val.U.Xval) != -(1<<uint64(t.Width*8-1)) {
check = 0
@@ -469,7 +469,7 @@
}
if t.Width < 8 {
- if gc.Issigned[t.Etype] != 0 {
+ if gc.Issigned[t.Etype] {
t = gc.Types[gc.TINT64]
} else {
t = gc.Types[gc.TUINT64]
@@ -615,7 +615,7 @@
case gc.TINT64,
gc.TUINT64:
- if gc.Issigned[t.Etype] != 0 {
+ if gc.Issigned[t.Etype] {
gins(ppc64.AMULHD, &n2, &n1)
} else {
gins(ppc64.AMULHDU, &n2, &n1)
@@ -706,7 +706,7 @@
gc.Nodconst(&n3, tcount, nl.Type.Width*8)
gins(optoas(gc.OCMP, tcount), &n1, &n3)
p1 := (*obj.Prog)(gc.Gbranch(optoas(gc.OLT, tcount), nil, +1))
- if op == gc.ORSH && gc.Issigned[nl.Type.Etype] != 0 {
+ if op == gc.ORSH && gc.Issigned[nl.Type.Etype] {
gc.Nodconst(&n3, gc.Types[gc.TUINT32], nl.Type.Width*8-1)
gins(a, &n3, &n2)
} else {