mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: refactor symbol sorting logic
This used to be duplicated in methcmp and siglt, because Sig used its own representation for Syms. Instead, just use Syms, and add a (*Sym).Less method that both methcmp and siglt can use. Also, prune some impossible cases purportedly related to blank methods: the Go spec disallows blank methods in interface method sets, and addmethod drops blank methods without actually recording them in the type's method set. Passes toolstash-check. Updates #24693. Change-Id: I24e981659b68504d71518160486989a82505f513 Reviewed-on: https://go-review.googlesource.com/105936 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
71bac7efe4
commit
c3473c4f10
6 changed files with 117 additions and 149 deletions
|
|
@ -600,7 +600,6 @@ var knownFormats = map[string]string{
|
|||
"*math/big.Int %s": "",
|
||||
"[16]byte %x": "",
|
||||
"[]*cmd/compile/internal/gc.Node %v": "",
|
||||
"[]*cmd/compile/internal/gc.Sig %#v": "",
|
||||
"[]*cmd/compile/internal/ssa.Block %v": "",
|
||||
"[]*cmd/compile/internal/ssa.Value %v": "",
|
||||
"[]byte %s": "",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue