cmd/compile: minor cleanups

Some minor scoping cleanups found by a very old version of grind.

Change-Id: I1d373817586445fc87e38305929097b652696fdd
Reviewed-on: https://go-review.googlesource.com/21064
Run-TryBot: Dave Cheney <dave@cheney.net>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Dave Cheney 2016-03-24 20:57:53 +11:00
parent 633e41432c
commit b9feb91f32
8 changed files with 23 additions and 39 deletions

View file

@ -3133,9 +3133,7 @@ func (p *parser) hidden_funarg() *Node {
s3 := p.hidden_type()
s4 := p.oliteral()
var t *Type
t = typ(TARRAY)
t := typ(TARRAY)
t.Bound = -1
t.Type = s3
@ -3159,19 +3157,16 @@ func (p *parser) hidden_structdcl() *Node {
s2 := p.hidden_type()
s3 := p.oliteral()
var s *Sym
var pkg *Pkg
var ss *Node
if s1 != nil && s1.Name != "?" {
ss = Nod(ODCLFIELD, newname(s1), typenod(s2))
ss.SetVal(s3)
} else {
s = s2.Sym
s := s2.Sym
if s == nil && Isptr[s2.Etype] {
s = s2.Type.Sym
}
pkg = importpkg
pkg := importpkg
if s1 != nil {
pkg = s1.Pkg
}