Hong Shin
43778a5e2b
Add V0 support for floats and doubles
...
PiperOrigin-RevId: 547503785
2 years ago
Martijn Vels
befdd1672d
Add internally visible Arena enabled copy constructor
...
PiperOrigin-RevId: 547364398
2 years ago
Protobuf Team Bot
9772a5af19
Auto-generate files after cl/547362713
2 years ago
Martijn Vels
bda0158e85
Add a constexpr std::initializer_list<> constructor to HasBits
...
This provides easy constant / default initialization of donated string bit masks
PiperOrigin-RevId: 547362713
2 years ago
Martijn Vels
5cf74223aa
Add protected `internal_visibility()` for Message derived classes.
...
PiperOrigin-RevId: 547316463
2 years ago
Thomas Van Lenten
d8b1a626dd
Use Printer::Emit formatting to remove optional args from GetOptionalDeprecatedAttribute.
...
PiperOrigin-RevId: 547303540
2 years ago
Thomas Van Lenten
0196d1e138
Move the two bools for EmitComment to a flags enum
...
Makes call sites easier to ready and should make things safer
if this ever needs some other support in the future.
PiperOrigin-RevId: 547284873
2 years ago
Thomas Van Lenten
3c2af99960
Clearify that ExtensionGenerator gets a message or root class.
...
PiperOrigin-RevId: 547207538
2 years ago
Thomas Van Lenten
b830c62623
Remove no longer needed comment helper.
...
PiperOrigin-RevId: 547200328
2 years ago
Hong Shin
fcab1a4371
Add V0 support for signed ints
...
PiperOrigin-RevId: 547200059
2 years ago
Thomas Van Lenten
6c4ab101ce
Move MessageGenerator::GenerateSource over to Printer::Emit
...
There are whatespace changes because I couldn't get some of the
generated CPreProcessor things to line up in the exact same way.
PiperOrigin-RevId: 547188309
2 years ago
Protobuf Team Bot
3d6a28f95f
Auto-generate files after cl/546969351
2 years ago
Protobuf Team Bot
55e5230196
Clean up macros related to the phased rollout of TSan validation.
...
PiperOrigin-RevId: 546969351
2 years ago
Thomas Van Lenten
54377be12c
Move MessageGenerator::GenerateMessageHeader over to Printer::Emit
...
PiperOrigin-RevId: 546930919
2 years ago
Thomas Van Lenten
aa72b19bf9
Move *FieldGeneator over to Printer::Emit.
...
Minor updates to how comments are output to have a method
so folks can directly call Emit to handle multline things correctly.
PiperOrigin-RevId: 546921123
2 years ago
Protobuf Team Bot
d18cacaeb9
Migrate hash_map<bool, T> to std::array<T, 2>
...
PiperOrigin-RevId: 546859975
2 years ago
Hong Shin
b3942c0618
In this CL, we add V0 support for unsigned ints (32 and 64).
...
PiperOrigin-RevId: 546859828
2 years ago
مهدي شينون (Mehdi Chinoune)
c2f07bb80f
Fix building shared libraries on MinGW-w64 ( #13240 )
...
Closes #13240
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/13240 from MehdiChinoune:mingw-shared 45600c9ccc
PiperOrigin-RevId: 546541196
2 years ago
Protobuf Team Bot
51f79d4415
Automated rollback of commit 3fec30fe28
.
...
PiperOrigin-RevId: 546409814
2 years ago
Chris Kennelly
3fec30fe28
Remove TODO and unnecessary branch/store in optimized builds.
...
PiperOrigin-RevId: 546382890
2 years ago
Protobuf Team Bot
6bae7c2295
Reverse the dependency between message.h and reflection.h.
...
Otherwise we would have undefined templates in message.h.
PiperOrigin-RevId: 546314824
2 years ago
Protobuf Team Bot
3a3df3057b
Internal change.
...
PiperOrigin-RevId: 546314630
2 years ago
Martijn Vels
5db61db331
Update comment for why templated function for Grow<> does not work here
...
PiperOrigin-RevId: 546289557
2 years ago
Protobuf Team Bot
cca0eee0e2
internal changes
...
PiperOrigin-RevId: 546287121
2 years ago
Martijn Vels
2d8b38f316
Add InternalVisibility and Arena enabled copy constructor to RepeatedField
...
PiperOrigin-RevId: 546121791
2 years ago
Protobuf Team Bot
0cb139cf9e
Auto-generate files after cl/546076822
2 years ago
Mike Kruskal
c3b72b99b4
Migrate internal C++-only test protos to editions.
...
This is some low hanging fruit that can increase our test coverage of editions. Since only the C++ backend is implemented today, we can't yet migrate any protos that are public, are used outside C++, or are depended on by any proto outside C++.
PiperOrigin-RevId: 546076822
2 years ago
Thomas Van Lenten
70002efe09
Move EnumFieldGenerator over to Printer::Print
...
PiperOrigin-RevId: 546039434
2 years ago
Thomas Van Lenten
f0d456b4b4
Move ExtensionGenerator over to Printer::Emit.
...
PiperOrigin-RevId: 546033854
2 years ago
Protobuf Team Bot
222b4b9cd6
Auto-generate files after cl/546026711
2 years ago
Martijn Vels
dc9b2bf857
Add InternalVisibility and Arena enabled copy constructor to Map
...
PiperOrigin-RevId: 546026711
2 years ago
Thomas Van Lenten
d3c6c9f9e1
Move OneofGenerator over to Printer::Emit
...
PiperOrigin-RevId: 545992294
2 years ago
Thomas Van Lenten
48dd1e81d2
Move EnumGenerator over to Emit.
...
PiperOrigin-RevId: 545982790
2 years ago
Mike Kruskal
7599210683
Editions test enhancements to cover utf8 handling.
...
This replaces the cc_utf8_verification and enforce_utf8 options with the corresponding feature values, consistent with C++ behavior. Further runtimes will be supported by refactoring the string_field_validation feature in a later change.
PiperOrigin-RevId: 545824813
2 years ago
Sandy Zhang
96c601d8b4
Delete extension declaration `is_repeated` (in favor of `repeated`) and `target_obsolete_do_not_use`.
...
PiperOrigin-RevId: 545757296
2 years ago
Mike Kruskal
1190f460c1
Improve feature propagation on map fields.
...
Generated map messages should inherit features from the original field, not the containing message. To do this, we copy *all* features from the original field to the generated ones, and disable explicit feature validation for them.
Additionally, this change fixes some bugs in the error handling of explicitly set features. String map fields should be allowed to use `string_field_validation`, and uninterpreted feature options in the proto should still be recognized for validation.
PiperOrigin-RevId: 545747503
2 years ago
Protobuf Team Bot
0275e51622
Enable TSan validation to detect when a mutable accessor of a message is called concurrently with another accessor on the same message, which is a data race.
...
This is the fourth phase, in which we enable validation for message fields.
PiperOrigin-RevId: 545695188
2 years ago
lbermes
532d2a2480
Update has_bits.h ( #13200 )
...
Issue #13143 Changed from size_t to int to avoid compiler size warnings. I do not expect that has bits needs to support more the 2^31 bits
see https://github.com/protocolbuffers/protobuf/issues/13143
Closes #13200
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/13200 from lbermes:Issue_13143 290a8093e7
PiperOrigin-RevId: 545488957
2 years ago
Protobuf Team Bot
fa4f15e320
Group PDProto related helper code.
...
PiperOrigin-RevId: 544945349
2 years ago
Protobuf Team Bot
194d18566b
Auto-generate files after cl/544805690
2 years ago
Mike Kruskal
4f9e41767a
Release prototype of Protobuf Editions.
...
This represents the future direction of protobuf, replacing proto2/proto3 syntax with editions. These will enable more incremental evolution of protobuf APIs through features, which are individual behaviors (such as whether field presence is explicit or implicit). For more details see https://protobuf.dev/editions/overview/ .
This PR contains a working implementation of editions for the protoc frontend and C++ code generation, along with various infrastructure improvements to support it. It gives early access for anyone who wants to a preview of editions, but has no effect on proto2/proto3 syntax. It is flag-guarded behind the `--experimental_editions` flag, and is an experimental feature with no guarantees.
PiperOrigin-RevId: 544805690
2 years ago
Protobuf Team Bot
bd589d9060
Auto-generate files after cl/544769979
2 years ago
Mike Kruskal
32828d843b
Internal changes
...
PiperOrigin-RevId: 544769979
2 years ago
Protobuf Team Bot
528344245e
Remove code for the paused linker-guided field stripping (go/lgpfs-paused).
...
PiperOrigin-RevId: 544763667
2 years ago
Thomas Van Lenten
c57ce72163
Move the rest of FileGenerator over to Emit
...
PiperOrigin-RevId: 544721559
2 years ago
Thomas Van Lenten
fb2523f51e
Fix up comment to use public api.
...
PiperOrigin-RevId: 544716296
2 years ago
Thomas Van Lenten
cea4551466
Move over some more of FileGenerator to Emit.
...
PiperOrigin-RevId: 544714210
2 years ago
Thomas Van Lenten
70b0769073
Start conversion to use Printer::Emit()
...
Move ImportWriter over and some of FileGenerator.
PiperOrigin-RevId: 544690162
2 years ago
Martijn Vels
d063281036
Internal cleanup
...
PiperOrigin-RevId: 544641683
2 years ago
Protobuf Team Bot
b17c4f9e5f
Auto-generate files after cl/544398743
2 years ago