mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[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>
This commit is contained in:
parent
82744bfbfc
commit
5517053d17
4 changed files with 194 additions and 67 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue