Formerly, they had their own fast path. Now they share the chunked processing of all fields. This makes chunked processing more effective as an optimization and also eliminates replicated code for repeated fields.
PiperOrigin-RevId: 532224517
This PR replaces the descriptor name validation regex with a validation method. This change allows the `System.Text.RegularExpressions` engine to be trimmed away in published apps that do standard protobuf serialization.
There are some other usages of `Regex` in Google.Protobuf, but they in `JsonParser`. They are only included in a published app if `JsonParser` is used.
Another benefit is a slightly faster app startup time. The removed regex was compiled, which has a high-ish fixed cost.
cc @jskeet@jtattermuschCloses#12174
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/12174 from JamesNK:jamesnk/remove-regex 9d065a3a71
PiperOrigin-RevId: 532210203
When we are running the destructor, we do not have an Arena. Since the Arena
is a runtime property, the compiler may not be able to optimize it out.
PiperOrigin-RevId: 531568752
This implements some cross-linking for traversing back up the tree, and some uniformity to aid templatized descriptor helpers. Later changes will make the previously public fields private
PiperOrigin-RevId: 531547696
In both cases a `size_t` was being converted to a `uint32_t`. These headers are used from application code, or at least from generated code, and the application may be compiling with more warnings enabled than normal.
Closes#12762
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/12762 from coryan:fix-avoid-warnings-with-MSVC 5ba6b5db1e
PiperOrigin-RevId: 531506224
This parser reduces binary code size between 1% and 20%, particularly of debug and sanitized builds, while improving aggregate performance.
Micro benchmarks may regress, but large system performance improves.
PiperOrigin-RevId: 531505892
DLLs get in the way of making these tables constexpr in the general case because cross-DLL references are not constant.
However, we need descriptor.proto tables to be constexpr so we keep constexpr there were we know it works. They do not reference other DLLs.
PiperOrigin-RevId: 531256398
When building protobuf with BUILD_SHARED_LIBS disabled, conformance_test_runner should link jsoncpp_static but not jsoncpp_lib.
Closes#12733
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/12733 from semlanik:main 2ab4be6bb0
PiperOrigin-RevId: 530926843