Source file src/runtime/map_faststr_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_faststr
    18  func mapaccess1_faststr(t *abi.SwissMapType, m *maps.Map, ky string) unsafe.Pointer
    19  
    20  // mapaccess2_faststr 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_faststr
    29  func mapaccess2_faststr(t *abi.SwissMapType, m *maps.Map, ky string) (unsafe.Pointer, bool)
    30  
    31  // mapassign_faststr 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_faststr
    41  func mapassign_faststr(t *abi.SwissMapType, m *maps.Map, s string) unsafe.Pointer
    42  
    43  //go:linkname mapdelete_faststr
    44  func mapdelete_faststr(t *abi.SwissMapType, m *maps.Map, ky string)
    45  

View as plain text