aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa/export_test.go
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2020-12-01 03:25:29 -0800
committerMatthew Dempsky <mdempsky@google.com>2020-12-01 19:24:00 +0000
commit5ffa275f3cab631483a1ce76a63fc4ede3d204e8 (patch)
treeb887c2c7990b97f4d251c5c52e1307548a15c978 /src/cmd/compile/internal/ssa/export_test.go
parent6ca23a45feebc8672a1851dbc65c5b34d481ca30 (diff)
downloadgo-5ffa275f3cab631483a1ce76a63fc4ede3d204e8.tar.gz
go-5ffa275f3cab631483a1ce76a63fc4ede3d204e8.zip
[dev.regabi] cmd/compile: first pass at abstracting Type
Passes toolstash/buildall. [git-generate] cd src/cmd/compile/internal/ssa rf ' ex . ../ir ../gc { import "cmd/compile/internal/types" var t *types.Type t.Etype -> t.Kind() t.Sym -> t.GetSym() t.Orig -> t.Underlying() } ' cd ../types rf ' mv EType Kind mv IRNode Object mv Type.Etype Type.kind mv Type.Sym Type.sym mv Type.Orig Type.underlying mv Type.Cache Type.cache mv Type.GetSym Type.Sym mv Bytetype ByteType mv Runetype RuneType mv Errortype ErrorType ' cd ../gc sed -i 's/Bytetype/ByteType/; s/Runetype/RuneType/' mkbuiltin.go git codereview gofmt go install cmd/compile/internal/... go test cmd/compile -u || go test cmd/compile Change-Id: Ibecb2d7100d3318a49238eb4a78d70acb49eedca Reviewed-on: https://go-review.googlesource.com/c/go/+/274437 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Russ Cox <rsc@golang.org> Trust: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src/cmd/compile/internal/ssa/export_test.go')
-rw-r--r--src/cmd/compile/internal/ssa/export_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd/compile/internal/ssa/export_test.go b/src/cmd/compile/internal/ssa/export_test.go
index df83383308..5a81f76ceb 100644
--- a/src/cmd/compile/internal/ssa/export_test.go
+++ b/src/cmd/compile/internal/ssa/export_test.go
@@ -140,7 +140,7 @@ func init() {
// so this test setup can share it.
types.Tconv = func(t *types.Type, flag, mode int) string {
- return t.Etype.String()
+ return t.Kind().String()
}
types.Sconv = func(s *types.Sym, flag, mode int) string {
return "sym"
@@ -149,13 +149,13 @@ func init() {
fmt.Fprintf(s, "sym")
}
types.FormatType = func(t *types.Type, s fmt.State, verb rune, mode int) {
- fmt.Fprintf(s, "%v", t.Etype)
+ fmt.Fprintf(s, "%v", t.Kind())
}
types.Dowidth = func(t *types.Type) {}
for _, typ := range [...]struct {
width int64
- et types.EType
+ et types.Kind
}{
{1, types.TINT8},
{1, types.TUINT8},