Protobuf Team Bot
b174d9d5a0
split out the internal arena defs from internal/upb.h
...
PiperOrigin-RevId: 456584853
2 years ago
Protobuf Team Bot
7b05f25b98
split out the alloc code from the arena code
...
PiperOrigin-RevId: 456531002
2 years ago
Protobuf Team Bot
e4635f223e
match file names to type names
...
Lots of changes but it's all just moving things around.
Backward-compatible stub #include's have been provided for now.
upb_Arena/upb_Status have been split out from upb/upb.?
upb_Array/upb_Map/upb_MessageValue have been split out from upb/collections.?
upb_ExtensionRegistry has been split out from upb/msg.?
upb/decode_internal.h is now upb/internal/decode.h
upb/mini_table_accessors_internal.h is now upb/internal/mini_table_accessors.h
upb/table_internal.h is now upb/internal/table.h
upb/upb_internal.h is now upb/internal/upb.h
PiperOrigin-RevId: 456297617
2 years ago
Protobuf Team Bot
97993b219d
rename upb::SymbolTable as upb::DefPool
...
PiperOrigin-RevId: 456147709
2 years ago
Protobuf Team Bot
65bde4e75b
upb_Encode() now returns a status value
...
PiperOrigin-RevId: 454740100
3 years ago
Protobuf Team Bot
65cd34dd00
The mini descriptor encoder now uses the internal api (upb_MessageDef, upb_FileDef, etc) instead of dealing directly with the proto fields. So much simpler and cleaner!
...
PiperOrigin-RevId: 454389613
3 years ago
Protobuf Team Bot
bb38fc9c4d
First implementation of protoc-gen-upbdev plugin
...
PiperOrigin-RevId: 454243195
3 years ago
Protobuf Team Bot
6e1aa9f136
add json encoder option to render enums as ints
...
PiperOrigin-RevId: 453724657
3 years ago
Protobuf Team
ba18b21b01
Allow GetMessage API to be used for Groups.
...
PiperOrigin-RevId: 452208245
3 years ago
Protobuf Team
b28d80a9cc
Fix GetMutableMessage not updating presence and storing new instance.
...
Add array resize API to support GetMutableRepeatedField api with size argument.
PiperOrigin-RevId: 452075516
3 years ago
Protobuf Team
c205f2f8aa
strtable keys are no longer required to be NULL-terminated so update the comments
...
PiperOrigin-RevId: 451802147
3 years ago
Joshua Haberman
eebcd59a96
Fixed fuzz bug due to negative oneof index.
...
PiperOrigin-RevId: 449900976
3 years ago
Protobuf Team
285474d8e1
Explicit casting to avoid 64 to 32 bit conversion clang warning
...
PiperOrigin-RevId: 449833676
3 years ago
Protobuf Team
a30bb1b842
Fix upb_MiniTable_Build not handling kUpb_MessageModifier_IsExtendable.
...
PiperOrigin-RevId: 449262594
3 years ago
Joshua Haberman
a60e9a379e
Fixed the mingw build by adding compatibility code for vsnprintf()
...
PiperOrigin-RevId: 448611947
3 years ago
Joshua Haberman
1cf8214e4d
Changed upb's arena alignment from 16 to 8.
...
upb has traditionally returned 16-byte-aligned pointers from arena allocation. This was out of an abundance of caution, since users could theoretically be using upb arenas to allocate memory that is then used for SSE/AVX values (eg. [`__m128`](https://docs.microsoft.com/en-us/cpp/cpp/m128?view=msvc-170 ), which require 16-byte alignment.
In practice, the protobuf C++ arena has used 8-byte alignment for 8 years with no significant problems I know of arising from SSE etc.
Reducing the alignment requirement to 8 will save memory. It will also help with compatibility on 32-bit architectures where `malloc()` only returns 8-byte aligned memory. The immediate motivation is to fix the win32 build for Python protobuf.
PiperOrigin-RevId: 448331777
3 years ago
Joshua Haberman
32f45b5f33
Update to the latest protobuf.
...
PiperOrigin-RevId: 447642349
3 years ago
Joshua Haberman
79afb79f93
Internal change.
...
PiperOrigin-RevId: 447637273
3 years ago
Protobuf Team
459059e301
Add Extensions to mini table based reflection apis.
...
PiperOrigin-RevId: 447561140
3 years ago
Joshua Haberman
d72d98495d
Fixed a Python test by adding a new map insert function that distinguishes between insert and update.
...
PiperOrigin-RevId: 447214618
3 years ago
Joshua Haberman
2eb973f53a
Added a GitHub Action to test Python+upb on Windows, and fixed a couple of bugs this revealed.
...
PiperOrigin-RevId: 446322046
3 years ago
Protobuf Team
c7620a4690
Mini table accessors Part2 (repeated fields).
...
Introduces upb_FieldValue for array accessor api.
PiperOrigin-RevId: 445491436
3 years ago
Protobuf Team
823ed18316
Move upb_Array and upb_Map into collections target.
...
PiperOrigin-RevId: 445272734
3 years ago
Joshua Haberman
3e0890c055
Added support for UnknownFieldSet.
...
PiperOrigin-RevId: 443143448
3 years ago
Joshua Haberman
4978040db4
Rewrote the MessageSet parsing code in the upb decoder to properly handle several edge cases.
...
PiperOrigin-RevId: 442979459
3 years ago
Joshua Haberman
76c7ca9327
Updated API for accessing extensions.
...
PiperOrigin-RevId: 442947856
3 years ago
Protobuf Team
e5468b47f8
Add mini table accessors
...
- Add hazzer, ClearField
- Add bool/int32 accessors
PiperOrigin-RevId: 442906872
3 years ago
Joshua Haberman
fa8b605f78
Implemented MiniDescriptors for proto2 enums.
...
An enum MiniDescriptor simply encodes a set of valid `int32_t` values, so that the protobuf parser can test whether a given enum value is known or not.
The format implemented here is novel and needs to be documented. In short, the format is:
1. base92 values 0-31: 5-bit mask indicating presence or absence of the next five enum values.
2. base92 values 60-91: varint indicating skip over a region of enum values.
Negative enum values are encoded as their `uint32_t` equivalent.
PiperOrigin-RevId: 442892799
3 years ago
Protobuf Team
e1e7435e70
Internal change
...
PiperOrigin-RevId: 440796832
3 years ago
Joshua Haberman
9cc02bb60d
Rewrote the MessageSet parsing code in the upb decoder to properly handle several edge cases.
...
PiperOrigin-RevId: 440788402
3 years ago
Protobuf Team
bef53686ec
Add support for clear field in upbc.
...
Add support for setting extension field value.
PiperOrigin-RevId: 439365359
3 years ago
Protobuf Team
e80ac6df59
Fix typos
...
PiperOrigin-RevId: 435416635
3 years ago
Protobuf Team
78f5af8103
Internal change
...
PiperOrigin-RevId: 435060849
3 years ago
Protobuf Team
b8edc7153f
Internal change
...
PiperOrigin-RevId: 435056074
3 years ago
Joshua Haberman
99d0b36baa
Change parameter to const void*.
3 years ago
Joshua Haberman
570332dfee
Ruby needs the "seed" parameter in our hash function.
3 years ago
Joshua Haberman
a1a101ab8e
clang-format.
3 years ago
Joshua Haberman
cb55c4d781
Addressed PR comments.
3 years ago
Joshua Haberman
8d148f023e
Clang-format and fixed missing dep.
3 years ago
Joshua Haberman
20e7802fca
Clang-format.
3 years ago
Joshua Haberman
3692e6659f
Reverted decode_fast.c changes. They are not necessary for this PR.
3 years ago
Joshua Haberman
c4ae35070b
Removed asserts we can no longer count on.
3 years ago
Joshua Haberman
911a25e738
Passes nearly all tests!
3 years ago
Joshua Haberman
273398ca5f
Removed MessageLayout from upbc.
3 years ago
Joshua Haberman
5b711f286b
WIP.
3 years ago
Joshua Haberman
e0aaad386f
Passes all conformance tests!
3 years ago
Joshua Haberman
37a7661855
Fixed bitmath bug.
3 years ago
Joshua Haberman
c3d8ef7939
Get packed flag working.
3 years ago
Joshua Haberman
03c1fe48c4
We are passing most tests and most conformance tests!
...
Proto2 enum mini-table building is not yet implemented.
3 years ago
Joshua Haberman
76a81e2177
WIP.
3 years ago