Commit Graph

55 Commits

Author SHA1 Message Date
Masaaki Goshima 5741c733a6 Refactor indent code 2020-12-25 17:03:56 +09:00
Masaaki Goshima f5daa592fa Improve encoding performance 2020-12-25 03:53:48 +09:00
Masaaki Goshima 16309e2635 Refactor int encoding 2020-12-20 22:59:23 +09:00
Masaaki Goshima 9e97505584 Remove sync.Pool for encodeRuntimeContext 2020-12-20 20:09:41 +09:00
Masaaki Goshima d85327b458 Replace int/uint encoding implementation 2020-12-20 04:02:03 +09:00
Masaaki Goshima 01b439e41e Refactor buffering of encoder for improvement performance 2020-12-20 04:02:03 +09:00
Masaaki Goshima 6eb02f7ac0 Optimize access to opcodeMap 2020-12-15 14:46:10 +09:00
Cuong Manh Le 6b1d701387
Fix all invalid usages of unsafe.Pointer
Most of the invalid usages due to the conversion from uintptr to
unsafe.Pointer. In general, unsafe.Pointer(p) where p of type uintptr is
considered unsafe.

To fix that, use &p instead of p, then introduce another dereference.
Example, the invalid usage:

	*(*int)(unsafe.Pointer(p)) = int(v)

wil become:

	**(**int)(unsafe.Pointer(&p)) = int(v)

Closes #53
2020-11-16 20:37:12 +07:00
Masaaki Goshima 4994bc5d04 Fix handling of comma as delimiter
Conflicts:
	encode_vm.go
2020-11-16 19:16:45 +09:00
Masaaki Goshima d76012422a Fix stream encoding 2020-09-17 01:26:39 +09:00
Masaaki Goshima aaea586778 Enable switch map processing at runtime 2020-09-16 18:15:47 +09:00
Masaaki Goshima 92fb386db5 Optimize encoding for byteSlice type 2020-09-15 23:22:35 +09:00
Masaaki Goshima 2e7a990bbb Copy original opcode before caching 2020-09-15 20:47:41 +09:00
Masaaki Goshima 02e04238a2 Add keepRefs field 2020-09-04 20:28:27 +09:00
Masaaki Goshima f297c99af1 Remove unused arguments 2020-09-04 13:53:25 +09:00
Masaaki Goshima 18a6e4cffe Remove codePool 2020-09-01 22:39:20 +09:00
Masaaki Goshima 3aa921e884 Fix encoding engine 2020-09-01 22:26:26 +09:00
Masaaki Goshima 72bc598dd4 Remove state variables from opcode 2020-08-31 21:59:22 +09:00
Masaaki Goshima a6276c4d8e Optimize opcode.idx and seenPtr 2020-08-31 03:14:37 +09:00
Masaaki Goshima 572d4842a5 Reset seenPtr 2020-08-31 00:14:32 +09:00
Masaaki Goshima 70f8f01ef3 Use encodeRuntimeContext.ptrs instead of opcode.ptr 2020-08-30 23:58:58 +09:00
Masaaki Goshima cb194687a0 Add encodeRuntimeContext 2020-08-30 17:52:59 +09:00
Masaaki Goshima e508ad41ba Refactor indent parameter 2020-08-29 15:35:03 +09:00
Masaaki Goshima 7dcadbd6ce Refactor with encodeCompileContext 2020-08-29 15:11:31 +09:00
Masaaki Goshima 95bfc8c549 Add validation for null value 2020-08-21 11:07:55 +09:00
Masaaki Goshima ae1b244386 Fix encoding format for float32 and float64 2020-08-20 15:36:00 +09:00
Masaaki Goshima 9143f35c93 Improve encoder performance ( remove unnecessary reference ) 2020-08-15 22:45:29 +09:00
Masaaki Goshima b71f7da8bc Fix recursive type definition 2020-08-12 18:42:29 +09:00
Masaaki Goshima b9bb609c1d Fix parallel encoding 2020-08-09 17:55:49 +09:00
Masaaki Goshima a979b83d27 Add noescape trick for decoding 2020-05-09 00:00:08 +09:00
Masaaki Goshima c23e5f43a7 Support UnmarshalJSON 2020-05-08 20:22:57 +09:00
Masaaki Goshima 33dcd50a5d Support MarshalJSON/MarshalText 2020-05-04 18:39:17 +09:00
Masaaki Goshima 7eba678cef Add noescape trick for encoding 2020-05-03 22:19:55 +09:00
Masaaki Goshima 6602d2d38c Support SetEscapeHTML 2020-05-03 17:41:33 +09:00
Masaaki Goshima 3d7267abc8 Add MarshalIndent 2020-05-02 23:35:41 +09:00
Masaaki Goshima 03a21193fc Support omitempty 2020-05-01 13:12:01 +09:00
Masaaki Goshima 4edbe3a346 Refactor encoder 2020-04-30 13:52:24 +09:00
Masaaki Goshima 95b2194742 Add optimized code 2020-04-30 11:56:56 +09:00
Masaaki Goshima 4f3b1262b2 Add VirtualMachine for Encoder 2020-04-30 00:31:50 +09:00
Masaaki Goshima 9034a6fca4 Support encoding for interface{} type 2020-04-28 18:25:51 +09:00
Masaaki Goshima 2c698a30a8 Fix build 2020-04-26 12:49:54 +09:00
Masaaki Goshima 015eb040ee Add reflect.rtype trick 2020-04-24 20:23:26 +09:00
Masaaki Goshima aa0aff6388 Remove unreachable error checking 2020-04-22 15:31:44 +09:00
Masaaki Goshima 31f2422545 Fix compile for encoding 2020-04-22 15:29:54 +09:00
Masaaki Goshima 2625e69825 Fix compile error of zero value 2020-04-22 13:52:42 +09:00
Masaaki Goshima 2c11838fe3 Add decoder 2020-04-22 13:06:52 +09:00
Masaaki Goshima 39812b172b Fix public interface for encoding/json 2020-04-21 14:19:50 +09:00
Masaaki Goshima 37a7ac09ee Supports encoding of structure fields that should be ignored 2020-04-21 13:38:48 +09:00
Masaaki Goshima a573d86121 Support encoding for Array type 2020-04-21 13:19:53 +09:00
Masaaki Goshima ed5ee07fdf Support encoding for map type 2020-04-21 00:06:27 +09:00