mirror of
https://github.com/golang/go
synced 2024-11-23 10:20:03 -07:00
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: Daniel Martí <mvdan@mvdan.cc> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
f4f6594124
commit
ad1644943b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user