aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2021-09-14 13:18:40 -0700
committerRobert Griesemer <gri@golang.org>2021-09-15 03:29:41 +0000
commitb26d325cb1fda20129deaef6e6a666efdc8f0140 (patch)
tree3b950fd30993a028769b2292ad177b6b9d2f52ed
parent9fc28892cb88dd4c7b0552137b97c1692c23e46b (diff)
downloadgo-b26d325cb1fda20129deaef6e6a666efdc8f0140.tar.gz
go-b26d325cb1fda20129deaef6e6a666efdc8f0140.zip
cmd/compile/internal/types2: remove some unnecessary loading/expansion of Named types
This is a clean port of CL 349409 from go/types to types2. Change-Id: I2deb9ce46e6dcda736fda2169912c02163930d7d Reviewed-on: https://go-review.googlesource.com/c/go/+/349991 Trust: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
-rw-r--r--src/cmd/compile/internal/types2/predicates.go3
-rw-r--r--src/cmd/compile/internal/types2/unify.go3
2 files changed, 0 insertions, 6 deletions
diff --git a/src/cmd/compile/internal/types2/predicates.go b/src/cmd/compile/internal/types2/predicates.go
index 473d22675f..aa797fccc7 100644
--- a/src/cmd/compile/internal/types2/predicates.go
+++ b/src/cmd/compile/internal/types2/predicates.go
@@ -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()
diff --git a/src/cmd/compile/internal/types2/unify.go b/src/cmd/compile/internal/types2/unify.go
index a1e5b3679b..bb69f0d27b 100644
--- a/src/cmd/compile/internal/types2/unify.go
+++ b/src/cmd/compile/internal/types2/unify.go
@@ -428,9 +428,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()