cmd/internal/gc: add internConcat for alloc-free string concatenation

This is a follow-up to review comments on CL 7696.

I believe that this includes the first regular Go test in the compiler.

No functional changes. Passes toolstash -cmp.

Change-Id: Id45f51aa664c5d52ece2a61cd7d8417159ce3cf0
Reviewed-on: https://go-review.googlesource.com/7820
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Josh Bleecher Snyder 2015-03-19 09:28:02 -07:00
parent 7274b1f6c9
commit 42fcc6fea0
4 changed files with 44 additions and 12 deletions

View file

@ -3574,10 +3574,10 @@ func isdirectiface(t *Type) bool {
return false
}
// type2IET returns "T" if t is a concrete type,
// "I" if t is an interface type, and "E" if t is an empty interface type.
// IET returns "T" if t is a concrete type, "I" if t is an interface type, and
// "E" if t is an empty interface type.
// It is used to build calls to the conv* and assert* runtime routines.
func type2IET(t *Type) string {
func (t *Type) IET() string {
if isnilinter(t) {
return "E"
}