]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: replace opnames with stringer
authorDaniel Martí <mvdan@mvdan.cc>
Thu, 9 Nov 2017 23:10:43 +0000 (23:10 +0000)
committerDaniel Martí <mvdan@mvdan.cc>
Fri, 10 Nov 2017 10:56:22 +0000 (10:56 +0000)
commit3231d4e4ef37df9c4457c1ce1ae3f46cf4b994f7
treecb865a1086842262ab8dfd5f436b80b857b08db1
parent366681cc06357cfdca91c18eff059e11e5470383
cmd/compile: replace opnames with stringer

Now possible, since stringer just got the -trimprefix flag added.

While at it, simplify a few Op stringifications since we can now use %v,
and no longer have to worry about o<len(opnames).

Passes toolstash -cmp on std cmd.

Fixes #15462.

Change-Id: Icdcde0b0a5eb165d18488918175024da274f782b
Reviewed-on: https://go-review.googlesource.com/76790
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Dave Cheney <dave@cheney.net>
src/cmd/compile/fmt_test.go
src/cmd/compile/internal/gc/bexport.go
src/cmd/compile/internal/gc/fmt.go
src/cmd/compile/internal/gc/op_string.go [new file with mode: 0644]
src/cmd/compile/internal/gc/opnames.go [deleted file]
src/cmd/compile/internal/gc/ssa.go
src/cmd/compile/internal/gc/syntax.go