Source file src/runtime/map_fast32.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_fast32
    16  func mapaccess1_fast32(t *abi.MapType, m *maps.Map, key uint32) unsafe.Pointer
    17  
    18  // mapaccess2_fast32 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_fast32
    27  func mapaccess2_fast32(t *abi.MapType, m *maps.Map, key uint32) (unsafe.Pointer, bool)
    28  
    29  // mapassign_fast32 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_fast32
    39  func mapassign_fast32(t *abi.MapType, m *maps.Map, key uint32) unsafe.Pointer
    40  
    41  // mapassign_fast32ptr should be an internal detail,
    42  // but widely used packages access it using linkname.
    43  // Notable members of the hall of shame include:
    44  //   - github.com/ugorji/go/codec
    45  //
    46  // Do not remove or change the type signature.
    47  // See go.dev/issue/67401.
    48  //
    49  //go:linkname mapassign_fast32ptr
    50  func mapassign_fast32ptr(t *abi.MapType, m *maps.Map, key unsafe.Pointer) unsafe.Pointer
    51  
    52  //go:linkname mapdelete_fast32
    53  func mapdelete_fast32(t *abi.MapType, m *maps.Map, key uint32)
    54  

View as plain text