]> Cypherpunks repositories - gostls13.git/commit
[dev.typeparams] cmd/compile: get rid of concretify use for bounds.
authorDan Scales <danscales@google.com>
Sat, 24 Jul 2021 00:19:51 +0000 (17:19 -0700)
committerDan Scales <danscales@google.com>
Sat, 24 Jul 2021 17:47:08 +0000 (17:47 +0000)
commit3dc0a0a2c5a7d8959a43265d4f73d7e2e509de5e
tree9aa4d3653e2a2ba3079cf3104ac4a58911e43447
parent77e0bf294cc431d5608c183d56b6aadbb95b09b0
[dev.typeparams] cmd/compile: get rid of concretify use for bounds.

We just need to substitute from the typeparams to the shapes for the dst
type of the bound.

Removed concretify substituter, not used anymore. Also removed
shape2params, not needed anymore.

However, since the dst type is now not concrete, this gives more cases
where the linker can't find a method.

I realized that we need to call MarkUsedIfaceMethod to mark a method as
used on a particular interface, else a type's method can be still
deadcoded even though MarkTypeUsedInInterface has been called on the
concrete type. I added a new version MarkUsedIfaceMethodIndex to fit my
use case.

Change-Id: Id67b72b350889dd3688b42739c337d5d79a0d1a2
Reviewed-on: https://go-review.googlesource.com/c/go/+/337230
Trust: Dan Scales <danscales@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/noder/stencil.go
src/cmd/compile/internal/reflectdata/reflect.go