cmd/compile: change Node fields from *NodeList to Nodes

Compile time is about the same.  Getting rid of the nodeSeq interfaces,
particularly nodeSeqIterate, should produce some improvements.

Passes toolstash -cmp.

Update #14473.

Change-Id: I678abafdd9129c6cccb0ec980511932eaed496a0
Reviewed-on: https://go-review.googlesource.com/20343
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Ian Lance Taylor 2016-03-07 14:32:18 -08:00
parent a81283d5d9
commit 6c4e90a99e
3 changed files with 14 additions and 12 deletions

View file

@ -489,10 +489,10 @@ func colas(left *NodeList, right *NodeList, lno int32) *Node {
setNodeSeq(&as.Rlist, right)
as.Colas = true
as.Lineno = lno
colasdefn(left, as)
colasdefn(as.List, as)
// make the tree prettier; not necessary
if count(left) == 1 && count(right) == 1 {
if nodeSeqLen(as.List) == 1 && nodeSeqLen(as.Rlist) == 1 {
as.Left = nodeSeqFirst(as.List)
as.Right = nodeSeqFirst(as.Rlist)
setNodeSeq(&as.List, nil)