Using _impl_ makes this trigger on mutations of the first field in _impl_, which makes the triggering change arbitrarily based on field order. Also, if we do TSan validation using the address of a particular field, then there will be false positive data races detected in cases where that field is mutated concurrently with a call to an accessor for another field in the message.
Note that TSan validation is currently disabled so this should be a no-op.
PiperOrigin-RevId: 540978247
available.
This prevents flushing hasbits unnecessarily, and enables the fast dispatch to the next field instead of returning back to ParseLoop to do it.
PiperOrigin-RevId: 540717028
Fixes the following compiler warning:
```
external/com_google_protobuf/src/google/protobuf/compiler/retention.cc:236:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<google::protobuf::SourceCodeInfo_Location*>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
```
Closes#13062
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/13062 from thomasegriffith:main 9f1b766fba
PiperOrigin-RevId: 540621306
`TextFormat::ParseFieldValueFromString` would take `const std::string &` as the input, but it's a read-only string and immediately passed to `ArrayInputStream`. This CL will change it to `absl::string_view`.
PiperOrigin-RevId: 540609068
This has caused repeated issues due to the fact that it checks the entire repo. Most recently, it decided to complain about a typo in a file that hasn't been touched in 5 years.
PiperOrigin-RevId: 540356791
This unifies proto2 and proto3 (and later editions) implementations to incorporate performance optimizations directly referencing unsafe and caching reflection presence field (and offset) to all syntaxes. These optimizations were originally added in cl/187404278 for proto2 only.
These optimizations do not seem to be meaningfully proto2/3-specific. The UnsafeUtil methods simply wrap the corresponding Unsafe methods. Presence bit fields are used in the same way for proto3, but this optimization seems to predate proto3 optional.
While in there, better document how the buffer encoding and mask/offsets work.
PiperOrigin-RevId: 540320373
Our automation can't currently update release branches, so we need to enable staleness tests as presubmits to force manual regeneration.
PiperOrigin-RevId: 540094169
This implements the associated type change suggested by dmitrig@.
I don't foresee use cases that would make `ViewFor` allowing multiple `T` to be
useful, rather than confusing.
This also implements some suggested wording changes that I agree with.
PiperOrigin-RevId: 540024883
This treats clear similarly to has and get to avoids issues from missing clear method for escaped synthetic oneofs (e.g. field _underscore -> oneof X_underscore). Previously, `clear` was using the clear method of the field (which has the same camel-cased name outside of the underscore case).
We also remove synthetic oneof camelCase names from the gencode for FieldAccesorTable since these should not be used / exposed.
Fixes#12880
PiperOrigin-RevId: 539069001