mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: convert subr, swt, typecheck to nodeSeq
Passes toolstash -cmp. Update #14473. Change-Id: I836197810405cde72cbb49fef7e163a517601f9c Reviewed-on: https://go-review.googlesource.com/20242 Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
parent
3da1a26fba
commit
65c4b55aba
5 changed files with 254 additions and 278 deletions
|
|
@ -391,12 +391,12 @@ func list1(n *Node) *NodeList {
|
|||
if n == nil {
|
||||
return nil
|
||||
}
|
||||
if n.Op == OBLOCK && n.Ninit == nil {
|
||||
if n.Op == OBLOCK && nodeSeqLen(n.Ninit) == 0 {
|
||||
// Flatten list and steal storage.
|
||||
// Poison pointer to catch errant uses.
|
||||
l := n.List
|
||||
|
||||
n.List = nil
|
||||
setNodeSeq(&n.List, nil)
|
||||
return l
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue