This CL kicks any definition longer than three or so lines out of the class
body and defines them out of line. The number of private definitions at the head of the class was getting completely out of control.
Ideally we would not kick Printer::Sub out, since its API is important,
but there's no way to do this while also moving ValueImpl out of the class,
which was taking on a whole lot of space.
Today I learned that an out-of-line template definition can have multiple template <> declarations, which is necessary to be able to utter the signature of those symbols out of line.
PiperOrigin-RevId: 495030857
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: 494877304
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