cmd/compile: simplify error sorting
Errors have unique seq values (their index within the errors slice), so errcmp never needs to fallback to sorting by message text. Moreover, comparing by original index is exactly the purpose of using a stable sort algorithm (and sort.Stable was added in Go 1.2), so we really only need to compare by lineno. Change-Id: I7f534b72a05d899ae9788dc7ef0541dd92a8b578 Reviewed-on: https://go-review.googlesource.com/19929 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Showing
Please register or sign in to comment