]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: apply constant folding to ORUNESTR
authorMatthew Dempsky <mdempsky@google.com>
Thu, 26 Sep 2019 23:32:34 +0000 (16:32 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Thu, 26 Sep 2019 23:54:29 +0000 (23:54 +0000)
commitac1d440ea6576dcfb851374dca69cf480f593517
tree7cdfd23354f8aa7808f8c12be8e97ef272475f49
parent0a5116493c4892d6d107d17fa78e87bd3b18772d
cmd/compile: apply constant folding to ORUNESTR

ORUNESTR represents the special case of integer->string conversion. If
the integer is a constant, then the string is a constant too, so
evconst needs to perform constant folding here.

Passes toolstash-check.

Fixes #34563.

Change-Id: Ieab3d76794d8ce570106b6b707a4bcd725d156e9
Reviewed-on: https://go-review.googlesource.com/c/go/+/197677
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/compile/internal/gc/const.go
test/const.go