mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.link] cmd/link: delete ctxt.Reachparent
It is no longer needed as we have converted the fieldtrack pass to using the loader. Also free loader.Reachparent after we are done with it. Change-Id: Ibc4b29f282e1e4aea363a1b549755e31f84b0295 Reviewed-on: https://go-review.googlesource.com/c/go/+/229322 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jeremy Faller <jeremy@golang.org>
This commit is contained in:
parent
9570fc8f71
commit
245a2f5780
6 changed files with 5 additions and 18 deletions
|
|
@ -45,7 +45,7 @@ type deadcodePass struct {
|
|||
func (d *deadcodePass) init() {
|
||||
d.ldr.InitReachable()
|
||||
d.ifaceMethod = make(map[methodsig]bool)
|
||||
if d.ctxt.Reachparent != nil {
|
||||
if objabi.Fieldtrack_enabled != 0 {
|
||||
d.ldr.Reachparent = make([]loader.Sym, d.ldr.NSym())
|
||||
}
|
||||
heap.Init(&d.wq)
|
||||
|
|
@ -190,7 +190,7 @@ func (d *deadcodePass) mark(symIdx, parent loader.Sym) {
|
|||
if symIdx != 0 && !d.ldr.AttrReachable(symIdx) {
|
||||
d.wq.push(symIdx)
|
||||
d.ldr.SetAttrReachable(symIdx, true)
|
||||
if d.ctxt.Reachparent != nil {
|
||||
if objabi.Fieldtrack_enabled != 0 {
|
||||
d.ldr.Reachparent[symIdx] = parent
|
||||
}
|
||||
if *flagDumpDep {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue