4
* Copyright 2021 ByteDance Inc.
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
10
* http://www.apache.org/licenses/LICENSE-2.0
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.
25
`github.com/bytedance/sonic/internal/rt`
29
//go:linkname memmove runtime.memmove
30
//goland:noinspection GoUnusedParameter
31
func memmove(to unsafe.Pointer, from unsafe.Pointer, n uintptr)
33
//go:linkname unsafe_NewArray reflect.unsafe_NewArray
34
//goland:noinspection GoUnusedParameter
35
func unsafe_NewArray(typ *rt.GoType, n int) unsafe.Pointer
37
//go:linkname growslice reflect.growslice
38
//goland:noinspection GoUnusedParameter
39
func growslice(et *rt.GoType, old rt.GoSlice, cap int) rt.GoSlice
42
func mem2ptr(s []byte) unsafe.Pointer {
43
return (*rt.GoSlice)(unsafe.Pointer(&s)).Ptr
47
//go:linkname safeSet encoding/json.safeSet
48
safeSet [utf8.RuneSelf]bool
50
//go:linkname hex encoding/json.hex
54
//go:linkname unquoteBytes encoding/json.unquoteBytes
55
func unquoteBytes(s []byte) (t []byte, ok bool)