Eric Salo
ff8e1b40ba
create base/ subdir and expand :status build target to :base
...
upb.h is now just a temporary stub
PiperOrigin-RevId: 488255988
2 years ago
Eric Salo
632471333c
clean up the build targets for collections, mem, reflection
...
PiperOrigin-RevId: 488226166
2 years ago
Eric Salo
33633fd604
generated code now uses the scalar get accessors
...
Also tweaked the generator to only emit a call to UPB_SIZE() when the two input values are actually different.
PiperOrigin-RevId: 487606926
2 years ago
Mike Kruskal
2b011bc759
Internal changes
...
PiperOrigin-RevId: 487599716
2 years ago
Eric Salo
0e76047f5f
add defaults to the mini table scalar getter accessor functions
...
also inline upb_MiniTable_HasField()
PiperOrigin-RevId: 487588457
2 years ago
Protobuf Team Bot
721c284959
Use UPB_SETJMP macro
...
PiperOrigin-RevId: 487009840
2 years ago
Eric Salo
aec12a466f
upb: split out :status as a separate build target
...
This should allow other upb components to depend upon the zcis without causing a cycle
PiperOrigin-RevId: 486987806
2 years ago
Eric Salo
a77b9665e1
move lua/ up to the top level directory where python/ lives
...
PiperOrigin-RevId: 486786325
2 years ago
Protobuf Team Bot
d4425d3f5b
Refactor out functions to get hasbit offset and mask.
...
PiperOrigin-RevId: 486738238
2 years ago
Eric Salo
75907f7af9
rename the upb_MiniTable subtypes to follow the upb style guide:
...
upb_MiniTable_Enum -> upb_MiniTableEnum
upb_MiniTable_Extension -> upb_MiniTableExtension
upb_MiniTable_Field -> upb_MiniTableField
upb_MiniTable_File -> upb_MiniTableFile
upb_MiniTable_Sub -> upb_MiniTableSub
PiperOrigin-RevId: 486712960
2 years ago
Eric Salo
cb7a51938c
inline the trivial int conversion functions in the code generator
...
PiperOrigin-RevId: 486670074
2 years ago
Eric Salo
f6307877d3
move portability stuff into upb/port/
...
Also delete redundant system #includes that are already pulled in by port/def.inc
PiperOrigin-RevId: 486398989
2 years ago
Eric Salo
46699b72ad
move message set enums into upb/wire/ (and use them)
...
PiperOrigin-RevId: 486366363
2 years ago
Eric Salo
5f1ff7c94a
change mini_table accessors test from the C encoder to the C++ encoder
...
PiperOrigin-RevId: 486363897
2 years ago
Copybara-Service
50a01524dc
Merge pull request #901 from limdor:patch-3
...
PiperOrigin-RevId: 486361732
2 years ago
Xavier Bonaventura
7de6cf7a7d
Build with incompatible_disallow_empty_glob
...
In order to flip the flag, all downstream projects should be adapted.
However, it is hard to fix them all if there are constant regressions.
Adding it to the CI will ensure that once the project can build with
incompatible_disallow_empty_glob it can keep building like that.
See: https://github.com/bazelbuild/bazel/pull/15327
2 years ago
Eric Salo
fd040a8bff
create collections/map_internal.h and collections/map_gencode_util.h
...
Move the map-related functions from msg_internal.h that are only used in generated code into map_gencode_util.h. Then move the rest of the map-related functions from msg_internal.h into map_internal.h.
PiperOrigin-RevId: 486299140
2 years ago
Protobuf Team Bot
a4779ef5f8
internal change
...
PiperOrigin-RevId: 486275169
2 years ago
Protobuf Team Bot
f345caf115
Update diagnostics for GCC warning
...
PiperOrigin-RevId: 486274318
2 years ago
Jie Luo
73661563db
Added is_closed to EnumDescriptor in protobuf python upb
...
PiperOrigin-RevId: 486253678
2 years ago
Protobuf Team Bot
0f4fffef16
Update config_setting visibility in support of --incompatible_config_setting_private_default_visibility.
...
For https://github.com/bazelbuild/bazel/issues/12933 .
PiperOrigin-RevId: 486230747
2 years ago
Protobuf Team Bot
306123e2e8
C++ Code generator
...
PiperOrigin-RevId: 486158566
2 years ago
Eric Salo
fd14316f38
create collections/ subdir for all array and map code
...
PiperOrigin-RevId: 486013554
2 years ago
Joshua Haberman
115b878a5c
Optimization: do not generate oneofs for proto3 optional fields.
...
Proto3 optional fields should use a hasbit for their presence. But we had been giving them oneof layouts, which makes them unnecessarily large. This CL will shrink messages with proto3 optional fields, by using hasbits instead of oneof cases for them.
PiperOrigin-RevId: 485998527
2 years ago
Joshua Haberman
93fee65c55
Merge pull request #884 from acozzette/test-cmake-generation
...
Make trivial change to CMakeLists.txt to test auto-generation
2 years ago
Eric Salo
d9b6f13cde
remove upb_MtDataEncoder from the public surface
...
PiperOrigin-RevId: 485928803
2 years ago
Eric Salo
0bb466356d
create text/ subdir for all text-format code
...
Currently all we have is an encoder but eventually a decoder will also go here.
PiperOrigin-RevId: 485911424
2 years ago
Protobuf Team Bot
9b8785ebd3
Pin Upb to C++ 17
...
Update rules_fuzzing to v0.3.2
PiperOrigin-RevId: 485902979
2 years ago
Eric Salo
e137175092
create wire/ subdir for all wire-format code
...
PiperOrigin-RevId: 485898080
2 years ago
Eric Salo
f409c9985b
create mem/ subdir for all arena code
...
PiperOrigin-RevId: 485884460
2 years ago
Mike Kruskal
5ba0d84c88
Internal Change
...
PiperOrigin-RevId: 485726227
2 years ago
Adam Cozzette
496276471d
Make trivial change to CMakeLists.txt to test auto-generation
...
If the auto-generation is working correctly, then CMakeLists.txt should
be quickly auto-updated with a change that undoes this one.
2 years ago
Eric Salo
c033eff26f
split apart mini_table.c into a new subdir
...
PiperOrigin-RevId: 484352293
2 years ago
Joshua Haberman
6c4dc6f9e8
Merge pull request #873 from acozzette/update-cmake-files
...
Check in generated CMake files
2 years ago
Eric Salo
5c646803ef
implement mini descriptors for message sets
...
PiperOrigin-RevId: 484058392
2 years ago
Eric Salo
cb5be728d7
fix bug in mini descriptor map decoder
...
PiperOrigin-RevId: 483960513
2 years ago
Mike Kruskal
41017ef8dc
Fixes https://github.com/protocolbuffers/upb/issues/869
...
PiperOrigin-RevId: 483794621
2 years ago
Adam Cozzette
52be7c2960
Check in generated CMake files
...
Once the GitHub action is fixed, these will be auto-updated whenever
necessary. I realized it would be a good idea to add them back first,
though, just to make sure nothing breaks before we enable the
auto-updating.
2 years ago
Eric Salo
20310e2f3a
implement mini descriptors for maps
...
PiperOrigin-RevId: 483474044
2 years ago
Eric Salo
6f68ba1350
upb: fail if a message set contains any sub-fields
...
This was causing fuzzer test failures.
Unrelated: inlined a few calls to upb_MessageDef_FullName() for performance
PiperOrigin-RevId: 483389910
2 years ago
Eric Salo
067c7aa3f1
check for malformed map entries
...
PiperOrigin-RevId: 481258673
2 years ago
Eric Salo
a4f240c18b
backport a fuzzer test patch from an earlier github branch
...
PiperOrigin-RevId: 481251218
2 years ago
Mike Kruskal
9e2d7f02da
Support local builds of upb's python wheel build.
...
PiperOrigin-RevId: 481207184
2 years ago
Eric Salo
36ce2fa7d1
add version/tag chars to the start of all mini descriptors
...
Verified during decoding. The specific values are just placeholders for now.
PiperOrigin-RevId: 481009599
2 years ago
Eric Salo
df34b04658
make upb_ExtensionRegistry_AddArray() and upb_ExtensionRegistry_Lookup() public
...
Previously these were internal _upb functions but it turns out that they are also useful outside of upb.
PiperOrigin-RevId: 480997511
2 years ago
Mike Kruskal
fc73215f86
Internal change
...
PiperOrigin-RevId: 480942674
2 years ago
Mike Kruskal
72f7799d12
Internal change
...
PiperOrigin-RevId: 480925629
2 years ago
Eric Salo
40998462d6
add upb_MtDataEncoder_EncodeExtension()
...
We need to sharpen the distinction between messages and extensions in the mini
descriptor encoder, so split the code paths for each.
PiperOrigin-RevId: 480675339
2 years ago
Mike Kruskal
4e67cea19c
Internal changes
...
PiperOrigin-RevId: 480471896
2 years ago
Mike Kruskal
d861ff5411
Reserve C++20 keywords
...
PiperOrigin-RevId: 480445608
2 years ago