liu
3696f9175b
fix: free the large buffer from pool ( #369 )
...
Co-authored-by: liuqiang <liuqiang.06@bytedance.com>
2023-02-24 17:31:26 +08:00
Yi Duan
e60b9541cd
fix: add nocheckptr directive ( #365 )
2023-02-20 14:52:46 +08:00
Yi Duan
a978cdb8c5
feat: generic loader for go1.16~1.17 ( #362 )
...
* feat: generic loader for go1.16
* delete unused codes
2023-02-15 15:36:40 +08:00
Yi Duan
fa82a64ce2
feat: add env option SONIC_STOP_PROFILING to stop traceback on demands ( #361 )
2023-02-14 14:48:22 +08:00
liu
02865de676
feat: repl invalid utf8 in serde by option ( #357 )
2023-02-10 18:55:27 +08:00
Yi Duan
f87d87de7a
feat: fallback on unsupported go versions ( #358 )
...
* feat: fallback api on unsupported go version
* add compact test
* not support go version <= 1.14
2023-02-08 16:56:10 +08:00
Yi Duan
e7ac2f25fc
feat: more complete function loader ( #354 )
...
* follow complete implementation of go symtab
* support go1.20
2023-02-08 14:35:00 +08:00
Yi Duan
cfa4fe1736
feat: add Get() API on not-amd64 envs ( #350 )
2023-01-13 11:34:20 +08:00
Yi Duan
32877b6d27
fix:(decoder) not clear memory after decoding failed ( #346 )
...
* fix: not clear memory after decoding failed
* doc: update sonic ast benchmark data
2023-01-10 14:19:32 +08:00
liu
2dc405d750
opt: faster skip in ast ( #345 )
...
* opt: faster skip in ast
* ci: remove excited repo
2023-01-09 16:20:36 +08:00
Yi Duan
67cffb15bd
feat:(ast) add fallback api on not-amd64 env ( #341 )
...
* feat:(ast) add fallback api on `not-amd64` env
* test: add native `linux-arm64` CI
* opt: just skip number chars whne `decodeFloat64`
* fmt
* fix: check EOF
2023-01-03 19:47:55 +08:00
Yi Duan
134fba2c1d
feat: ignore SIGPROF while calling native funcs ( #342 )
2023-01-03 15:15:51 +08:00
Yi Duan
685ea7b9e3
feat:(encoder) support concrete-type key implementing encoding.TextMarshaler while encoding map ( #343 )
...
* feat:(encoder) support concrete type implementing `encoding.TextMarshaler` while encoding map
* add missing license
* opt: use unsafe to avoid reflect.Call
2022-12-30 17:48:04 +08:00
Yi Duan
f421ee8530
fix:(encoder) pass pv through compiler recursively ( #336 )
...
* pass pv
* test reflect indirect
* fix: pass `pv` throught compiler recursively
2022-12-13 14:26:58 +08:00
erin liman
01c0d36194
feat: reformat print error example and clarify v1.6.0 example ( #332 )
2022-12-09 17:00:49 +08:00
liu
dda5da9f64
fix: support decode json-encoded base64 in JIT ( #329 )
...
Co-authored-by: liuqiang <liuqiang.06@bytedance.com>
2022-11-15 16:38:08 +08:00
Yi Duan
518110bd99
feat:(decoder) clear memory when decoding failed ( #320 )
...
* feat:(decoder) clear memory when decoding failed
* fix test case
* fix: skip empty string for `,string` option
* test map text key
* support skip mismatched key-value of map
2022-11-07 11:04:19 +08:00
Yi Duan
02fe88266f
feat:(decoder) support skip mismatche-typed value ( #325 )
...
* feat:(decoder) support skip mismatche-typed value
* change test cases
* refactor: add type check down into `CompilePrimitive()` to avoid repeat `null` check
* opt call skip()
* bench: add option `--repeat_times`
* test: omit check primitive
* opt: inline primitive check into its OP
* implement on Go1.15
* fix: support skip json.Numer
* fix: OP_go_skip
* update README.md
2022-11-04 14:27:21 +08:00
linuxsong
2866800519
optimize type assertion ( #324 )
2022-10-31 12:47:12 +08:00
liu
78c2ade913
fix: readme typos ( #323 )
2022-10-28 17:32:48 +08:00
liu
6deed01a90
opt: reduce memory pool size ( #302 )
...
* fix: reduce state stack size
* fix types
* opt: shrink encoder stack size
* opt: reduce decoder stack size
* add bench.py loops
Co-authored-by: liuqiang <liuqiang.06@bytedance.com>
Co-authored-by: duanyi.aster <duanyi.aster@bytedance.com>
2022-10-28 16:40:14 +08:00
linuxsong
3e6f839fb6
fix iterator traversal empty object panic ( #314 )
2022-10-18 10:59:51 +08:00
Keyi Xie
b52e528dc6
feat: add dummy implementation of pretouch() for !amd64 arch ( #306 )
...
* feat: 🎸 (sonic.go): Add none implement for !amd64 arch
✅ Closes : #301
* Add test
* Address comment
2022-09-28 13:58:24 +08:00
liu
56e81a633e
fix: use sse instead of sse4 ( #305 )
...
* fix: use sse instead of sse4
* fix: use dispatch
* fix: remove lzero
Co-authored-by: liuqiang <liuqiang.06@bytedance.com>
2022-09-26 12:45:01 +08:00
Chen Yannan
5e54c02172
fmt: move thrid-party tests into another module ( #299 )
...
* fix:move benchmarkTests and unitTests related to external json library
* remove extra spaces
* merge go.mod files
* refactor: add external_jsonlib_test into go.work and CI
Co-authored-by: Yi Duan <duanyi.aster@bytedance.com>
2022-09-20 12:02:41 +08:00
liu
ccc0f3f1e3
opt: faster ftoa ( #291 )
...
* opt: faster f64toa
* feat:(option) add option `MaxInlineDepth` for addjust compilation inline depth (#287 )
* feat: make compilation depth changeable
* feat: add option `DefaultMaxInlineDepth`
* add recurse depth = 10
* refactor
* doc: readme and comment
* opt: add `_MAX_FIELDS` to limit the inlining of big struct
* update license
* fix typo
* feat:(ast) support cast `null` to empty value (#278 )
* fix: recompile
* test: add ftoa benchmarks
* feat: add f32toa
* fix: add license
* opt: optimize decimal
* fix benchmarks
* fix: poor performance in atof32
* test: add more integer test
Co-authored-by: liuqiang <liuqiang.06@bytedance.com>
Co-authored-by: Yi Duan <duanyi.aster@bytedance.com>
2022-09-20 10:26:18 +08:00
Yi Duan
2138136685
feat: support more loose type-casting ( #294 )
...
* feat: support more losing type cast
* test: add loose casting tests
* format
* fmt: add license
* fmt: add comments
2022-09-08 16:31:38 +08:00
Yi Duan
a48cad8488
fix:(decoder) more loose repeatable condition for StreamDecoder ( #296 )
2022-09-08 16:16:38 +08:00
Yi Duan
6e979df0d3
fix:(decoder) StreamDecoder unexpectedly stop while skipping incomplete number ( #295 )
2022-09-07 19:54:13 +08:00
Chen Yannan
0a3d980974
Fix/ci ( #292 )
...
* install qemu in CI
* install qemu in CI
2022-08-31 17:27:11 +08:00
Yi Duan
cf08d54edd
feat:(ast) support cast null to empty value ( #278 )
2022-08-22 16:11:26 +08:00
Yi Duan
94f95f0479
feat:(option) add option MaxInlineDepth for addjust compilation inline depth ( #287 )
...
* feat: make compilation depth changeable
* feat: add option `DefaultMaxInlineDepth`
* add recurse depth = 10
* refactor
* doc: readme and comment
* opt: add `_MAX_FIELDS` to limit the inlining of big struct
* update license
* fix typo
2022-08-22 15:45:49 +08:00
Yi Duan
1a7758c557
build: all fallbacks to compact.go on ARM arch ( #286 )
2022-08-18 20:56:22 +08:00
cyn6315
dd3e092a5b
fix spelling mistake in README.md ( #285 )
...
* fix spelling mistake in README.md
* fix spelling mistake in README.md
2022-08-18 17:14:46 +08:00
cyn6315
d1190d6797
change push-check-arm.yml and remove fall back logics ( #284 )
...
* change push-check-arm.yml and remove fall back logics
* fix README on the requirement and compatibility
* fix: README on the requirement and compatibility
* fix: README add backquotes
* fix:remove instruction set requirement in README
* Update README.md
Co-authored-by: Yi Duan <duanyi.aster@bytedance.com>
2022-08-18 15:58:07 +08:00
cyn6315
a8311c6cde
fix: adapts to Mac M1 ( #280 )
...
* fix: adapts to Mac M1
* feat: add `noavx` mode
* fix: fix SSE4 segfault with latest asm2asm
* chore: remove excessive spaces
* chore: more compact assembly
* chore: re-indent with 4 spaces
* chore: remove excessive space
Co-authored-by: chenzhuoyu <chenzhuoyu@bytedance.com>
2022-08-15 14:37:20 +08:00
chenzhuoyu
d4024becca
chore: remove excessive spaces
2022-08-12 15:29:23 +08:00
liu
de2dc2c35a
add ValidateString option into decode ( #253 )
...
* fix: add escape validate
* feat: add validatestring option
* add print debug
* add jit debug in decoder
* fix go1.16 decoder debug
* fix: not change others
* fix generic parse bug
* remove debug info
* test twitter json
* fix: option typos
* test: add bug test
* fix validate bugs
* fix: validate
* remove files
* re-compile
* update license
* add flags on `skip_xxx()`
* fix internal native tests
* re-compile
* add validstring for perftest
* modify api
* fix readme
* fix comment
* add license
* rename to ValidateString
* fix xprintf.h
* add debug
Co-authored-by: liuqiang <liuqiang.06@bytedance.com>
Co-authored-by: duanyi.aster <duanyi.aster@bytedance.com>
2022-08-11 19:06:11 +08:00
Yi Duan
b36771ba37
feat: support Go 1.19 ( #275 )
...
* feat: support Go 1.19
* fuzz test refactor
* fix fuzz bug, generate pointer typ
Co-authored-by: liuqiang <liuqiang.06@bytedance.com>
2022-08-09 12:54:11 +08:00
Yi Duan
8b51e75241
fix:(encoder) insufficient buffer size check for OP_i32 ( #269 )
2022-07-28 17:18:53 +08:00
Yi Duan
2eae594741
fix:(native) StreamDecoder returns error when run out of buffer while skiping value ( #267 )
...
* fix:(native) StreamDecoder return error when run out of input buffer while skiping value
* refactor
2022-07-25 15:17:52 +08:00
liu
34026b9c65
fix: useint64 in decode SetOption ( #268 )
...
* fix: useint64 in decode SetOption
* doc: add comments on `sonic.Config`
Co-authored-by: liuqiang <liuqiang.06@bytedance.com>
Co-authored-by: duanyi.aster <duanyi.aster@bytedance.com>
2022-07-25 14:26:18 +08:00
Yi Duan
755c0252a9
feat: (ast) support casting V_STRING to number ( #262 )
2022-07-12 16:27:27 +08:00
Yi Duan
07d7b867d4
feat (encoder): add encoder option NoNullSliceOrMap ( #218 )
...
* feat (encoder): add encoder option `NoNullSliceOrMap`
* feat: add option on `sonic.Config`
* build: specify `self-host` to x64 machine
2022-07-08 15:07:42 +08:00
Yi Duan
08c7640684
fix:(decoder) didn't check ',' before object key due to imperfect FSM ( #261 )
2022-07-08 11:12:34 +08:00
Yi Duan
a66db08b94
fix:(encoder) handle map like pointer when calling call_marshaler_v ( #259 )
2022-07-06 14:50:28 +08:00
Yi Duan
55e3d10619
fix: (decoder) return io.EOF when read nothing from io.Reader ( #254 )
...
* fix: (decoder) return io.EOF when read nothing from io.Reader
* build:(CI) codeql-analysis only use x86 machine
2022-07-01 17:51:42 +08:00
Yi Duan
fc6f3743fd
fix:(ast) checkRaw() check if node is nil pointer first ( #250 )
2022-06-28 14:16:10 +08:00
Yi Duan
2e751bf5db
feat:(ast) Add more strict casting API ( #249 )
...
* feat:(ast) Add more strict API
* test: add cast test
2022-06-28 13:27:07 +08:00
liu
f8fb04a184
fix(ub): marshal escape b f as encoding/json ( #243 )
...
* fix(ub): marshal b f as encoding/json
* test: fix old test for escape b
Co-authored-by: liuqiang <liuqiang.06@bytedance.com>
2022-06-10 11:21:35 +08:00