Source file src/runtime/map_faststr.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 package runtime 6 7 import ( 8 "internal/abi" 9 "internal/runtime/maps" 10 "unsafe" 11 ) 12 13 // Functions below pushed from internal/runtime/maps. 14 15 //go:linkname mapaccess1_faststr 16 func mapaccess1_faststr(t *abi.MapType, m *maps.Map, ky string) unsafe.Pointer 17 18 // mapaccess2_faststr should be an internal detail, 19 // but widely used packages access it using linkname. 20 // Notable members of the hall of shame include: 21 // - github.com/ugorji/go/codec 22 // 23 // Do not remove or change the type signature. 24 // See go.dev/issue/67401. 25 // 26 //go:linkname mapaccess2_faststr 27 func mapaccess2_faststr(t *abi.MapType, m *maps.Map, ky string) (unsafe.Pointer, bool) 28 29 // mapassign_faststr should be an internal detail, 30 // but widely used packages access it using linkname. 31 // Notable members of the hall of shame include: 32 // - github.com/bytedance/sonic 33 // - github.com/ugorji/go/codec 34 // 35 // Do not remove or change the type signature. 36 // See go.dev/issue/67401. 37 // 38 //go:linkname mapassign_faststr 39 func mapassign_faststr(t *abi.MapType, m *maps.Map, s string) unsafe.Pointer 40 41 //go:linkname mapdelete_faststr 42 func mapdelete_faststr(t *abi.MapType, m *maps.Map, ky string) 43