go/src/internal/runtime/maps/map.go

// Extracts the H1 portion of a hash: the 57 upper bits.
// TODO(prattmic): what about 32-bit systems?
func h1(h uintptr) uintptr {}

// Extracts the H2 portion of a hash: the 7 bits not used for h1.
//
// These are used as an occupied control byte.
func h2(h uintptr) uintptr {}

type Map

func depthToShift(depth uint8) uint8 {}

// If m is non-nil, it should be used rather than allocating.
//
// maxAlloc should be runtime.maxAlloc.
//
// TODO(prattmic): Put maxAlloc somewhere accessible.
func NewMap(mt *abi.SwissMapType, hint uintptr, m *Map, maxAlloc uintptr) *Map {}

func NewEmptyMap() *Map {}

func (m *Map) directoryIndex(hash uintptr) uintptr {}

func (m *Map) directoryAt(i uintptr) *table {}

func (m *Map) directorySet(i uintptr, nt *table) {}

func (m *Map) replaceTable(nt *table) {}

func (m *Map) installTableSplit(old, left, right *table) {}

func (m *Map) Used() uint64 {}

// Get performs a lookup of the key that key points to. It returns a pointer to
// the element, or false if the key doesn't exist.
func (m *Map) Get(typ *abi.SwissMapType, key unsafe.Pointer) (unsafe.Pointer, bool) {}

func (m *Map) getWithKey(typ *abi.SwissMapType, key unsafe.Pointer) (unsafe.Pointer, unsafe.Pointer, bool) {}

func (m *Map) getWithoutKey(typ *abi.SwissMapType, key unsafe.Pointer) (unsafe.Pointer, bool) {}

func (m *Map) getWithKeySmall(typ *abi.SwissMapType, hash uintptr, key unsafe.Pointer) (unsafe.Pointer, unsafe.Pointer, bool) {}

func (m *Map) Put(typ *abi.SwissMapType, key, elem unsafe.Pointer) {}

// PutSlot returns a pointer to the element slot where an inserted element
// should be written.
//
// PutSlot never returns nil.
func (m *Map) PutSlot(typ *abi.SwissMapType, key unsafe.Pointer) unsafe.Pointer {}

func (m *Map) putSlotSmall(typ *abi.SwissMapType, hash uintptr, key unsafe.Pointer) unsafe.Pointer {}

func (m *Map) growToSmall(typ *abi.SwissMapType) {}

func (m *Map) growToTable(typ *abi.SwissMapType) {}

func (m *Map) Delete(typ *abi.SwissMapType, key unsafe.Pointer) {}

func (m *Map) deleteSmall(typ *abi.SwissMapType, hash uintptr, key unsafe.Pointer) {}

// Clear deletes all entries from the map resulting in an empty map.
func (m *Map) Clear(typ *abi.SwissMapType) {}

func (m *Map) clearSmall(typ *abi.SwissMapType) {}