• Matthew Dempsky's avatar
    cmd/compile: refactor symbol sorting logic · c3473c4f
    Matthew Dempsky authored
    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/105936Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    Run-TryBot: Matthew Dempsky <mdempsky@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    c3473c4f
fmt_test.go 22.8 KB