mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: more nodeSeq conversions
Found by temporarily flipping fields from *NodeList to Nodes and fixing all the compilation errors. This CL does not actually change any fields. Passes toolstash -cmp. Update #14473. Change-Id: Ib98fa37e8752f96358224c973a743618a6a0e736 Reviewed-on: https://go-review.googlesource.com/20320 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
c3dfad5df9
commit
2a68c6c27c
15 changed files with 234 additions and 229 deletions
|
|
@ -849,7 +849,7 @@ func (p *exporter) node(n *Node) {
|
|||
|
||||
// expressions
|
||||
case OMAKEMAP, OMAKECHAN, OMAKESLICE:
|
||||
if p.bool(n.List != nil) {
|
||||
if p.bool(nodeSeqLen(n.List) != 0) {
|
||||
p.nodeList(n.List) // TODO(gri) do we still need to export this?
|
||||
}
|
||||
p.nodesOrNil(n.Left, n.Right)
|
||||
|
|
@ -971,7 +971,7 @@ func (p *exporter) node(n *Node) {
|
|||
p.nodeList(n.Nbody)
|
||||
|
||||
case ORANGE:
|
||||
if p.bool(n.List != nil) {
|
||||
if p.bool(nodeSeqLen(n.List) != 0) {
|
||||
p.nodeList(n.List)
|
||||
}
|
||||
p.node(n.Right)
|
||||
|
|
@ -983,7 +983,7 @@ func (p *exporter) node(n *Node) {
|
|||
p.nodeList(n.List)
|
||||
|
||||
case OCASE, OXCASE:
|
||||
if p.bool(n.List != nil) {
|
||||
if p.bool(nodeSeqLen(n.List) != 0) {
|
||||
p.nodeList(n.List)
|
||||
}
|
||||
p.nodeList(n.Nbody)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue