cmd/compile/internal/gc: make Nod private
Follow up to CL 29134. Generated with gofmt -r 'Nod -> nod', plus
three manual adjustments to the comments in syntax/parser.go
Change-Id: I02920f7ab10c70b6e850457b42d5fe35f1f3821a
Reviewed-on: https://go-review.googlesource.com/29136
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
diff --git a/src/cmd/compile/internal/gc/inl.go b/src/cmd/compile/internal/gc/inl.go
index 6832cdd..6687b1a 100644
--- a/src/cmd/compile/internal/gc/inl.go
+++ b/src/cmd/compile/internal/gc/inl.go
@@ -592,7 +592,7 @@
if ln.Op == ONAME {
ln.Name.Inlvar = typecheck(inlvar(ln), Erv)
if ln.Class == PPARAM || ln.Name.Param.Stackcopy != nil && ln.Name.Param.Stackcopy.Class == PPARAM {
- ninit.Append(Nod(ODCL, ln.Name.Inlvar, nil))
+ ninit.Append(nod(ODCL, ln.Name.Inlvar, nil))
}
}
}
@@ -610,7 +610,7 @@
i++
}
- ninit.Append(Nod(ODCL, m, nil))
+ ninit.Append(nod(ODCL, m, nil))
retvars = append(retvars, m)
}
@@ -628,7 +628,7 @@
if t == nil {
Fatalf("method call unknown receiver type: %+v", n)
}
- as := Nod(OAS, tinlvar(t), n.Left.Left)
+ as := nod(OAS, tinlvar(t), n.Left.Left)
if as != nil {
as = typecheck(as, Etop)
ninit.Append(as)
@@ -673,7 +673,7 @@
}
// assign arguments to the parameters' temp names
- as := Nod(OAS2, nil, nil)
+ as := nod(OAS2, nil, nil)
as.Rlist.Set(n.List.Slice())
li := 0
@@ -763,15 +763,15 @@
// turn the variadic args into a slice.
if variadic {
- as = Nod(OAS, vararg, nil)
+ as = nod(OAS, vararg, nil)
if varargcount == 0 {
as.Right = nodnil()
as.Right.Type = varargtype
} else {
vararrtype := typArray(varargtype.Elem(), int64(varargcount))
- as.Right = Nod(OCOMPLIT, nil, typenod(vararrtype))
+ as.Right = nod(OCOMPLIT, nil, typenod(vararrtype))
as.Right.List.Set(varargs)
- as.Right = Nod(OSLICE, as.Right, nil)
+ as.Right = nod(OSLICE, as.Right, nil)
}
as = typecheck(as, Etop)
@@ -780,7 +780,7 @@
// zero the outparams
for _, n := range retvars {
- as = Nod(OAS, n, nil)
+ as = nod(OAS, n, nil)
as = typecheck(as, Etop)
ninit.Append(as)
}
@@ -797,7 +797,7 @@
body := subst.list(fn.Func.Inl)
- lab := Nod(OLABEL, retlabel, nil)
+ lab := nod(OLABEL, retlabel, nil)
lab.Used = true // avoid 'not used' when function doesn't have return
body = append(body, lab)
@@ -805,7 +805,7 @@
//dumplist("ninit post", ninit);
- call := Nod(OINLCALL, nil, nil)
+ call := nod(OINLCALL, nil, nil)
call.Ninit.Set(ninit.Slice())
call.Nbody.Set(body)
@@ -940,12 +940,12 @@
// dump("Return before substitution", n);
case ORETURN:
- m := Nod(OGOTO, subst.retlabel, nil)
+ m := nod(OGOTO, subst.retlabel, nil)
m.Ninit.Set(subst.list(n.Ninit))
if len(subst.retvars) != 0 && n.List.Len() != 0 {
- as := Nod(OAS2, nil, nil)
+ as := nod(OAS2, nil, nil)
// Make a shallow copy of retvars.
// Otherwise OINLCALL.Rlist will be the same list,
@@ -965,7 +965,7 @@
return m
case OGOTO, OLABEL:
- m := Nod(OXXX, nil, nil)
+ m := nod(OXXX, nil, nil)
*m = *n
m.Ninit.Set(nil)
p := fmt.Sprintf("%s·%d", n.Left.Sym.Name, inlgen)
@@ -973,7 +973,7 @@
return m
default:
- m := Nod(OXXX, nil, nil)
+ m := nod(OXXX, nil, nil)
*m = *n
m.Ninit.Set(nil)