cmd/compile: remove nodesOrNodeList outside of syntax.go
Passes toolstash -cmp.
Update #14473.
Change-Id: I717ebd948dfc8faf8b9ef5aa02c67484af618d18
Reviewed-on: https://go-review.googlesource.com/20359
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
diff --git a/src/cmd/compile/internal/gc/inl.go b/src/cmd/compile/internal/gc/inl.go
index c192b32..ac93c6b 100644
--- a/src/cmd/compile/internal/gc/inl.go
+++ b/src/cmd/compile/internal/gc/inl.go
@@ -87,7 +87,7 @@
savefn := Curfn
Curfn = fn
- typechecklist(fn.Func.Inl, Etop)
+ typechecklist(fn.Func.Inl.Slice(), Etop)
Curfn = savefn
safemode = save_safemode
@@ -170,7 +170,7 @@
}
// Look for anything we want to punt on.
-func ishairylist(ll nodesOrNodeList, budget *int) bool {
+func ishairylist(ll Nodes, budget *int) bool {
for it := nodeSeqIterate(ll); !it.Done(); it.Next() {
if ishairy(it.N(), budget) {
return true
@@ -245,7 +245,7 @@
// Inlcopy and inlcopylist recursively copy the body of a function.
// Any name-like node of non-local class is marked for re-export by adding it to
// the exportlist.
-func inlcopylist(ll nodesOrNodeList) []*Node {
+func inlcopylist(ll []*Node) []*Node {
s := make([]*Node, 0, nodeSeqLen(ll))
for it := nodeSeqIterate(ll); !it.Done(); it.Next() {
s = append(s, inlcopy(it.N()))
@@ -270,9 +270,9 @@
}
m.Left = inlcopy(n.Left)
m.Right = inlcopy(n.Right)
- setNodeSeq(&m.List, inlcopylist(n.List))
- setNodeSeq(&m.Rlist, inlcopylist(n.Rlist))
- setNodeSeq(&m.Ninit, inlcopylist(n.Ninit))
+ setNodeSeq(&m.List, inlcopylist(n.List.Slice()))
+ setNodeSeq(&m.Rlist, inlcopylist(n.Rlist.Slice()))
+ setNodeSeq(&m.Ninit, inlcopylist(n.Ninit.Slice()))
m.Nbody.Set(inlcopylist(n.Nbody.Slice()))
return m
@@ -324,7 +324,7 @@
return s
}
-func inlnodelist(l nodesOrNodeList) {
+func inlnodelist(l Nodes) {
for it := nodeSeqIterate(l); !it.Done(); it.Next() {
inlnode(it.P())
}
@@ -899,7 +899,7 @@
// pristine ->inl body of the function while substituting references
// to input/output parameters with ones to the tmpnames, and
// substituting returns with assignments to the output.
-func inlsubstlist(ll nodesOrNodeList) []*Node {
+func inlsubstlist(ll Nodes) []*Node {
s := make([]*Node, 0, nodeSeqLen(ll))
for it := nodeSeqIterate(ll); !it.Done(); it.Next() {
s = append(s, inlsubst(it.N()))
@@ -949,7 +949,7 @@
appendNodeSeqNode(&m.Ninit, as)
}
- typechecklist(m.Ninit, Etop)
+ typechecklist(m.Ninit.Slice(), Etop)
typecheck(&m, Etop)
// dump("Return after substitution", m);
@@ -984,7 +984,7 @@
}
// Plaster over linenumbers
-func setlnolist(ll nodesOrNodeList, lno int32) {
+func setlnolist(ll Nodes, lno int32) {
for it := nodeSeqIterate(ll); !it.Done(); it.Next() {
setlno(it.N(), lno)
}