aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/noder
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2022-05-16 12:02:54 -0700
committerMatthew Dempsky <mdempsky@google.com>2022-05-20 19:01:40 +0000
commit69b412b7d6e9cbd9908b7a9641d1c6af3ff6bc63 (patch)
tree7845ccee2cc5ee2b1d96e8e363255090266db5be /src/cmd/compile/internal/noder
parentec464edb22301764b6caf7592ac8dc9451c595c6 (diff)
downloadgo-69b412b7d6e9cbd9908b7a9641d1c6af3ff6bc63.tar.xz
internal/pkgbits: better documentation
Change-Id: I3f96a6e8a43faa5c8111b9d979aa37822c1dce06 Reviewed-on: https://go-review.googlesource.com/c/go/+/407434 Reviewed-by: Robert Griesemer <gri@google.com> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
Diffstat (limited to 'src/cmd/compile/internal/noder')
-rw-r--r--src/cmd/compile/internal/noder/writer.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/noder/writer.go b/src/cmd/compile/internal/noder/writer.go
index 772a9e27c8..298ed493f7 100644
--- a/src/cmd/compile/internal/noder/writer.go
+++ b/src/cmd/compile/internal/noder/writer.go
@@ -109,11 +109,20 @@ type writerDict struct {
itabs []itabInfo
}
+// A derivedInfo represents a reference to an encoded generic Go type.
type derivedInfo struct {
idx int
needed bool
}
+// A typeInfo represents a reference to an encoded Go type.
+//
+// If derived is true, then the typeInfo represents a generic Go type
+// that contains type parameters. In this case, idx is an index into
+// the readerDict.derived{,Types} arrays.
+//
+// Otherwise, the typeInfo represents a non-generic Go type, and idx
+// is an index into the reader.typs array instead.
type typeInfo struct {
idx int
derived bool