mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: change order.go to use nodeSeq
Passes toolstash -cmp Update #14473. Change-Id: I15b35d40a5ec1f4355ee38bc6d131920933ac95c Reviewed-on: https://go-review.googlesource.com/20237 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
16e2e95dd9
commit
80e5b52566
3 changed files with 105 additions and 121 deletions
|
|
@ -2366,23 +2366,15 @@ func listtreecopy(l *NodeList, lineno int32) *NodeList {
|
|||
return out
|
||||
}
|
||||
|
||||
func liststmt(l *NodeList) *Node {
|
||||
func liststmt(l nodesOrNodeList) *Node {
|
||||
n := Nod(OBLOCK, nil, nil)
|
||||
n.List = l
|
||||
if l != nil {
|
||||
n.Lineno = l.N.Lineno
|
||||
setNodeSeq(&n.List, l)
|
||||
if nodeSeqLen(l) != 0 {
|
||||
n.Lineno = nodeSeqFirst(l).Lineno
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func liststmtslice(l []*Node) *Node {
|
||||
var ll *NodeList
|
||||
for _, n := range l {
|
||||
ll = list(ll, n)
|
||||
}
|
||||
return liststmt(ll)
|
||||
}
|
||||
|
||||
// return nelem of list
|
||||
func structcount(t *Type) int {
|
||||
var s Iter
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue