Skip to content

Commit 89c3f7c

Browse files
cuonglmgopherbot
authored andcommitted
cmd/compile/internal/walk: remove unused eqFor
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 <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Auto-Submit: Cuong Manh Le <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Matthew Dempsky <[email protected]>
1 parent 9aaaedb commit 89c3f7c

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

src/cmd/compile/internal/walk/compare.go

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -462,33 +462,6 @@ func finishCompare(n *ir.BinaryExpr, r ir.Node, init *ir.Nodes) ir.Node {
462462
return r
463463
}
464464

465-
func eqFor(t *types.Type) (n ir.Node, needsize bool) {
466-
// Should only arrive here with large memory or
467-
// a struct/array containing a non-memory field/element.
468-
// Small memory is handled inline, and single non-memory
469-
// is handled by walkCompare.
470-
switch a, _ := types.AlgType(t); a {
471-
case types.AMEM:
472-
n := typecheck.LookupRuntime("memequal")
473-
n = typecheck.SubstArgTypes(n, t, t)
474-
return n, true
475-
case types.ASPECIAL:
476-
sym := reflectdata.TypeSymPrefix(".eq", t)
477-
// TODO(austin): This creates an ir.Name with a nil Func.
478-
n := typecheck.NewName(sym)
479-
ir.MarkFunc(n)
480-
n.SetType(types.NewSignature(nil, []*types.Field{
481-
types.NewField(base.Pos, nil, types.NewPtr(t)),
482-
types.NewField(base.Pos, nil, types.NewPtr(t)),
483-
}, []*types.Field{
484-
types.NewField(base.Pos, nil, types.Types[types.TBOOL]),
485-
}))
486-
return n, false
487-
}
488-
base.Fatalf("eqFor %v", t)
489-
return nil, false
490-
}
491-
492465
// brcom returns !(op).
493466
// For example, brcom(==) is !=.
494467
func brcom(op ir.Op) ir.Op {

0 commit comments

Comments
 (0)