mirror of
https://github.com/golang/go.git
synced 2025-05-30 19:52:53 +00:00
cmd/compile/internal/gc: simplify x = x <op> y
to x <op>= y
Change-Id: I5afba2c10372252be4b65dae7a95461722de904f Reviewed-on: https://go-review.googlesource.com/135835 Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org> Run-TryBot: Iskander Sharipov <iskander.sharipov@intel.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
d17ac29158
commit
713edf8b31
@ -1419,7 +1419,7 @@ func describeEscape(em uint16) string {
|
|||||||
}
|
}
|
||||||
s += "contentToHeap"
|
s += "contentToHeap"
|
||||||
}
|
}
|
||||||
for em >>= EscReturnBits; em != 0; em = em >> bitsPerOutputInTag {
|
for em >>= EscReturnBits; em != 0; em >>= bitsPerOutputInTag {
|
||||||
// See encoding description above
|
// See encoding description above
|
||||||
if s != "" {
|
if s != "" {
|
||||||
s += " "
|
s += " "
|
||||||
@ -1469,7 +1469,7 @@ func (e *EscState) escassignfromtag(note string, dsts Nodes, src, call *Node) ui
|
|||||||
|
|
||||||
em0 := em
|
em0 := em
|
||||||
dstsi := 0
|
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).
|
// Prefer the lowest-level path to the reference (for escape purposes).
|
||||||
// Two-bit encoding (for example. 1, 3, and 4 bits are other options)
|
// Two-bit encoding (for example. 1, 3, and 4 bits are other options)
|
||||||
// 01 = 0-level
|
// 01 = 0-level
|
||||||
|
@ -1312,7 +1312,7 @@ opswitch:
|
|||||||
b = conv(b, convType)
|
b = conv(b, convType)
|
||||||
b = nod(OLSH, b, nodintconst(int64(8*offset)))
|
b = nod(OLSH, b, nodintconst(int64(8*offset)))
|
||||||
ncsubstr = nod(OOR, ncsubstr, b)
|
ncsubstr = nod(OOR, ncsubstr, b)
|
||||||
csubstr = csubstr | int64(s[i+offset])<<uint8(8*offset)
|
csubstr |= int64(s[i+offset]) << uint8(8*offset)
|
||||||
}
|
}
|
||||||
csubstrPart := nodintconst(csubstr)
|
csubstrPart := nodintconst(csubstr)
|
||||||
// Compare "step" bytes as once
|
// Compare "step" bytes as once
|
||||||
|
Loading…
x
Reference in New Issue
Block a user