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