diff options
author | Matthew Dempsky <mdempsky@google.com> | 2021-06-24 11:31:56 -0700 |
---|---|---|
committer | Matthew Dempsky <mdempsky@google.com> | 2021-06-25 05:00:04 +0000 |
commit | 3f1a517a45d2e443a327e0b28df17698e299ea50 (patch) | |
tree | b94f274e4638ce10d413772400adc39239e25850 /src/cmd/compile/internal/noder/reader.go | |
parent | badb98364b3710933de89bfe579fb8d1f82741c8 (diff) | |
download | go-3f1a517a45d2e443a327e0b28df17698e299ea50.tar.gz go-3f1a517a45d2e443a327e0b28df17698e299ea50.zip |
[dev.typeparams] cmd/compile: refactor "need to emit" logic for types
This CL refactors out a single reflectdata.NeedEmit function that
reports whether the current compilation unit needs to emit the runtime
type descriptor and method wrappers for a given type.
As a minor side bonus, this CL also skips compiling the "error.Error"
wrapper in non-runtime packages. Package runtime already
unconditionally emitted the runtime type descriptor for error, so we
just need to make sure it emits the wrapper and other packages don't.
Passes toolstash -cmp.
Change-Id: Ic9ea219dfba8a0a57f2f42f817bdff7618732bff
Reviewed-on: https://go-review.googlesource.com/c/go/+/330754
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Diffstat (limited to 'src/cmd/compile/internal/noder/reader.go')
0 files changed, 0 insertions, 0 deletions