From 713edf8b31de04dce26f603576f074133e95de47 Mon Sep 17 00:00:00 2001 From: Iskander Sharipov Date: Tue, 18 Sep 2018 01:04:41 +0300 Subject: [PATCH] cmd/compile/internal/gc: simplify `x = x y` to `x = y` Change-Id: I5afba2c10372252be4b65dae7a95461722de904f Reviewed-on: https://go-review.googlesource.com/135835 Reviewed-by: Keith Randall Reviewed-by: Robert Griesemer Run-TryBot: Iskander Sharipov TryBot-Result: Gobot Gobot --- src/cmd/compile/internal/gc/esc.go | 4 ++-- src/cmd/compile/internal/gc/walk.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cmd/compile/internal/gc/esc.go b/src/cmd/compile/internal/gc/esc.go index cd85a38eb6..ad4d11806c 100644 --- a/src/cmd/compile/internal/gc/esc.go +++ b/src/cmd/compile/internal/gc/esc.go @@ -1419,7 +1419,7 @@ func describeEscape(em uint16) string { } s += "contentToHeap" } - for em >>= EscReturnBits; em != 0; em = em >> bitsPerOutputInTag { + for em >>= EscReturnBits; em != 0; em >>= bitsPerOutputInTag { // See encoding description above if s != "" { s += " " @@ -1469,7 +1469,7 @@ func (e *EscState) escassignfromtag(note string, dsts Nodes, src, call *Node) ui em0 := em dstsi := 0 - for em >>= EscReturnBits; em != 0 && dstsi < dsts.Len(); em = em >> bitsPerOutputInTag { + for em >>= EscReturnBits; em != 0 && dstsi < dsts.Len(); em >>= bitsPerOutputInTag { // Prefer the lowest-level path to the reference (for escape purposes). // Two-bit encoding (for example. 1, 3, and 4 bits are other options) // 01 = 0-level diff --git a/src/cmd/compile/internal/gc/walk.go b/src/cmd/compile/internal/gc/walk.go index 2c0bc4b22e..0b382bbbf0 100644 --- a/src/cmd/compile/internal/gc/walk.go +++ b/src/cmd/compile/internal/gc/walk.go @@ -1312,7 +1312,7 @@ opswitch: b = conv(b, convType) b = nod(OLSH, b, nodintconst(int64(8*offset))) ncsubstr = nod(OOR, ncsubstr, b) - csubstr = csubstr | int64(s[i+offset])<