aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/deadcode/deadcode.go
diff options
context:
space:
mode:
authorCuong Manh Le <cuong.manhle.vn@gmail.com>2023-02-08 15:45:09 +0700
committerCuong Manh Le <cuong.manhle.vn@gmail.com>2023-04-14 17:57:14 +0000
commita141c58c85a166081bfa9ea4b1d80c347bbb96e4 (patch)
treec17fa3c57e7a3f5b71b712bbdda4422f5678d72e /src/cmd/compile/internal/deadcode/deadcode.go
parentac9d777caf06364524ce9c67203a14a899f71a57 (diff)
downloadgo-a141c58c85a166081bfa9ea4b1d80c347bbb96e4.tar.xz
cmd/compile: handle string concatenation in static init inliner
Static init inliner is using typecheck.EvalConst to handle string concatenation expressions. But static init inliner may reveal constant expressions after substitution, and the compiler needs to evaluate those expressions in non-constant semantic. Using typecheck.EvalConst, which always evaluates expressions in constant semantic, is not the right choice. For safety, this CL fold the logic to handle string concatenation to static init inliner, so there won't be regression in handling constant expressions in non-constant semantic. And also, future CL can simplify typecheck.EvalConst logic. Updates #58293 Updates #58339 Fixes #58439 Change-Id: I74068d99c245938e576afe9460cbd2b39677bbff Reviewed-on: https://go-review.googlesource.com/c/go/+/466277 Reviewed-by: Keith Randall <khr@google.com> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/deadcode/deadcode.go')
0 files changed, 0 insertions, 0 deletions