Joshua Haberman
c81113e60f
Added fallback code for when no enum matches.
5 years ago
Joshua Haberman
c10b24ffb2
Simplified switch().
5 years ago
Joshua Haberman
ded2e657a7
Added compatibility with old generated code.
...
Until everyone can regenerate their code, we need to provide
compatible semantics with the old generated code.
Also fixed a bug where enums were allocated 8 bytes instead
of 4.
5 years ago
Joshua Haberman
8bd5c0088e
Merge pull request #316 from haberman/submsg-array
...
Fixed bug where submsg array could have excess elements.
5 years ago
Joshua Haberman
a4966fd230
Added a few extra sanity checks.
5 years ago
Joshua Haberman
99acbe0da8
Fixed bug where submsg array could have excess elements.
...
Before we were allocating an array element for every sub-message
field, even if two different fields had messages of the same type.
5 years ago
Joshua Haberman
2a0425ecf5
Merge pull request #315 from haberman/conformance-fixes
...
Updated to a new version of protobuf and fixed a few conformance tests.
5 years ago
Joshua Haberman
7ccf5650c7
If we encounter "null" for a non-NullValue enum, throw an error.
5 years ago
Joshua Haberman
0a3a94a12f
Updated to a new version of protobuf and fixed a few conformance tests.
...
When `google.protobuf.NullValue` appears on its own, we need to parse
and serialize it as plain JSON "null" value.
5 years ago
Joshua Haberman
ddd5f28c4f
Merge branch 'is_bazel'
5 years ago
Joshua Haberman
10fa3a0c77
Merge pull request #314 from haberman/addunknown
...
Fixed bug in addunknown and added ASAN poisoning.
5 years ago
Joshua Haberman
504e105420
undef UPB_ASAN.
5 years ago
Joshua Haberman
ab96d1ec41
Removed extraneous C++-style comment.
5 years ago
Joshua Haberman
d5096f9ee8
Fixed bug in addunknown and added ASAN poisoning.
5 years ago
Joshua Haberman
6fe84526be
Mark _is_bazel to be replace in google3.
5 years ago
Joshua Haberman
d1cd80385b
Merge pull request #313 from haberman/inline-arena
...
Inline arena for the duration of the decode.
5 years ago
Joshua Haberman
2339fc779c
Updated obsolete comment.
5 years ago
Joshua Haberman
ebe53f8590
Fixed compile error.
5 years ago
Joshua Haberman
71749b7caf
Implemented inline array allocation, and moved type->lg2 map to reflection.
5 years ago
Joshua Haberman
b58d2a0ee6
Shrink overhead of message representation.
5 years ago
Joshua Haberman
d87ceeacab
Shave off one more store.
5 years ago
Joshua Haberman
c25d895adf
Shrunk the arena state that needs to be synced.
5 years ago
Joshua Haberman
ff40dd6ea9
Added new internal header.
5 years ago
Joshua Haberman
cbcd635917
Fixed memory leak.
5 years ago
Joshua Haberman
e5264bd794
Merge pull request #312 from haberman/defiter
...
Added simple offset-based accessors for defs, and deprecated old iterators
5 years ago
Joshua Haberman
746f64692c
Moved arena inline for decoder.
5 years ago
Joshua Haberman
b8ef1dcc57
Removed C++-style comments.
5 years ago
Joshua Haberman
575acd85bd
Re-added const for all of the pointer wrapper types.
5 years ago
Joshua Haberman
5aa5b77b41
Added simple offset-based accessors for defs, and deprecated old iterators.
5 years ago
Joshua Haberman
33384301e2
Merge pull request #311 from haberman/proto2-benchmark2
...
Benchmarks vs. proto2
5 years ago
Joshua Haberman
bc301e7da4
Use merge/partial variants to give proto2 benchmark the fairest hearing.
5 years ago
Joshua Haberman
30f01afa83
Added LargeInitialBlock test for proto2.
5 years ago
Joshua Haberman
5d23fd99af
Used shorter protobuf:: namespace alias.
5 years ago
Joshua Haberman
02ff6fb996
Merge pull request #309 from haberman/decoder-forceinline
...
Add UPB_FORCEINLINE for varint32 decoding.
5 years ago
Joshua Haberman
a202ce9629
Add UPB_FORCEINLINE for varint32 decoding.
...
This speeds up the decoder by >20% and also reduces code size slightly!
name old time/op new time/op delta
ArenaOneAlloc 20.4ns ± 0% 20.2ns ± 0% -1.10% (p=0.000 n=12+11)
ArenaInitialBlockOneAlloc 5.25ns ± 0% 5.25ns ± 0% ~ (p=0.786 n=11+12)
ParseDescriptorNoHeap 17.1µs ± 0% 13.1µs ± 0% -23.29% (p=0.000 n=11+12)
ParseDescriptor 17.4µs ± 1% 13.5µs ± 1% -22.51% (p=0.000 n=12+12)
SerializeDescriptor 10.7µs ± 0% 10.9µs ± 0% +1.95% (p=0.000 n=12+12)
FILE SIZE VM SIZE
-------------- --------------
+2.7% +16 +2.7% +16 [LOAD #2 [RX]]
+0.5% +16 [ = ] 0 [Unmapped]
-1.4% -72 -0.7% -32 upb/decode.c
+3.1% +98 +3.1% +98 decode_msg
[DEL] -170 [DEL] -130 decode_varint32
-0.0% -40 -0.0% -16 TOTAL
5 years ago
Joshua Haberman
d0f2c4c8a2
Merge pull request #308 from haberman/encoder
...
Optimized the binary encoder for a 2x speedup
5 years ago
Joshua Haberman
5741eb9ad7
Expanded benchmarking script and added one size opt to the encoder.
5 years ago
Joshua Haberman
0135399e60
Fixed bug introduced in refactoring.
5 years ago
Joshua Haberman
df3438222b
Notated impossible branch as unreachable.
5 years ago
Joshua Haberman
9b31e8fe12
Merged common encode tag paths.
5 years ago
Joshua Haberman
5d7dc718cc
Minor formatting fix.
5 years ago
Joshua Haberman
80441e4eb4
Optimized binary encoder.
5 years ago
Joshua Haberman
ada28896b9
Changed encoder to use longjmp() for error recovery.
5 years ago
Joshua Haberman
6e140c267c
Added benchmark for encoding.
5 years ago
Joshua Haberman
7338facddb
Merge pull request #307 from veblush/port-backport
...
Add UPB_NORETURN for MSC
5 years ago
Esun Kim
4d2251c3e4
Add UPB_NORETURN for MSC
5 years ago
Joshua Haberman
382d5afc60
Merge pull request #306 from haberman/bigendian
...
Fixed binary encoding and decoding for big-endian machines.
5 years ago
Joshua Haberman
efefbffc80
Fixed binary encoding and decoding for big-endian machines.
5 years ago
Joshua Haberman
5d3083013c
Merge pull request #304 from haberman/upb-assume
...
Fixed UPB_ASSUME() for non-GCC, non-MSVC platforms.
5 years ago
Joshua Haberman
55dd9d3e41
Fixed UPB_ASSUME() for non-GCC, non-MSVC platforms.
5 years ago