Commit 7e8e9abe authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

cmd/compile: reduce stutter

This is follow-up 1 of 3 to CL 20959.

Passes toolstash -cmp.

Change-Id: I9bddf7d88333fa4755e03ff8a034a35bd01b7855
Reviewed-on: https://go-review.googlesource.com/21052
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 694eadcc
......@@ -457,9 +457,7 @@ func walkclosure(func_ *Node, init *Nodes) *Node {
delete(prealloc, func_)
}
clos = walkexpr(clos, init)
return clos
return walkexpr(clos, init)
}
func typecheckpartialcall(fn *Node, sym *Sym) {
......@@ -662,7 +660,5 @@ func walkpartialcall(n *Node, init *Nodes) *Node {
delete(prealloc, n)
}
clos = walkexpr(clos, init)
return clos
return walkexpr(clos, init)
}
......@@ -143,8 +143,7 @@ func convlit1(n *Node, t *Type, explicit bool) *Node {
// target is invalid type for a constant? leave alone.
case OLITERAL:
if !okforconst[t.Etype] && n.Type.Etype != TNIL {
n = defaultlit(n, nil)
return n
return defaultlit(n, nil)
}
case OLSH, ORSH:
......@@ -204,9 +203,7 @@ func convlit1(n *Node, t *Type, explicit bool) *Node {
n.Type = t
return n
}
n = defaultlit(n, nil)
return n
return defaultlit(n, nil)
}
switch ct {
......@@ -1264,8 +1261,7 @@ func defaultlit(n *Node, t *Type) *Node {
switch ctype {
default:
if t != nil {
n = convlit(n, t)
return n
return convlit(n, t)
}
if n.Val().Ctype() == CTNIL {
......
......@@ -902,12 +902,11 @@ func esc(e *EscState, n *Node, up *Node) {
// Link addresses of captured variables to closure.
case OCLOSURE:
var a *Node
for _, v := range n.Func.Cvars.Slice() {
if v.Op == OXXX { // unnamed out argument; see dcl.go:/^funcargs
continue
}
a = v.Name.Param.Closure
a := v.Name.Param.Closure
if !v.Name.Byval {
a = Nod(OADDR, a, nil)
a.Lineno = v.Lineno
......
......@@ -225,8 +225,7 @@ func reexportdep(n *Node) {
}
func dumpexportconst(s *Sym) {
n := s.Def
n = typecheck(n, Erv)
n := typecheck(s.Def, Erv)
if n == nil || n.Op != OLITERAL {
Fatalf("dumpexportconst: oconst nil: %v", s)
}
......
......@@ -292,8 +292,7 @@ func inlconv2stmt(n *Node) {
// n.Left = inlconv2expr(n.Left)
func inlconv2expr(n *Node) *Node {
r := n.Rlist.First()
r = addinit(r, append(n.Ninit.Slice(), n.Nbody.Slice()...))
return r
return addinit(r, append(n.Ninit.Slice(), n.Nbody.Slice()...))
}
// Turn the rlist (with the return values) of the OINLCALL in
......@@ -509,8 +508,7 @@ func tinlvar(t *Field) *Node {
return t.Nname.Name.Inlvar
}
nblank = typecheck(nblank, Erv|Easgn)
return nblank
return typecheck(nblank, Erv|Easgn)
}
var inlgen int
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment