stubs_go120.go (3608B)
1 // +build 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 decoder 20 21 import ( 22 `unsafe` 23 `reflect` 24 25 _ `github.com/chenzhuoyu/base64x` 26 27 `github.com/bytedance/sonic/internal/rt` 28 ) 29 30 //go:linkname _subr__b64decode github.com/chenzhuoyu/base64x._subr__b64decode 31 var _subr__b64decode uintptr 32 33 // runtime.maxElementSize 34 const _max_map_element_size uintptr = 128 35 36 func mapfast(vt reflect.Type) bool { 37 return vt.Elem().Size() <= _max_map_element_size 38 } 39 40 //go:nosplit 41 //go:linkname throw runtime.throw 42 //goland:noinspection GoUnusedParameter 43 func throw(s string) 44 45 //go:linkname convT64 runtime.convT64 46 //goland:noinspection GoUnusedParameter 47 func convT64(v uint64) unsafe.Pointer 48 49 //go:linkname convTslice runtime.convTslice 50 //goland:noinspection GoUnusedParameter 51 func convTslice(v []byte) unsafe.Pointer 52 53 //go:linkname convTstring runtime.convTstring 54 //goland:noinspection GoUnusedParameter 55 func convTstring(v string) unsafe.Pointer 56 57 //go:noescape 58 //go:linkname memequal runtime.memequal 59 //goland:noinspection GoUnusedParameter 60 func memequal(a unsafe.Pointer, b unsafe.Pointer, size uintptr) bool 61 62 //go:noescape 63 //go:linkname memmove runtime.memmove 64 //goland:noinspection GoUnusedParameter 65 func memmove(to unsafe.Pointer, from unsafe.Pointer, n uintptr) 66 67 //go:linkname mallocgc runtime.mallocgc 68 //goland:noinspection GoUnusedParameter 69 func mallocgc(size uintptr, typ *rt.GoType, needzero bool) unsafe.Pointer 70 71 //go:linkname makeslice runtime.makeslice 72 //goland:noinspection GoUnusedParameter 73 func makeslice(et *rt.GoType, len int, cap int) unsafe.Pointer 74 75 //go:noescape 76 //go:linkname growslice reflect.growslice 77 //goland:noinspection GoUnusedParameter 78 func growslice(et *rt.GoType, old rt.GoSlice, cap int) rt.GoSlice 79 80 //go:linkname makemap_small runtime.makemap_small 81 func makemap_small() unsafe.Pointer 82 83 //go:linkname mapassign runtime.mapassign 84 //goland:noinspection GoUnusedParameter 85 func mapassign(t *rt.GoType, h unsafe.Pointer, k unsafe.Pointer) unsafe.Pointer 86 87 //go:linkname mapassign_fast32 runtime.mapassign_fast32 88 //goland:noinspection GoUnusedParameter 89 func mapassign_fast32(t *rt.GoType, h unsafe.Pointer, k uint32) unsafe.Pointer 90 91 //go:linkname mapassign_fast64 runtime.mapassign_fast64 92 //goland:noinspection GoUnusedParameter 93 func mapassign_fast64(t *rt.GoType, h unsafe.Pointer, k uint64) unsafe.Pointer 94 95 //go:linkname mapassign_fast64ptr runtime.mapassign_fast64ptr 96 //goland:noinspection GoUnusedParameter 97 func mapassign_fast64ptr(t *rt.GoType, h unsafe.Pointer, k unsafe.Pointer) unsafe.Pointer 98 99 //go:linkname mapassign_faststr runtime.mapassign_faststr 100 //goland:noinspection GoUnusedParameter 101 func mapassign_faststr(t *rt.GoType, h unsafe.Pointer, s string) unsafe.Pointer 102 103 //go:nosplit 104 //go:linkname memclrHasPointers runtime.memclrHasPointers 105 //goland:noinspection GoUnusedParameter 106 func memclrHasPointers(ptr unsafe.Pointer, n uintptr) 107 108 //go:noescape 109 //go:linkname memclrNoHeapPointers runtime.memclrNoHeapPointers 110 //goland:noinspection GoUnusedParameter 111 func memclrNoHeapPointers(ptr unsafe.Pointer, n uintptr)