]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: optimize types.sconv
authorMatthew Dempsky <mdempsky@google.com>
Wed, 7 Jul 2021 19:33:40 +0000 (12:33 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Wed, 7 Jul 2021 22:28:19 +0000 (22:28 +0000)
commitb003a8b1ae26fa684ec35eb7543efa1ded1bcae7
tree660a3ae6ca58d4f50d237d6892bf2499f782e0bd
parent11f5df2d6703b3fbd61a256e4e32ba67d835e7ad
cmd/compile: optimize types.sconv

Now that symfmt is simpler, we can simply manually inline it into
sconv. Importantly, this allows us to avoid allocating a buffer +
writing a string + re-interning it when we don't need to qualify the
identifier.

Passes toolstash -cmp.

Updates #47087.

Change-Id: I47b57aef22301ba242556a645346f478f0c1a7d1
Reviewed-on: https://go-review.googlesource.com/c/go/+/333162
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/cmd/compile/internal/types/fmt.go