]> Cypherpunks repositories - gostls13.git/commit
[dev.typeparams] cmd/compile: don't export/import type parameter indices anymore
authorDan Scales <danscales@google.com>
Fri, 6 Aug 2021 23:29:09 +0000 (16:29 -0700)
committerDan Scales <danscales@google.com>
Sat, 7 Aug 2021 06:00:09 +0000 (06:00 +0000)
commitd10a90471275bf2d91c4c853d7d1f75f23a70a32
tree53ac7210fa0056404aa3d7e0346de3d58945b5cf
parent9e0ac72d680e71d22c7d31950a16d4f92f08305a
[dev.typeparams] cmd/compile: don't export/import type parameter indices anymore

types2 now determines type parameter indices lazily, so we don't need
them just as we are importing. We set them in types1 as we are importing
the type param list itself.

type param indices are not strongly needed in types1 - we only use them
in one place which could be rewritten. But I kept them in analogy to
types2 (TypeParam.Index).

Fixes #47451

Change-Id: I30631f95c45a259354eaf7ec5194f71e799eb358
Reviewed-on: https://go-review.googlesource.com/c/go/+/340532
Run-TryBot: Dan Scales <danscales@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
Trust: Dan Scales <danscales@google.com>
src/cmd/compile/internal/importer/iimport.go
src/cmd/compile/internal/typecheck/iexport.go
src/cmd/compile/internal/typecheck/iimport.go
src/cmd/compile/internal/types/type.go