aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Martí <mvdan@mvdan.cc>2016-11-16 14:28:12 +0000
committerBrad Fitzpatrick <bradfitz@golang.org>2016-11-16 16:00:35 +0000
commit26069e1981ba8500baf35ff5aec79531e4882543 (patch)
tree75181a54be22b33fa595c0f30f32b7aad669b277 /src
parentd338f2e1470227afcadde977f2f2ab07d65088db (diff)
downloadgo-26069e1981ba8500baf35ff5aec79531e4882543.tar.xz
cmd/compile: remove some unused code
The use of these has been removed in recent commits. Change-Id: Iff36a3ee4dcdfe39c40e93e2601f44d3c59f7024 Reviewed-on: https://go-review.googlesource.com/33274 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src')
-rw-r--r--src/cmd/compile/internal/gc/swt.go3
-rw-r--r--src/cmd/compile/internal/gc/walk.go37
2 files changed, 0 insertions, 40 deletions
diff --git a/src/cmd/compile/internal/gc/swt.go b/src/cmd/compile/internal/gc/swt.go
index 98efedc084..3d3496d643 100644
--- a/src/cmd/compile/internal/gc/swt.go
+++ b/src/cmd/compile/internal/gc/swt.go
@@ -11,9 +11,6 @@ const (
switchKindExpr = iota // switch a {...} or switch 5 {...}
switchKindTrue // switch true {...} or switch {...}
switchKindFalse // switch false {...}
-
- // type switch
- switchKindType // switch a.(type) {...}
)
const (
diff --git a/src/cmd/compile/internal/gc/walk.go b/src/cmd/compile/internal/gc/walk.go
index 3adfd465d8..8248d503b3 100644
--- a/src/cmd/compile/internal/gc/walk.go
+++ b/src/cmd/compile/internal/gc/walk.go
@@ -433,38 +433,6 @@ func convFuncName(from, to *Type) string {
panic("unreachable")
}
-// Build name of function: assertI2E etc.
-// If with2suffix is true, the form ending in "2" is returned".
-func assertFuncName(from, to *Type, with2suffix bool) string {
- l := len("assertX2X2")
- if !with2suffix {
- l--
- }
- tkind := to.iet()
- switch from.iet() {
- case 'E':
- switch tkind {
- case 'I':
- return "assertE2I2"[:l]
- case 'E':
- return "assertE2E2"[:l]
- case 'T':
- return "assertE2T2"[:l]
- }
- case 'I':
- switch tkind {
- case 'I':
- return "assertI2I2"[:l]
- case 'E':
- return "assertI2E2"[:l]
- case 'T':
- return "assertI2T2"[:l]
- }
- }
- Fatalf("unknown assert func %c2%c", from.iet(), to.iet())
- panic("unreachable")
-}
-
// The result of walkexpr MUST be assigned back to n, e.g.
// n.Left = walkexpr(n.Left, init)
func walkexpr(n *Node, init *Nodes) *Node {
@@ -2099,11 +2067,6 @@ func isstack(n *Node) bool {
return false
}
-func (n *Node) isGlobal() bool {
- n = outervalue(n)
- return n.Op == ONAME && n.Class == PEXTERN
-}
-
// Do we need a write barrier for the assignment l = r?
func needwritebarrier(l *Node, r *Node) bool {
if !use_writebarrier {