aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/internal
diff options
context:
space:
mode:
authorPaschalis Tsilias <paschalis.tsilias@gmail.com>2023-09-13 12:44:17 +0300
committerGopher Robot <gobot@golang.org>2024-09-10 21:20:57 +0000
commitfe69121bc538260cf91f11dab705335b690e51a3 (patch)
treed5962a3404521bd5bed263fad4156d462f6673c6 /src/cmd/internal
parent3da4281df1b0c7ea11b524ff19fc2f409b8e58c0 (diff)
downloadgo-fe69121bc538260cf91f11dab705335b690e51a3.tar.xz
cmd/compile: optimize []byte(string1 + string2)
This CL optimizes the compilation of string-to-bytes conversion in the case of string additions. Fixes #62407 Change-Id: Ic47df758478e5d061880620025c4ec7dbbff8a64 Reviewed-on: https://go-review.googlesource.com/c/go/+/527935 Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: Keith Randall <khr@golang.org> Auto-Submit: Keith Randall <khr@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Tim King <taking@google.com>
Diffstat (limited to 'src/cmd/internal')
-rw-r--r--src/cmd/internal/goobj/builtinlist.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cmd/internal/goobj/builtinlist.go b/src/cmd/internal/goobj/builtinlist.go
index e2aae748a0..98a7fd0411 100644
--- a/src/cmd/internal/goobj/builtinlist.go
+++ b/src/cmd/internal/goobj/builtinlist.go
@@ -55,6 +55,11 @@ var builtins = [...]struct {
{"runtime.concatstring4", 1},
{"runtime.concatstring5", 1},
{"runtime.concatstrings", 1},
+ {"runtime.concatbyte2", 1},
+ {"runtime.concatbyte3", 1},
+ {"runtime.concatbyte4", 1},
+ {"runtime.concatbyte5", 1},
+ {"runtime.concatbytes", 1},
{"runtime.cmpstring", 1},
{"runtime.intstring", 1},
{"runtime.slicebytetostring", 1},