mirror of https://github.com/golang/go.git
runtime: fix string optimization
R=golang-dev, r CC=golang-dev https://golang.org/cl/6354048
This commit is contained in:
parent
8744d35dd3
commit
71643b2fdb
|
|
@ -155,7 +155,9 @@ concatstring(int32 n, String *s)
|
|||
out = s[i];
|
||||
}
|
||||
}
|
||||
if(count <= 1) // zero or one non-empty string in concatenation
|
||||
if(count == 0)
|
||||
return runtime·emptystring;
|
||||
if(count == 1) // zero or one non-empty string in concatenation
|
||||
return out;
|
||||
|
||||
out = gostringsize(l);
|
||||
|
|
|
|||
Loading…
Reference in New Issue