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:
Ian Lance Taylor 2016-03-04 17:28:07 -08:00
parent 3da1a26fba
commit 65c4b55aba
5 changed files with 254 additions and 278 deletions

View file

@ -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
}