Commit a2119aca authored by Robert Griesemer's avatar Robert Griesemer

cmd/compile/internal/gc: make funcsyms a []*Node

Remove another use of NodeList.

Change-Id: Ice07eff862caf715f722dec7829006bf71715b07
Reviewed-on: https://go-review.googlesource.com/15432Reviewed-by: 's avatarDave Cheney <dave@cheney.net>
parent 88150935
...@@ -1499,5 +1499,5 @@ func makefuncsym(s *Sym) { ...@@ -1499,5 +1499,5 @@ func makefuncsym(s *Sym) {
s1 := funcsym(s) s1 := funcsym(s)
s1.Def = newfuncname(s1) s1.Def = newfuncname(s1)
s1.Def.Func.Shortname = newname(s) s1.Def.Func.Shortname = newname(s)
funcsyms = list(funcsyms, s1.Def) funcsyms = append(funcsyms, s1.Def)
} }
...@@ -589,7 +589,7 @@ var exportlist []*Node ...@@ -589,7 +589,7 @@ var exportlist []*Node
var importlist []*Node // imported functions and methods with inlinable bodies var importlist []*Node // imported functions and methods with inlinable bodies
var funcsyms *NodeList var funcsyms []*Node
var dclcontext uint8 // PEXTERN/PAUTO var dclcontext uint8 // PEXTERN/PAUTO
......
...@@ -104,8 +104,6 @@ func dumpobj() { ...@@ -104,8 +104,6 @@ func dumpobj() {
} }
func dumpglobls() { func dumpglobls() {
var n *Node
// add globals // add globals
for _, n := range externdcl { for _, n := range externdcl {
if n.Op != ONAME { if n.Op != ONAME {
...@@ -125,8 +123,7 @@ func dumpglobls() { ...@@ -125,8 +123,7 @@ func dumpglobls() {
ggloblnod(n) ggloblnod(n)
} }
for l := funcsyms; l != nil; l = l.Next { for _, n := range funcsyms {
n = l.N
dsymptr(n.Sym, 0, n.Sym.Def.Func.Shortname.Sym, 0) dsymptr(n.Sym, 0, n.Sym.Def.Func.Shortname.Sym, 0)
ggloblsym(n.Sym, int32(Widthptr), obj.DUPOK|obj.RODATA) ggloblsym(n.Sym, int32(Widthptr), obj.DUPOK|obj.RODATA)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment