mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: make concatstring{2,3,4,5} consistent w/ compiler's use
Internally the compiler uses a0,a1,a3 string, not [3]string, and this lead to different parameter passing (memory, versus registers) which of course did not work. Updates #40724. Change-Id: I1dbf479b88134559ba54b4b00a042b9a0fd128b8 Reviewed-on: https://go-review.googlesource.com/c/go/+/306910 Trust: David Chase <drchase@google.com> Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com>
This commit is contained in:
parent
41cf18eda7
commit
35a8bbc9ea
1 changed files with 8 additions and 8 deletions
|
|
@ -55,20 +55,20 @@ func concatstrings(buf *tmpBuf, a []string) string {
|
|||
return s
|
||||
}
|
||||
|
||||
func concatstring2(buf *tmpBuf, a [2]string) string {
|
||||
return concatstrings(buf, a[:])
|
||||
func concatstring2(buf *tmpBuf, a0, a1 string) string {
|
||||
return concatstrings(buf, []string{a0, a1})
|
||||
}
|
||||
|
||||
func concatstring3(buf *tmpBuf, a [3]string) string {
|
||||
return concatstrings(buf, a[:])
|
||||
func concatstring3(buf *tmpBuf, a0, a1, a2 string) string {
|
||||
return concatstrings(buf, []string{a0, a1, a2})
|
||||
}
|
||||
|
||||
func concatstring4(buf *tmpBuf, a [4]string) string {
|
||||
return concatstrings(buf, a[:])
|
||||
func concatstring4(buf *tmpBuf, a0, a1, a2, a3 string) string {
|
||||
return concatstrings(buf, []string{a0, a1, a2, a3})
|
||||
}
|
||||
|
||||
func concatstring5(buf *tmpBuf, a [5]string) string {
|
||||
return concatstrings(buf, a[:])
|
||||
func concatstring5(buf *tmpBuf, a0, a1, a2, a3, a4 string) string {
|
||||
return concatstrings(buf, []string{a0, a1, a2, a3, a4})
|
||||
}
|
||||
|
||||
// slicebytetostring converts a byte slice to a string.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue