From ad1644943ba691740c3bec29280f350f9d81c1b1 Mon Sep 17 00:00:00 2001 From: Iskander Sharipov Date: Sat, 29 Dec 2018 23:16:01 +0300 Subject: [PATCH] cmd/compile/internal/gc: remove unused methodbyname type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 TryBot-Result: Gobot Gobot Reviewed-by: Daniel Martí Reviewed-by: Brad Fitzpatrick --- src/cmd/compile/internal/gc/export.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/cmd/compile/internal/gc/export.go b/src/cmd/compile/internal/gc/export.go index 4fe1f8b95f1..791fc063b7f 100644 --- a/src/cmd/compile/internal/gc/export.go +++ b/src/cmd/compile/internal/gc/export.go @@ -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