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/internal/gc/closure.go b/src/cmd/internal/gc/closure.go
index 20a0349..d954ad0 100644
--- a/src/cmd/internal/gc/closure.go
+++ b/src/cmd/internal/gc/closure.go
@@ -519,7 +519,7 @@
p = fmt.Sprintf("(%v).(%v)-fm", Tconv(rcvrtype, obj.FmtLeft|obj.FmtShort), Sconv(meth.Sym, obj.FmtLeft))
}
basetype := rcvrtype
- if Isptr[rcvrtype.Etype] != 0 {
+ if Isptr[rcvrtype.Etype] {
basetype = basetype.Type
}
if basetype.Etype != TINTER && basetype.Sym == nil {
@@ -613,7 +613,7 @@
ptr.Used = 1
ptr.Curfn = xfunc
xfunc.Dcl = list(xfunc.Dcl, ptr)
- if Isptr[rcvrtype.Etype] != 0 || Isinter(rcvrtype) {
+ if Isptr[rcvrtype.Etype] || Isinter(rcvrtype) {
ptr.Ntype = typenod(rcvrtype)
body = list(body, Nod(OAS, ptr, cv))
} else {