cmd/compile/internal/gc: unexport more helper functions

After the removal of the old backend many types are no longer referenced
outside internal/gc. Make these functions private so that tools like
honnef.co/go/unused can spot when they become dead code. In doing so
this CL identified several previously public helpers which are no longer
used, so removes them.

This should be the last of the public functions.

Change-Id: I7e9c4e72f86f391b428b9dddb6f0d516529706c3
Reviewed-on: https://go-review.googlesource.com/29134
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-09-15 15:45:10 +10:00
parent 896ac677b5
commit d7012ca282
37 changed files with 713 additions and 720 deletions

View file

@ -103,18 +103,18 @@ func lexinit() {
idealbool = typ(TBOOL)
s := Pkglookup("true", builtinpkg)
s.Def = Nodbool(true)
s.Def.Sym = Lookup("true")
s.Def = nodbool(true)
s.Def.Sym = lookup("true")
s.Def.Name = new(Name)
s.Def.Type = idealbool
s = Pkglookup("false", builtinpkg)
s.Def = Nodbool(false)
s.Def.Sym = Lookup("false")
s.Def = nodbool(false)
s.Def.Sym = lookup("false")
s.Def.Name = new(Name)
s.Def.Type = idealbool
s = Lookup("_")
s = lookup("_")
s.Block = -100
s.Def = Nod(ONAME, nil, nil)
s.Def.Sym = s
@ -361,7 +361,7 @@ func makeErrorInterface() *Type {
rcvr := typ(TSTRUCT)
rcvr.StructType().Funarg = FunargRcvr
field := newField()
field.Type = Ptrto(typ(TSTRUCT))
field.Type = ptrto(typ(TSTRUCT))
rcvr.SetFields([]*Field{field})
in := typ(TSTRUCT)
@ -380,7 +380,7 @@ func makeErrorInterface() *Type {
t := typ(TINTER)
field = newField()
field.Sym = Lookup("Error")
field.Sym = lookup("Error")
field.Type = f
t.SetFields([]*Field{field})
@ -448,7 +448,7 @@ func finishUniverse() {
if s.Def == nil || (s.Name == "any" && Debug['A'] == 0) {
continue
}
s1 := Lookup(s.Name)
s1 := lookup(s.Name)
if s1.Def != nil {
continue
}
@ -461,5 +461,5 @@ func finishUniverse() {
nodfp.Type = Types[TINT32]
nodfp.Xoffset = 0
nodfp.Class = PPARAM
nodfp.Sym = Lookup(".fp")
nodfp.Sym = lookup(".fp")
}