Source file src/runtime/map_fast64_swiss.go
1 // Copyright 2018 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 //go:build goexperiment.swissmap 6 7 package runtime 8 9 import ( 10 "internal/abi" 11 "internal/runtime/maps" 12 "unsafe" 13 ) 14 15 // Functions below pushed from internal/runtime/maps. 16 17 //go:linkname mapaccess1_fast64 18 func mapaccess1_fast64(t *abi.SwissMapType, m *maps.Map, key uint64) unsafe.Pointer 19 20 // mapaccess2_fast64 should be an internal detail, 21 // but widely used packages access it using linkname. 22 // Notable members of the hall of shame include: 23 // - github.com/ugorji/go/codec 24 // 25 // Do not remove or change the type signature. 26 // See go.dev/issue/67401. 27 // 28 //go:linkname mapaccess2_fast64 29 func mapaccess2_fast64(t *abi.SwissMapType, m *maps.Map, key uint64) (unsafe.Pointer, bool) 30 31 // mapassign_fast64 should be an internal detail, 32 // but widely used packages access it using linkname. 33 // Notable members of the hall of shame include: 34 // - github.com/bytedance/sonic 35 // - github.com/ugorji/go/codec 36 // 37 // Do not remove or change the type signature. 38 // See go.dev/issue/67401. 39 // 40 //go:linkname mapassign_fast64 41 func mapassign_fast64(t *abi.SwissMapType, m *maps.Map, key uint64) unsafe.Pointer 42 43 // mapassign_fast64ptr should be an internal detail, 44 // but widely used packages access it using linkname. 45 // Notable members of the hall of shame include: 46 // - github.com/bytedance/sonic 47 // - github.com/ugorji/go/codec 48 // 49 // Do not remove or change the type signature. 50 // See go.dev/issue/67401. 51 // 52 //go:linkname mapassign_fast64ptr 53 func mapassign_fast64ptr(t *abi.SwissMapType, m *maps.Map, key unsafe.Pointer) unsafe.Pointer 54 55 //go:linkname mapdelete_fast64 56 func mapdelete_fast64(t *abi.SwissMapType, m *maps.Map, key uint64) 57