const c0 … const c1 … func memhash0(p unsafe.Pointer, h uintptr) uintptr { … } func memhash8(p unsafe.Pointer, h uintptr) uintptr { … } func memhash16(p unsafe.Pointer, h uintptr) uintptr { … } func memhash128(p unsafe.Pointer, h uintptr) uintptr { … } //go:nosplit func memhash_varlen(p unsafe.Pointer, h uintptr) uintptr { … } var useAeshash … // memhash should be an internal detail, // but widely used packages access it using linkname. // Notable members of the hall of shame include: // - github.com/aacfactory/fns // - github.com/dgraph-io/ristretto // - github.com/minio/simdjson-go // - github.com/nbd-wtf/go-nostr // - github.com/outcaste-io/ristretto // - github.com/puzpuzpuz/xsync/v2 // - github.com/puzpuzpuz/xsync/v3 // - github.com/authzed/spicedb // - github.com/pingcap/badger // // Do not remove or change the type signature. // See go.dev/issue/67401. // //go:linkname memhash func memhash(p unsafe.Pointer, h, s uintptr) uintptr func memhash32(p unsafe.Pointer, h uintptr) uintptr func memhash64(p unsafe.Pointer, h uintptr) uintptr // strhash should be an internal detail, // but widely used packages access it using linkname. // Notable members of the hall of shame include: // - github.com/aristanetworks/goarista // - github.com/bytedance/sonic // - github.com/bytedance/go-tagexpr/v2 // - github.com/cloudwego/dynamicgo // - github.com/v2fly/v2ray-core/v5 // // Do not remove or change the type signature. // See go.dev/issue/67401. // //go:linkname strhash func strhash(p unsafe.Pointer, h uintptr) uintptr func strhashFallback(a unsafe.Pointer, h uintptr) uintptr { … } func f32hash(p unsafe.Pointer, h uintptr) uintptr { … } func f64hash(p unsafe.Pointer, h uintptr) uintptr { … } func c64hash(p unsafe.Pointer, h uintptr) uintptr { … } func c128hash(p unsafe.Pointer, h uintptr) uintptr { … } func interhash(p unsafe.Pointer, h uintptr) uintptr { … } // nilinterhash should be an internal detail, // but widely used packages access it using linkname. // Notable members of the hall of shame include: // - github.com/anacrolix/stm // - github.com/aristanetworks/goarista // // Do not remove or change the type signature. // See go.dev/issue/67401. // //go:linkname nilinterhash func nilinterhash(p unsafe.Pointer, h uintptr) uintptr { … } // typehash computes the hash of the object of type t at address p. // h is the seed. // This function is seldom used. Most maps use for hashing either // fixed functions (e.g. f32hash) or compiler-generated functions // (e.g. for a type like struct { x, y string }). This implementation // is slower but more general and is used for hashing interface types // (called from interhash or nilinterhash, above) or for hashing in // maps generated by reflect.MapOf (reflect_typehash, below). // Note: this function must match the compiler generated // functions exactly. See issue 37716. // // typehash should be an internal detail, // but widely used packages access it using linkname. // Notable members of the hall of shame include: // - github.com/puzpuzpuz/xsync/v2 // - github.com/puzpuzpuz/xsync/v3 // // Do not remove or change the type signature. // See go.dev/issue/67401. // //go:linkname typehash func typehash(t *_type, p unsafe.Pointer, h uintptr) uintptr { … } func mapKeyError(t *maptype, p unsafe.Pointer) error { … } func mapKeyError2(t *_type, p unsafe.Pointer) error { … } //go:linkname reflect_typehash reflect.typehash func reflect_typehash(t *_type, p unsafe.Pointer, h uintptr) uintptr { … } func memequal0(p, q unsafe.Pointer) bool { … } func memequal8(p, q unsafe.Pointer) bool { … } func memequal16(p, q unsafe.Pointer) bool { … } func memequal32(p, q unsafe.Pointer) bool { … } func memequal64(p, q unsafe.Pointer) bool { … } func memequal128(p, q unsafe.Pointer) bool { … } func f32equal(p, q unsafe.Pointer) bool { … } func f64equal(p, q unsafe.Pointer) bool { … } func c64equal(p, q unsafe.Pointer) bool { … } func c128equal(p, q unsafe.Pointer) bool { … } func strequal(p, q unsafe.Pointer) bool { … } func interequal(p, q unsafe.Pointer) bool { … } func nilinterequal(p, q unsafe.Pointer) bool { … } func efaceeq(t *_type, x, y unsafe.Pointer) bool { … } func ifaceeq(tab *itab, x, y unsafe.Pointer) bool { … } // Testing adapters for hash quality tests (see hash_test.go) // // stringHash should be an internal detail, // but widely used packages access it using linkname. // Notable members of the hall of shame include: // - github.com/k14s/starlark-go // // Do not remove or change the type signature. // See go.dev/issue/67401. // //go:linkname stringHash func stringHash(s string, seed uintptr) uintptr { … } func bytesHash(b []byte, seed uintptr) uintptr { … } func int32Hash(i uint32, seed uintptr) uintptr { … } func int64Hash(i uint64, seed uintptr) uintptr { … } func efaceHash(i any, seed uintptr) uintptr { … } func ifaceHash(i interface { … } const hashRandomBytes … var aeskeysched … var hashkey … func alginit() { … } func initAlgAES() { … } // Note: These routines perform the read with a native endianness. func readUnaligned32(p unsafe.Pointer) uint32 { … } func readUnaligned64(p unsafe.Pointer) uint64 { … }