]> Cypherpunks repositories - gostls13.git/commitdiff
Revert "cmd/compile: improve equality algs for arrays of interfaces"
authorKeith Randall <khr@golang.org>
Wed, 3 Jun 2020 17:07:09 +0000 (17:07 +0000)
committerKeith Randall <khr@golang.org>
Wed, 3 Jun 2020 17:38:23 +0000 (17:38 +0000)
This reverts commit 7eab9506c92562fe49861597e7bf1fcb28f2fd40.

Reason for revert: Undoing to get back to semantics discussed in #8606.

Change-Id: If0cd7518c10c37a81fdbb4ae112239e04c0b1448
Reviewed-on: https://go-review.googlesource.com/c/go/+/236278
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

index b55109bbbc07a9a02a07115f13e48d33e31ddd99..ecbed1a3c9c0f1f3f880ab57546a6e8ba880732b 100644 (file)
@@ -591,24 +591,6 @@ func geneq(t *types.Type) *obj.LSym {
                }
 
                switch t.Elem().Etype {
-               case TINTER:
-                       // Do two loops. First, check that all the types match (cheap).
-                       // Second, check that all the data match (expensive).
-                       // TODO: when the array size is small, unroll the tab match checks.
-                       checkAll(3, func(pi, qi *Node) *Node {
-                               // Compare types.
-                               pi = typecheck(pi, ctxExpr)
-                               qi = typecheck(qi, ctxExpr)
-                               eqtab, _ := eqinterface(pi, qi)
-                               return eqtab
-                       })
-                       checkAll(1, func(pi, qi *Node) *Node {
-                               // Compare data.
-                               pi = typecheck(pi, ctxExpr)
-                               qi = typecheck(qi, ctxExpr)
-                               _, eqdata := eqinterface(pi, qi)
-                               return eqdata
-                       })
                case TSTRING:
                        // Do two loops. First, check that all the lengths match (cheap).
                        // Second, check that all the contents match (expensive).