cmd/compile/internal: some janitoring

Nicer swaps, loops (removed tmp variables). Use of bool instead of int.

This change passes go build -toolexec 'toolstash -cmp' -a std.

Change-Id: I541904c74b57297848decc51a8a4913a8eca4af3
Reviewed-on: https://go-review.googlesource.com/14316
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Marvin Stenger 2015-09-06 16:59:57 +02:00 committed by Brad Fitzpatrick
parent 31322996fd
commit 932c1e3dd3
12 changed files with 50 additions and 112 deletions

View file

@ -705,9 +705,7 @@ func cgen_wb(n, res *Node, wb bool) {
*/
sbop: // symmetric binary
if nl.Ullman < nr.Ullman || (nl.Ullman == nr.Ullman && (Smallintconst(nl) || (nr.Op == OLITERAL && !Smallintconst(nr)))) {
r := nl
nl = nr
nr = r
nl, nr = nr, nl
}
abop: // asymmetric binary