go/types: remove some unnecessary loading/expansion of Named types

For Identical an u.nify, only type arguments and pointer identity is
needed.

Change-Id: Id4018d2a53044fa20fd26d28890f28b37b6d6d70
Reviewed-on: https://go-review.googlesource.com/c/go/+/349409
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
Robert Findley 2021-09-09 18:41:30 -04:00
parent 0d8a4bfc96
commit ad97d204f0
2 changed files with 0 additions and 6 deletions

View File

@ -302,9 +302,6 @@ func identical(x, y Type, cmpTags bool, p *ifacePair) bool {
// Two named types are identical if their type names originate
// in the same type declaration.
if y, ok := y.(*Named); ok {
x.expand(nil)
y.expand(nil)
xargs := x.TypeArgs().list()
yargs := y.TypeArgs().list()

View File

@ -425,9 +425,6 @@ func (u *unifier) nify(x, y Type, p *ifacePair) bool {
case *Named:
if y, ok := y.(*Named); ok {
x.expand(nil)
y.expand(nil)
xargs := x.targs.list()
yargs := y.targs.list()