cmd/internal/gc: make Node.Isddd boolean
Convert Node.Isddd to a boolean and simplify usage.
- Node.Isddd converted to bool
- Type.Isddd converted to bool
- mkinlcall converted to take isddd as a bool
- typecheckaste converted to take isddd as a bool
- ascompatte converted to take isddd as a bool
Change-Id: I52586145619c44182bb0c2c5d80a0a3fe3e50a07
Reviewed-on: https://go-review.googlesource.com/7172
Reviewed-by: Keith Randall <khr@golang.org>
diff --git a/src/cmd/internal/gc/reflect.go b/src/cmd/internal/gc/reflect.go
index 797f62a..36aa0b6 100644
--- a/src/cmd/internal/gc/reflect.go
+++ b/src/cmd/internal/gc/reflect.go
@@ -1051,9 +1051,9 @@
for t1 = getthisx(t).Type; t1 != nil; t1 = t1.Down {
dtypesym(t1.Type)
}
- isddd := 0
+ isddd := false
for t1 = getinargx(t).Type; t1 != nil; t1 = t1.Down {
- isddd = int(t1.Isddd)
+ isddd = t1.Isddd
dtypesym(t1.Type)
}
@@ -1063,7 +1063,7 @@
ot = dcommontype(s, ot, t)
xt = ot - 3*Widthptr
- ot = duint8(s, ot, uint8(isddd))
+ ot = duint8(s, ot, uint8(bool2int(isddd)))
// two slice headers: in and out.
ot = int(Rnd(int64(ot), int64(Widthptr)))