cmd/compile, cmd/asm: remove Link.Plists

Link.Plists never contained more than one Plist, and sometimes none.
Passing around the Plist being worked on is straightforward and makes
the data flow easier to follow.

Change-Id: I79cb30cb2bd3d319fdbb1dfa5d35b27fcb748e5c
Reviewed-on: https://go-review.googlesource.com/37169
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
Heschi Kreinick 2017-02-17 16:52:16 -05:00
parent ac4a86523c
commit ac7761e1a4
9 changed files with 83 additions and 117 deletions

View file

@ -368,7 +368,10 @@ func compile(fn *Node) {
return
}
newplist()
plist := new(obj.Plist)
pc = Ctxt.NewProg()
Clearp(pc)
plist.Firstpc = pc
setlineno(Curfn)
@ -430,6 +433,7 @@ func compile(fn *Node) {
genssa(ssafn, ptxt, gcargs, gclocals)
ssafn.Free()
obj.Flushplist(Ctxt, plist) // convert from Prog list to machine code
}
func gendebug(fn *obj.LSym, decls []*Node) {