SIGN IN SIGN UP

Protocol Buffers - Google's data interchange format

0 0 35 C++

The MiniDescriptor parser is now capable of building fasttables at runtime.

Prior to this CL, fasttables were only possible to build at compile time, using generated code.  Each table entry would link to a fast parser function symbolically, using a name like `upb_DecodeFast_Varint32_Scalar_Tag1Byte`.

With this CL, we can now do the same for MiniTables built at runtime.  This requires that we can pick a parser function dynamically, which requires building an array of all such functions and choosing the right one by index.

This will increase the code size overhead since *all* fast functions are referenced now (but only when fasttable is enabled, which is not the default).

This also requires us to wait until the end of MiniDescriptor parsing to allocate the MiniTable, since we use variably-sized fasttables whose size depends on the set of fields that are present and their field numbers, types, etc.

PiperOrigin-RevId: 756792199
J
Joshua Haberman committed
c2d0e28d87a681dc79d39745be6478e9846730f7
Parent: a7ff7a3
Committed by Copybara-Service <copybara-worker@google.com> on 5/9/2025, 4:18:38 PM