mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.typeparams] cmd/compile: cleanup unified IR file format a little
This CL makes two changes: 1. It moves object symbols and code tags into a new "relocName" relocation, which should eventually allow getting rid of objStub. 2. It moves the type parameter data into the relocObjDict relocation, so everything related to writing out dictionaries is contained there. Change-Id: If0f7ff7d9384e8664957c3180bf6f20e97bcff6e Reviewed-on: https://go-review.googlesource.com/c/go/+/336051 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
d5f6ba943c
commit
897970688b
7 changed files with 124 additions and 116 deletions
|
|
@ -263,7 +263,7 @@ func readPackage(pr *pkgReader, importpkg *types.Pkg) {
|
|||
idx := r.reloc(relocObj)
|
||||
assert(r.len() == 0)
|
||||
|
||||
path, name, code, _ := r.p.peekObj(idx)
|
||||
path, name, code := r.p.peekObj(idx)
|
||||
if code != objStub {
|
||||
objReader[types.NewPkg(path, "").Lookup(name)] = pkgReaderIndex{pr, idx, nil}
|
||||
}
|
||||
|
|
@ -298,7 +298,7 @@ func writeNewExport(out io.Writer) {
|
|||
idx := r.reloc(relocObj)
|
||||
assert(r.len() == 0)
|
||||
|
||||
xpath, xname, xtag, _ := pr.peekObj(idx)
|
||||
xpath, xname, xtag := pr.peekObj(idx)
|
||||
assert(xpath == pr.pkgPath)
|
||||
assert(xtag != objStub)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue