cmd/5g etc: merge simple case expressions onto fewer lines
The c2go translation left a lot of case expressions on separate lines.
Merge expressions onto single lines subject to these constraints:
* Max 4 clauses, all literals or names
* Don't move expressions with comments
The change was created by running http://play.golang.org/p/yHajs72h-g:
$ mergecase cmd/internal/{ld,gc,obj}/*.go cmd/internal/obj/*/*.go
Passes toolstash -cmp.
Change-Id: Iba41b390d302e5486e5dc6ba7599a92270676556
Reviewed-on: https://go-review.googlesource.com/7593
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
diff --git a/src/cmd/internal/gc/gsubr.go b/src/cmd/internal/gc/gsubr.go
index 4a9f895..357bca1 100644
--- a/src/cmd/internal/gc/gsubr.go
+++ b/src/cmd/internal/gc/gsubr.go
@@ -250,9 +250,7 @@
func Isfat(t *Type) bool {
if t != nil {
switch t.Etype {
- case TSTRUCT,
- TARRAY,
- TSTRING,
+ case TSTRUCT, TARRAY, TSTRING,
TINTER: // maybe remove later
return true
}
@@ -384,8 +382,7 @@
case PAUTO:
a.Name = obj.NAME_AUTO
- case PPARAM,
- PPARAMOUT:
+ case PPARAM, PPARAMOUT:
a.Name = obj.NAME_PARAM
case PFUNC:
@@ -409,8 +406,7 @@
a.Type = obj.TYPE_FCONST
a.Val = mpgetflt(n.Val.U.Fval)
- case CTINT,
- CTRUNE:
+ case CTINT, CTRUNE:
a.Sym = nil
a.Type = obj.TYPE_CONST
a.Offset = Mpgetfix(n.Val.U.Xval)