Several of the classes vended by the runtime don't really support subclassing,
so mark them as such to get compiler enforcement just in case.
PiperOrigin-RevId: 505221732
Since it really just wraps some basic types, there are lots of instances
that are actually the same content wise, so to better match the contract
for NSObject it should compare the fields.
PiperOrigin-RevId: 505167021
The root class only needs to be started up if the message scopes extensions.
This updates the startup flows so the root is only started when the message
scopes extensions and thus the runtime requires that startup.
Bump the generated source version to account for the new initializer that
doesn't take the rootClass argument.
Fix typo while at it.
PiperOrigin-RevId: 504899046
1) Move the check for invalid varint outside handling a >= 32 bit varint. This gives a modest speedup (+0.5%) on the [fleetbench protogen benchmark](https://github.com/google/fleetbench/tree/main/fleetbench/proto) by working around an LLVM issue which inserted a redundant branch.
2) Move ValueBarrier() to parse_context.h so we can delete ForceToRegister(), which does the same thing as the single value ValueBarrier() implementation.
PiperOrigin-RevId: 504883550
(Edited by jskeet) For public release notes:
Add a public `IMessage.MergeFrom(ReadOnlySequence<byte>)` extension method, exposing existing internal functionality.
(Parsing a completely new message from `ReadOnlySequence<byte>` was already publicly available, just not merging.)
----
Public the `MergeFrom` method of type `ReadOnlySequence<byte>`.
We found that the `MergeFrom` method of type `ReadOnlySequence<byte>` is internal.
**We need it !!!**
Closes#11124
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/11124 from VAllens:patch-1 0ddea03042
PiperOrigin-RevId: 504575534
This deletes our old branches of internal Abseil code in favor of their newly open-sourced library. Notably, this removes the ability to turn CHECK crashes into exceptions.
PiperOrigin-RevId: 504460562
Can result in a small reduction in binary size as well as slight performance
improvement during serialization since it is less subcalls for writing out any
extensions in the ranges.
PiperOrigin-RevId: 504272482
Currently RepeatedField allocates and constructs all elements on 'Reserve'. This creates inefficiencies, but more problematically, leads to sanitizer issues once we have instances that actively poison their private contents such as Cord. This change fixes RepeatedField to only create actually 'live' elements.
PiperOrigin-RevId: 504121827