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

@ -21,7 +21,7 @@ func unsafenmagic(nn *Node) *Node {
}
if args.Len() == 0 {
Yyerror("missing argument for %v", s)
yyerror("missing argument for %v", s)
return nil
}
@ -60,7 +60,7 @@ func unsafenmagic(nn *Node) *Node {
case ODOT, ODOTPTR:
break
case OCALLPART:
Yyerror("invalid expression %v: argument is a method value", nn)
yyerror("invalid expression %v: argument is a method value", nn)
goto ret
default:
goto bad
@ -74,7 +74,7 @@ func unsafenmagic(nn *Node) *Node {
// but accessing f must not otherwise involve
// indirection via embedded pointer types.
if r1.Left != base {
Yyerror("invalid expression %v: selector implies indirection of embedded %v", nn, r1.Left)
yyerror("invalid expression %v: selector implies indirection of embedded %v", nn, r1.Left)
goto ret
}
fallthrough
@ -92,12 +92,12 @@ func unsafenmagic(nn *Node) *Node {
}
if args.Len() > 1 {
Yyerror("extra arguments for %v", s)
yyerror("extra arguments for %v", s)
}
goto ret
bad:
Yyerror("invalid expression %v", nn)
yyerror("invalid expression %v", nn)
ret:
// any side effects disappear; ignore init