This change implements the existing 'Align*' logic in terms of `arena_align.h` enabling further cleanups and a long needed split of arena_impl.h into serial_arena.h and thread_safe_arena.h. The latter reduces the cost of adding new features or optimizations to arena.
PiperOrigin-RevId: 494291562
This change implements the existing 'Align*' logic in terms of `arena_align.h` enabling further cleanups and a long needed split of arena_impl.h into serial_arena.h and thread_safe_arena.h. The latter reduces the cost of adding new features or optimizations to arena.
PiperOrigin-RevId: 494259282
In particular, this allows for configuring what the "consume after" characters that follow
a $...$ are, which previously were ";," for callback subs and "" for everything else.
In a followup the three-argument constructor for Sub will be removed and replaced with
calls to Annotate().
Also, calls to WithVars still reject closure arguments, but this check happens at runtime
now. This is a minor papercut for users that simplifies the implementation of Sub and
related private types immensely.
PiperOrigin-RevId: 494254545
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