]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: clean up equality generation
authorKeith Randall <khr@golang.org>
Mon, 15 Jun 2020 18:08:36 +0000 (11:08 -0700)
committerKeith Randall <khr@golang.org>
Thu, 27 Aug 2020 23:25:58 +0000 (23:25 +0000)
commit42fd1306cea2dc2ff91bd5208d9593721ab5a30f
treeae235f8895e58dfbdcb7a86e489160fa988a2dff
parent4f76fe86756841befb6574ce4bf04113d14389d4
cmd/compile: clean up equality generation

We're using sort.SliceStable, so no need to keep track of indexes as well.

Use a more robust test for whether a node is a call.

Add a test that we're actually reordering comparisons. This test fails
without the alg.go changes in this CL because eqstring uses OCALLFUNC
instead of OCALL for its data comparisons.

Update #8606

Change-Id: Ieeec33434c72e3aa328deb11cc415cfda05632e2
Reviewed-on: https://go-review.googlesource.com/c/go/+/237921
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/gc/alg.go
test/fixedbugs/issue8606b.go [new file with mode: 0644]