This turns the constexpr constructors into templates to silence errors when constexpr isn't valid. We are also switching to 12.2 for GCC/cmake tests to prevent regressions (9.5 and 13.1 are already tested by GCC/bazel tests).
Fixes#12807
PiperOrigin-RevId: 532258101
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