mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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:
parent
579297e1e1
commit
a0d6d3855f
5 changed files with 38 additions and 20 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue