Commit cabf73ff authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

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: 's avatarMatthew Dempsky <mdempsky@google.com>
parent 0f86d1ed
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment