summaryrefslogtreecommitdiff
path: root/src/runtime/alg.go
diff options
context:
space:
mode:
authorCherry Zhang <cherryyz@google.com>2020-10-28 09:12:20 -0400
committerCherry Zhang <cherryyz@google.com>2020-10-28 09:12:20 -0400
commita16e30d162c1c7408db7821e7b9513cefa09c6ca (patch)
treeaf752ba9ba44c547df39bb0af9bff79f610ba9d5 /src/runtime/alg.go
parent91e4d2d57bc341dd82c98247117114c851380aef (diff)
parentcf6cfba4d5358404dd890f6025e573a4b2156543 (diff)
downloadgo-git-dev.link.tar.gz
[dev.link] all: merge branch 'master' into dev.linkdev.link
Clean merge. Change-Id: Ia7b2808bc649790198d34c226a61d9e569084dc5
Diffstat (limited to 'src/runtime/alg.go')
-rw-r--r--src/runtime/alg.go21
1 files changed, 1 insertions, 20 deletions
diff --git a/src/runtime/alg.go b/src/runtime/alg.go
index 0af48ab25c..2ec3fc3658 100644
--- a/src/runtime/alg.go
+++ b/src/runtime/alg.go
@@ -15,25 +15,6 @@ const (
c1 = uintptr((8-sys.PtrSize)/4*3267000013 + (sys.PtrSize-4)/4*23344194077549503)
)
-// type algorithms - known to compiler
-const (
- alg_NOEQ = iota
- alg_MEM0
- alg_MEM8
- alg_MEM16
- alg_MEM32
- alg_MEM64
- alg_MEM128
- alg_STRING
- alg_INTER
- alg_NILINTER
- alg_FLOAT32
- alg_FLOAT64
- alg_CPLX64
- alg_CPLX128
- alg_max
-)
-
func memhash0(p unsafe.Pointer, h uintptr) uintptr {
return h
}
@@ -185,7 +166,7 @@ func typehash(t *_type, p unsafe.Pointer, h uintptr) uintptr {
return strhash(p, h)
case kindInterface:
i := (*interfacetype)(unsafe.Pointer(t))
- if len(i.mhdr) == 0 {
+ if i.isEmpty() {
return nilinterhash(p, h)
}
return interhash(p, h)