]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: optimize []byte(string1 + string2)
authorPaschalis Tsilias <paschalis.tsilias@gmail.com>
Wed, 13 Sep 2023 09:44:17 +0000 (12:44 +0300)
committerGopher Robot <gobot@golang.org>
Tue, 10 Sep 2024 21:20:57 +0000 (21:20 +0000)
commitfe69121bc538260cf91f11dab705335b690e51a3
treed5962a3404521bd5bed263fad4156d462f6673c6
parent3da4281df1b0c7ea11b524ff19fc2f409b8e58c0
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>
src/cmd/compile/internal/test/issue62407_test.go [new file with mode: 0644]
src/cmd/compile/internal/typecheck/_builtin/runtime.go
src/cmd/compile/internal/typecheck/builtin.go
src/cmd/compile/internal/walk/convert.go
src/cmd/compile/internal/walk/expr.go
src/cmd/internal/goobj/builtinlist.go
src/runtime/string.go
test/codegen/strings.go