mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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:
parent
896ac677b5
commit
d7012ca282
37 changed files with 713 additions and 720 deletions
|
|
@ -19,7 +19,7 @@ var makefuncdatasym_nsym int
|
|||
func makefuncdatasym(nameprefix string, funcdatakind int64) *Sym {
|
||||
var nod Node
|
||||
|
||||
sym := LookupN(nameprefix, makefuncdatasym_nsym)
|
||||
sym := lookupN(nameprefix, makefuncdatasym_nsym)
|
||||
makefuncdatasym_nsym++
|
||||
pnod := newname(sym)
|
||||
pnod.Class = PEXTERN
|
||||
|
|
@ -89,7 +89,7 @@ func gvardefx(n *Node, as obj.As) {
|
|||
Fatalf("gvardef nil")
|
||||
}
|
||||
if n.Op != ONAME {
|
||||
Yyerror("gvardef %#v; %v", n.Op, n)
|
||||
yyerror("gvardef %#v; %v", n.Op, n)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -132,7 +132,7 @@ func emitptrargsmap() {
|
|||
if Curfn.Func.Nname.Sym.Name == "_" {
|
||||
return
|
||||
}
|
||||
sym := Lookup(fmt.Sprintf("%s.args_stackmap", Curfn.Func.Nname.Sym.Name))
|
||||
sym := lookup(fmt.Sprintf("%s.args_stackmap", Curfn.Func.Nname.Sym.Name))
|
||||
|
||||
nptr := int(Curfn.Type.ArgWidth() / int64(Widthptr))
|
||||
bv := bvalloc(int32(nptr) * 2)
|
||||
|
|
@ -281,7 +281,7 @@ func allocauto(ptxt *obj.Prog) {
|
|||
}
|
||||
if Stksize >= 1<<31 {
|
||||
setlineno(Curfn)
|
||||
Yyerror("stack frame too large (>2GB)")
|
||||
yyerror("stack frame too large (>2GB)")
|
||||
}
|
||||
|
||||
stkdelta[n] = -Stksize - n.Xoffset
|
||||
|
|
@ -325,7 +325,7 @@ func compile(fn *Node) {
|
|||
|
||||
if fn.Nbody.Len() == 0 {
|
||||
if pure_go || strings.HasPrefix(fn.Func.Nname.Sym.Name, "init.") {
|
||||
Yyerror("missing function body for %q", fn.Func.Nname.Sym.Name)
|
||||
yyerror("missing function body for %q", fn.Func.Nname.Sym.Name)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue