Eric Salo
c67021f84a
split out the json string-to-int functions for general use
...
PiperOrigin-RevId: 469509635
2 years ago
Eric Salo
24f567b64a
clean up the public api for mini descriptors
...
push the gory details down into internal/ where they belong
PiperOrigin-RevId: 461264404
2 years ago
Mike Kruskal
17b6451684
Bumping protobuf dependency to newer commit
...
PiperOrigin-RevId: 460811319
2 years ago
Eric Salo
9b3e87307d
upb: upb_EnumDefs are now built using mini descriptors
...
Added upb_EnumDef_IsSorted() as an optimization for presorted enum protos
PiperOrigin-RevId: 460564949
2 years ago
Eric Salo
410143b265
split out some unicode logic from the json decoder
...
Also fixed a bug in the json decoder which caused it to break on a code point value of exactly 0x10ffff
PiperOrigin-RevId: 459856813
2 years ago
Protobuf Team Bot
ff46379efe
Prepare build for C++ generator.
...
PiperOrigin-RevId: 459265699
2 years ago
Protobuf Team Bot
8c44f04697
create and lock down upb/internal/array.h
...
Internal array functions are now implemented in upb/internal/array.c and declared in
upb/internal/array.h, which only has local visibility.
PiperOrigin-RevId: 458260144
2 years ago
Joshua Haberman
125db89ff5
Added fuzz tests for mini table building and binary format parsing/serialization.
...
PiperOrigin-RevId: 458240180
2 years ago
Protobuf Team Bot
ca08ff5b74
lock down upb/internal/decode.h
...
PiperOrigin-RevId: 457116753
2 years ago
Protobuf Team Bot
033859ff5d
rename internal/upb.h as internal/encode.h
...
add build target for upb/internal/encode.h and lock down its visibility
PiperOrigin-RevId: 457087638
2 years ago
Protobuf Team Bot
15596be402
move table.c into upb/internal
...
PiperOrigin-RevId: 457044228
2 years ago
Protobuf Team Bot
7975945e61
clean up the dependency graph some more
...
PiperOrigin-RevId: 456890270
2 years ago
Protobuf Team Bot
e153b52394
split out upb_StringView from upb.h
...
PiperOrigin-RevId: 456858455
2 years ago
Protobuf Team Bot
8d0d13f2bc
Fix the dependency chain for internal/arena.h
...
Clean up a few other superfluous #include's and forward declarations
PiperOrigin-RevId: 456851942
2 years ago
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
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
e5f2601836
use constraints values in @platforms instead of @bazel_tools//platforms https://github.com/bazelbuild/bazel/issues/8622
...
PiperOrigin-RevId: 452387904
3 years ago
Joshua Haberman
4ffeaa6a58
Fixed Python Tests by disabling the numpy test for now.
...
PiperOrigin-RevId: 452357087
3 years ago
Joshua Haberman
6df5517d25
Consolidate upb visibility into a single visibility list.
...
PiperOrigin-RevId: 450733238
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
Protobuf Team
459059e301
Add Extensions to mini table based reflection apis.
...
PiperOrigin-RevId: 447561140
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
Xavier Bonaventura
1143481fe2
Remove none existing folders
...
This folders do not exist and this prevents to build with --incompatible_disallow_empty_glob
https://github.com/bazelbuild/bazel/issues/8195
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
bef53686ec
Add support for clear field in upbc.
...
Add support for setting extension field value.
PiperOrigin-RevId: 439365359
3 years ago
Joshua Haberman
a5243ff6d9
Restructure our file syncing so GitHub only files are tracked separately in Piper.
...
PiperOrigin-RevId: 438395194
3 years ago
Protobuf Team
b8edc7153f
Internal change
...
PiperOrigin-RevId: 435056074
3 years ago
Joshua Haberman
8d148f023e
Clang-format and fixed missing dep.
3 years ago
Joshua Haberman
970c645140
Fixes for google3 (layering check and formatting).
3 years ago
Joshua Haberman
50c1298f32
Added conformance test variant to exercise dynamic minitable building.
3 years ago
Joshua Haberman
8ede0d552d
Tests are passing.
3 years ago
Joshua Haberman
dfc07a8f89
Added explicit dep on :table from Python.
3 years ago
Joshua Haberman
8c530f9226
Changed generated code deps to avoid deps on core libraries.
...
This will allow the core libraries to be visibility controlled if
necessary.
3 years ago
Matt Kulukundis
42c121ed79
fix msg_test harder
3 years ago
Matt Kulukundis
a3bd5f8f57
fix msg_test to be explicit about its deps
3 years ago
Matt Kulukundis
c49e6dfbac
Switch to using :port
3 years ago
Matt Kulukundis
edd1dd30e7
Fix missing build deps
3 years ago
Matt Kulukundis
92d71a4667
make deps explicit
3 years ago
Matt Kulukundis
c8f823ef0a
explicitly include deps for internal headers
3 years ago
Matt Kulukundis
61b0905040
add some missing testonly attributes
3 years ago
Joshua Haberman
60a3edb87f
Code is in place to generate from upbc, but segv results.
3 years ago
Joshua Haberman
502d6ba1d6
Moved fuzzing to a sub-directory.
...
gRPC does not want to depend on rules_fuzzing.
3 years ago
Joshua Haberman
11b6df0c46
Moved tests into the main source tree.
3 years ago