mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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:
parent
31322996fd
commit
932c1e3dd3
12 changed files with 50 additions and 112 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue