[dev.regabi] cmd/compile: remove CTRUNE

Since CL 255217, we've been able to rely on types.UntypedRune to
identify untyped rune literals, rather than needing Mpint.Rune /
CTRUNE. This makes way for switching to using go/constant, which
doesn't have a separate notion of rune constants distinct from integer
constants.

Passes toolstash-check.

Change-Id: I319861f4758aeea17345c101b167cb307e706a0e
Reviewed-on: https://go-review.googlesource.com/c/go/+/272652
Reviewed-by: Robert Griesemer <gri@golang.org>
Trust: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
Matthew Dempsky 2020-11-13 18:33:19 -08:00
parent 6dae48fb0b
commit c767d73227
7 changed files with 72 additions and 88 deletions

View file

@ -1931,10 +1931,11 @@ func walkprint(nn *Node, init *Nodes) *Node {
calls := []*Node{mkcall("printlock", nil, init)}
for i, n := range nn.List.Slice() {
if n.Op == OLITERAL {
switch n.Val().Ctype() {
case CTRUNE:
if n.Type == types.UntypedRune {
n = defaultlit(n, types.Runetype)
}
switch n.Val().Ctype() {
case CTINT:
n = defaultlit(n, types.Types[TINT64])