]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile/internal/walk: remove unused eqFor
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Thu, 16 Feb 2023 14:19:42 +0000 (21:19 +0700)
committerGopher Robot <gobot@golang.org>
Tue, 28 Feb 2023 18:50:14 +0000 (18:50 +0000)
CL 436436 replaced eqFor with reflectdata.EqFor, but forgot removing it.

Change-Id: I3f2bf02da2e161a27718226b970b81815e9f0a46
Reviewed-on: https://go-review.googlesource.com/c/go/+/468815
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/walk/compare.go

index 87987b09a69ef5ac49c54ed9b58ad027dd11053c..a2fd3b4974f13cf44ad0e87a613dbfdddc480f95 100644 (file)
@@ -462,33 +462,6 @@ func finishCompare(n *ir.BinaryExpr, r ir.Node, init *ir.Nodes) ir.Node {
        return r
 }
 
-func eqFor(t *types.Type) (n ir.Node, needsize bool) {
-       // Should only arrive here with large memory or
-       // a struct/array containing a non-memory field/element.
-       // Small memory is handled inline, and single non-memory
-       // is handled by walkCompare.
-       switch a, _ := types.AlgType(t); a {
-       case types.AMEM:
-               n := typecheck.LookupRuntime("memequal")
-               n = typecheck.SubstArgTypes(n, t, t)
-               return n, true
-       case types.ASPECIAL:
-               sym := reflectdata.TypeSymPrefix(".eq", t)
-               // TODO(austin): This creates an ir.Name with a nil Func.
-               n := typecheck.NewName(sym)
-               ir.MarkFunc(n)
-               n.SetType(types.NewSignature(nil, []*types.Field{
-                       types.NewField(base.Pos, nil, types.NewPtr(t)),
-                       types.NewField(base.Pos, nil, types.NewPtr(t)),
-               }, []*types.Field{
-                       types.NewField(base.Pos, nil, types.Types[types.TBOOL]),
-               }))
-               return n, false
-       }
-       base.Fatalf("eqFor %v", t)
-       return nil, false
-}
-
 // brcom returns !(op).
 // For example, brcom(==) is !=.
 func brcom(op ir.Op) ir.Op {