diff options
| author | Mark Freeman <mark@golang.org> | 2026-04-02 15:46:31 -0400 |
|---|---|---|
| committer | Mark Freeman <mark@golang.org> | 2026-04-03 10:10:30 -0700 |
| commit | 142f2376017887a3ed02dc1bc91542d39cfe2ecd (patch) | |
| tree | cca1d19148e45c9da7c725073a6ad014421632d7 /test/codegen | |
| parent | 5ecf12eedf00dec83cbfe29b1c5dc471e3fe5f94 (diff) | |
| download | go-142f2376017887a3ed02dc1bc91542d39cfe2ecd.tar.xz | |
cmd/compile/internal/noder: omit wrapper functions for generic methods
Emitting wrapper functions for generic methods is tricky for 2 reasons:
1. Existing downstream machinery expects that it can make certain
assumptions about a method if it sees a wrapper function. We
may violate those assumptions with generic method wrappers.
2. Signatures for generic methods are generic and hence cannot be
encoded using w.typ.
This has the slight downside of not using a statically computed
wrapper for generic methods and instead dynamically computing the
dictionary pointer. Thus, we miss out on a performance optimization
for generic methods for now. Code that does not use generic methods
is unaffected.
Change-Id: I72c626ef0f807c0cb54d8cf040250de8177303cc
Reviewed-on: https://go-review.googlesource.com/c/go/+/762382
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Mark Freeman <markfreeman@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Diffstat (limited to 'test/codegen')
0 files changed, 0 insertions, 0 deletions
