github.com/goshafaq/sonic@v0.0.0-20231026082336-871835fb94c6/internal/encoder/stubs_go120.go (about)

     1  //go:build go1.20 && !go1.21
     2  // +build go1.20,!go1.21
     3  
     4  /*
     5   * Copyright 2021 ByteDance Inc.
     6   *
     7   * Licensed under the Apache License, Version 2.0 (the "License");
     8   * you may not use this file except in compliance with the License.
     9   * You may obtain a copy of the License at
    10   *
    11   *     http://www.apache.org/licenses/LICENSE-2.0
    12   *
    13   * Unless required by applicable law or agreed to in writing, software
    14   * distributed under the License is distributed on an "AS IS" BASIS,
    15   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    16   * See the License for the specific language governing permissions and
    17   * limitations under the License.
    18   */
    19  
    20  package encoder
    21  
    22  import (
    23  	"unsafe"
    24  
    25  	_ "github.com/chenzhuoyu/base64x"
    26  
    27  	"github.com/goshafaq/sonic/internal/rt"
    28  )
    29  
    30  //go:linkname _subr__b64encode github.com/chenzhuoyu/base64x._subr__b64encode
    31  var _subr__b64encode uintptr
    32  
    33  //go:noescape
    34  //go:linkname memmove runtime.memmove
    35  //goland:noinspection GoUnusedParameter
    36  func memmove(to unsafe.Pointer, from unsafe.Pointer, n uintptr)
    37  
    38  //go:linkname growslice reflect.growslice
    39  //goland:noinspection GoUnusedParameter
    40  func growslice(et *rt.GoType, old rt.GoSlice, cap int) rt.GoSlice
    41  
    42  //go:linkname assertI2I runtime.assertI2I2
    43  //goland:noinspection GoUnusedParameter
    44  func assertI2I(inter *rt.GoType, i rt.GoIface) rt.GoIface
    45  
    46  //go:linkname mapiternext runtime.mapiternext
    47  //goland:noinspection GoUnusedParameter
    48  func mapiternext(it *rt.GoMapIterator)
    49  
    50  //go:linkname mapiterinit runtime.mapiterinit
    51  //goland:noinspection GoUnusedParameter
    52  func mapiterinit(t *rt.GoMapType, m *rt.GoMap, it *rt.GoMapIterator)
    53  
    54  //go:linkname isValidNumber encoding/json.isValidNumber
    55  //goland:noinspection GoUnusedParameter
    56  func isValidNumber(s string) bool
    57  
    58  //go:noescape
    59  //go:linkname memclrNoHeapPointers runtime.memclrNoHeapPointers
    60  //goland:noinspection GoUnusedParameter
    61  func memclrNoHeapPointers(ptr unsafe.Pointer, n uintptr)
    62  
    63  //go:linkname _runtime_writeBarrier runtime.writeBarrier
    64  var _runtime_writeBarrier uintptr
    65  
    66  //go:linkname gcWriteBarrierAX runtime.gcWriteBarrier
    67  func gcWriteBarrierAX()