cmd/compile: construct typename in walk instead of SSA conversion

This eliminates references to lineno and
other globals from ssa conversion.

Passes toolstash-check.

Updates #15756

Change-Id: I9792074fab0036b42f454b79139d0b27db913fb5
Reviewed-on: https://go-review.googlesource.com/38721
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
Josh Bleecher Snyder 2017-03-27 14:48:24 -07:00
parent 579297e1e1
commit a0d6d3855f
5 changed files with 38 additions and 20 deletions

View file

@ -1980,6 +1980,15 @@ func liststmt(l []*Node) *Node {
return n
}
func (l Nodes) asblock() *Node {
n := nod(OBLOCK, nil, nil)
n.List = l
if l.Len() != 0 {
n.Pos = l.First().Pos
}
return n
}
func ngotype(n *Node) *Sym {
if n.Type != nil {
return typenamesym(n.Type)