changes.
(1) Use PROTOBUF_NOINLINE attributes to avoid inlining of
Clear(), ByteSizeLong() and IsInitialized() routines
within the same .pb.cc file
(2) If the tag number is less than 16 and the type is one of
a handful of common types, call a non-inlined templated
routine specialized for that tag number that handles both
the EnsureSpace call and the encoding of the tag and the
value into the array.
PiperOrigin-RevId: 529162319
Without it some compilers will not constant initialize the tables and cause
runtime failures during registration. We must be able to parse descriptors
during dynamic initialization.
PiperOrigin-RevId: 529092745
We found last week that Clang's support for `musttail` on 32-bit Linux does not
seem to work reliably, so let's disable it for now.
PiperOrigin-RevId: 528817403
While embedded nulls are technically allowed in JSON strings (and thus as object keys), they put undesirable constraints on implementations. Embedded nulls require that string length is stored explicitly, which wastes memory to accommodate a case that virtually nobody wants or needs.
PiperOrigin-RevId: 528484333
This is a new feature allowing fields to be annotated with a `targets` option
specifying what kinds of entities that field may be applied to when used in an
option.
PiperOrigin-RevId: 527990260
Fix for unknown type `int32_t` in `src/google/protobuf/compiler/objectivec/text_format_decode_data.h`
Issue encountered when building with GCC 13 (MinGW-w64 on Windows 64-bit).
Error:
```
In file included from R:/winlibs-gcc13-64/protobuf-22.3/src/google/protobuf/compiler/objectivec/text_format_decode_data.cc:31:
R:/winlibs-gcc13-64/protobuf-22.3/src/google/protobuf/compiler/objectivec/text_format_decode_data.h:59:18: error: 'int32_t' has not been declared
59 | void AddString(int32_t key, const std::string& input_for_decode,
| ^~~~~~~
R:/winlibs-gcc13-64/protobuf-22.3/src/google/protobuf/compiler/objectivec/text_format_decode_data.h:68:21: error: 'int32_t' was not declared in this scope
68 | typedef std::pair<int32_t, std::string> DataEntry;
| ^~~~~~~
R:/winlibs-gcc13-64/protobuf-22.3/src/google/protobuf/compiler/objectivec/text_format_decode_data.h:40:1: note: 'int32_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
39 | #include "google/protobuf/port_def.inc"
+++ |+#include <cstdint>
40 |
```
Closes#12554
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/12554 from brechtsanders:patch-1 0ab04b43b6
PiperOrigin-RevId: 527667592
Sanitizers are picky for container start addresses to be aligned at 8 byte aligned offsets, which causes issues under 32 bit compilations as we lay out the internal layout as {arena*, elements[...]}. This change forces the minimum header size to be at least 8 bytes, adding padding as needed.
PiperOrigin-RevId: 527596133
These changes hid public APIs that are deprecated in advance of protobuf editions. They will be fully removed in a future release. Any uses of them should be migrated to the future-facing feature helpers we provide on descriptor classes.
PiperOrigin-RevId: 527422059
This way, when e.g. `Arena::CreateMessage<RepeatedPtrField<Msg>>` is called with a non-null arena, we won't end up calling the destructor of the repeated field later.
Also add some missing includes in unittest.
PiperOrigin-RevId: 527382003
These changes hid public APIs that are deprecated in advance of protobuf editions. They will be fully removed in a future release. Any uses of them should be migrated to the future-facing feature helpers we provide on descriptor classes.
PiperOrigin-RevId: 527362587
This saves 24 bytes on each `map` field when reflection is not used.
It also delays constructing a Mutex until reflection is needed. This means we do
not have to register the mutex for destruction in the arena for normal
operation.
PiperOrigin-RevId: 527051764