mirror of
https://github.com/golang/go
synced 2024-11-24 08:00:12 -07:00
cmd/compile: switch Eqtype and (*Type).Compare to use recvParamsResults
Change-Id: I5365b94b815bfb4795db643415c2df51fc815ea1 Reviewed-on: https://go-review.googlesource.com/20459 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Dave Cheney <dave@cheney.net>
This commit is contained in:
parent
6b59d61822
commit
b594b8b039
@ -767,7 +767,7 @@ func eqtype1(t1, t2 *Type, assumedEqual map[typePair]struct{}) bool {
|
||||
|
||||
// Loop over structs: receiver, in, out.
|
||||
case TFUNC:
|
||||
for _, f := range [...]func(*Type) *Type{(*Type).Recv, (*Type).Results, (*Type).Params} {
|
||||
for _, f := range recvParamsResults {
|
||||
// Loop over fields in structs, ignoring argument names.
|
||||
ta, ia := IterFields(f(t1))
|
||||
tb, ib := IterFields(f(t2))
|
||||
|
@ -423,7 +423,7 @@ func (t *Type) cmp(x *Type) ssa.Cmp {
|
||||
return ssa.CMPeq
|
||||
|
||||
case TFUNC:
|
||||
for _, f := range [...]func(*Type) *Type{(*Type).Recv, (*Type).Results, (*Type).Params} {
|
||||
for _, f := range recvParamsResults {
|
||||
// Loop over fields in structs, ignoring argument names.
|
||||
ta, ia := IterFields(f(t))
|
||||
tb, ib := IterFields(f(x))
|
||||
|
Loading…
Reference in New Issue
Block a user