aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/noder/unified.go
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2021-07-13 09:09:32 -0700
committerMatthew Dempsky <mdempsky@google.com>2021-07-14 02:41:09 +0000
commit5517053d178d1259f6f1a9c2d65efbf335002cea (patch)
tree3fd5cf40c099f152f9b68e1f2532e2e9aed1dedf /src/cmd/compile/internal/noder/unified.go
parent82744bfbfc2d0407ecf1bf055f548c3948d4683b (diff)
downloadgo-5517053d178d1259f6f1a9c2d65efbf335002cea.tar.gz
go-5517053d178d1259f6f1a9c2d65efbf335002cea.zip
[dev.typeparams] cmd/compile: record more typ/fun info for dictionaries in unified IR
Records whether a derived type is needed at run-time as well as instantiated functions that rely on derived types (and thus need sub-dictionaries). Change-Id: I2f2036976bfce5b3b4372fba88b4116dafa7e6b7 Reviewed-on: https://go-review.googlesource.com/c/go/+/334349 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/unified.go')
-rw-r--r--src/cmd/compile/internal/noder/unified.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/noder/unified.go b/src/cmd/compile/internal/noder/unified.go
index 39989778f8..e8c203ae46 100644
--- a/src/cmd/compile/internal/noder/unified.go
+++ b/src/cmd/compile/internal/noder/unified.go
@@ -259,6 +259,7 @@ func readPackage(pr *pkgReader, importpkg *types.Pkg) {
for i, n := 0, r.len(); i < n; i++ {
r.sync(syncObject)
+ assert(!r.bool())
idx := r.reloc(relocObj)
assert(r.len() == 0)
@@ -293,6 +294,7 @@ func writeNewExport(out io.Writer) {
for i, n := 0, r.len(); i < n; i++ {
r.sync(syncObject)
+ assert(!r.bool())
idx := r.reloc(relocObj)
assert(r.len() == 0)
@@ -325,6 +327,7 @@ func writeNewExport(out io.Writer) {
w.len(len(idxs))
for _, idx := range idxs {
w.sync(syncObject)
+ w.bool(false)
w.reloc(relocObj, idx)
w.len(0)
}