func mapaccess1(t *maptype, h *hmap, key unsafe.Pointer) unsafe.Pointer {
callerpc := getcallerpc()
pc := funcPC(mapaccess1)
racereadpc(unsafe.Pointer(h), callerpc, pc)
raceReadObjectPC(t.key, key, callerpc, pc)
}
msanread(key, t.key.size)
}
if
t.hashMightPanic() {
t.hasher(key, 0)
return
unsafe.Pointer(&zeroVal[0])
}
throw
(
"concurrent map read and map write"
)
}
m := bucketMask(h.B)
if
!h.sameSizeGrow() {
m >>= 1
}
oldb := (*bmap)(add(c, (hash&m)*uintptr(t.bucketsize)))
b = oldb
}
}
for
; b != nil; b = b.overflow(t) {
for
i := uintptr(0); i < bucketCnt; i++ {
if
b.tophash[i] == emptyRest {
break
bucketloop
}
continue
}
if
t.indirectkey() {
k = *((*unsafe.Pointer)(k))
}
e := add(unsafe.Pointer(b), dataOffset+bucketCnt*uintptr(t.keysize)+i*uintptr(t.elemsize))
if
t.indirectelem() {
e = *((*unsafe.Pointer)(e))
}
return
e
}
}
}