Commit ad164494 authored by Iskander Sharipov's avatar Iskander Sharipov Committed by Brad Fitzpatrick

cmd/compile/internal/gc: remove unused methodbyname type

methodbyname was used for sorting in bexport.go, until
https://golang.org/cl/139338 removed the code that
invoked sorting function.

R=1.13

Change-Id: I13e313fb60111a142ed3883d81916af254445fdc
Reviewed-on: https://go-review.googlesource.com/c/155959
Run-TryBot: Iskander Sharipov <quasilyte@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: 's avatarDaniel Martí <mvdan@mvdan.cc>
Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent f4f65941
......@@ -62,13 +62,6 @@ func autoexport(n *Node, ctxt Class) {
}
}
// methodbyname sorts types by symbol name.
type methodbyname []*types.Field
func (x methodbyname) Len() int { return len(x) }
func (x methodbyname) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
func (x methodbyname) Less(i, j int) bool { return x[i].Sym.Name < x[j].Sym.Name }
func dumpexport(bout *bio.Writer) {
// The linker also looks for the $$ marker - use char after $$ to distinguish format.
exportf(bout, "\n$$B\n") // indicate binary export format
......
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