aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/stack.go
diff options
context:
space:
mode:
authorDan Scales <danscales@google.com>2021-09-22 20:20:09 -0700
committerDan Scales <danscales@google.com>2021-09-27 20:41:47 +0000
commitdfd875d015fb67671a2374c229e2159388d37693 (patch)
tree6797e73626821895c38b1a4f24fc991622b8b7ff /src/runtime/stack.go
parent964ea8c6482f48b242072697d150bb2192710892 (diff)
downloadgo-dfd875d015fb67671a2374c229e2159388d37693.tar.xz
cmd/compile: allow methods on shape types (but no bodies)
In a previous change, I was too aggressive in substInstType() in not generating methods for shape types during import. We do actually want to generate the method nodes - we just don't want to generate method bodies (which we would never use). We may need the method nodes for checking types later in the compile (especially with inlining). So, we do generate method nodes for shape types during import. In order to avoid the name collision we previously had, we now add ".nofunc." to the method nodes for shape types (during import and in the type substituter). We do that by passing in a 'isMethodNode' arg to MakeInstSym. We keep the normal name (without ".nofunc") for any other method nodes, and for the instantiated functions that help with implementing the methods of fully-instantiated types. The ".nofunc" names will never appear in the executable, since we don't generate any method bodies for the method nodes of shape types. Change-Id: I3e57e328691214140ca5f48d32011552d2a0d45d Reviewed-on: https://go-review.googlesource.com/c/go/+/352470 Trust: Dan Scales <danscales@google.com> Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/runtime/stack.go')
0 files changed, 0 insertions, 0 deletions