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
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
9aab4704ef
fix: issux213 ( #215 )
...
* fix (decoder): use AVX mode only on base64x
2022-04-21 15:29:52 +08:00
liu
57989f38ba
opt: skip number in json.Number parsing ( #209 )
...
* opt: skip number in json.Number parsing
* fix: generic use skip_number
* test: add json.Number decoding benchmarks
Co-authored-by: liuqiang <liuqiang.06@bytedance.com>
Co-authored-by: duanyi.aster <duanyi.aster@bytedance.com>
2022-04-01 17:45:06 +08:00
Yi Duan
94232a7b2e
fix: ignore overflow error when decoding json.Number ( #207 )
2022-03-24 16:00:08 +08:00
Yi Duan
f087445eee
fix: allow string value decoded as json.Number ( #196 )
...
* fix: allow string value decoded as `json.Number`
* test: move -race flag from Go1.15 since it reports "race: limit on 8128 simultaneously alive goroutines is exceeded, dying"
* test: add benchmarks
2022-02-28 20:14:38 +08:00
Yi Duan
b66168fa77
feat:(decoder) add option CopyString() ( #192 )
...
* feat: add option `CopyString()`
* test: diff copy and nocopy decoding bench
* doc: update README.md
* opt: use global link for `escape_string()`
* feat: copy JSON on `Unmarshal()`
* test: add norace test
* fix: nocopy field key
* test: add generic test
* fix: remove useless instruction
2022-02-28 18:46:25 +08:00
Yi Duan
5be8dafe41
fix: premature GC on decoding string ( #187 )
...
* fix: cast `[]byte` to `string` for `Unmarshal()`
* fix: store `Decoder.s` to `_Stack` to avoid premature GC
* fix: add gcwritebarrir for `op_str`
2022-02-15 16:41:53 +08:00
Yi Duan
526c46883e
fix: support writeBarrier for Go 1.15 ( #181 )
2022-01-27 17:37:42 +08:00
liu
1443eb3bcf
fix: move large-size local array to _Stack ( #162 )
...
* fix: move large-size local array to _Stack
* fix: adjust jsonstate and add alwaysinline
* fix: initialize types.JsonState's dbuf at prologue
* fix: replace `always_inline` with `inline`
* fix: remove unused types
* feat: update asm2asm
* fix: check stack size befor call JIT function
Co-authored-by: liuqiang <liuqiang.06@bytedance.com>
Co-authored-by: duanyi.aster <duanyi.aster@bytedance.com>
2021-12-30 14:51:23 +08:00
Yi Duan
22229eefc3
fix: relocate stack pointers ( #156 )
...
* fix: relocate stack pointer _VAR_sv to keep it alive
* fix: add stack pointer _VAR_vk to defend `encoding.TextUnmarshaler`
* fix: align faker func's stack with JIT func's
* fix: clear _Stack memory when err returned
* fix: clear stack pointer before return
* fix: relimit stack-overflow check at `_ValueDecoder`
Co-authored-by: duanyi.aster <duanyi.aster@bytedance.com>
2021-12-20 16:19:12 +08:00
liu
d5104197c4
fix: 'string' option in struct tag as encoding/json ( #148 )
...
Co-authored-by: liuqiang <liuqiang.06@bytedance.com>
2021-12-03 15:46:09 +08:00
Yi Duan
49df11ef83
feat: adjust ABI for supporting go1.17 ( #116 )
...
* feat: adjust encoder ABI for supporting go1.17
* binding
* generic
* opt: exchange R10/R11 with BX/BP when call c func
* fmt
Co-authored-by: duanyi.aster <duanyi.aster@bytedance.com>
2021-11-30 18:47:17 +08:00
Yi Duan
5b38f56cec
fix: go1.15 CANNOT support gcWriteBarrier due to linkname bug ( #134 )
...
* fix: go1.15 CANNOT add gcWriteBarrier due to linkname bug
* add go1.15 push-check
Co-authored-by: duanyi.aster <duanyi.aster@bytedance.com>
2021-11-18 11:15:14 +08:00