Commit e577a55b authored by Matthew Dempsky's avatar Matthew Dempsky

cmd/compile: change signatlist to []*Type

No need to keep as Nodes when they're all Types anyway.

Change-Id: I8157914ba5b09cadf2263247844680a60233a0f2
Reviewed-on: https://go-review.googlesource.com/37886
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 2a26f580
...@@ -24,7 +24,7 @@ type ptabEntry struct { ...@@ -24,7 +24,7 @@ type ptabEntry struct {
} }
// runtime interface and reflection data structures // runtime interface and reflection data structures
var signatlist []*Node var signatlist []*Type
var itabs []itabEntry var itabs []itabEntry
var ptabs []ptabEntry var ptabs []ptabEntry
...@@ -977,7 +977,7 @@ func typenamesym(t *Type) *Sym { ...@@ -977,7 +977,7 @@ func typenamesym(t *Type) *Sym {
n.Typecheck = 1 n.Typecheck = 1
s.Def = n s.Def = n
signatlist = append(signatlist, typenod(t)) signatlist = append(signatlist, t)
} }
return s.Def.Sym return s.Def.Sym
...@@ -1382,20 +1382,15 @@ ok: ...@@ -1382,20 +1382,15 @@ ok:
func dumptypestructs() { func dumptypestructs() {
// copy types from externdcl list to signatlist // copy types from externdcl list to signatlist
for _, n := range externdcl { for _, n := range externdcl {
if n.Op != OTYPE { if n.Op == OTYPE {
continue signatlist = append(signatlist, n.Type)
} }
signatlist = append(signatlist, n)
} }
// Process signatlist. This can't use range, as entries are // Process signatlist. This can't use range, as entries are
// added to the list while it is being processed. // added to the list while it is being processed.
for i := 0; i < len(signatlist); i++ { for i := 0; i < len(signatlist); i++ {
n := signatlist[i] t := signatlist[i]
if n.Op != OTYPE {
continue
}
t := n.Type
dtypesym(t) dtypesym(t)
if t.Sym != nil { if t.Sym != nil {
dtypesym(ptrto(t)) dtypesym(ptrto(t))
......
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