aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/alg.go
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2014-12-27 20:32:11 -0800
committerKeith Randall <khr@golang.org>2014-12-28 18:42:39 +0000
commitb1f29b2d443f5c8df15d6702937ae786660375be (patch)
tree08cf747849f665bc1958ca8473100defb1f2afff /src/runtime/alg.go
parent2c987e16937a6abf907ab230b04d42c071a388f5 (diff)
downloadgo-b1f29b2d443f5c8df15d6702937ae786660375be.tar.xz
runtime: get rid of goalg, no longer needed
The goalg function was a holdover from when we had algorithm tables in both C and Go. It is no longer needed. Change-Id: Ia0c1af35bef3497a899f22084a1a7b42daae72a0 Reviewed-on: https://go-review.googlesource.com/2099 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/runtime/alg.go')
-rw-r--r--src/runtime/alg.go13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/runtime/alg.go b/src/runtime/alg.go
index 1bed3c461b..15e3abe368 100644
--- a/src/runtime/alg.go
+++ b/src/runtime/alg.go
@@ -131,7 +131,7 @@ func interhash(p unsafe.Pointer, s, h uintptr) uintptr {
return h
}
t := tab._type
- fn := goalg(t.alg).hash
+ fn := t.alg.hash
if fn == nil {
panic(errorString("hash of unhashable type " + *t._string))
}
@@ -148,7 +148,7 @@ func nilinterhash(p unsafe.Pointer, s, h uintptr) uintptr {
if t == nil {
return h
}
- fn := goalg(t.alg).hash
+ fn := t.alg.hash
if fn == nil {
panic(errorString("hash of unhashable type " + *t._string))
}
@@ -219,7 +219,7 @@ func efaceeq(p, q interface{}) bool {
if t == nil {
return true
}
- eq := goalg(t.alg).equal
+ eq := t.alg.equal
if eq == nil {
panic(errorString("comparing uncomparable type " + *t._string))
}
@@ -241,7 +241,7 @@ func ifaceeq(p, q interface {
return true
}
t := xtab._type
- eq := goalg(t.alg).equal
+ eq := t.alg.equal
if eq == nil {
panic(errorString("comparing uncomparable type " + *t._string))
}
@@ -285,11 +285,6 @@ func memclrBytes(b []byte) {
memclr(s.array, uintptr(s.len))
}
-// TODO(dvyukov): remove when Type is converted to Go and contains *typeAlg.
-func goalg(a unsafe.Pointer) *typeAlg {
- return (*typeAlg)(a)
-}
-
// used in asm_{386,amd64}.s
const hashRandomBytes = ptrSize / 4 * 64