Source File
map_noswiss.go
Belonging Package
internal/abi
// Copyright 2023 The Go Authors. All rights reserved.// Use of this source code is governed by a BSD-style// license that can be found in the LICENSE file.package abiimport ()// Map constants common to several packages// runtime/runtime-gdb.py:MapTypePrinter contains its own copyconst (// Maximum number of key/elem pairs a bucket can hold.OldMapBucketCountBits = 3 // log2 of number of elements in a bucket.OldMapBucketCount = 1 << OldMapBucketCountBits// Maximum key or elem size to keep inline (instead of mallocing per element).// Must fit in a uint8.// Note: fast map functions cannot handle big elems (bigger than MapMaxElemBytes).OldMapMaxKeyBytes = 128OldMapMaxElemBytes = 128 // Must fit in a uint8.)type OldMapType struct {TypeKey *TypeElem *TypeBucket *Type // internal type representing a hash bucket// function for hashing keys (ptr to key, seed) -> hashHasher func(unsafe.Pointer, uintptr) uintptrKeySize uint8 // size of key slotValueSize uint8 // size of elem slotBucketSize uint16 // size of bucketFlags uint32}// Note: flag values must match those used in the TMAP case// in ../cmd/compile/internal/reflectdata/reflect.go:writeType.func ( *OldMapType) () bool { // store ptr to key instead of key itselfreturn .Flags&1 != 0}func ( *OldMapType) () bool { // store ptr to elem instead of elem itselfreturn .Flags&2 != 0}func ( *OldMapType) () bool { // true if k==k for all keysreturn .Flags&4 != 0}func ( *OldMapType) () bool { // true if we need to update key on an overwritereturn .Flags&8 != 0}func ( *OldMapType) () bool { // true if hash function might panicreturn .Flags&16 != 0}
The pages are generated with Golds v0.7.6. (GOOS=linux GOARCH=amd64)