...
1
16
17 package native
18
19 import (
20 `unsafe`
21
22 neon `github.com/bytedance/sonic/internal/native/neon`
23 `github.com/bytedance/sonic/internal/native/types`
24 )
25
26 const (
27 MaxFrameSize uintptr = 200
28 BufPaddingSize int = 64
29 )
30
31 var (
32 S_f64toa uintptr
33 S_f32toa uintptr
34 S_i64toa uintptr
35 S_u64toa uintptr
36 S_lspace uintptr
37 )
38
39 var (
40 S_quote uintptr
41 S_unquote uintptr
42 )
43
44 var (
45 S_value uintptr
46 S_vstring uintptr
47 S_vnumber uintptr
48 S_vsigned uintptr
49 S_vunsigned uintptr
50 )
51
52 var (
53 S_skip_one uintptr
54 S_skip_one_fast uintptr
55 S_get_by_path uintptr
56 S_skip_array uintptr
57 S_skip_object uintptr
58 S_skip_number uintptr
59 )
60
61
62
63
64 func Quote(s unsafe.Pointer, nb int, dp unsafe.Pointer, dn *int, flags uint64) int
65
66
67
68
69 func Unquote(s unsafe.Pointer, nb int, dp unsafe.Pointer, ep *int, flags uint64) int
70
71
72
73
74 func HTMLEscape(s unsafe.Pointer, nb int, dp unsafe.Pointer, dn *int) int
75
76
77
78
79 func Value(s unsafe.Pointer, n int, p int, v *types.JsonState, flags uint64) int
80
81
82
83
84 func SkipOne(s *string, p *int, m *types.StateMachine, flags uint64) int
85
86
87
88
89 func SkipOneFast(s *string, p *int) int
90
91
92
93
94 func GetByPath(s *string, p *int, path *[]interface{}, m *types.StateMachine) int
95
96
97
98
99 func ValidateOne(s *string, p *int, m *types.StateMachine, flags uint64) int
100
101
102
103
104 func I64toa(out *byte, val int64) (ret int)
105
106
107
108
109 func U64toa(out *byte, val uint64) (ret int)
110
111
112
113
114 func F64toa(out *byte, val float64) (ret int)
115
116
117
118
119 func F32toa(out *byte, val float32) (ret int)
120
121
122
123
124 func ValidateUTF8(s *string, p *int, m *types.StateMachine) (ret int)
125
126
127
128
129 func ValidateUTF8Fast(s *string) (ret int)
130
131 func useNeon() {
132 S_f64toa = neon.S_f64toa
133 S_f32toa = neon.S_f32toa
134 S_i64toa = neon.S_i64toa
135 S_u64toa = neon.S_u64toa
136 S_lspace = neon.S_lspace
137 S_quote = neon.S_quote
138 S_unquote = neon.S_unquote
139 S_value = neon.S_value
140 S_vstring = neon.S_vstring
141 S_vnumber = neon.S_vnumber
142 S_vsigned = neon.S_vsigned
143 S_vunsigned = neon.S_vunsigned
144 S_skip_one = neon.S_skip_one
145 S_skip_one_fast = neon.S_skip_one_fast
146 S_skip_array = neon.S_skip_array
147 S_skip_object = neon.S_skip_object
148 S_skip_number = neon.S_skip_number
149 S_get_by_path = neon.S_get_by_path
150 }
151
152 func init() {
153 useNeon()
154 }
155
View as plain text