github.com/bytedance/sonic@v1.11.7-0.20240517092252-d2edb31b167b/internal/encoder/stubs_go117.go (about)

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