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

@ -225,7 +225,7 @@ func formatErrorf(format string, args ...interface{}) {
Fatalf(format, args...)
}
Yyerror("cannot import %q due to version skew - reinstall package (%s)",
yyerror("cannot import %q due to version skew - reinstall package (%s)",
importpkg.Path, fmt.Sprintf(format, args...))
errorexit()
}
@ -287,10 +287,10 @@ func (p *importer) pkg() *Pkg {
pkg.Name = name
numImport[name]++
} else if pkg.Name != name {
Yyerror("conflicting package names %s and %s for path %q", pkg.Name, name, path)
yyerror("conflicting package names %s and %s for path %q", pkg.Name, name, path)
}
if myimportpath != "" && path == myimportpath {
Yyerror("import %q: package depends on %q (import cycle)", importpkg.Path, path)
yyerror("import %q: package depends on %q (import cycle)", importpkg.Path, path)
errorexit()
}
p.pkgList = append(p.pkgList, pkg)
@ -405,7 +405,7 @@ func (p *importer) importtype(pt, t *Type) {
// Collect the types and verify identity later.
p.cmpList = append(p.cmpList, struct{ pt, t *Type }{pt, t})
} else if !eqtype(pt.Orig, t) {
Yyerror("inconsistent definition for type %v during import\n\t%L (in %q)\n\t%L (in %q)", pt.Sym, pt, pt.Sym.Importdef.Path, t, importpkg.Path)
yyerror("inconsistent definition for type %v during import\n\t%L (in %q)\n\t%L (in %q)", pt.Sym, pt, pt.Sym.Importdef.Path, t, importpkg.Path)
}
}
@ -905,7 +905,7 @@ func (p *importer) node() *Node {
case OXDOT:
// see parser.new_dotname
return NodSym(OXDOT, p.expr(), p.fieldSym())
return nodSym(OXDOT, p.expr(), p.fieldSym())
// case ODOTTYPE, ODOTTYPE2:
// unreachable - mapped to case ODOTTYPE below by exporter