This change extracts the existing tokenization logic into one function and
tweaks it slightly, making it easier to understand how format strings are tokenized
at the cost of a few allocations.
Most of the changes in generated code are due to slight changes in how indentation are handled that harmlessly confuse some odd uses of cpp::Formatter; Emit() is not impacted.
PiperOrigin-RevId: 494193350
This generates Messages and Enums into separate files, this is the start of some
exploratory work to see if not using `-ObjC` with the linker can reduce the size
of protos by ensuring there are linker references for all the classes needed.
To take advantage of this, the Application code can't use things like
`NSClassFromString`, as that would not generate any inker reference for usage of
the class.
Again, this is an experimental feature and may change or be removed at any time,
it is not counted as a part of the official options provided by the ObjC
support.
PiperOrigin-RevId: 493595005
Add missing header <istream> and <ostream>
Remove unneeded proto headers repeated_field.h and generated_message_util.h
Remove unnecessary conversion when calling absl::Hex
Use StrCat rather than repeated string addition
Use string_view parameter rather than `const char *`
Make single-argument constructor explicit
Use consistent InitializationErrorMessage logic
Fix a typo
PiperOrigin-RevId: 493427054
Replace access to variables created in globals() by explicit access to the globals() array. This avoids static analysis of the code to error out on those unknown variables, and make the files cythonable.
Fixes#10800Closes#11011
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/11011 from vthib:10800-cython-compatibility 705da40d5c
PiperOrigin-RevId: 493379473
This CL changes the prefetch to NTA instead of T0 to reduce cache pollution with a simplified, yet more efficient cleanup prefetch loop which removes stores and loads on the local prefetch stack, and instead simply repeats the load and branch of the prefetch resulting in CPU savings.
PiperOrigin-RevId: 493136574
The text format specs state that short formed repeated field should be valid. For example:
```
repeated_field: [{}, {}]
```
However, this was not supported when text format parser tries to skip **unknown fields**.
PiperOrigin-RevId: 493085702
The allowlist is currently empty.
It uses a simple text format to avoid reentrant dependencies into protobuf
parsing, and allow sharing between languages.
PiperOrigin-RevId: 493075113