SIGN IN SIGN UP

Protocol Buffers - Google's data interchange format

0 0 35 C++

Implemented a newly-designed scheme for enumerating fasttable function combinations.

We lean heavily on the preprocessor, but we do so in a nice and readable way that allows us to reuse our lists for several purposes:

- To create C `enum`s for each dimension.
- To count the number of possibilities for each dimension.
- To generate a cross-product of all dimension combinations, with a canonical ordering of functions that lets us address functions by index.
- To generate function names for each combination.

Unlike the initial design for fasttable, this scheme lets us generate an array of all fast field parsers, which will allow us to build fasttables at runtime from MiniDescriptors.

While I ran the tests with `--//third_party/upb:fasttable_enabled=True` and found that most of them pass (and none regress compared to HEAD), this code is not currently tested in TAP and we know that the fasttable parser has bugs. Subsequent CLs will fuzz it against the main parser so that we can make it truly robust.

#test-continuous

PiperOrigin-RevId: 755606670
J
Joshua Haberman committed
f873475c767bd07b0426acd4e06287e0fce7289a
Parent: 49f1873
Committed by Copybara-Service <copybara-worker@google.com> on 5/7/2025, 1:28:54 AM