cmd/compile: add EType.String and missing EType names

Passes toolstash -cmp.

Change-Id: Icc387eb557d5029e903923a051b565812fd2246b
Reviewed-on: https://go-review.googlesource.com/21234
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
Josh Bleecher Snyder 2016-03-27 15:31:50 -07:00
parent 0f86d1edfb
commit cabf73ffb8

View file

@ -394,6 +394,7 @@ s%^ ........*\]%&~%g
s%~ %%g
*/
var etnames = []string{
Txxx: "Txxx",
TINT: "INT",
TUINT: "UINT",
TINT8: "INT8",
@ -422,6 +423,13 @@ var etnames = []string{
TSTRING: "STRING",
TUNSAFEPTR: "TUNSAFEPTR",
TANY: "ANY",
TIDEAL: "TIDEAL",
TNIL: "TNIL",
TBLANK: "TBLANK",
TFUNCARGS: "TFUNCARGS",
TCHANARGS: "TCHANARGS",
TINTERMETH: "TINTERMETH",
TDDDFIELD: "TDDDFIELD",
}
// Fmt "%E": etype
@ -432,6 +440,10 @@ func Econv(et EType) string {
return fmt.Sprintf("E-%d", et)
}
func (e EType) String() string {
return Econv(e)
}
// Fmt "%S": syms
func symfmt(s *Sym, flag FmtFlag) string {
if s.Pkg != nil && flag&FmtShort == 0 {