Commit 92607fdd authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

cmd/compile: split dumptypestructs further

This is preparatory cleanup to make future changes clearer.

Change-Id: I20fb9c78257de61b8bd096fce6b1e751995c01f2
Reviewed-on: https://go-review.googlesource.com/41818
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 3ddf6501
......@@ -137,7 +137,8 @@ func dumpobj1(outfile string, mode int) {
dumpglobls()
addptabs()
dumptypestructs(externdcl)
addsignats(externdcl)
dumpsignats()
dumptabs()
dumpimportstrings()
dumpbasictypes()
......
......@@ -1404,14 +1404,16 @@ func addsignat(t *types.Type) {
signatlist[formalType(t)] = true
}
func dumptypestructs(dcls []*Node) {
func addsignats(dcls []*Node) {
// copy types from dcl list to signatlist
for _, n := range dcls {
if n.Op == OTYPE {
addsignat(n.Type)
}
}
}
func dumpsignats() {
// Process signatlist. Use a loop, as dtypesym adds
// entries to signatlist while it is being processed.
signats := make([]typeAndStr, len(signatlist))
......
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