This change significantly reduces the code size for large enums and improves
performance by reducing cache misses and branch mispredictions.
Change the table-driven parser to use these tables instead of going through the _IsValid functions. This avoids indirect function calls in the parser.
PiperOrigin-RevId: 560179698
Our automation clobbered a few more files, so let's move them
temporarily so that we can put them back in place in a way that "git
blame" continues to work.
This is the second attempt to fix our Git history. This should allow
"git blame" to work correctly in the upb/ directory even though our
automation unexpectedly blew away that directory.
upb is going to have its own Bazel repository for now, so this change will
ensure that things like `bazel query //...` won't try to descend into upb and
get confused. I would think that Bazel should see the `WORKSPACE` file and
know not to descend into the upb/ directory, but that does not seem to be
happening (possibly a Bazel bug).
PiperOrigin-RevId: 560072475
We still retain RawMessage and RawArena, but drop the macro for readability.
In lieu of invoking define_opaque_nonnulls, we spell out RawMessage and RawArena by hand.
PiperOrigin-RevId: 559906043
On the read side avoid writing to memory via volatile. The volatile access will generate its own tsan checks because it is touching memory.
On the write side also avoid the volatile access by unconditionally writing to the memory. The address used for the tsan validation is dedicated for it so it doesn't matter if we write arbitrary values to it.
PiperOrigin-RevId: 559841351
This allows the compiler to statically detect use-after-free bugs.
This change touches a subset of field types. More changes to follow.
PiperOrigin-RevId: 559832961
- `generate_minimal_imports` is now `yes`, this reduces the imports generated
into the generated source.
- `headers_use_forward_declarations` is now `no`; this causes the generated
.pbobj.h files to directly import all the headers needed to define types used by
this types defined in the file. This provides better compatibility for Swift
interop especially when the ObjC protos are used in multiple libraries as
forward declarations can cause issues for importing into Swift.
If you need to override either options, please open an issue on github to report
the reason. A future release of the library will remove these options locking in
the new behaviors.
PiperOrigin-RevId: 559737716