5g: register allocation bugs

Fixes #1099.

R=ken2, r
CC=golang-dev
https://golang.org/cl/2147047
This commit is contained in:
Russ Cox 2010-09-12 00:06:45 -04:00
parent b2a6558811
commit be443ee8bc
10 changed files with 98 additions and 60 deletions

View file

@ -200,16 +200,10 @@ func (ip IP) String() string {
// If IPv4, use dotted notation.
if p4 := p.To4(); len(p4) == 4 {
// BUG: work around bug in 5g by simplifying expression.
// return itod(uint(p4[0])) + "." +
// itod(uint(p4[1])) + "." +
// itod(uint(p4[2])) + "." +
// itod(uint(p4[3]))
str := itod(uint(p4[0])) + "."
str += itod(uint(p4[1])) + "."
str += itod(uint(p4[2])) + "."
str += itod(uint(p4[3]))
return str
return itod(uint(p4[0])) + "." +
itod(uint(p4[1])) + "." +
itod(uint(p4[2])) + "." +
itod(uint(p4[3]))
}
if len(p) != IPv6len {
return "?"