]> Cypherpunks repositories - gostls13.git/commit
go/types, types2: remove need to store type parameter list in unifier
authorRobert Griesemer <gri@golang.org>
Thu, 9 Feb 2023 17:23:41 +0000 (09:23 -0800)
committerGopher Robot <gobot@golang.org>
Thu, 9 Feb 2023 21:14:00 +0000 (21:14 +0000)
commita4d5fbc3a48b63f19fcd2a4d040a85c75a2709b5
tree2e71659057212597f279fd51e735ce2934583159
parentda47cd6192822daef997df6bbbc0d3a6bdbdae13
go/types, types2: remove need to store type parameter list in unifier

For unification we only need the handles map.
The type parameter list was stored for reproducible printing only,
but we can achieve the same effect with sorting.

This opens the door to adding type parameters from different
types/functions that we may want to infer together. They may
be added through separate "addTypeParams" calls in the future.
Printing (which is used for debugging only) will remain reproducible.

Change-Id: I23b56c63fa45a7d687761f2efcf558e61b004584
Reviewed-on: https://go-review.googlesource.com/c/go/+/466955
Reviewed-by: Robert Griesemer <gri@google.com>
Run-TryBot: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
src/cmd/compile/internal/types2/unify.go
src/go/types/unify.go