liu
7e82ad0a45
fix: unmarshal into defined ptr type ( #392 )
2023-04-03 17:25:57 +08:00
liu
6473c7a802
fix: direct struct/array type with marshaler ( #396 )
2023-04-03 17:13:50 +08:00
Yi Duan
8dbcce341b
fix: decimal map key may be truncated and populated unexpectedly ( #382 )
...
* fix:(StreamDecoder) Integer map key may be truncated and populated unexpectedly
* feat: expose option `DefaultBufferSize`
* test adjust
* test adjust
* feat: add options to make default buffer size adjustable
2023-03-14 13:49:27 +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
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
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
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
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
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
chenzhuoyu
d4024becca
chore: remove excessive spaces
2022-08-12 15:29:23 +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
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
fc6f3743fd
fix:(ast) checkRaw() check if node is nil pointer first ( #250 )
2022-06-28 14:16:10 +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
75b728ba51
feat: support for Windows ( #228 )
...
* feat: support for Windows
* fix (loader): default loader now has build tag: for linux and darwin
* feat (loader): add memory allocator support for Windows
* feat: add Windows CI
Added Windows CI for GitHub Actions
Go version: 1.15.x, 1.16.x, 1.17.x, 1.18.x
* fix (loader): remove `amd64` build constraint from Windows
* fix: TSAN error on Windows CI
Temporary remove `-race` flag
Link: https://github.com/golang/go/issues/46099
Co-authored-by: Yi Duan <duanyi.aster@bytedance.com>
2022-05-23 12:55:45 +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
fe2497d01e
fix:(loader) init _Moduledata.gcdatapointer to avoid panic on plugin-mode ( #188 )
...
* fix:(loader) init `_Moduledata.gcdata`pointer to avoid panic on plugin-mode
* fix: freeze gcdata pointer
* feat: go115
* update test
* fix: use unique bytes pointer
* test: drop go1.15 race test
* feat: support go1.18
2022-04-01 16:46:07 +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
8caa4eef05
fix: check nil pointer for Marshaler ( #194 )
2022-02-25 18:00:57 +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
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
liu
c27120f2bc
fix: correct the field priority as encoding/json when unmarshal to struct ( #142 )
2021-11-30 10:28:50 +08:00
liu
49fc705341
feat: Pretouch recursively for large/deep struct ( #137 )
2021-11-26 14:12:51 +08:00
liu
9a95e9de00
test: fix timeout problem in issue_test when enable force GC ( #135 )
...
Co-authored-by: liuqiang <liuqiang.06@bytedance.com>
2021-11-19 14:10:19 +08:00
Yi Duan
0f66ab7211
fix: add stack memory at _VAR_vp to pass the address of vp while recursing ( #129 )
...
Co-authored-by: duanyi.aster <duanyi.aster@bytedance.com>
2021-11-09 12:47:05 +08:00
Yi Duan
3eade82a01
fix: add gcGuard to prevent GC during Marshal()/Unmarshal() ( #122 )
...
Co-authored-by: duanyi.aster <duanyi.aster@bytedance.com>
2021-10-28 17:02:37 +08:00
liuqiang
fe56a21bf5
fix: make it return error when unmarshal invalid base64-encoded strings
2021-10-21 18:20:04 +08:00
liu
0a710eeb9d
fix: make it sorted when marshalling integer key map ( #117 )
2021-10-18 19:31:33 +08:00
liu
3eca433cb9
fix: marshal struct field with omitempty tag as encoding/json ( #114 )
2021-10-12 15:14:39 +08:00
liu
530d423243
fix: make it parse the UTF-16 surrogate pair after invalid unicode ( #111 )
2021-09-24 16:33:02 +08:00
liu
a7ace8cd03
fix: skip exponent number that begin with zero in skip_number() ( #109 )
2021-09-23 15:02:09 +08:00
Yi Duan
a577eafc25
refactor: make it more readable ( #104 )
...
Co-authored-by: duanyi.aster <duanyi.aster@bytedance.com>
2021-09-18 11:31:25 +08:00