diff --git a/docs/options.md b/docs/options.md index 0dbd2def5b25e..32cfd80e94780 100644 --- a/docs/options.md +++ b/docs/options.md @@ -451,3 +451,8 @@ with info about your project (name and website) so we can add an entry for you. * Website: http://connect.build/ * Extension: 1167-1176 + +1. protocel + + * Website: https://github.com/Neakxs/protocel + * Extension: 1177-1178 diff --git a/docs/third_party.md b/docs/third_party.md index d9ff970227a03..267d9c9be4729 100644 --- a/docs/third_party.md +++ b/docs/third_party.md @@ -7,110 +7,103 @@ If you have a project that should be listed here, please ## Programming Languages -These are projects we know about implementing Protocol Buffers for other programming languages: -* Action Script: https://code.google.com/p/protobuf-actionscript3/ -* Action Script: https://code.google.com/p/protoc-gen-as3/ -* Action Script: https://github.com/matrix3d/JProtoc -* Action Script: https://github.com/zhongfq/protobuf-as3/ -* Ada: https://github.com/reznikmm/protobuf -* C: https://github.com/protobuf-c/protobuf-c -* C: https://koti.kapsi.fi/jpa/nanopb/ -* C: https://github.com/cloudwu/pbc/ -* C: https://github.com/haberman/upb/wiki -* C: https://github.com/squidfunk/protobluff -* C: https://github.com/eerimoq/pbtools -* C++: https://github.com/protocolbuffers/protobuf (Google-official implementation) -* C++: https://EmbeddedProto.com -* C/C++: http://spbc.sf.net/ -* C#: https://code.google.com/p/protobuf-csharp-port -* C#: https://silentorbit.com/protobuf/ -* C#/.NET/WCF/VB: https://code.google.com/p/protobuf-net/ -* Clojure: http://github.com/ninjudd/clojure-protobuf -* Clojure: https://github.com/clojusc/protobuf -* Clojure: https://protojure.readthedocs.io -* Common Lisp: http://github.com/brown/protobuf -* Common Lisp: http://github.com/qitab/cl-protobuf -* D: https://github.com/dcarp/protobuf-d -* D: https://github.com/msoucy/dproto -* D: https://github.com/opticron/ProtocolBuffer -* Dart: https://github.com/dart-lang/dart-protobuf (runtime) https://github.com/dart-lang/dart-protoc-plugin (code generator) -* Delphi: http://sourceforge.net/projects/protobuf-delphi/ -* Delphi: http://fundementals.sourceforge.net/dl.html -* Elixir: https://github.com/jeremyong/exprotoc -* Elixir: https://github.com/tony612/protobuf-elixir -* Elixir: https://github.com/ahamez/protox -* Elm: https://github.com/tiziano88/elm-protobuf -* Erlang: https://github.com/tomas-abrahamsson/gpb -* Erlang: http://piqi.org/ -* Erlang: https://github.com/basho/erlang_protobuffs (no longer maintained, use gpb instead) -* Hacklang/HHVM: https://github.com/y3llowcake/proto-hack -* GDScript: https://github.com/oniksan/godobuf (Godot v3 engine plugin) -* Go: https://github.com/golang/protobuf (Google-official implementation) -* Go: https://github.com/akunspy/gopbuf -* Go: https://github.com/gogo/protobuf -* GopherJS: https://github.com/johanbrandhorst/protobuf -* Haskell: https://hackage.haskell.org/package/hprotoc -* Haskell: https://github.com/google/proto-lens (Google-unofficial implementation) -* Haskell: https://github.com/awakesecurity/proto3-suite (code generator) https://github.com/awakesecurity/proto3-wire (binary serializer/deserializer) -* Haxe: https://github.com/Atry/protoc-gen-haxe -* Java: https://github.com/protocolbuffers/protobuf (Google-official implementation) -* Java/Android: https://github.com/square/wire -* Java: https://github.com/HebiRobotics/QuickBuffers/ -* Java ME: https://code.google.com/p/protobuf-javame/ -* Java ME: http://swingme.sourceforge.net/encode.shtml -* Javascript: https://code.google.com/p/protobuf-js/ -* Javascript: http://github.com/sirikata/protojs -* Javascript: https://github.com/dcodeIO/ProtoBuf.js -* Javascript: https://code.google.com/p/protobuf-for-node/ -* Javascript: https://code.google.com/p/protostuff/ -* Javascript: https://github.com/seishun/node-protoc-plugin (Node.js port of plugin.h) -* Javascript: https://github.com/seishun/node-protoc-gen-javascript (Node.js port of the Google-official implementation) -* Javascript: https://github.com/ButterCam/sisyphus-js -* Julia: https://github.com/tanmaykm/ProtoBuf.jl -* Kotlin: https://github.com/marcoferrer/kroto-plus -* Kotlin: https://github.com/Kotlin/kotlinx.serialization -* Kotlin: https://github.com/ButterCam/sisyphus -* Kotlin: https://github.com/open-toast/protokt -* Kotlin Multiplatform: https://github.com/streem/pbandk -* Lua: https://code.google.com/p/protoc-gen-lua/ -* Lua: http://github.com/indygreg/lua-protobuf -* Lua: https://github.com/Neopallium/lua-pb -* Matlab: https://code.google.com/p/protobuf-matlab/ -* Mercury: https://code.google.com/p/protobuf-mercury/ -* Objective C: https://code.google.com/p/protobuf-objc/ -* Objective C: https://github.com/alexeyxo/protobuf-objc -* OCaml: http://piqi.org/ -* Perl: http://groups.google.com/group/protobuf-perl -* Perl: https://metacpan.org/pod/Google::ProtocolBuffers -* Perl: https://metacpan.org/pod/Google::ProtocolBuffers::Dynamic -* Perl/XS: https://code.google.com/p/protobuf-perlxs/ -* PHP: https://code.google.com/p/pb4php/ -* PHP: https://github.com/allegro/php-protobuf/ -* PHP: https://github.com/chobie/php-protocolbuffers -* Prolog: http://www.swi-prolog.org/pldoc/package/protobufs.html -* Purescript: https://github.com/xc-jp/purescript-protobuf -* Python: https://github.com/protocolbuffers/protobuf (Google-official implementation) -* Python: https://github.com/eigenein/protobuf -* Python: https://github.com/danielgtaylor/python-betterproto -* R: http://cran.r-project.org/package=RProtoBuf -* Ruby: https://code.google.com/p/ruby-protobuf/ -* Ruby: http://github.com/mozy/ruby-protocol-buffers -* Ruby: https://github.com/bmizerany/beefcake/tree/master/lib/beefcake -* Ruby: https://github.com/localshred/protobuf -* Rust: https://github.com/tokio-rs/prost -* Rust: https://github.com/stepancheg/rust-protobuf/ -* Rust: https://github.com/tafia/quick-protobuf -* Scala: http://github.com/jeffplaisance/scala-protobuf -* Scala: https://code.google.com/p/protobuf-scala -* Scala: https://github.com/SandroGrzicic/ScalaBuff -* Scala: https://scalapb.github.io -* Solidity: https://github.com/celer-network/pb3-gen-sol -* Swift: https://github.com/alexeyxo/protobuf-swift -* Swift: https://github.com/apple/swift-protobuf/ -* Typescript: https://github.com/thesayyn/protoc-gen-ts -* Typescript: https://github.com/pbkit/pbkit -* Vala: https://launchpad.net/protobuf-vala -* Visual Basic: https://code.google.com/p/protobuf-net/ +These are projects we know about implementing Protocol Buffers for other +programming languages: * Action Script: +https://code.google.com/p/protobuf-actionscript3/ * Action Script: +https://code.google.com/p/protoc-gen-as3/ * Action Script: +https://github.com/matrix3d/JProtoc * Action Script: +https://github.com/zhongfq/protobuf-as3/ * Ada: +https://github.com/reznikmm/protobuf * C: +https://github.com/protobuf-c/protobuf-c * C: https://koti.kapsi.fi/jpa/nanopb/ +* C: https://github.com/cloudwu/pbc/ * C: https://github.com/haberman/upb/wiki * +C: https://github.com/squidfunk/protobluff * C: +https://github.com/eerimoq/pbtools * C++: +https://github.com/protocolbuffers/protobuf (Google-official implementation) * +C++: https://github.com/yksten/struct2x * C++: https://EmbeddedProto.com * +C/C++: http://spbc.sf.net/ * C#: https://code.google.com/p/protobuf-csharp-port +* C#: https://silentorbit.com/protobuf/ * C#/.NET/WCF/VB: +https://code.google.com/p/protobuf-net/ * Clojure: +http://github.com/ninjudd/clojure-protobuf * Clojure: +https://github.com/clojusc/protobuf * Clojure: https://protojure.readthedocs.io +* Common Lisp: http://github.com/brown/protobuf * Common Lisp: +http://github.com/qitab/cl-protobuf * D: https://github.com/dcarp/protobuf-d * +D: https://github.com/msoucy/dproto * D: +https://github.com/opticron/ProtocolBuffer * Dart: +https://github.com/dart-lang/dart-protobuf (runtime) +https://github.com/dart-lang/dart-protoc-plugin (code generator) * Delphi: +http://sourceforge.net/projects/protobuf-delphi/ * Delphi: +http://fundementals.sourceforge.net/dl.html * Elixir: +https://github.com/jeremyong/exprotoc * Elixir: +https://github.com/tony612/protobuf-elixir * Elixir: +https://github.com/ahamez/protox * Elm: +https://github.com/tiziano88/elm-protobuf * Erlang: +https://github.com/tomas-abrahamsson/gpb * Erlang: http://piqi.org/ * Erlang: +https://github.com/basho/erlang_protobuffs (no longer maintained, use gpb +instead) * Hacklang/HHVM: https://github.com/y3llowcake/proto-hack * GDScript: +https://github.com/oniksan/godobuf (Godot v3 engine plugin) * Go: +https://github.com/golang/protobuf (Google-official implementation) * Go: +https://github.com/akunspy/gopbuf * Go: https://github.com/gogo/protobuf * +GopherJS: https://github.com/johanbrandhorst/protobuf * Haskell: +https://hackage.haskell.org/package/hprotoc * Haskell: +https://github.com/google/proto-lens (Google-unofficial implementation) * +Haskell: https://github.com/awakesecurity/proto3-suite (code generator) +https://github.com/awakesecurity/proto3-wire (binary serializer/deserializer) * +Haxe: https://github.com/Atry/protoc-gen-haxe * Java: +https://github.com/protocolbuffers/protobuf (Google-official implementation) * +Java/Android: https://github.com/square/wire * Java: +https://github.com/HebiRobotics/QuickBuffers/ * Java ME: +https://code.google.com/p/protobuf-javame/ * Java ME: +http://swingme.sourceforge.net/encode.shtml * Javascript: +https://code.google.com/p/protobuf-js/ * Javascript: +http://github.com/sirikata/protojs * Javascript: +https://github.com/dcodeIO/ProtoBuf.js * Javascript: +https://code.google.com/p/protobuf-for-node/ * Javascript: +https://code.google.com/p/protostuff/ * Javascript: +https://github.com/seishun/node-protoc-plugin (Node.js port of plugin.h) * +Javascript: https://github.com/seishun/node-protoc-gen-javascript (Node.js port +of the Google-official implementation) * Javascript: +https://github.com/ButterCam/sisyphus-js * Julia: +https://github.com/tanmaykm/ProtoBuf.jl * Kotlin: +https://github.com/marcoferrer/kroto-plus * Kotlin: +https://github.com/Kotlin/kotlinx.serialization * Kotlin: +https://github.com/ButterCam/sisyphus * Kotlin: +https://github.com/open-toast/protokt * Kotlin Multiplatform: +https://github.com/streem/pbandk * Lua: +https://code.google.com/p/protoc-gen-lua/ * Lua: +http://github.com/indygreg/lua-protobuf * Lua: +https://github.com/Neopallium/lua-pb * Matlab: +https://code.google.com/p/protobuf-matlab/ * Mercury: +https://code.google.com/p/protobuf-mercury/ * Objective C: +https://code.google.com/p/protobuf-objc/ * Objective C: +https://github.com/alexeyxo/protobuf-objc * OCaml: http://piqi.org/ * Perl: +http://groups.google.com/group/protobuf-perl * Perl: +https://metacpan.org/pod/Google::ProtocolBuffers * Perl: +https://metacpan.org/pod/Google::ProtocolBuffers::Dynamic * Perl/XS: +https://code.google.com/p/protobuf-perlxs/ * PHP: +https://code.google.com/p/pb4php/ * PHP: +https://github.com/allegro/php-protobuf/ * PHP: +https://github.com/chobie/php-protocolbuffers * Prolog: +http://www.swi-prolog.org/pldoc/package/protobufs.html * Purescript: +https://github.com/xc-jp/purescript-protobuf * Python: +https://github.com/protocolbuffers/protobuf (Google-official implementation) * +Python: https://github.com/eigenein/protobuf * Python: +https://github.com/danielgtaylor/python-betterproto * R: +http://cran.r-project.org/package=RProtoBuf * Ruby: +https://code.google.com/p/ruby-protobuf/ * Ruby: +http://github.com/mozy/ruby-protocol-buffers * Ruby: +https://github.com/bmizerany/beefcake/tree/master/lib/beefcake * Ruby: +https://github.com/localshred/protobuf * Rust: https://github.com/tokio-rs/prost +* Rust: https://github.com/stepancheg/rust-protobuf/ * Rust: +https://github.com/tafia/quick-protobuf * Scala: +http://github.com/jeffplaisance/scala-protobuf * Scala: +https://code.google.com/p/protobuf-scala * Scala: +https://github.com/SandroGrzicic/ScalaBuff * Scala: https://scalapb.github.io * +Solidity: https://github.com/celer-network/pb3-gen-sol * Swift: +https://github.com/alexeyxo/protobuf-swift * Swift: +https://github.com/apple/swift-protobuf/ * Typescript: +https://github.com/thesayyn/protoc-gen-ts * Typescript: +https://github.com/pbkit/pbkit * Vala: https://launchpad.net/protobuf-vala * +Visual Basic: https://code.google.com/p/protobuf-net/ ## RPC Implementations diff --git a/kokoro/release/collect_all_artifacts.sh b/kokoro/release/collect_all_artifacts.sh index 20c6d8d785186..f6f237195fb0c 100755 --- a/kokoro/release/collect_all_artifacts.sh +++ b/kokoro/release/collect_all_artifacts.sh @@ -6,6 +6,7 @@ set -ex cd $(dirname $0)/../.. # Initialize any submodules. +git config --global --add safe.directory ${KOKORO_GFILE_DIR}/github/protobuf git submodule update --init --recursive # The directory with all resulting artifacts diff --git a/php/ext/google/protobuf/php-upb.c b/php/ext/google/protobuf/php-upb.c index a2cb3b5859d82..27ff52c47ecbd 100644 --- a/php/ext/google/protobuf/php-upb.c +++ b/php/ext/google/protobuf/php-upb.c @@ -147,12 +147,6 @@ #if defined(__GNUC__) || defined(__clang__) #define UPB_UNREACHABLE() do { assert(0); __builtin_unreachable(); } while(0) -#elif defined(_MSC_VER) -#define UPB_UNREACHABLE() \ - do { \ - assert(0); \ - __assume(0); \ - } while (0) #else #define UPB_UNREACHABLE() do { assert(0); } while(0) #endif @@ -978,18 +972,19 @@ static const upb_MiniTableSub google_protobuf_MessageOptions_submsgs[1] = { {.submsg = &google_protobuf_UninterpretedOption_msg_init}, }; -static const upb_MiniTableField google_protobuf_MessageOptions__fields[5] = { +static const upb_MiniTableField google_protobuf_MessageOptions__fields[6] = { {1, 1, 1, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, {2, 2, 2, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, {3, 3, 3, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, {7, 4, 4, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, + {11, 5, 5, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, {999, 8, 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, }; const upb_MiniTable google_protobuf_MessageOptions_msg_init = { &google_protobuf_MessageOptions_submsgs[0], &google_protobuf_MessageOptions__fields[0], - 16, 5, kUpb_ExtMode_Extendable, 3, 255, 0, + 16, 6, kUpb_ExtMode_Extendable, 3, 255, 0, }; static const upb_MiniTableSub google_protobuf_FieldOptions_submsgs[3] = { @@ -1033,16 +1028,17 @@ static const upb_MiniTableSub google_protobuf_EnumOptions_submsgs[1] = { {.submsg = &google_protobuf_UninterpretedOption_msg_init}, }; -static const upb_MiniTableField google_protobuf_EnumOptions__fields[3] = { +static const upb_MiniTableField google_protobuf_EnumOptions__fields[4] = { {2, 1, 1, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, {3, 2, 2, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, + {6, 3, 3, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, {999, UPB_SIZE(4, 8), 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, }; const upb_MiniTable google_protobuf_EnumOptions_msg_init = { &google_protobuf_EnumOptions_submsgs[0], &google_protobuf_EnumOptions__fields[0], - UPB_SIZE(8, 16), 3, kUpb_ExtMode_Extendable, 0, 255, 0, + UPB_SIZE(8, 16), 4, kUpb_ExtMode_Extendable, 0, 255, 0, }; static const upb_MiniTableSub google_protobuf_EnumValueOptions_submsgs[1] = { @@ -1305,7 +1301,7 @@ const upb_MiniTableFile google_protobuf_descriptor_proto_upb_file_layout = { * regenerated. */ -static const char descriptor[7820] = {'\n', ' ', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'd', 'e', 's', 'c', 'r', 'i', 'p', +static const char descriptor[7996] = {'\n', ' ', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'd', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', '.', 'p', 'r', 'o', 't', 'o', '\022', '\017', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '\"', 'M', '\n', '\021', 'F', 'i', 'l', 'e', 'D', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'S', 'e', 't', '\022', '8', '\n', '\004', 'f', 'i', 'l', 'e', '\030', '\001', ' ', '\003', '(', '\013', '2', '$', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', @@ -1495,7 +1491,7 @@ static const char descriptor[7820] = {'\n', ' ', 'g', 'o', 'o', 'g', 'l', 'e', ' 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', '\"', ':', '\n', '\014', 'O', 'p', 't', 'i', 'm', 'i', 'z', 'e', 'M', 'o', 'd', 'e', '\022', '\t', '\n', '\005', 'S', 'P', 'E', 'E', 'D', '\020', '\001', '\022', '\r', '\n', '\t', 'C', 'O', 'D', 'E', '_', 'S', 'I', 'Z', 'E', '\020', '\002', '\022', '\020', '\n', '\014', 'L', 'I', 'T', 'E', '_', 'R', 'U', 'N', 'T', 'I', 'M', 'E', '\020', '\003', '*', '\t', '\010', -'\350', '\007', '\020', '\200', '\200', '\200', '\200', '\002', 'J', '\004', '\010', '&', '\020', '\'', '\"', '\343', '\002', '\n', '\016', 'M', 'e', 's', 's', 'a', 'g', +'\350', '\007', '\020', '\200', '\200', '\200', '\200', '\002', 'J', '\004', '\010', '&', '\020', '\'', '\"', '\273', '\003', '\n', '\016', 'M', 'e', 's', 's', 'a', 'g', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\022', '<', '\n', '\027', 'm', 'e', 's', 's', 'a', 'g', 'e', '_', 's', 'e', 't', '_', 'w', 'i', 'r', 'e', '_', 'f', 'o', 'r', 'm', 'a', 't', '\030', '\001', ' ', '\001', '(', '\010', ':', '\005', 'f', 'a', 'l', 's', 'e', 'R', '\024', 'm', 'e', 's', 's', 'a', 'g', 'e', 'S', 'e', 't', 'W', 'i', 'r', 'e', 'F', 'o', 'r', 'm', 'a', 't', '\022', 'L', '\n', '\037', 'n', @@ -1504,120 +1500,127 @@ static const char descriptor[7820] = {'\n', ' ', 'g', 'o', 'o', 'g', 'l', 'e', ' 'n', 'd', 'a', 'r', 'd', 'D', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'A', 'c', 'c', 'e', 's', 's', 'o', 'r', '\022', '%', '\n', '\n', 'd', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'e', 'd', '\030', '\003', ' ', '\001', '(', '\010', ':', '\005', 'f', 'a', 'l', 's', 'e', 'R', '\n', 'd', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'e', 'd', '\022', '\033', '\n', '\t', 'm', 'a', 'p', '_', 'e', 'n', 't', 'r', 'y', -'\030', '\007', ' ', '\001', '(', '\010', 'R', '\010', 'm', 'a', 'p', 'E', 'n', 't', 'r', 'y', '\022', 'X', '\n', '\024', 'u', 'n', 'i', 'n', 't', -'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', '_', 'o', 'p', 't', 'i', 'o', 'n', '\030', '\347', '\007', ' ', '\003', '(', '\013', '2', '$', '.', -'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', -'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', 'R', '\023', 'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', -'O', 'p', 't', 'i', 'o', 'n', '*', '\t', '\010', '\350', '\007', '\020', '\200', '\200', '\200', '\200', '\002', 'J', '\004', '\010', '\004', '\020', '\005', 'J', '\004', -'\010', '\005', '\020', '\006', 'J', '\004', '\010', '\006', '\020', '\007', 'J', '\004', '\010', '\010', '\020', '\t', 'J', '\004', '\010', '\t', '\020', '\n', '\"', '\222', '\004', -'\n', '\014', 'F', 'i', 'e', 'l', 'd', 'O', 'p', 't', 'i', 'o', 'n', 's', '\022', 'A', '\n', '\005', 'c', 't', 'y', 'p', 'e', '\030', '\001', -' ', '\001', '(', '\016', '2', '#', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', -'e', 'l', 'd', 'O', 'p', 't', 'i', 'o', 'n', 's', '.', 'C', 'T', 'y', 'p', 'e', ':', '\006', 'S', 'T', 'R', 'I', 'N', 'G', 'R', -'\005', 'c', 't', 'y', 'p', 'e', '\022', '\026', '\n', '\006', 'p', 'a', 'c', 'k', 'e', 'd', '\030', '\002', ' ', '\001', '(', '\010', 'R', '\006', 'p', -'a', 'c', 'k', 'e', 'd', '\022', 'G', '\n', '\006', 'j', 's', 't', 'y', 'p', 'e', '\030', '\006', ' ', '\001', '(', '\016', '2', '$', '.', 'g', -'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'e', 'l', 'd', 'O', 'p', 't', 'i', 'o', -'n', 's', '.', 'J', 'S', 'T', 'y', 'p', 'e', ':', '\t', 'J', 'S', '_', 'N', 'O', 'R', 'M', 'A', 'L', 'R', '\006', 'j', 's', 't', -'y', 'p', 'e', '\022', '\031', '\n', '\004', 'l', 'a', 'z', 'y', '\030', '\005', ' ', '\001', '(', '\010', ':', '\005', 'f', 'a', 'l', 's', 'e', 'R', -'\004', 'l', 'a', 'z', 'y', '\022', '.', '\n', '\017', 'u', 'n', 'v', 'e', 'r', 'i', 'f', 'i', 'e', 'd', '_', 'l', 'a', 'z', 'y', '\030', -'\017', ' ', '\001', '(', '\010', ':', '\005', 'f', 'a', 'l', 's', 'e', 'R', '\016', 'u', 'n', 'v', 'e', 'r', 'i', 'f', 'i', 'e', 'd', 'L', -'a', 'z', 'y', '\022', '%', '\n', '\n', 'd', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'e', 'd', '\030', '\003', ' ', '\001', '(', '\010', ':', '\005', -'f', 'a', 'l', 's', 'e', 'R', '\n', 'd', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'e', 'd', '\022', '\031', '\n', '\004', 'w', 'e', 'a', 'k', -'\030', '\n', ' ', '\001', '(', '\010', ':', '\005', 'f', 'a', 'l', 's', 'e', 'R', '\004', 'w', 'e', 'a', 'k', '\022', 'X', '\n', '\024', 'u', 'n', -'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', '_', 'o', 'p', 't', 'i', 'o', 'n', '\030', '\347', '\007', ' ', '\003', '(', '\013', -'2', '$', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'n', 'i', 'n', 't', 'e', -'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', 'R', '\023', 'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', -'t', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', '\"', '/', '\n', '\005', 'C', 'T', 'y', 'p', 'e', '\022', '\n', '\n', '\006', 'S', 'T', 'R', -'I', 'N', 'G', '\020', '\000', '\022', '\010', '\n', '\004', 'C', 'O', 'R', 'D', '\020', '\001', '\022', '\020', '\n', '\014', 'S', 'T', 'R', 'I', 'N', 'G', -'_', 'P', 'I', 'E', 'C', 'E', '\020', '\002', '\"', '5', '\n', '\006', 'J', 'S', 'T', 'y', 'p', 'e', '\022', '\r', '\n', '\t', 'J', 'S', '_', -'N', 'O', 'R', 'M', 'A', 'L', '\020', '\000', '\022', '\r', '\n', '\t', 'J', 'S', '_', 'S', 'T', 'R', 'I', 'N', 'G', '\020', '\001', '\022', '\r', -'\n', '\t', 'J', 'S', '_', 'N', 'U', 'M', 'B', 'E', 'R', '\020', '\002', '*', '\t', '\010', '\350', '\007', '\020', '\200', '\200', '\200', '\200', '\002', 'J', -'\004', '\010', '\004', '\020', '\005', '\"', 's', '\n', '\014', 'O', 'n', 'e', 'o', 'f', 'O', 'p', 't', 'i', 'o', 'n', 's', '\022', 'X', '\n', '\024', -'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', '_', 'o', 'p', 't', 'i', 'o', 'n', '\030', '\347', '\007', ' ', '\003', -'(', '\013', '2', '$', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'n', 'i', 'n', -'t', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', 'R', '\023', 'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', -'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', '*', '\t', '\010', '\350', '\007', '\020', '\200', '\200', '\200', '\200', '\002', '\"', '\300', '\001', -'\n', '\013', 'E', 'n', 'u', 'm', 'O', 'p', 't', 'i', 'o', 'n', 's', '\022', '\037', '\n', '\013', 'a', 'l', 'l', 'o', 'w', '_', 'a', 'l', -'i', 'a', 's', '\030', '\002', ' ', '\001', '(', '\010', 'R', '\n', 'a', 'l', 'l', 'o', 'w', 'A', 'l', 'i', 'a', 's', '\022', '%', '\n', '\n', -'d', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'e', 'd', '\030', '\003', ' ', '\001', '(', '\010', ':', '\005', 'f', 'a', 'l', 's', 'e', 'R', '\n', -'d', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'e', 'd', '\022', 'X', '\n', '\024', 'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', -'e', 'd', '_', 'o', 'p', 't', 'i', 'o', 'n', '\030', '\347', '\007', ' ', '\003', '(', '\013', '2', '$', '.', 'g', 'o', 'o', 'g', 'l', 'e', -'.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', -'t', 'i', 'o', 'n', 'R', '\023', 'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', -'*', '\t', '\010', '\350', '\007', '\020', '\200', '\200', '\200', '\200', '\002', 'J', '\004', '\010', '\005', '\020', '\006', '\"', '\236', '\001', '\n', '\020', 'E', 'n', 'u', -'m', 'V', 'a', 'l', 'u', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\022', '%', '\n', '\n', 'd', 'e', 'p', 'r', 'e', 'c', 'a', 't', -'e', 'd', '\030', '\001', ' ', '\001', '(', '\010', ':', '\005', 'f', 'a', 'l', 's', 'e', 'R', '\n', 'd', 'e', 'p', 'r', 'e', 'c', 'a', 't', -'e', 'd', '\022', 'X', '\n', '\024', 'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', '_', 'o', 'p', 't', 'i', 'o', -'n', '\030', '\347', '\007', ' ', '\003', '(', '\013', '2', '$', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', -'f', '.', 'U', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', 'R', '\023', 'u', 'n', -'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', '*', '\t', '\010', '\350', '\007', '\020', '\200', '\200', -'\200', '\200', '\002', '\"', '\234', '\001', '\n', '\016', 'S', 'e', 'r', 'v', 'i', 'c', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\022', '%', '\n', -'\n', 'd', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'e', 'd', '\030', '!', ' ', '\001', '(', '\010', ':', '\005', 'f', 'a', 'l', 's', 'e', 'R', -'\n', 'd', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'e', 'd', '\022', 'X', '\n', '\024', 'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', +'\030', '\007', ' ', '\001', '(', '\010', 'R', '\010', 'm', 'a', 'p', 'E', 'n', 't', 'r', 'y', '\022', 'V', '\n', '&', 'd', 'e', 'p', 'r', 'e', +'c', 'a', 't', 'e', 'd', '_', 'l', 'e', 'g', 'a', 'c', 'y', '_', 'j', 's', 'o', 'n', '_', 'f', 'i', 'e', 'l', 'd', '_', 'c', +'o', 'n', 'f', 'l', 'i', 'c', 't', 's', '\030', '\013', ' ', '\001', '(', '\010', 'B', '\002', '\030', '\001', 'R', '\"', 'd', 'e', 'p', 'r', 'e', +'c', 'a', 't', 'e', 'd', 'L', 'e', 'g', 'a', 'c', 'y', 'J', 's', 'o', 'n', 'F', 'i', 'e', 'l', 'd', 'C', 'o', 'n', 'f', 'l', +'i', 'c', 't', 's', '\022', 'X', '\n', '\024', 'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', '_', 'o', 'p', 't', +'i', 'o', 'n', '\030', '\347', '\007', ' ', '\003', '(', '\013', '2', '$', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', +'b', 'u', 'f', '.', 'U', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', 'R', '\023', +'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', '*', '\t', '\010', '\350', '\007', '\020', +'\200', '\200', '\200', '\200', '\002', 'J', '\004', '\010', '\004', '\020', '\005', 'J', '\004', '\010', '\005', '\020', '\006', 'J', '\004', '\010', '\006', '\020', '\007', 'J', '\004', +'\010', '\010', '\020', '\t', 'J', '\004', '\010', '\t', '\020', '\n', '\"', '\222', '\004', '\n', '\014', 'F', 'i', 'e', 'l', 'd', 'O', 'p', 't', 'i', 'o', +'n', 's', '\022', 'A', '\n', '\005', 'c', 't', 'y', 'p', 'e', '\030', '\001', ' ', '\001', '(', '\016', '2', '#', '.', 'g', 'o', 'o', 'g', 'l', +'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'e', 'l', 'd', 'O', 'p', 't', 'i', 'o', 'n', 's', '.', 'C', +'T', 'y', 'p', 'e', ':', '\006', 'S', 'T', 'R', 'I', 'N', 'G', 'R', '\005', 'c', 't', 'y', 'p', 'e', '\022', '\026', '\n', '\006', 'p', 'a', +'c', 'k', 'e', 'd', '\030', '\002', ' ', '\001', '(', '\010', 'R', '\006', 'p', 'a', 'c', 'k', 'e', 'd', '\022', 'G', '\n', '\006', 'j', 's', 't', +'y', 'p', 'e', '\030', '\006', ' ', '\001', '(', '\016', '2', '$', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', +'u', 'f', '.', 'F', 'i', 'e', 'l', 'd', 'O', 'p', 't', 'i', 'o', 'n', 's', '.', 'J', 'S', 'T', 'y', 'p', 'e', ':', '\t', 'J', +'S', '_', 'N', 'O', 'R', 'M', 'A', 'L', 'R', '\006', 'j', 's', 't', 'y', 'p', 'e', '\022', '\031', '\n', '\004', 'l', 'a', 'z', 'y', '\030', +'\005', ' ', '\001', '(', '\010', ':', '\005', 'f', 'a', 'l', 's', 'e', 'R', '\004', 'l', 'a', 'z', 'y', '\022', '.', '\n', '\017', 'u', 'n', 'v', +'e', 'r', 'i', 'f', 'i', 'e', 'd', '_', 'l', 'a', 'z', 'y', '\030', '\017', ' ', '\001', '(', '\010', ':', '\005', 'f', 'a', 'l', 's', 'e', +'R', '\016', 'u', 'n', 'v', 'e', 'r', 'i', 'f', 'i', 'e', 'd', 'L', 'a', 'z', 'y', '\022', '%', '\n', '\n', 'd', 'e', 'p', 'r', 'e', +'c', 'a', 't', 'e', 'd', '\030', '\003', ' ', '\001', '(', '\010', ':', '\005', 'f', 'a', 'l', 's', 'e', 'R', '\n', 'd', 'e', 'p', 'r', 'e', +'c', 'a', 't', 'e', 'd', '\022', '\031', '\n', '\004', 'w', 'e', 'a', 'k', '\030', '\n', ' ', '\001', '(', '\010', ':', '\005', 'f', 'a', 'l', 's', +'e', 'R', '\004', 'w', 'e', 'a', 'k', '\022', 'X', '\n', '\024', 'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', '_', +'o', 'p', 't', 'i', 'o', 'n', '\030', '\347', '\007', ' ', '\003', '(', '\013', '2', '$', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', +'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', +'n', 'R', '\023', 'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', '\"', '/', '\n', +'\005', 'C', 'T', 'y', 'p', 'e', '\022', '\n', '\n', '\006', 'S', 'T', 'R', 'I', 'N', 'G', '\020', '\000', '\022', '\010', '\n', '\004', 'C', 'O', 'R', +'D', '\020', '\001', '\022', '\020', '\n', '\014', 'S', 'T', 'R', 'I', 'N', 'G', '_', 'P', 'I', 'E', 'C', 'E', '\020', '\002', '\"', '5', '\n', '\006', +'J', 'S', 'T', 'y', 'p', 'e', '\022', '\r', '\n', '\t', 'J', 'S', '_', 'N', 'O', 'R', 'M', 'A', 'L', '\020', '\000', '\022', '\r', '\n', '\t', +'J', 'S', '_', 'S', 'T', 'R', 'I', 'N', 'G', '\020', '\001', '\022', '\r', '\n', '\t', 'J', 'S', '_', 'N', 'U', 'M', 'B', 'E', 'R', '\020', +'\002', '*', '\t', '\010', '\350', '\007', '\020', '\200', '\200', '\200', '\200', '\002', 'J', '\004', '\010', '\004', '\020', '\005', '\"', 's', '\n', '\014', 'O', 'n', 'e', +'o', 'f', 'O', 'p', 't', 'i', 'o', 'n', 's', '\022', 'X', '\n', '\024', 'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', +'d', '_', 'o', 'p', 't', 'i', 'o', 'n', '\030', '\347', '\007', ' ', '\003', '(', '\013', '2', '$', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', +'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', +'i', 'o', 'n', 'R', '\023', 'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', '*', +'\t', '\010', '\350', '\007', '\020', '\200', '\200', '\200', '\200', '\002', '\"', '\230', '\002', '\n', '\013', 'E', 'n', 'u', 'm', 'O', 'p', 't', 'i', 'o', 'n', +'s', '\022', '\037', '\n', '\013', 'a', 'l', 'l', 'o', 'w', '_', 'a', 'l', 'i', 'a', 's', '\030', '\002', ' ', '\001', '(', '\010', 'R', '\n', 'a', +'l', 'l', 'o', 'w', 'A', 'l', 'i', 'a', 's', '\022', '%', '\n', '\n', 'd', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'e', 'd', '\030', '\003', +' ', '\001', '(', '\010', ':', '\005', 'f', 'a', 'l', 's', 'e', 'R', '\n', 'd', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'e', 'd', '\022', 'V', +'\n', '&', 'd', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'e', 'd', '_', 'l', 'e', 'g', 'a', 'c', 'y', '_', 'j', 's', 'o', 'n', '_', +'f', 'i', 'e', 'l', 'd', '_', 'c', 'o', 'n', 'f', 'l', 'i', 'c', 't', 's', '\030', '\006', ' ', '\001', '(', '\010', 'B', '\002', '\030', '\001', +'R', '\"', 'd', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'e', 'd', 'L', 'e', 'g', 'a', 'c', 'y', 'J', 's', 'o', 'n', 'F', 'i', 'e', +'l', 'd', 'C', 'o', 'n', 'f', 'l', 'i', 'c', 't', 's', '\022', 'X', '\n', '\024', 'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', '_', 'o', 'p', 't', 'i', 'o', 'n', '\030', '\347', '\007', ' ', '\003', '(', '\013', '2', '$', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', 'R', '\023', 'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', -'n', '*', '\t', '\010', '\350', '\007', '\020', '\200', '\200', '\200', '\200', '\002', '\"', '\340', '\002', '\n', '\r', 'M', 'e', 't', 'h', 'o', 'd', 'O', 'p', -'t', 'i', 'o', 'n', 's', '\022', '%', '\n', '\n', 'd', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'e', 'd', '\030', '!', ' ', '\001', '(', '\010', -':', '\005', 'f', 'a', 'l', 's', 'e', 'R', '\n', 'd', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'e', 'd', '\022', 'q', '\n', '\021', 'i', 'd', -'e', 'm', 'p', 'o', 't', 'e', 'n', 'c', 'y', '_', 'l', 'e', 'v', 'e', 'l', '\030', '\"', ' ', '\001', '(', '\016', '2', '/', '.', 'g', -'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'M', 'e', 't', 'h', 'o', 'd', 'O', 'p', 't', 'i', -'o', 'n', 's', '.', 'I', 'd', 'e', 'm', 'p', 'o', 't', 'e', 'n', 'c', 'y', 'L', 'e', 'v', 'e', 'l', ':', '\023', 'I', 'D', 'E', -'M', 'P', 'O', 'T', 'E', 'N', 'C', 'Y', '_', 'U', 'N', 'K', 'N', 'O', 'W', 'N', 'R', '\020', 'i', 'd', 'e', 'm', 'p', 'o', 't', -'e', 'n', 'c', 'y', 'L', 'e', 'v', 'e', 'l', '\022', 'X', '\n', '\024', 'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', -'d', '_', 'o', 'p', 't', 'i', 'o', 'n', '\030', '\347', '\007', ' ', '\003', '(', '\013', '2', '$', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', -'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', -'i', 'o', 'n', 'R', '\023', 'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', '\"', -'P', '\n', '\020', 'I', 'd', 'e', 'm', 'p', 'o', 't', 'e', 'n', 'c', 'y', 'L', 'e', 'v', 'e', 'l', '\022', '\027', '\n', '\023', 'I', 'D', -'E', 'M', 'P', 'O', 'T', 'E', 'N', 'C', 'Y', '_', 'U', 'N', 'K', 'N', 'O', 'W', 'N', '\020', '\000', '\022', '\023', '\n', '\017', 'N', 'O', -'_', 'S', 'I', 'D', 'E', '_', 'E', 'F', 'F', 'E', 'C', 'T', 'S', '\020', '\001', '\022', '\016', '\n', '\n', 'I', 'D', 'E', 'M', 'P', 'O', -'T', 'E', 'N', 'T', '\020', '\002', '*', '\t', '\010', '\350', '\007', '\020', '\200', '\200', '\200', '\200', '\002', '\"', '\232', '\003', '\n', '\023', 'U', 'n', 'i', -'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', '\022', 'A', '\n', '\004', 'n', 'a', 'm', 'e', '\030', -'\002', ' ', '\003', '(', '\013', '2', '-', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', -'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', '.', 'N', 'a', 'm', 'e', 'P', 'a', -'r', 't', 'R', '\004', 'n', 'a', 'm', 'e', '\022', ')', '\n', '\020', 'i', 'd', 'e', 'n', 't', 'i', 'f', 'i', 'e', 'r', '_', 'v', 'a', -'l', 'u', 'e', '\030', '\003', ' ', '\001', '(', '\t', 'R', '\017', 'i', 'd', 'e', 'n', 't', 'i', 'f', 'i', 'e', 'r', 'V', 'a', 'l', 'u', -'e', '\022', ',', '\n', '\022', 'p', 'o', 's', 'i', 't', 'i', 'v', 'e', '_', 'i', 'n', 't', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\004', -' ', '\001', '(', '\004', 'R', '\020', 'p', 'o', 's', 'i', 't', 'i', 'v', 'e', 'I', 'n', 't', 'V', 'a', 'l', 'u', 'e', '\022', ',', '\n', -'\022', 'n', 'e', 'g', 'a', 't', 'i', 'v', 'e', '_', 'i', 'n', 't', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\005', ' ', '\001', '(', '\003', -'R', '\020', 'n', 'e', 'g', 'a', 't', 'i', 'v', 'e', 'I', 'n', 't', 'V', 'a', 'l', 'u', 'e', '\022', '!', '\n', '\014', 'd', 'o', 'u', -'b', 'l', 'e', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\006', ' ', '\001', '(', '\001', 'R', '\013', 'd', 'o', 'u', 'b', 'l', 'e', 'V', 'a', -'l', 'u', 'e', '\022', '!', '\n', '\014', 's', 't', 'r', 'i', 'n', 'g', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\007', ' ', '\001', '(', '\014', -'R', '\013', 's', 't', 'r', 'i', 'n', 'g', 'V', 'a', 'l', 'u', 'e', '\022', '\'', '\n', '\017', 'a', 'g', 'g', 'r', 'e', 'g', 'a', 't', -'e', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\010', ' ', '\001', '(', '\t', 'R', '\016', 'a', 'g', 'g', 'r', 'e', 'g', 'a', 't', 'e', 'V', -'a', 'l', 'u', 'e', '\032', 'J', '\n', '\010', 'N', 'a', 'm', 'e', 'P', 'a', 'r', 't', '\022', '\033', '\n', '\t', 'n', 'a', 'm', 'e', '_', -'p', 'a', 'r', 't', '\030', '\001', ' ', '\002', '(', '\t', 'R', '\010', 'n', 'a', 'm', 'e', 'P', 'a', 'r', 't', '\022', '!', '\n', '\014', 'i', -'s', '_', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', '\030', '\002', ' ', '\002', '(', '\010', 'R', '\013', 'i', 's', 'E', 'x', 't', 'e', -'n', 's', 'i', 'o', 'n', '\"', '\247', '\002', '\n', '\016', 'S', 'o', 'u', 'r', 'c', 'e', 'C', 'o', 'd', 'e', 'I', 'n', 'f', 'o', '\022', -'D', '\n', '\010', 'l', 'o', 'c', 'a', 't', 'i', 'o', 'n', '\030', '\001', ' ', '\003', '(', '\013', '2', '(', '.', 'g', 'o', 'o', 'g', 'l', -'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'S', 'o', 'u', 'r', 'c', 'e', 'C', 'o', 'd', 'e', 'I', 'n', 'f', 'o', -'.', 'L', 'o', 'c', 'a', 't', 'i', 'o', 'n', 'R', '\010', 'l', 'o', 'c', 'a', 't', 'i', 'o', 'n', '\032', '\316', '\001', '\n', '\010', 'L', -'o', 'c', 'a', 't', 'i', 'o', 'n', '\022', '\026', '\n', '\004', 'p', 'a', 't', 'h', '\030', '\001', ' ', '\003', '(', '\005', 'B', '\002', '\020', '\001', -'R', '\004', 'p', 'a', 't', 'h', '\022', '\026', '\n', '\004', 's', 'p', 'a', 'n', '\030', '\002', ' ', '\003', '(', '\005', 'B', '\002', '\020', '\001', 'R', -'\004', 's', 'p', 'a', 'n', '\022', ')', '\n', '\020', 'l', 'e', 'a', 'd', 'i', 'n', 'g', '_', 'c', 'o', 'm', 'm', 'e', 'n', 't', 's', -'\030', '\003', ' ', '\001', '(', '\t', 'R', '\017', 'l', 'e', 'a', 'd', 'i', 'n', 'g', 'C', 'o', 'm', 'm', 'e', 'n', 't', 's', '\022', '+', -'\n', '\021', 't', 'r', 'a', 'i', 'l', 'i', 'n', 'g', '_', 'c', 'o', 'm', 'm', 'e', 'n', 't', 's', '\030', '\004', ' ', '\001', '(', '\t', -'R', '\020', 't', 'r', 'a', 'i', 'l', 'i', 'n', 'g', 'C', 'o', 'm', 'm', 'e', 'n', 't', 's', '\022', ':', '\n', '\031', 'l', 'e', 'a', -'d', 'i', 'n', 'g', '_', 'd', 'e', 't', 'a', 'c', 'h', 'e', 'd', '_', 'c', 'o', 'm', 'm', 'e', 'n', 't', 's', '\030', '\006', ' ', -'\003', '(', '\t', 'R', '\027', 'l', 'e', 'a', 'd', 'i', 'n', 'g', 'D', 'e', 't', 'a', 'c', 'h', 'e', 'd', 'C', 'o', 'm', 'm', 'e', -'n', 't', 's', '\"', '\320', '\002', '\n', '\021', 'G', 'e', 'n', 'e', 'r', 'a', 't', 'e', 'd', 'C', 'o', 'd', 'e', 'I', 'n', 'f', 'o', -'\022', 'M', '\n', '\n', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', '\030', '\001', ' ', '\003', '(', '\013', '2', '-', '.', 'g', 'o', -'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'G', 'e', 'n', 'e', 'r', 'a', 't', 'e', 'd', 'C', 'o', -'d', 'e', 'I', 'n', 'f', 'o', '.', 'A', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 'R', '\n', 'a', 'n', 'n', 'o', 't', 'a', -'t', 'i', 'o', 'n', '\032', '\353', '\001', '\n', '\n', 'A', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', '\022', '\026', '\n', '\004', 'p', 'a', -'t', 'h', '\030', '\001', ' ', '\003', '(', '\005', 'B', '\002', '\020', '\001', 'R', '\004', 'p', 'a', 't', 'h', '\022', '\037', '\n', '\013', 's', 'o', 'u', -'r', 'c', 'e', '_', 'f', 'i', 'l', 'e', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\n', 's', 'o', 'u', 'r', 'c', 'e', 'F', 'i', 'l', -'e', '\022', '\024', '\n', '\005', 'b', 'e', 'g', 'i', 'n', '\030', '\003', ' ', '\001', '(', '\005', 'R', '\005', 'b', 'e', 'g', 'i', 'n', '\022', '\020', -'\n', '\003', 'e', 'n', 'd', '\030', '\004', ' ', '\001', '(', '\005', 'R', '\003', 'e', 'n', 'd', '\022', 'R', '\n', '\010', 's', 'e', 'm', 'a', 'n', -'t', 'i', 'c', '\030', '\005', ' ', '\001', '(', '\016', '2', '6', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', -'u', 'f', '.', 'G', 'e', 'n', 'e', 'r', 'a', 't', 'e', 'd', 'C', 'o', 'd', 'e', 'I', 'n', 'f', 'o', '.', 'A', 'n', 'n', 'o', -'t', 'a', 't', 'i', 'o', 'n', '.', 'S', 'e', 'm', 'a', 'n', 't', 'i', 'c', 'R', '\010', 's', 'e', 'm', 'a', 'n', 't', 'i', 'c', -'\"', '(', '\n', '\010', 'S', 'e', 'm', 'a', 'n', 't', 'i', 'c', '\022', '\010', '\n', '\004', 'N', 'O', 'N', 'E', '\020', '\000', '\022', '\007', '\n', -'\003', 'S', 'E', 'T', '\020', '\001', '\022', '\t', '\n', '\005', 'A', 'L', 'I', 'A', 'S', '\020', '\002', 'B', '~', '\n', '\023', 'c', 'o', 'm', '.', -'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', 'B', '\020', 'D', 'e', 's', 'c', 'r', 'i', 'p', 't', -'o', 'r', 'P', 'r', 'o', 't', 'o', 's', 'H', '\001', 'Z', '-', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'g', 'o', 'l', 'a', 'n', 'g', -'.', 'o', 'r', 'g', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 't', 'y', 'p', 'e', 's', '/', 'd', 'e', 's', 'c', 'r', -'i', 'p', 't', 'o', 'r', 'p', 'b', '\370', '\001', '\001', '\242', '\002', '\003', 'G', 'P', 'B', '\252', '\002', '\032', 'G', 'o', 'o', 'g', 'l', 'e', -'.', 'P', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'R', 'e', 'f', 'l', 'e', 'c', 't', 'i', 'o', 'n', +'n', '*', '\t', '\010', '\350', '\007', '\020', '\200', '\200', '\200', '\200', '\002', 'J', '\004', '\010', '\005', '\020', '\006', '\"', '\236', '\001', '\n', '\020', 'E', 'n', +'u', 'm', 'V', 'a', 'l', 'u', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\022', '%', '\n', '\n', 'd', 'e', 'p', 'r', 'e', 'c', 'a', +'t', 'e', 'd', '\030', '\001', ' ', '\001', '(', '\010', ':', '\005', 'f', 'a', 'l', 's', 'e', 'R', '\n', 'd', 'e', 'p', 'r', 'e', 'c', 'a', +'t', 'e', 'd', '\022', 'X', '\n', '\024', 'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', '_', 'o', 'p', 't', 'i', +'o', 'n', '\030', '\347', '\007', ' ', '\003', '(', '\013', '2', '$', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', +'u', 'f', '.', 'U', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', 'R', '\023', 'u', +'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', '*', '\t', '\010', '\350', '\007', '\020', '\200', +'\200', '\200', '\200', '\002', '\"', '\234', '\001', '\n', '\016', 'S', 'e', 'r', 'v', 'i', 'c', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\022', '%', +'\n', '\n', 'd', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'e', 'd', '\030', '!', ' ', '\001', '(', '\010', ':', '\005', 'f', 'a', 'l', 's', 'e', +'R', '\n', 'd', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'e', 'd', '\022', 'X', '\n', '\024', 'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', +'e', 't', 'e', 'd', '_', 'o', 'p', 't', 'i', 'o', 'n', '\030', '\347', '\007', ' ', '\003', '(', '\013', '2', '$', '.', 'g', 'o', 'o', 'g', +'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', +'O', 'p', 't', 'i', 'o', 'n', 'R', '\023', 'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', +'o', 'n', '*', '\t', '\010', '\350', '\007', '\020', '\200', '\200', '\200', '\200', '\002', '\"', '\340', '\002', '\n', '\r', 'M', 'e', 't', 'h', 'o', 'd', 'O', +'p', 't', 'i', 'o', 'n', 's', '\022', '%', '\n', '\n', 'd', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'e', 'd', '\030', '!', ' ', '\001', '(', +'\010', ':', '\005', 'f', 'a', 'l', 's', 'e', 'R', '\n', 'd', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'e', 'd', '\022', 'q', '\n', '\021', 'i', +'d', 'e', 'm', 'p', 'o', 't', 'e', 'n', 'c', 'y', '_', 'l', 'e', 'v', 'e', 'l', '\030', '\"', ' ', '\001', '(', '\016', '2', '/', '.', +'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'M', 'e', 't', 'h', 'o', 'd', 'O', 'p', 't', +'i', 'o', 'n', 's', '.', 'I', 'd', 'e', 'm', 'p', 'o', 't', 'e', 'n', 'c', 'y', 'L', 'e', 'v', 'e', 'l', ':', '\023', 'I', 'D', +'E', 'M', 'P', 'O', 'T', 'E', 'N', 'C', 'Y', '_', 'U', 'N', 'K', 'N', 'O', 'W', 'N', 'R', '\020', 'i', 'd', 'e', 'm', 'p', 'o', +'t', 'e', 'n', 'c', 'y', 'L', 'e', 'v', 'e', 'l', '\022', 'X', '\n', '\024', 'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', +'e', 'd', '_', 'o', 'p', 't', 'i', 'o', 'n', '\030', '\347', '\007', ' ', '\003', '(', '\013', '2', '$', '.', 'g', 'o', 'o', 'g', 'l', 'e', +'.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', +'t', 'i', 'o', 'n', 'R', '\023', 'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', +'\"', 'P', '\n', '\020', 'I', 'd', 'e', 'm', 'p', 'o', 't', 'e', 'n', 'c', 'y', 'L', 'e', 'v', 'e', 'l', '\022', '\027', '\n', '\023', 'I', +'D', 'E', 'M', 'P', 'O', 'T', 'E', 'N', 'C', 'Y', '_', 'U', 'N', 'K', 'N', 'O', 'W', 'N', '\020', '\000', '\022', '\023', '\n', '\017', 'N', +'O', '_', 'S', 'I', 'D', 'E', '_', 'E', 'F', 'F', 'E', 'C', 'T', 'S', '\020', '\001', '\022', '\016', '\n', '\n', 'I', 'D', 'E', 'M', 'P', +'O', 'T', 'E', 'N', 'T', '\020', '\002', '*', '\t', '\010', '\350', '\007', '\020', '\200', '\200', '\200', '\200', '\002', '\"', '\232', '\003', '\n', '\023', 'U', 'n', +'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', '\022', 'A', '\n', '\004', 'n', 'a', 'm', 'e', +'\030', '\002', ' ', '\003', '(', '\013', '2', '-', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', +'U', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', '.', 'N', 'a', 'm', 'e', 'P', +'a', 'r', 't', 'R', '\004', 'n', 'a', 'm', 'e', '\022', ')', '\n', '\020', 'i', 'd', 'e', 'n', 't', 'i', 'f', 'i', 'e', 'r', '_', 'v', +'a', 'l', 'u', 'e', '\030', '\003', ' ', '\001', '(', '\t', 'R', '\017', 'i', 'd', 'e', 'n', 't', 'i', 'f', 'i', 'e', 'r', 'V', 'a', 'l', +'u', 'e', '\022', ',', '\n', '\022', 'p', 'o', 's', 'i', 't', 'i', 'v', 'e', '_', 'i', 'n', 't', '_', 'v', 'a', 'l', 'u', 'e', '\030', +'\004', ' ', '\001', '(', '\004', 'R', '\020', 'p', 'o', 's', 'i', 't', 'i', 'v', 'e', 'I', 'n', 't', 'V', 'a', 'l', 'u', 'e', '\022', ',', +'\n', '\022', 'n', 'e', 'g', 'a', 't', 'i', 'v', 'e', '_', 'i', 'n', 't', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\005', ' ', '\001', '(', +'\003', 'R', '\020', 'n', 'e', 'g', 'a', 't', 'i', 'v', 'e', 'I', 'n', 't', 'V', 'a', 'l', 'u', 'e', '\022', '!', '\n', '\014', 'd', 'o', +'u', 'b', 'l', 'e', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\006', ' ', '\001', '(', '\001', 'R', '\013', 'd', 'o', 'u', 'b', 'l', 'e', 'V', +'a', 'l', 'u', 'e', '\022', '!', '\n', '\014', 's', 't', 'r', 'i', 'n', 'g', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\007', ' ', '\001', '(', +'\014', 'R', '\013', 's', 't', 'r', 'i', 'n', 'g', 'V', 'a', 'l', 'u', 'e', '\022', '\'', '\n', '\017', 'a', 'g', 'g', 'r', 'e', 'g', 'a', +'t', 'e', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\010', ' ', '\001', '(', '\t', 'R', '\016', 'a', 'g', 'g', 'r', 'e', 'g', 'a', 't', 'e', +'V', 'a', 'l', 'u', 'e', '\032', 'J', '\n', '\010', 'N', 'a', 'm', 'e', 'P', 'a', 'r', 't', '\022', '\033', '\n', '\t', 'n', 'a', 'm', 'e', +'_', 'p', 'a', 'r', 't', '\030', '\001', ' ', '\002', '(', '\t', 'R', '\010', 'n', 'a', 'm', 'e', 'P', 'a', 'r', 't', '\022', '!', '\n', '\014', +'i', 's', '_', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', '\030', '\002', ' ', '\002', '(', '\010', 'R', '\013', 'i', 's', 'E', 'x', 't', +'e', 'n', 's', 'i', 'o', 'n', '\"', '\247', '\002', '\n', '\016', 'S', 'o', 'u', 'r', 'c', 'e', 'C', 'o', 'd', 'e', 'I', 'n', 'f', 'o', +'\022', 'D', '\n', '\010', 'l', 'o', 'c', 'a', 't', 'i', 'o', 'n', '\030', '\001', ' ', '\003', '(', '\013', '2', '(', '.', 'g', 'o', 'o', 'g', +'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'S', 'o', 'u', 'r', 'c', 'e', 'C', 'o', 'd', 'e', 'I', 'n', 'f', +'o', '.', 'L', 'o', 'c', 'a', 't', 'i', 'o', 'n', 'R', '\010', 'l', 'o', 'c', 'a', 't', 'i', 'o', 'n', '\032', '\316', '\001', '\n', '\010', +'L', 'o', 'c', 'a', 't', 'i', 'o', 'n', '\022', '\026', '\n', '\004', 'p', 'a', 't', 'h', '\030', '\001', ' ', '\003', '(', '\005', 'B', '\002', '\020', +'\001', 'R', '\004', 'p', 'a', 't', 'h', '\022', '\026', '\n', '\004', 's', 'p', 'a', 'n', '\030', '\002', ' ', '\003', '(', '\005', 'B', '\002', '\020', '\001', +'R', '\004', 's', 'p', 'a', 'n', '\022', ')', '\n', '\020', 'l', 'e', 'a', 'd', 'i', 'n', 'g', '_', 'c', 'o', 'm', 'm', 'e', 'n', 't', +'s', '\030', '\003', ' ', '\001', '(', '\t', 'R', '\017', 'l', 'e', 'a', 'd', 'i', 'n', 'g', 'C', 'o', 'm', 'm', 'e', 'n', 't', 's', '\022', +'+', '\n', '\021', 't', 'r', 'a', 'i', 'l', 'i', 'n', 'g', '_', 'c', 'o', 'm', 'm', 'e', 'n', 't', 's', '\030', '\004', ' ', '\001', '(', +'\t', 'R', '\020', 't', 'r', 'a', 'i', 'l', 'i', 'n', 'g', 'C', 'o', 'm', 'm', 'e', 'n', 't', 's', '\022', ':', '\n', '\031', 'l', 'e', +'a', 'd', 'i', 'n', 'g', '_', 'd', 'e', 't', 'a', 'c', 'h', 'e', 'd', '_', 'c', 'o', 'm', 'm', 'e', 'n', 't', 's', '\030', '\006', +' ', '\003', '(', '\t', 'R', '\027', 'l', 'e', 'a', 'd', 'i', 'n', 'g', 'D', 'e', 't', 'a', 'c', 'h', 'e', 'd', 'C', 'o', 'm', 'm', +'e', 'n', 't', 's', '\"', '\320', '\002', '\n', '\021', 'G', 'e', 'n', 'e', 'r', 'a', 't', 'e', 'd', 'C', 'o', 'd', 'e', 'I', 'n', 'f', +'o', '\022', 'M', '\n', '\n', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', '\030', '\001', ' ', '\003', '(', '\013', '2', '-', '.', 'g', +'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'G', 'e', 'n', 'e', 'r', 'a', 't', 'e', 'd', 'C', +'o', 'd', 'e', 'I', 'n', 'f', 'o', '.', 'A', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 'R', '\n', 'a', 'n', 'n', 'o', 't', +'a', 't', 'i', 'o', 'n', '\032', '\353', '\001', '\n', '\n', 'A', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', '\022', '\026', '\n', '\004', 'p', +'a', 't', 'h', '\030', '\001', ' ', '\003', '(', '\005', 'B', '\002', '\020', '\001', 'R', '\004', 'p', 'a', 't', 'h', '\022', '\037', '\n', '\013', 's', 'o', +'u', 'r', 'c', 'e', '_', 'f', 'i', 'l', 'e', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\n', 's', 'o', 'u', 'r', 'c', 'e', 'F', 'i', +'l', 'e', '\022', '\024', '\n', '\005', 'b', 'e', 'g', 'i', 'n', '\030', '\003', ' ', '\001', '(', '\005', 'R', '\005', 'b', 'e', 'g', 'i', 'n', '\022', +'\020', '\n', '\003', 'e', 'n', 'd', '\030', '\004', ' ', '\001', '(', '\005', 'R', '\003', 'e', 'n', 'd', '\022', 'R', '\n', '\010', 's', 'e', 'm', 'a', +'n', 't', 'i', 'c', '\030', '\005', ' ', '\001', '(', '\016', '2', '6', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', +'b', 'u', 'f', '.', 'G', 'e', 'n', 'e', 'r', 'a', 't', 'e', 'd', 'C', 'o', 'd', 'e', 'I', 'n', 'f', 'o', '.', 'A', 'n', 'n', +'o', 't', 'a', 't', 'i', 'o', 'n', '.', 'S', 'e', 'm', 'a', 'n', 't', 'i', 'c', 'R', '\010', 's', 'e', 'm', 'a', 'n', 't', 'i', +'c', '\"', '(', '\n', '\010', 'S', 'e', 'm', 'a', 'n', 't', 'i', 'c', '\022', '\010', '\n', '\004', 'N', 'O', 'N', 'E', '\020', '\000', '\022', '\007', +'\n', '\003', 'S', 'E', 'T', '\020', '\001', '\022', '\t', '\n', '\005', 'A', 'L', 'I', 'A', 'S', '\020', '\002', 'B', '~', '\n', '\023', 'c', 'o', 'm', +'.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', 'B', '\020', 'D', 'e', 's', 'c', 'r', 'i', 'p', +'t', 'o', 'r', 'P', 'r', 'o', 't', 'o', 's', 'H', '\001', 'Z', '-', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'g', 'o', 'l', 'a', 'n', +'g', '.', 'o', 'r', 'g', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 't', 'y', 'p', 'e', 's', '/', 'd', 'e', 's', 'c', +'r', 'i', 'p', 't', 'o', 'r', 'p', 'b', '\370', '\001', '\001', '\242', '\002', '\003', 'G', 'P', 'B', '\252', '\002', '\032', 'G', 'o', 'o', 'g', 'l', +'e', '.', 'P', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'R', 'e', 'f', 'l', 'e', 'c', 't', 'i', 'o', 'n', }; static _upb_DefPool_Init *deps[1] = { @@ -1628,7 +1631,7 @@ _upb_DefPool_Init google_protobuf_descriptor_proto_upbdefinit = { deps, &google_protobuf_descriptor_proto_upb_file_layout, "google/protobuf/descriptor.proto", - UPB_STRINGVIEW_INIT(descriptor, 7820) + UPB_STRINGVIEW_INIT(descriptor, 7996) }; /* @@ -5514,11 +5517,6 @@ upb_UnknownToMessage_Status upb_MiniTable_PromoteUnknownToMessageArray( if (ret.status == kUpb_UnknownToMessage_Ok) { upb_MessageValue value; value.msg_val = ret.message; - // Allocate array on demand before append. - if (!repeated_messages) { - upb_MiniTable_ResizeArray(msg, field, 0, arena); - repeated_messages = upb_MiniTable_GetMutableArray(msg, field); - } if (!upb_Array_Append(repeated_messages, value, arena)) { return kUpb_UnknownToMessage_OutOfMemory; } @@ -5661,6 +5659,20 @@ const upb_Message_Extension* _upb_Message_Getext( return NULL; } +void _upb_Message_Clearext(upb_Message* msg, + const upb_MiniTableExtension* ext_l) { + upb_Message_Internal* in = upb_Message_Getinternal(msg); + if (!in->internal) return; + const upb_Message_Extension* base = + UPB_PTR_AT(in->internal, in->internal->ext_begin, void); + upb_Message_Extension* ext = + (upb_Message_Extension*)_upb_Message_Getext(msg, ext_l); + if (ext) { + *ext = *base; + in->internal->ext_begin += sizeof(upb_Message_Extension); + } +} + upb_Message_Extension* _upb_Message_GetOrCreateExtension( upb_Message* msg, const upb_MiniTableExtension* e, upb_Arena* arena) { upb_Message_Extension* ext = @@ -6388,21 +6400,6 @@ static void upb_MtDecoder_ParseMap(upb_MtDecoder* d, const char* data, } upb_MtDecoder_ParseMessage(d, data, len); - if (UPB_UNLIKELY(d->table->field_count != 2)) { - upb_MtDecoder_ErrorFormat(d, "%hu fields in map", d->table->field_count); - UPB_UNREACHABLE(); - } - if (UPB_UNLIKELY(d->table->fields[0].number != 1)) { - upb_MtDecoder_ErrorFormat(d, "field %d in map key", - d->table->fields[0].number); - UPB_UNREACHABLE(); - } - if (UPB_UNLIKELY(d->table->fields[1].number != 2)) { - upb_MtDecoder_ErrorFormat(d, "field %d in map val", - d->table->fields[1].number); - UPB_UNREACHABLE(); - } - upb_MtDecoder_AssignHasbits(d->table); // Map entries have a pre-determined layout, regardless of types. @@ -8091,6 +8088,7 @@ upb_EnumReservedRange* _upb_EnumReservedRanges_New( google_protobuf_EnumDescriptorProto_EnumReservedRange_start(protos[i]); const int32_t end = google_protobuf_EnumDescriptorProto_EnumReservedRange_end(protos[i]); + const int32_t max = kUpb_MaxFieldNumber + 1; // A full validation would also check that each range is disjoint, and that // none of the fields overlap with the extension ranges, but we are just @@ -8098,7 +8096,7 @@ upb_EnumReservedRange* _upb_EnumReservedRanges_New( // Note: Not a typo! Unlike extension ranges and message reserved ranges, // the end value of an enum reserved range is *inclusive*! - if (end < start) { + if (start < 1 || end < start || end > max) { _upb_DefBuilder_Errf(ctx, "Reserved range (%d, %d) is invalid, enum=%s\n", (int)start, (int)end, upb_EnumDef_FullName(e)); } @@ -9493,7 +9491,7 @@ void _upb_FileDef_Create(upb_DefBuilder* ctx, bool upb_Message_HasFieldByDef(const upb_Message* msg, const upb_FieldDef* f) { UPB_ASSERT(upb_FieldDef_HasPresence(f)); - return upb_Message_HasField(msg, upb_FieldDef_MiniTable(f)); + return _upb_MiniTable_HasField(msg, upb_FieldDef_MiniTable(f)); } const upb_FieldDef* upb_Message_WhichOneof(const upb_Message* msg, @@ -9515,7 +9513,7 @@ upb_MessageValue upb_Message_GetFieldByDef(const upb_Message* msg, const upb_FieldDef* f) { upb_MessageValue default_val = upb_FieldDef_Default(f); upb_MessageValue ret; - _upb_Message_GetField(msg, upb_FieldDef_MiniTable(f), &default_val, &ret); + _upb_MiniTable_GetField(msg, upb_FieldDef_MiniTable(f), &default_val, &ret); return ret; } @@ -9560,11 +9558,11 @@ upb_MutableMessageValue upb_Message_Mutable(upb_Message* msg, bool upb_Message_SetFieldByDef(upb_Message* msg, const upb_FieldDef* f, upb_MessageValue val, upb_Arena* a) { - return _upb_Message_SetField(msg, upb_FieldDef_MiniTable(f), &val, a); + return _upb_MiniTable_SetField(msg, upb_FieldDef_MiniTable(f), &val, a); } void upb_Message_ClearFieldByDef(upb_Message* msg, const upb_FieldDef* f) { - upb_Message_ClearField(msg, upb_FieldDef_MiniTable(f)); + _upb_MiniTable_ClearField(msg, upb_FieldDef_MiniTable(f)); } void upb_Message_ClearByDef(upb_Message* msg, const upb_MessageDef* m) { @@ -10799,7 +10797,6 @@ const char* _upb_FastDecoder_ErrorJmp(upb_Decoder* d, int status) { UPB_LONGJMP(d->err, status); return NULL; } - static void _upb_Decoder_VerifyUtf8(upb_Decoder* d, const char* buf, int len) { if (!_upb_Decoder_VerifyUtf8Inline(buf, len)) { _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_BadUtf8); @@ -10875,8 +10872,7 @@ static const char* upb_Decoder_DecodeSize(upb_Decoder* d, const char* ptr, uint32_t* size) { uint64_t size64; ptr = _upb_Decoder_DecodeVarint(d, ptr, &size64); - if (size64 >= INT32_MAX || - !upb_EpsCopyInputStream_CheckSize(&d->input, ptr, (int)size64)) { + if (size64 >= INT32_MAX || ptr - d->end + (int)size64 > d->limit) { _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_Malformed); } *size = size64; @@ -10923,6 +10919,15 @@ static upb_Message* _upb_Decoder_NewSubMessage( return msg; } +UPB_NOINLINE +const char* _upb_Decoder_IsDoneFallback(upb_Decoder* d, const char* ptr, + int overrun) { + int status; + ptr = _upb_Decoder_IsDoneFallbackInline(d, ptr, overrun, &status); + if (ptr == NULL) _upb_Decoder_ErrorJmp(d, status); + return ptr; +} + static const char* _upb_Decoder_ReadString(upb_Decoder* d, const char* ptr, int size, upb_StringView* str) { if (d->options & kUpb_DecodeOption_AliasString) { @@ -10958,11 +10963,11 @@ UPB_FORCEINLINE static const char* _upb_Decoder_DecodeSubMessage( upb_Decoder* d, const char* ptr, upb_Message* submsg, const upb_MiniTableSub* subs, const upb_MiniTableField* field, int size) { - int saved_delta = upb_EpsCopyInputStream_PushLimit(&d->input, ptr, size); + int saved_delta = _upb_Decoder_PushLimit(d, ptr, size); const upb_MiniTable* subl = subs[field->submsg_index].submsg; UPB_ASSERT(subl); ptr = _upb_Decoder_RecurseSubMessage(d, ptr, submsg, subl, DECODE_NOGROUP); - upb_EpsCopyInputStream_PopLimit(&d->input, ptr, saved_delta); + _upb_Decoder_PopLimit(d, ptr, saved_delta); return ptr; } @@ -11109,7 +11114,7 @@ static const char* _upb_Decoder_DecodeVarintPacked( upb_Decoder* d, const char* ptr, upb_Array* arr, wireval* val, const upb_MiniTableField* field, int lg2) { int scale = 1 << lg2; - int saved_limit = upb_EpsCopyInputStream_PushLimit(&d->input, ptr, val->size); + int saved_limit = _upb_Decoder_PushLimit(d, ptr, val->size); char* out = UPB_PTR_AT(_upb_array_ptr(arr), arr->size << lg2, void); while (!_upb_Decoder_IsDone(d, &ptr)) { wireval elem; @@ -11122,7 +11127,7 @@ static const char* _upb_Decoder_DecodeVarintPacked( memcpy(out, &elem, scale); out += scale; } - upb_EpsCopyInputStream_PopLimit(&d->input, ptr, saved_limit); + _upb_Decoder_PopLimit(d, ptr, saved_limit); return ptr; } @@ -11132,7 +11137,7 @@ static const char* _upb_Decoder_DecodeEnumPacked( const upb_MiniTableSub* subs, const upb_MiniTableField* field, wireval* val) { const upb_MiniTableEnum* e = subs[field->submsg_index].subenum; - int saved_limit = upb_EpsCopyInputStream_PushLimit(&d->input, ptr, val->size); + int saved_limit = _upb_Decoder_PushLimit(d, ptr, val->size); char* out = UPB_PTR_AT(_upb_array_ptr(arr), arr->size * 4, void); while (!_upb_Decoder_IsDone(d, &ptr)) { wireval elem; @@ -11148,7 +11153,7 @@ static const char* _upb_Decoder_DecodeEnumPacked( memcpy(out, &elem, 4); out += 4; } - upb_EpsCopyInputStream_PopLimit(&d->input, ptr, saved_limit); + _upb_Decoder_PopLimit(d, ptr, saved_limit); return ptr; } @@ -11896,7 +11901,7 @@ static const char* _upb_Decoder_DecodeMessage(upb_Decoder* d, const char* ptr, d->debug_tagstart = ptr; #endif - UPB_ASSERT(ptr < d->input.limit_ptr); + UPB_ASSERT(ptr < d->limit_ptr); ptr = _upb_Decoder_DecodeTag(d, ptr, &tag); field_number = tag >> 3; wire_type = tag & 7; @@ -11954,13 +11959,6 @@ static upb_DecodeStatus _upb_Decoder_DecodeTop(struct upb_Decoder* d, return kUpb_DecodeStatus_Ok; } -UPB_NOINLINE -const char* _upb_Decoder_IsDoneFallback(upb_EpsCopyInputStream* e, - const char* ptr, int overrun) { - return _upb_EpsCopyInputStream_IsDoneFallbackInline( - e, ptr, overrun, _upb_Decoder_BufferFlipCallback); -} - upb_DecodeStatus upb_Decode(const char* buf, size_t size, void* msg, const upb_MiniTable* l, const upb_ExtensionRegistry* extreg, int options, @@ -11968,11 +11966,20 @@ upb_DecodeStatus upb_Decode(const char* buf, size_t size, void* msg, upb_Decoder state; unsigned depth = (unsigned)options >> 16; - if (upb_EpsCopyInputStream_Init(&state.input, &buf, size)) { + if (size <= 16) { + memset(&state.patch, 0, 32); + if (size) memcpy(&state.patch, buf, size); + buf = state.patch; + state.end = buf + size; + state.limit = 0; options &= ~kUpb_DecodeOption_AliasString; // Can't alias patch buf. + } else { + state.end = buf + size - 16; + state.limit = 16; } state.extreg = extreg; + state.limit_ptr = state.end; state.unknown = NULL; state.depth = depth ? depth : 64; state.end_group = DECODE_NOGROUP; @@ -12037,27 +12044,28 @@ typedef enum { UPB_NOINLINE static const char* fastdecode_isdonefallback(UPB_PARSE_PARAMS) { int overrun = data; - ptr = _upb_EpsCopyInputStream_IsDoneFallbackInline( - &d->input, ptr, overrun, _upb_Decoder_BufferFlipCallback); + int status; + ptr = _upb_Decoder_IsDoneFallbackInline(d, ptr, overrun, &status); + if (ptr == NULL) _upb_FastDecoder_ErrorJmp(d, status); data = _upb_FastDecoder_LoadTag(ptr); UPB_MUSTTAIL return _upb_FastDecoder_TagDispatch(UPB_PARSE_ARGS); } UPB_FORCEINLINE static const char* fastdecode_dispatch(UPB_PARSE_PARAMS) { - int overrun; - switch (upb_EpsCopyInputStream_IsDoneStatus(&d->input, ptr, &overrun)) { - case kUpb_IsDoneStatus_Done: + if (UPB_UNLIKELY(ptr >= d->limit_ptr)) { + int overrun = ptr - d->end; + if (UPB_LIKELY(overrun == d->limit)) { + // Parse is finished. *(uint32_t*)msg |= hasbits; // Sync hasbits. const upb_MiniTable* l = decode_totablep(table); return UPB_UNLIKELY(l->required_count) ? _upb_Decoder_CheckRequired(d, ptr, msg, l) : ptr; - case kUpb_IsDoneStatus_NotDone: - break; - case kUpb_IsDoneStatus_NeedFallback: + } else { data = overrun; UPB_MUSTTAIL return fastdecode_isdonefallback(UPB_PARSE_ARGS); + } } // Read two bytes of tag data (for a one-byte tag, the high byte is junk). @@ -12095,17 +12103,37 @@ static const char* fastdecode_longsize(const char* ptr, int* size) { } UPB_FORCEINLINE -static const char* fastdecode_delimited( - upb_Decoder* d, const char* ptr, - upb_EpsCopyInputStream_ParseDelimitedFunc* func, void* ctx) { - ptr++; +static bool fastdecode_boundscheck(const char* ptr, size_t len, + const char* end) { + uintptr_t uptr = (uintptr_t)ptr; + uintptr_t uend = (uintptr_t)end + 16; + uintptr_t res = uptr + len; + return res < uptr || res > uend; +} - // Sign-extend so varint greater than one byte becomes negative, causing - // fast delimited parse to fail. - int len = (int8_t)ptr[-1]; +UPB_FORCEINLINE +static bool fastdecode_boundscheck2(const char* ptr, size_t len, + const char* end) { + // This is one extra branch compared to the more normal: + // return (size_t)(end - ptr) < size; + // However it is one less computation if we are just about to use "ptr + len": + // https://godbolt.org/z/35YGPz + // In microbenchmarks this shows an overall 4% improvement. + uintptr_t uptr = (uintptr_t)ptr; + uintptr_t uend = (uintptr_t)end; + uintptr_t res = uptr + len; + return res < uptr || res > uend; +} + +typedef const char* fastdecode_delimfunc(upb_Decoder* d, const char* ptr, + void* ctx); - if (!upb_EpsCopyInputStream_TryParseDelimitedFast(&d->input, &ptr, len, func, - ctx)) { +UPB_FORCEINLINE +static const char* fastdecode_delimited(upb_Decoder* d, const char* ptr, + fastdecode_delimfunc* func, void* ctx) { + ptr++; + int len = (int8_t)ptr[-1]; + if (fastdecode_boundscheck2(ptr, len, d->limit_ptr)) { // Slow case: Sub-message is >=128 bytes and/or exceeds the current buffer. // If it exceeds the buffer limit, limit/limit_ptr will change during // sub-message parsing, so we need to preserve delta, not limit. @@ -12117,13 +12145,25 @@ static const char* fastdecode_delimited( return NULL; } } - if (!upb_EpsCopyInputStream_CheckSize(&d->input, ptr, len)) { + if (ptr - d->end + (int)len > d->limit) { // Corrupt wire format: invalid limit. return NULL; } - int delta = upb_EpsCopyInputStream_PushLimit(&d->input, ptr, len); - ptr = func(&d->input, ptr, ctx); - upb_EpsCopyInputStream_PopLimit(&d->input, ptr, delta); + int delta = _upb_Decoder_PushLimit(d, ptr, len); + ptr = func(d, ptr, ctx); + _upb_Decoder_PopLimit(d, ptr, delta); + } else { + // Fast case: Sub-message is <128 bytes and fits in the current buffer. + // This means we can preserve limit/limit_ptr verbatim. + const char* saved_limit_ptr = d->limit_ptr; + int saved_limit = d->limit; + d->limit_ptr = ptr + len; + d->limit = d->limit_ptr - d->end; + UPB_ASSERT(d->limit_ptr == d->end + UPB_MIN(0, d->limit)); + ptr = func(d, ptr, ctx); + d->limit_ptr = saved_limit_ptr; + d->limit = saved_limit; + UPB_ASSERT(d->limit_ptr == d->end + UPB_MIN(0, d->limit)); } return ptr; } @@ -12364,9 +12404,8 @@ typedef struct { } fastdecode_varintdata; UPB_FORCEINLINE -static const char* fastdecode_topackedvarint(upb_EpsCopyInputStream* e, - const char* ptr, void* ctx) { - upb_Decoder* d = (upb_Decoder*)e; +static const char* fastdecode_topackedvarint(upb_Decoder* d, const char* ptr, + void* ctx) { fastdecode_varintdata* data = ctx; void* dst = data->dst; uint64_t val; @@ -12514,8 +12553,7 @@ TAGBYTES(p) ptr = fastdecode_longsize(ptr, &size); \ } \ \ - if (UPB_UNLIKELY(!upb_EpsCopyInputStream_CheckDataSizeAvailable( \ - &d->input, ptr, size) || \ + if (UPB_UNLIKELY(fastdecode_boundscheck(ptr, size, d->limit_ptr) || \ (size % valbytes) != 0)) { \ _upb_FastDecoder_ErrorJmp(d, kUpb_DecodeStatus_Malformed); \ } \ @@ -12607,8 +12645,7 @@ static const char* fastdecode_verifyutf8(upb_Decoder* d, const char* ptr, ptr = fastdecode_longsize(ptr, &size); \ } \ \ - if (UPB_UNLIKELY(!upb_EpsCopyInputStream_CheckDataSizeAvailable( \ - &d->input, ptr, size))) { \ + if (UPB_UNLIKELY(fastdecode_boundscheck(ptr, size, d->limit_ptr))) { \ dst->size = 0; \ _upb_FastDecoder_ErrorJmp(d, kUpb_DecodeStatus_Malformed); \ } \ @@ -12661,92 +12698,91 @@ static void fastdecode_docopy(upb_Decoder* d, const char* ptr, uint32_t size, UPB_POISON_MEMORY_REGION(data + size, copy - size); } -#define FASTDECODE_COPYSTRING(d, ptr, msg, table, hasbits, data, tagbytes, \ - card, validate_utf8) \ - upb_StringView* dst; \ - fastdecode_arr farr; \ - int64_t size; \ - size_t arena_has; \ - size_t common_has; \ - char* buf; \ - \ - UPB_ASSERT((d->options & kUpb_DecodeOption_AliasString) == 0); \ - UPB_ASSERT(fastdecode_checktag(data, tagbytes)); \ - \ - dst = fastdecode_getfield(d, ptr, msg, &data, &hasbits, &farr, \ - sizeof(upb_StringView), card); \ - \ - again: \ - if (card == CARD_r) { \ - dst = fastdecode_resizearr(d, dst, &farr, sizeof(upb_StringView)); \ - } \ - \ - size = (uint8_t)ptr[tagbytes]; \ - ptr += tagbytes + 1; \ - dst->size = size; \ - \ - buf = d->arena.head.ptr; \ - arena_has = _upb_ArenaHas(&d->arena); \ - common_has = UPB_MIN(arena_has, \ - upb_EpsCopyInputStream_BytesAvailable(&d->input, ptr)); \ - \ - if (UPB_LIKELY(size <= 15 - tagbytes)) { \ - if (arena_has < 16) goto longstr; \ - d->arena.head.ptr += 16; \ - memcpy(buf, ptr - tagbytes - 1, 16); \ - dst->data = buf + tagbytes + 1; \ - } else if (UPB_LIKELY(size <= 32)) { \ - if (UPB_UNLIKELY(common_has < 32)) goto longstr; \ - fastdecode_docopy(d, ptr, size, 32, buf, dst); \ - } else if (UPB_LIKELY(size <= 64)) { \ - if (UPB_UNLIKELY(common_has < 64)) goto longstr; \ - fastdecode_docopy(d, ptr, size, 64, buf, dst); \ - } else if (UPB_LIKELY(size < 128)) { \ - if (UPB_UNLIKELY(common_has < 128)) goto longstr; \ - fastdecode_docopy(d, ptr, size, 128, buf, dst); \ - } else { \ - goto longstr; \ - } \ - \ - ptr += size; \ - \ - if (card == CARD_r) { \ - if (validate_utf8 && \ - !_upb_Decoder_VerifyUtf8Inline(dst->data, dst->size)) { \ - _upb_FastDecoder_ErrorJmp(d, kUpb_DecodeStatus_BadUtf8); \ - } \ - fastdecode_nextret ret = fastdecode_nextrepeated( \ - d, dst, &ptr, &farr, data, tagbytes, sizeof(upb_StringView)); \ - switch (ret.next) { \ - case FD_NEXT_SAMEFIELD: \ - dst = ret.dst; \ - goto again; \ - case FD_NEXT_OTHERFIELD: \ - data = ret.tag; \ - UPB_MUSTTAIL return _upb_FastDecoder_TagDispatch(UPB_PARSE_ARGS); \ - case FD_NEXT_ATLIMIT: \ - return ptr; \ - } \ - } \ - \ - if (card != CARD_r && validate_utf8) { \ - data = (uint64_t)dst; \ - UPB_MUSTTAIL return fastdecode_verifyutf8(UPB_PARSE_ARGS); \ - } \ - \ - UPB_MUSTTAIL return fastdecode_dispatch(UPB_PARSE_ARGS); \ - \ - longstr: \ - if (card == CARD_r) { \ - fastdecode_commitarr(dst + 1, &farr, sizeof(upb_StringView)); \ - } \ - ptr--; \ - if (validate_utf8) { \ - UPB_MUSTTAIL return fastdecode_longstring_utf8(d, ptr, msg, table, \ - hasbits, (uint64_t)dst); \ - } else { \ - UPB_MUSTTAIL return fastdecode_longstring_noutf8(d, ptr, msg, table, \ - hasbits, (uint64_t)dst); \ +#define FASTDECODE_COPYSTRING(d, ptr, msg, table, hasbits, data, tagbytes, \ + card, validate_utf8) \ + upb_StringView* dst; \ + fastdecode_arr farr; \ + int64_t size; \ + size_t arena_has; \ + size_t common_has; \ + char* buf; \ + \ + UPB_ASSERT((d->options & kUpb_DecodeOption_AliasString) == 0); \ + UPB_ASSERT(fastdecode_checktag(data, tagbytes)); \ + \ + dst = fastdecode_getfield(d, ptr, msg, &data, &hasbits, &farr, \ + sizeof(upb_StringView), card); \ + \ + again: \ + if (card == CARD_r) { \ + dst = fastdecode_resizearr(d, dst, &farr, sizeof(upb_StringView)); \ + } \ + \ + size = (uint8_t)ptr[tagbytes]; \ + ptr += tagbytes + 1; \ + dst->size = size; \ + \ + buf = d->arena.head.ptr; \ + arena_has = _upb_ArenaHas(&d->arena); \ + common_has = UPB_MIN(arena_has, (d->end - ptr) + 16); \ + \ + if (UPB_LIKELY(size <= 15 - tagbytes)) { \ + if (arena_has < 16) goto longstr; \ + d->arena.head.ptr += 16; \ + memcpy(buf, ptr - tagbytes - 1, 16); \ + dst->data = buf + tagbytes + 1; \ + } else if (UPB_LIKELY(size <= 32)) { \ + if (UPB_UNLIKELY(common_has < 32)) goto longstr; \ + fastdecode_docopy(d, ptr, size, 32, buf, dst); \ + } else if (UPB_LIKELY(size <= 64)) { \ + if (UPB_UNLIKELY(common_has < 64)) goto longstr; \ + fastdecode_docopy(d, ptr, size, 64, buf, dst); \ + } else if (UPB_LIKELY(size < 128)) { \ + if (UPB_UNLIKELY(common_has < 128)) goto longstr; \ + fastdecode_docopy(d, ptr, size, 128, buf, dst); \ + } else { \ + goto longstr; \ + } \ + \ + ptr += size; \ + \ + if (card == CARD_r) { \ + if (validate_utf8 && \ + !_upb_Decoder_VerifyUtf8Inline(dst->data, dst->size)) { \ + _upb_FastDecoder_ErrorJmp(d, kUpb_DecodeStatus_BadUtf8); \ + } \ + fastdecode_nextret ret = fastdecode_nextrepeated( \ + d, dst, &ptr, &farr, data, tagbytes, sizeof(upb_StringView)); \ + switch (ret.next) { \ + case FD_NEXT_SAMEFIELD: \ + dst = ret.dst; \ + goto again; \ + case FD_NEXT_OTHERFIELD: \ + data = ret.tag; \ + UPB_MUSTTAIL return _upb_FastDecoder_TagDispatch(UPB_PARSE_ARGS); \ + case FD_NEXT_ATLIMIT: \ + return ptr; \ + } \ + } \ + \ + if (card != CARD_r && validate_utf8) { \ + data = (uint64_t)dst; \ + UPB_MUSTTAIL return fastdecode_verifyutf8(UPB_PARSE_ARGS); \ + } \ + \ + UPB_MUSTTAIL return fastdecode_dispatch(UPB_PARSE_ARGS); \ + \ + longstr: \ + if (card == CARD_r) { \ + fastdecode_commitarr(dst + 1, &farr, sizeof(upb_StringView)); \ + } \ + ptr--; \ + if (validate_utf8) { \ + UPB_MUSTTAIL return fastdecode_longstring_utf8(d, ptr, msg, table, \ + hasbits, (uint64_t)dst); \ + } else { \ + UPB_MUSTTAIL return fastdecode_longstring_noutf8(d, ptr, msg, table, \ + hasbits, (uint64_t)dst); \ } #define FASTDECODE_STRING(d, ptr, msg, table, hasbits, data, tagbytes, card, \ @@ -12776,8 +12812,7 @@ static void fastdecode_docopy(upb_Decoder* d, const char* ptr, uint32_t size, dst->data = ptr; \ dst->size = size; \ \ - if (UPB_UNLIKELY(!upb_EpsCopyInputStream_CheckDataSizeAvailable( \ - &d->input, ptr, size))) { \ + if (UPB_UNLIKELY(fastdecode_boundscheck(ptr, size, d->end))) { \ ptr--; \ if (validate_utf8) { \ return fastdecode_longstring_utf8(d, ptr, msg, table, hasbits, \ @@ -12890,9 +12925,8 @@ typedef struct { } fastdecode_submsgdata; UPB_FORCEINLINE -static const char* fastdecode_tosubmsg(upb_EpsCopyInputStream* e, - const char* ptr, void* ctx) { - upb_Decoder* d = (upb_Decoder*)e; +static const char* fastdecode_tosubmsg(upb_Decoder* d, const char* ptr, + void* ctx) { fastdecode_submsgdata* submsg = ctx; ptr = fastdecode_dispatch(d, ptr, submsg->msg, submsg->table, 0, 0); UPB_ASSUME(ptr != NULL); diff --git a/php/ext/google/protobuf/php-upb.h b/php/ext/google/protobuf/php-upb.h index 1db98915b7ac8..f4b126b39e6b3 100644 --- a/php/ext/google/protobuf/php-upb.h +++ b/php/ext/google/protobuf/php-upb.h @@ -146,12 +146,6 @@ #if defined(__GNUC__) || defined(__clang__) #define UPB_UNREACHABLE() do { assert(0); __builtin_unreachable(); } while(0) -#elif defined(_MSC_VER) -#define UPB_UNREACHABLE() \ - do { \ - assert(0); \ - __assume(0); \ - } while (0) #else #define UPB_UNREACHABLE() do { assert(0); } while(0) #endif @@ -1657,8 +1651,7 @@ extern "C" { #endif // Creates a new message with the given mini_table on the given arena. -UPB_API upb_Message* upb_Message_New(const upb_MiniTable* mini_table, - upb_Arena* arena); +upb_Message* upb_Message_New(const upb_MiniTable* mini_table, upb_Arena* arena); // Adds unknown data (serialized protobuf data) to the given message. // The data is copied into the message instance. @@ -1900,6 +1893,8 @@ const upb_Message_Extension* _upb_Message_Getexts(const upb_Message* msg, const upb_Message_Extension* _upb_Message_Getext( const upb_Message* msg, const upb_MiniTableExtension* ext); +void _upb_Message_Clearext(upb_Message* msg, const upb_MiniTableExtension* ext); + #ifdef __cplusplus } /* extern "C" */ #endif @@ -1955,7 +1950,7 @@ typedef struct upb_ExtensionRegistry upb_ExtensionRegistry; // Creates a upb_ExtensionRegistry in the given arena. // The arena must outlive any use of the extreg. -UPB_API upb_ExtensionRegistry* upb_ExtensionRegistry_New(upb_Arena* arena); +upb_ExtensionRegistry* upb_ExtensionRegistry_New(upb_Arena* arena); // Adds the given extension info for the array |e| of size |count| into the // registry. If there are any errors, the entire array is backed out. @@ -2329,8 +2324,8 @@ UPB_INLINE const void* _upb_MiniTableField_GetConstPtr( return (char*)msg + field->offset; } -UPB_INLINE void _upb_Message_SetPresence(upb_Message* msg, - const upb_MiniTableField* field) { +UPB_INLINE void _upb_MiniTable_SetPresence(upb_Message* msg, + const upb_MiniTableField* field) { if (field->presence > 0) { _upb_sethas_field(msg, field); } else if (_upb_MiniTableField_InOneOf(field)) { @@ -2338,6 +2333,9 @@ UPB_INLINE void _upb_Message_SetPresence(upb_Message* msg, } } +UPB_INLINE bool upb_MiniTable_HasField(const upb_Message* msg, + const upb_MiniTableField* field); + UPB_INLINE bool _upb_MiniTable_ValueIsNonZero(const void* default_val, const upb_MiniTableField* field) { char zero[16] = {0}; @@ -2386,52 +2384,31 @@ UPB_INLINE void _upb_MiniTable_CopyFieldData(void* to, const void* from, // bool FooMessage_set_bool_field(const upb_Message* msg, bool val) { // const upb_MiniTableField field = {1, 0, 0, /* etc... */}; // // All value in "field" are compile-time known. -// _upb_Message_SetNonExtensionField(msg, &field, &value); +// _upb_MiniTable_SetNonExtensionField(msg, &field, &value); // } // // // Via UPB_ASSUME(). -// UPB_INLINE bool upb_Message_SetBool(upb_Message* msg, -// const upb_MiniTableField* field, -// bool value, upb_Arena* a) { +// UPB_INLINE void upb_MiniTable_SetBool(upb_Message* msg, +// const upb_MiniTableField* field, +// bool value) { // UPB_ASSUME(field->descriptortype == kUpb_FieldType_Bool); // UPB_ASSUME(!upb_IsRepeatedOrMap(field)); // UPB_ASSUME(_upb_MiniTableField_GetRep(field) == kUpb_FieldRep_1Byte); -// _upb_Message_SetField(msg, field, &value, a); +// _upb_MiniTable_SetNonExtensionField(msg, field, &value); // } // // As a result, we can use these universal getters/setters for *all* message // accessors: generated code, MiniTable accessors, and reflection. The only // exception is the binary encoder/decoder, which need to be a bit more clever // about how the read/write the message data, for efficiency. -// -// These functions work on both extensions and non-extensions. If the field -// of a setter is known to be a non-extension, the arena may be NULL and the -// returned bool value may be ignored since it will always succeed. - -UPB_INLINE bool _upb_Message_HasExtensionField( - const upb_Message* msg, const upb_MiniTableExtension* ext) { - UPB_ASSERT(upb_MiniTableField_HasPresence(&ext->field)); - return _upb_Message_Getext(msg, ext) != NULL; -} -UPB_INLINE bool _upb_Message_HasNonExtensionField( - const upb_Message* msg, const upb_MiniTableField* field) { - UPB_ASSERT(upb_MiniTableField_HasPresence(field)); - UPB_ASSUME(!upb_MiniTableField_IsExtension(field)); - if (_upb_MiniTableField_InOneOf(field)) { - return _upb_getoneofcase_field(msg, field) == field->number; - } else { - return _upb_hasbit_field(msg, field); - } -} - -static UPB_FORCEINLINE void _upb_Message_GetNonExtensionField( +static UPB_FORCEINLINE void _upb_MiniTable_GetNonExtensionField( const upb_Message* msg, const upb_MiniTableField* field, const void* default_val, void* val) { UPB_ASSUME(!upb_MiniTableField_IsExtension(field)); if ((_upb_MiniTableField_InOneOf(field) || _upb_MiniTable_ValueIsNonZero(default_val, field)) && - !_upb_Message_HasNonExtensionField(msg, field)) { + !upb_MiniTable_HasField(msg, field)) { _upb_MiniTable_CopyFieldData(val, default_val, field); return; } @@ -2439,7 +2416,7 @@ static UPB_FORCEINLINE void _upb_Message_GetNonExtensionField( field); } -UPB_INLINE void _upb_Message_GetExtensionField( +UPB_INLINE void _upb_MiniTable_GetExtensionField( const upb_Message* msg, const upb_MiniTableExtension* mt_ext, const void* default_val, void* val) { UPB_ASSUME(upb_MiniTableField_IsExtension(&mt_ext->field)); @@ -2451,29 +2428,28 @@ UPB_INLINE void _upb_Message_GetExtensionField( } } -UPB_INLINE void _upb_Message_GetField(const upb_Message* msg, - const upb_MiniTableField* field, - const void* default_val, void* val) { +UPB_INLINE void _upb_MiniTable_GetField(const upb_Message* msg, + const upb_MiniTableField* field, + const void* default_val, void* val) { if (upb_MiniTableField_IsExtension(field)) { - _upb_Message_GetExtensionField(msg, (upb_MiniTableExtension*)field, - default_val, val); + _upb_MiniTable_GetExtensionField(msg, (upb_MiniTableExtension*)field, + default_val, val); } else { - _upb_Message_GetNonExtensionField(msg, field, default_val, val); + _upb_MiniTable_GetNonExtensionField(msg, field, default_val, val); } } -UPB_INLINE void _upb_Message_SetNonExtensionField( +UPB_INLINE void _upb_MiniTable_SetNonExtensionField( upb_Message* msg, const upb_MiniTableField* field, const void* val) { UPB_ASSUME(!upb_MiniTableField_IsExtension(field)); - _upb_Message_SetPresence(msg, field); + _upb_MiniTable_SetPresence(msg, field); _upb_MiniTable_CopyFieldData(_upb_MiniTableField_GetPtr(msg, field), val, field); } -UPB_INLINE bool _upb_Message_SetExtensionField( +UPB_INLINE bool _upb_MiniTable_SetExtensionField( upb_Message* msg, const upb_MiniTableExtension* mt_ext, const void* val, upb_Arena* a) { - UPB_ASSERT(a); upb_Message_Extension* ext = _upb_Message_GetOrCreateExtension(msg, mt_ext, a); if (!ext) return false; @@ -2481,33 +2457,51 @@ UPB_INLINE bool _upb_Message_SetExtensionField( return true; } -UPB_INLINE bool _upb_Message_SetField(upb_Message* msg, - const upb_MiniTableField* field, - const void* val, upb_Arena* a) { +UPB_INLINE bool _upb_MiniTable_SetField(upb_Message* msg, + const upb_MiniTableField* field, + const void* val, upb_Arena* a) { if (upb_MiniTableField_IsExtension(field)) { - const upb_MiniTableExtension* ext = (const upb_MiniTableExtension*)field; - return _upb_Message_SetExtensionField(msg, ext, val, a); + return _upb_MiniTable_SetExtensionField( + msg, (const upb_MiniTableExtension*)field, val, a); } else { - _upb_Message_SetNonExtensionField(msg, field, val); + _upb_MiniTable_SetNonExtensionField(msg, field, val); return true; } } -UPB_INLINE void _upb_Message_ClearExtensionField( - upb_Message* msg, const upb_MiniTableExtension* ext_l) { - upb_Message_Internal* in = upb_Message_Getinternal(msg); - if (!in->internal) return; - const upb_Message_Extension* base = - UPB_PTR_AT(in->internal, in->internal->ext_begin, upb_Message_Extension); - upb_Message_Extension* ext = - (upb_Message_Extension*)_upb_Message_Getext(msg, ext_l); - if (ext) { - *ext = *base; - in->internal->ext_begin += sizeof(upb_Message_Extension); +UPB_INLINE bool _upb_MiniTable_HasExtensionField( + const upb_Message* msg, const upb_MiniTableExtension* ext) { + UPB_ASSERT(upb_MiniTableField_HasPresence(&ext->field)); + return _upb_Message_Getext(msg, ext) != NULL; +} + +UPB_INLINE bool _upb_MiniTable_HasNonExtensionField( + const upb_Message* msg, const upb_MiniTableField* field) { + UPB_ASSERT(upb_MiniTableField_HasPresence(field)); + UPB_ASSUME(!upb_MiniTableField_IsExtension(field)); + if (_upb_MiniTableField_InOneOf(field)) { + return _upb_getoneofcase_field(msg, field) == field->number; + } else { + return _upb_hasbit_field(msg, field); } } -UPB_INLINE void _upb_Message_ClearNonExtensionField( +UPB_INLINE bool _upb_MiniTable_HasField(const upb_Message* msg, + const upb_MiniTableField* field) { + if (upb_MiniTableField_IsExtension(field)) { + return _upb_MiniTable_HasExtensionField( + msg, (const upb_MiniTableExtension*)field); + } else { + return _upb_MiniTable_HasNonExtensionField(msg, field); + } +} + +UPB_INLINE void _upb_MiniTable_ClearExtensionField( + upb_Message* msg, const upb_MiniTableExtension* ext) { + _upb_Message_Clearext(msg, ext); +} + +UPB_INLINE void _upb_MiniTable_ClearNonExtensionField( upb_Message* msg, const upb_MiniTableField* field) { if (field->presence > 0) { _upb_clearhas_field(msg, field); @@ -2521,51 +2515,50 @@ UPB_INLINE void _upb_Message_ClearNonExtensionField( field); } -// EVERYTHING ABOVE THIS LINE IS INTERNAL - DO NOT USE ///////////////////////// - -UPB_API_INLINE void upb_Message_ClearField(upb_Message* msg, - const upb_MiniTableField* field) { +UPB_INLINE void _upb_MiniTable_ClearField(upb_Message* msg, + const upb_MiniTableField* field) { if (upb_MiniTableField_IsExtension(field)) { - const upb_MiniTableExtension* ext = (const upb_MiniTableExtension*)field; - _upb_Message_ClearExtensionField(msg, ext); + _upb_Message_Clearext(msg, (const upb_MiniTableExtension*)field); } else { - _upb_Message_ClearNonExtensionField(msg, field); + _upb_MiniTable_ClearNonExtensionField(msg, field); } } -UPB_API_INLINE bool upb_Message_HasField(const upb_Message* msg, - const upb_MiniTableField* field) { - if (upb_MiniTableField_IsExtension(field)) { - const upb_MiniTableExtension* ext = (const upb_MiniTableExtension*)field; - return _upb_Message_HasExtensionField(msg, ext); - } else { - return _upb_Message_HasNonExtensionField(msg, field); - } +// EVERYTHING ABOVE THIS LINE IS INTERNAL - DO NOT USE ///////////////////////// + +UPB_API_INLINE void upb_MiniTable_ClearField(upb_Message* msg, + const upb_MiniTableField* field) { + _upb_MiniTable_ClearNonExtensionField(msg, field); } -UPB_API_INLINE bool upb_Message_GetBool(const upb_Message* msg, - const upb_MiniTableField* field, - bool default_val) { +UPB_API_INLINE bool upb_MiniTable_HasField(const upb_Message* msg, + const upb_MiniTableField* field) { + return _upb_MiniTable_HasNonExtensionField(msg, field); +} + +UPB_API_INLINE bool upb_MiniTable_GetBool(const upb_Message* msg, + const upb_MiniTableField* field, + bool default_val) { UPB_ASSUME(field->descriptortype == kUpb_FieldType_Bool); UPB_ASSUME(!upb_IsRepeatedOrMap(field)); UPB_ASSUME(_upb_MiniTableField_GetRep(field) == kUpb_FieldRep_1Byte); bool ret; - _upb_Message_GetField(msg, field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, field, &default_val, &ret); return ret; } -UPB_API_INLINE bool upb_Message_SetBool(upb_Message* msg, - const upb_MiniTableField* field, - bool value, upb_Arena* a) { +UPB_API_INLINE void upb_MiniTable_SetBool(upb_Message* msg, + const upb_MiniTableField* field, + bool value) { UPB_ASSUME(field->descriptortype == kUpb_FieldType_Bool); UPB_ASSUME(!upb_IsRepeatedOrMap(field)); UPB_ASSUME(_upb_MiniTableField_GetRep(field) == kUpb_FieldRep_1Byte); - return _upb_Message_SetField(msg, field, &value, a); + _upb_MiniTable_SetNonExtensionField(msg, field, &value); } -UPB_API_INLINE int32_t upb_Message_GetInt32(const upb_Message* msg, - const upb_MiniTableField* field, - int32_t default_val) { +UPB_API_INLINE int32_t upb_MiniTable_GetInt32(const upb_Message* msg, + const upb_MiniTableField* field, + int32_t default_val) { UPB_ASSUME(field->descriptortype == kUpb_FieldType_Int32 || field->descriptortype == kUpb_FieldType_SInt32 || field->descriptortype == kUpb_FieldType_SFixed32 || @@ -2573,41 +2566,41 @@ UPB_API_INLINE int32_t upb_Message_GetInt32(const upb_Message* msg, UPB_ASSUME(!upb_IsRepeatedOrMap(field)); UPB_ASSUME(_upb_MiniTableField_GetRep(field) == kUpb_FieldRep_4Byte); int32_t ret; - _upb_Message_GetField(msg, field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, field, &default_val, &ret); return ret; } -UPB_API_INLINE bool upb_Message_SetInt32(upb_Message* msg, - const upb_MiniTableField* field, - int32_t value, upb_Arena* a) { +UPB_API_INLINE void upb_MiniTable_SetInt32(upb_Message* msg, + const upb_MiniTableField* field, + int32_t value) { UPB_ASSUME(field->descriptortype == kUpb_FieldType_Int32 || field->descriptortype == kUpb_FieldType_SInt32 || field->descriptortype == kUpb_FieldType_SFixed32); UPB_ASSUME(!upb_IsRepeatedOrMap(field)); UPB_ASSUME(_upb_MiniTableField_GetRep(field) == kUpb_FieldRep_4Byte); - return _upb_Message_SetField(msg, field, &value, a); + _upb_MiniTable_SetNonExtensionField(msg, field, &value); } -UPB_API_INLINE uint32_t upb_Message_GetUInt32(const upb_Message* msg, - const upb_MiniTableField* field, - uint32_t default_val) { +UPB_API_INLINE uint32_t upb_MiniTable_GetUInt32(const upb_Message* msg, + const upb_MiniTableField* field, + uint32_t default_val) { UPB_ASSUME(field->descriptortype == kUpb_FieldType_UInt32 || field->descriptortype == kUpb_FieldType_Fixed32); UPB_ASSUME(!upb_IsRepeatedOrMap(field)); UPB_ASSUME(_upb_MiniTableField_GetRep(field) == kUpb_FieldRep_4Byte); uint32_t ret; - _upb_Message_GetField(msg, field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, field, &default_val, &ret); return ret; } -UPB_API_INLINE bool upb_Message_SetUInt32(upb_Message* msg, - const upb_MiniTableField* field, - uint32_t value, upb_Arena* a) { +UPB_API_INLINE void upb_MiniTable_SetUInt32(upb_Message* msg, + const upb_MiniTableField* field, + uint32_t value) { UPB_ASSUME(field->descriptortype == kUpb_FieldType_UInt32 || field->descriptortype == kUpb_FieldType_Fixed32); UPB_ASSUME(!upb_IsRepeatedOrMap(field)); UPB_ASSUME(_upb_MiniTableField_GetRep(field) == kUpb_FieldRep_4Byte); - return _upb_Message_SetField(msg, field, &value, a); + _upb_MiniTable_SetNonExtensionField(msg, field, &value); } UPB_API_INLINE void upb_MiniTable_SetEnumProto2( @@ -2618,115 +2611,115 @@ UPB_API_INLINE void upb_MiniTable_SetEnumProto2( UPB_ASSUME(_upb_MiniTableField_GetRep(field) == kUpb_FieldRep_4Byte); UPB_ASSERT(upb_MiniTableEnum_CheckValue( upb_MiniTable_GetSubEnumTable(msg_mini_table, field), value)); - _upb_Message_SetNonExtensionField(msg, field, &value); + _upb_MiniTable_SetNonExtensionField(msg, field, &value); } -UPB_API_INLINE int64_t upb_Message_GetInt64(const upb_Message* msg, - const upb_MiniTableField* field, - uint64_t default_val) { +UPB_API_INLINE int64_t upb_MiniTable_GetInt64(const upb_Message* msg, + const upb_MiniTableField* field, + uint64_t default_val) { UPB_ASSERT(field->descriptortype == kUpb_FieldType_Int64 || field->descriptortype == kUpb_FieldType_SInt64 || field->descriptortype == kUpb_FieldType_SFixed64); UPB_ASSUME(!upb_IsRepeatedOrMap(field)); UPB_ASSUME(_upb_MiniTableField_GetRep(field) == kUpb_FieldRep_8Byte); int64_t ret; - _upb_Message_GetField(msg, field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, field, &default_val, &ret); return ret; } -UPB_API_INLINE bool upb_Message_SetInt64(upb_Message* msg, - const upb_MiniTableField* field, - int64_t value, upb_Arena* a) { +UPB_API_INLINE void upb_MiniTable_SetInt64(upb_Message* msg, + const upb_MiniTableField* field, + int64_t value) { UPB_ASSERT(field->descriptortype == kUpb_FieldType_Int64 || field->descriptortype == kUpb_FieldType_SInt64 || field->descriptortype == kUpb_FieldType_SFixed64); UPB_ASSUME(!upb_IsRepeatedOrMap(field)); UPB_ASSUME(_upb_MiniTableField_GetRep(field) == kUpb_FieldRep_8Byte); - return _upb_Message_SetField(msg, field, &value, a); + _upb_MiniTable_SetNonExtensionField(msg, field, &value); } -UPB_API_INLINE uint64_t upb_Message_GetUInt64(const upb_Message* msg, - const upb_MiniTableField* field, - uint64_t default_val) { +UPB_API_INLINE uint64_t upb_MiniTable_GetUInt64(const upb_Message* msg, + const upb_MiniTableField* field, + uint64_t default_val) { UPB_ASSERT(field->descriptortype == kUpb_FieldType_UInt64 || field->descriptortype == kUpb_FieldType_Fixed64); UPB_ASSUME(!upb_IsRepeatedOrMap(field)); UPB_ASSUME(_upb_MiniTableField_GetRep(field) == kUpb_FieldRep_8Byte); uint64_t ret; - _upb_Message_GetField(msg, field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, field, &default_val, &ret); return ret; } -UPB_API_INLINE bool upb_Message_SetUInt64(upb_Message* msg, - const upb_MiniTableField* field, - uint64_t value, upb_Arena* a) { +UPB_API_INLINE void upb_MiniTable_SetUInt64(upb_Message* msg, + const upb_MiniTableField* field, + uint64_t value) { UPB_ASSERT(field->descriptortype == kUpb_FieldType_UInt64 || field->descriptortype == kUpb_FieldType_Fixed64); UPB_ASSUME(!upb_IsRepeatedOrMap(field)); UPB_ASSUME(_upb_MiniTableField_GetRep(field) == kUpb_FieldRep_8Byte); - return _upb_Message_SetField(msg, field, &value, a); + _upb_MiniTable_SetNonExtensionField(msg, field, &value); } -UPB_API_INLINE float upb_Message_GetFloat(const upb_Message* msg, - const upb_MiniTableField* field, - float default_val) { +UPB_API_INLINE float upb_MiniTable_GetFloat(const upb_Message* msg, + const upb_MiniTableField* field, + float default_val) { UPB_ASSERT(field->descriptortype == kUpb_FieldType_Float); UPB_ASSUME(!upb_IsRepeatedOrMap(field)); UPB_ASSUME(_upb_MiniTableField_GetRep(field) == kUpb_FieldRep_4Byte); float ret; - _upb_Message_GetField(msg, field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, field, &default_val, &ret); return ret; } -UPB_API_INLINE bool upb_Message_SetFloat(upb_Message* msg, - const upb_MiniTableField* field, - float value, upb_Arena* a) { +UPB_API_INLINE void upb_MiniTable_SetFloat(upb_Message* msg, + const upb_MiniTableField* field, + float value) { UPB_ASSERT(field->descriptortype == kUpb_FieldType_Float); UPB_ASSUME(!upb_IsRepeatedOrMap(field)); UPB_ASSUME(_upb_MiniTableField_GetRep(field) == kUpb_FieldRep_4Byte); - return _upb_Message_SetField(msg, field, &value, a); + _upb_MiniTable_SetNonExtensionField(msg, field, &value); } -UPB_API_INLINE double upb_Message_GetDouble(const upb_Message* msg, - const upb_MiniTableField* field, - double default_val) { +UPB_API_INLINE double upb_MiniTable_GetDouble(const upb_Message* msg, + const upb_MiniTableField* field, + double default_val) { UPB_ASSERT(field->descriptortype == kUpb_FieldType_Double); UPB_ASSUME(!upb_IsRepeatedOrMap(field)); UPB_ASSUME(_upb_MiniTableField_GetRep(field) == kUpb_FieldRep_8Byte); double ret; - _upb_Message_GetField(msg, field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, field, &default_val, &ret); return ret; } -UPB_API_INLINE bool upb_Message_SetDouble(upb_Message* msg, - const upb_MiniTableField* field, - double value, upb_Arena* a) { +UPB_API_INLINE void upb_MiniTable_SetDouble(upb_Message* msg, + const upb_MiniTableField* field, + double value) { UPB_ASSERT(field->descriptortype == kUpb_FieldType_Double); UPB_ASSUME(!upb_IsRepeatedOrMap(field)); UPB_ASSUME(_upb_MiniTableField_GetRep(field) == kUpb_FieldRep_8Byte); - return _upb_Message_SetField(msg, field, &value, a); + _upb_MiniTable_SetNonExtensionField(msg, field, &value); } UPB_API_INLINE upb_StringView -upb_Message_GetString(const upb_Message* msg, const upb_MiniTableField* field, - upb_StringView def_val) { +upb_MiniTable_GetString(const upb_Message* msg, const upb_MiniTableField* field, + upb_StringView def_val) { UPB_ASSERT(field->descriptortype == kUpb_FieldType_Bytes || field->descriptortype == kUpb_FieldType_String); UPB_ASSUME(!upb_IsRepeatedOrMap(field)); UPB_ASSUME(_upb_MiniTableField_GetRep(field) == kUpb_FieldRep_StringView); upb_StringView ret; - _upb_Message_GetField(msg, field, &def_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, field, &def_val, &ret); return ret; } -UPB_API_INLINE bool upb_Message_SetString(upb_Message* msg, - const upb_MiniTableField* field, - upb_StringView value, upb_Arena* a) { +UPB_API_INLINE void upb_MiniTable_SetString(upb_Message* msg, + const upb_MiniTableField* field, + upb_StringView value) { UPB_ASSERT(field->descriptortype == kUpb_FieldType_Bytes || field->descriptortype == kUpb_FieldType_String); UPB_ASSUME(!upb_IsRepeatedOrMap(field)); UPB_ASSUME(_upb_MiniTableField_GetRep(field) == kUpb_FieldRep_StringView); - return _upb_Message_SetField(msg, field, &value, a); + _upb_MiniTable_SetNonExtensionField(msg, field, &value); } UPB_API_INLINE const upb_Message* upb_MiniTable_GetMessage( @@ -2738,7 +2731,7 @@ UPB_API_INLINE const upb_Message* upb_MiniTable_GetMessage( UPB_ASSUME(_upb_MiniTableField_GetRep(field) == UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte)); upb_Message* ret; - _upb_Message_GetNonExtensionField(msg, field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, field, &default_val, &ret); return ret; } @@ -2752,7 +2745,7 @@ UPB_API_INLINE void upb_MiniTable_SetMessage(upb_Message* msg, UPB_ASSUME(_upb_MiniTableField_GetRep(field) == UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte)); UPB_ASSERT(mini_table->subs[field->submsg_index].submsg); - _upb_Message_SetNonExtensionField(msg, field, &sub_message); + _upb_MiniTable_SetNonExtensionField(msg, field, &sub_message); } UPB_API_INLINE upb_Message* upb_MiniTable_GetMutableMessage( @@ -2767,7 +2760,7 @@ UPB_API_INLINE upb_Message* upb_MiniTable_GetMutableMessage( UPB_ASSERT(sub_mini_table); sub_message = _upb_Message_New(sub_mini_table, arena); *UPB_PTR_AT(msg, field->offset, upb_Message*) = sub_message; - _upb_Message_SetPresence(msg, field); + _upb_MiniTable_SetPresence(msg, field); } return sub_message; } @@ -2776,7 +2769,7 @@ UPB_API_INLINE const upb_Array* upb_MiniTable_GetArray( const upb_Message* msg, const upb_MiniTableField* field) { const upb_Array* ret; const upb_Array* default_val = NULL; - _upb_Message_GetNonExtensionField(msg, field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, field, &default_val, &ret); return ret; } @@ -2788,12 +2781,6 @@ UPB_API_INLINE upb_Array* upb_MiniTable_GetMutableArray( void* upb_MiniTable_ResizeArray(upb_Message* msg, const upb_MiniTableField* field, size_t len, upb_Arena* arena); - -UPB_API_INLINE bool upb_MiniTableField_IsClosedEnum( - const upb_MiniTableField* field) { - return field->descriptortype == kUpb_FieldType_Enum; -} - typedef enum { kUpb_GetExtension_Ok, kUpb_GetExtension_NotPresent, @@ -2934,10 +2921,10 @@ typedef enum { kUpb_DecodeStatus_MissingRequired = 5, } upb_DecodeStatus; -UPB_API upb_DecodeStatus upb_Decode(const char* buf, size_t size, - upb_Message* msg, const upb_MiniTable* l, - const upb_ExtensionRegistry* extreg, - int options, upb_Arena* arena); +upb_DecodeStatus upb_Decode(const char* buf, size_t size, upb_Message* msg, + const upb_MiniTable* l, + const upb_ExtensionRegistry* extreg, int options, + upb_Arena* arena); #ifdef __cplusplus } /* extern "C" */ @@ -3297,7 +3284,7 @@ UPB_INLINE char* google_protobuf_FileDescriptorSet_serialize_ex(const google_pro } UPB_INLINE void google_protobuf_FileDescriptorSet_clear_file(google_protobuf_FileDescriptorSet* msg) { const upb_MiniTableField field = {1, 0, 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_FileDescriptorProto* const* google_protobuf_FileDescriptorSet_file(const google_protobuf_FileDescriptorSet* msg, size_t* len) { return (const google_protobuf_FileDescriptorProto* const*)_upb_array_accessor(msg, 0, len); @@ -3358,37 +3345,37 @@ UPB_INLINE char* google_protobuf_FileDescriptorProto_serialize_ex(const google_p } UPB_INLINE void google_protobuf_FileDescriptorProto_clear_name(google_protobuf_FileDescriptorProto* msg) { const upb_MiniTableField field = {1, UPB_SIZE(40, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_FileDescriptorProto_name(const google_protobuf_FileDescriptorProto* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {1, UPB_SIZE(40, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileDescriptorProto_has_name(const google_protobuf_FileDescriptorProto* msg) { const upb_MiniTableField field = {1, UPB_SIZE(40, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileDescriptorProto_clear_package(google_protobuf_FileDescriptorProto* msg) { const upb_MiniTableField field = {2, UPB_SIZE(48, 24), 2, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_FileDescriptorProto_package(const google_protobuf_FileDescriptorProto* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {2, UPB_SIZE(48, 24), 2, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileDescriptorProto_has_package(const google_protobuf_FileDescriptorProto* msg) { const upb_MiniTableField field = {2, UPB_SIZE(48, 24), 2, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileDescriptorProto_clear_dependency(google_protobuf_FileDescriptorProto* msg) { const upb_MiniTableField field = {3, UPB_SIZE(4, 40), 0, kUpb_NoSub, 12, kUpb_FieldMode_Array | kUpb_LabelFlags_IsAlternate | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView const* google_protobuf_FileDescriptorProto_dependency(const google_protobuf_FileDescriptorProto* msg, size_t* len) { return (upb_StringView const*)_upb_array_accessor(msg, UPB_SIZE(4, 40), len); @@ -3400,7 +3387,7 @@ UPB_INLINE bool google_protobuf_FileDescriptorProto_has_dependency(const google_ } UPB_INLINE void google_protobuf_FileDescriptorProto_clear_message_type(google_protobuf_FileDescriptorProto* msg) { const upb_MiniTableField field = {4, UPB_SIZE(8, 48), 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_DescriptorProto* const* google_protobuf_FileDescriptorProto_message_type(const google_protobuf_FileDescriptorProto* msg, size_t* len) { return (const google_protobuf_DescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(8, 48), len); @@ -3412,7 +3399,7 @@ UPB_INLINE bool google_protobuf_FileDescriptorProto_has_message_type(const googl } UPB_INLINE void google_protobuf_FileDescriptorProto_clear_enum_type(google_protobuf_FileDescriptorProto* msg) { const upb_MiniTableField field = {5, UPB_SIZE(12, 56), 0, 1, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_EnumDescriptorProto* const* google_protobuf_FileDescriptorProto_enum_type(const google_protobuf_FileDescriptorProto* msg, size_t* len) { return (const google_protobuf_EnumDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(12, 56), len); @@ -3424,7 +3411,7 @@ UPB_INLINE bool google_protobuf_FileDescriptorProto_has_enum_type(const google_p } UPB_INLINE void google_protobuf_FileDescriptorProto_clear_service(google_protobuf_FileDescriptorProto* msg) { const upb_MiniTableField field = {6, UPB_SIZE(16, 64), 0, 2, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_ServiceDescriptorProto* const* google_protobuf_FileDescriptorProto_service(const google_protobuf_FileDescriptorProto* msg, size_t* len) { return (const google_protobuf_ServiceDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(16, 64), len); @@ -3436,7 +3423,7 @@ UPB_INLINE bool google_protobuf_FileDescriptorProto_has_service(const google_pro } UPB_INLINE void google_protobuf_FileDescriptorProto_clear_extension(google_protobuf_FileDescriptorProto* msg) { const upb_MiniTableField field = {7, UPB_SIZE(20, 72), 0, 3, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_FieldDescriptorProto* const* google_protobuf_FileDescriptorProto_extension(const google_protobuf_FileDescriptorProto* msg, size_t* len) { return (const google_protobuf_FieldDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(20, 72), len); @@ -3448,37 +3435,37 @@ UPB_INLINE bool google_protobuf_FileDescriptorProto_has_extension(const google_p } UPB_INLINE void google_protobuf_FileDescriptorProto_clear_options(google_protobuf_FileDescriptorProto* msg) { const upb_MiniTableField field = {8, UPB_SIZE(24, 80), 3, 4, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_FileOptions* google_protobuf_FileDescriptorProto_options(const google_protobuf_FileDescriptorProto* msg) { const google_protobuf_FileOptions* default_val = NULL; const google_protobuf_FileOptions* ret; const upb_MiniTableField field = {8, UPB_SIZE(24, 80), 3, 4, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileDescriptorProto_has_options(const google_protobuf_FileDescriptorProto* msg) { const upb_MiniTableField field = {8, UPB_SIZE(24, 80), 3, 4, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileDescriptorProto_clear_source_code_info(google_protobuf_FileDescriptorProto* msg) { const upb_MiniTableField field = {9, UPB_SIZE(28, 88), 4, 5, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_SourceCodeInfo* google_protobuf_FileDescriptorProto_source_code_info(const google_protobuf_FileDescriptorProto* msg) { const google_protobuf_SourceCodeInfo* default_val = NULL; const google_protobuf_SourceCodeInfo* ret; const upb_MiniTableField field = {9, UPB_SIZE(28, 88), 4, 5, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileDescriptorProto_has_source_code_info(const google_protobuf_FileDescriptorProto* msg) { const upb_MiniTableField field = {9, UPB_SIZE(28, 88), 4, 5, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileDescriptorProto_clear_public_dependency(google_protobuf_FileDescriptorProto* msg) { const upb_MiniTableField field = {10, UPB_SIZE(32, 96), 0, kUpb_NoSub, 5, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t const* google_protobuf_FileDescriptorProto_public_dependency(const google_protobuf_FileDescriptorProto* msg, size_t* len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(32, 96), len); @@ -3490,7 +3477,7 @@ UPB_INLINE bool google_protobuf_FileDescriptorProto_has_public_dependency(const } UPB_INLINE void google_protobuf_FileDescriptorProto_clear_weak_dependency(google_protobuf_FileDescriptorProto* msg) { const upb_MiniTableField field = {11, UPB_SIZE(36, 104), 0, kUpb_NoSub, 5, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t const* google_protobuf_FileDescriptorProto_weak_dependency(const google_protobuf_FileDescriptorProto* msg, size_t* len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(36, 104), len); @@ -3502,41 +3489,41 @@ UPB_INLINE bool google_protobuf_FileDescriptorProto_has_weak_dependency(const go } UPB_INLINE void google_protobuf_FileDescriptorProto_clear_syntax(google_protobuf_FileDescriptorProto* msg) { const upb_MiniTableField field = {12, UPB_SIZE(56, 112), 5, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_FileDescriptorProto_syntax(const google_protobuf_FileDescriptorProto* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {12, UPB_SIZE(56, 112), 5, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileDescriptorProto_has_syntax(const google_protobuf_FileDescriptorProto* msg) { const upb_MiniTableField field = {12, UPB_SIZE(56, 112), 5, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileDescriptorProto_clear_edition(google_protobuf_FileDescriptorProto* msg) { const upb_MiniTableField field = {13, UPB_SIZE(64, 128), 6, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_FileDescriptorProto_edition(const google_protobuf_FileDescriptorProto* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {13, UPB_SIZE(64, 128), 6, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileDescriptorProto_has_edition(const google_protobuf_FileDescriptorProto* msg) { const upb_MiniTableField field = {13, UPB_SIZE(64, 128), 6, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileDescriptorProto_set_name(google_protobuf_FileDescriptorProto *msg, upb_StringView value) { const upb_MiniTableField field = {1, UPB_SIZE(40, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FileDescriptorProto_set_package(google_protobuf_FileDescriptorProto *msg, upb_StringView value) { const upb_MiniTableField field = {2, UPB_SIZE(48, 24), 2, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE upb_StringView* google_protobuf_FileDescriptorProto_mutable_dependency(google_protobuf_FileDescriptorProto* msg, size_t* len) { return (upb_StringView*)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 40), len); } @@ -3596,7 +3583,7 @@ UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_FileDesc } UPB_INLINE void google_protobuf_FileDescriptorProto_set_options(google_protobuf_FileDescriptorProto *msg, google_protobuf_FileOptions* value) { const upb_MiniTableField field = {8, UPB_SIZE(24, 80), 3, 4, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE struct google_protobuf_FileOptions* google_protobuf_FileDescriptorProto_mutable_options(google_protobuf_FileDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_FileOptions* sub = (struct google_protobuf_FileOptions*)google_protobuf_FileDescriptorProto_options(msg); if (sub == NULL) { @@ -3607,7 +3594,7 @@ UPB_INLINE void google_protobuf_FileDescriptorProto_set_options(google_protobuf_ } UPB_INLINE void google_protobuf_FileDescriptorProto_set_source_code_info(google_protobuf_FileDescriptorProto *msg, google_protobuf_SourceCodeInfo* value) { const upb_MiniTableField field = {9, UPB_SIZE(28, 88), 4, 5, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE struct google_protobuf_SourceCodeInfo* google_protobuf_FileDescriptorProto_mutable_source_code_info(google_protobuf_FileDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_SourceCodeInfo* sub = (struct google_protobuf_SourceCodeInfo*)google_protobuf_FileDescriptorProto_source_code_info(msg); if (sub == NULL) { @@ -3636,10 +3623,10 @@ UPB_INLINE bool google_protobuf_FileDescriptorProto_add_weak_dependency(google_p } UPB_INLINE void google_protobuf_FileDescriptorProto_set_syntax(google_protobuf_FileDescriptorProto *msg, upb_StringView value) { const upb_MiniTableField field = {12, UPB_SIZE(56, 112), 5, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FileDescriptorProto_set_edition(google_protobuf_FileDescriptorProto *msg, upb_StringView value) { const upb_MiniTableField field = {13, UPB_SIZE(64, 128), 6, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); } /* google.protobuf.DescriptorProto */ @@ -3678,22 +3665,22 @@ UPB_INLINE char* google_protobuf_DescriptorProto_serialize_ex(const google_proto } UPB_INLINE void google_protobuf_DescriptorProto_clear_name(google_protobuf_DescriptorProto* msg) { const upb_MiniTableField field = {1, UPB_SIZE(40, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_DescriptorProto_name(const google_protobuf_DescriptorProto* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {1, UPB_SIZE(40, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_DescriptorProto_has_name(const google_protobuf_DescriptorProto* msg) { const upb_MiniTableField field = {1, UPB_SIZE(40, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_DescriptorProto_clear_field(google_protobuf_DescriptorProto* msg) { const upb_MiniTableField field = {2, UPB_SIZE(4, 24), 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_FieldDescriptorProto* const* google_protobuf_DescriptorProto_field(const google_protobuf_DescriptorProto* msg, size_t* len) { return (const google_protobuf_FieldDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(4, 24), len); @@ -3705,7 +3692,7 @@ UPB_INLINE bool google_protobuf_DescriptorProto_has_field(const google_protobuf_ } UPB_INLINE void google_protobuf_DescriptorProto_clear_nested_type(google_protobuf_DescriptorProto* msg) { const upb_MiniTableField field = {3, UPB_SIZE(8, 32), 0, 1, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_DescriptorProto* const* google_protobuf_DescriptorProto_nested_type(const google_protobuf_DescriptorProto* msg, size_t* len) { return (const google_protobuf_DescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(8, 32), len); @@ -3717,7 +3704,7 @@ UPB_INLINE bool google_protobuf_DescriptorProto_has_nested_type(const google_pro } UPB_INLINE void google_protobuf_DescriptorProto_clear_enum_type(google_protobuf_DescriptorProto* msg) { const upb_MiniTableField field = {4, UPB_SIZE(12, 40), 0, 2, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_EnumDescriptorProto* const* google_protobuf_DescriptorProto_enum_type(const google_protobuf_DescriptorProto* msg, size_t* len) { return (const google_protobuf_EnumDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(12, 40), len); @@ -3729,7 +3716,7 @@ UPB_INLINE bool google_protobuf_DescriptorProto_has_enum_type(const google_proto } UPB_INLINE void google_protobuf_DescriptorProto_clear_extension_range(google_protobuf_DescriptorProto* msg) { const upb_MiniTableField field = {5, UPB_SIZE(16, 48), 0, 3, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_DescriptorProto_ExtensionRange* const* google_protobuf_DescriptorProto_extension_range(const google_protobuf_DescriptorProto* msg, size_t* len) { return (const google_protobuf_DescriptorProto_ExtensionRange* const*)_upb_array_accessor(msg, UPB_SIZE(16, 48), len); @@ -3741,7 +3728,7 @@ UPB_INLINE bool google_protobuf_DescriptorProto_has_extension_range(const google } UPB_INLINE void google_protobuf_DescriptorProto_clear_extension(google_protobuf_DescriptorProto* msg) { const upb_MiniTableField field = {6, UPB_SIZE(20, 56), 0, 4, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_FieldDescriptorProto* const* google_protobuf_DescriptorProto_extension(const google_protobuf_DescriptorProto* msg, size_t* len) { return (const google_protobuf_FieldDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(20, 56), len); @@ -3753,22 +3740,22 @@ UPB_INLINE bool google_protobuf_DescriptorProto_has_extension(const google_proto } UPB_INLINE void google_protobuf_DescriptorProto_clear_options(google_protobuf_DescriptorProto* msg) { const upb_MiniTableField field = {7, UPB_SIZE(24, 64), 2, 5, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_MessageOptions* google_protobuf_DescriptorProto_options(const google_protobuf_DescriptorProto* msg) { const google_protobuf_MessageOptions* default_val = NULL; const google_protobuf_MessageOptions* ret; const upb_MiniTableField field = {7, UPB_SIZE(24, 64), 2, 5, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_DescriptorProto_has_options(const google_protobuf_DescriptorProto* msg) { const upb_MiniTableField field = {7, UPB_SIZE(24, 64), 2, 5, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_DescriptorProto_clear_oneof_decl(google_protobuf_DescriptorProto* msg) { const upb_MiniTableField field = {8, UPB_SIZE(28, 72), 0, 6, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_OneofDescriptorProto* const* google_protobuf_DescriptorProto_oneof_decl(const google_protobuf_DescriptorProto* msg, size_t* len) { return (const google_protobuf_OneofDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(28, 72), len); @@ -3780,7 +3767,7 @@ UPB_INLINE bool google_protobuf_DescriptorProto_has_oneof_decl(const google_prot } UPB_INLINE void google_protobuf_DescriptorProto_clear_reserved_range(google_protobuf_DescriptorProto* msg) { const upb_MiniTableField field = {9, UPB_SIZE(32, 80), 0, 7, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_DescriptorProto_ReservedRange* const* google_protobuf_DescriptorProto_reserved_range(const google_protobuf_DescriptorProto* msg, size_t* len) { return (const google_protobuf_DescriptorProto_ReservedRange* const*)_upb_array_accessor(msg, UPB_SIZE(32, 80), len); @@ -3792,7 +3779,7 @@ UPB_INLINE bool google_protobuf_DescriptorProto_has_reserved_range(const google_ } UPB_INLINE void google_protobuf_DescriptorProto_clear_reserved_name(google_protobuf_DescriptorProto* msg) { const upb_MiniTableField field = {10, UPB_SIZE(36, 88), 0, kUpb_NoSub, 12, kUpb_FieldMode_Array | kUpb_LabelFlags_IsAlternate | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView const* google_protobuf_DescriptorProto_reserved_name(const google_protobuf_DescriptorProto* msg, size_t* len) { return (upb_StringView const*)_upb_array_accessor(msg, UPB_SIZE(36, 88), len); @@ -3805,7 +3792,7 @@ UPB_INLINE bool google_protobuf_DescriptorProto_has_reserved_name(const google_p UPB_INLINE void google_protobuf_DescriptorProto_set_name(google_protobuf_DescriptorProto *msg, upb_StringView value) { const upb_MiniTableField field = {1, UPB_SIZE(40, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_DescriptorProto_mutable_field(google_protobuf_DescriptorProto* msg, size_t* len) { return (google_protobuf_FieldDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 24), len); } @@ -3868,7 +3855,7 @@ UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_Descript } UPB_INLINE void google_protobuf_DescriptorProto_set_options(google_protobuf_DescriptorProto *msg, google_protobuf_MessageOptions* value) { const upb_MiniTableField field = {7, UPB_SIZE(24, 64), 2, 5, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE struct google_protobuf_MessageOptions* google_protobuf_DescriptorProto_mutable_options(google_protobuf_DescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_MessageOptions* sub = (struct google_protobuf_MessageOptions*)google_protobuf_DescriptorProto_options(msg); if (sub == NULL) { @@ -3948,59 +3935,59 @@ UPB_INLINE char* google_protobuf_DescriptorProto_ExtensionRange_serialize_ex(con } UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_clear_start(google_protobuf_DescriptorProto_ExtensionRange* msg) { const upb_MiniTableField field = {1, 4, 1, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t google_protobuf_DescriptorProto_ExtensionRange_start(const google_protobuf_DescriptorProto_ExtensionRange* msg) { int32_t default_val = (int32_t)0; int32_t ret; const upb_MiniTableField field = {1, 4, 1, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_start(const google_protobuf_DescriptorProto_ExtensionRange* msg) { const upb_MiniTableField field = {1, 4, 1, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_clear_end(google_protobuf_DescriptorProto_ExtensionRange* msg) { const upb_MiniTableField field = {2, 8, 2, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t google_protobuf_DescriptorProto_ExtensionRange_end(const google_protobuf_DescriptorProto_ExtensionRange* msg) { int32_t default_val = (int32_t)0; int32_t ret; const upb_MiniTableField field = {2, 8, 2, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_end(const google_protobuf_DescriptorProto_ExtensionRange* msg) { const upb_MiniTableField field = {2, 8, 2, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_clear_options(google_protobuf_DescriptorProto_ExtensionRange* msg) { const upb_MiniTableField field = {3, UPB_SIZE(12, 16), 3, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_ExtensionRangeOptions* google_protobuf_DescriptorProto_ExtensionRange_options(const google_protobuf_DescriptorProto_ExtensionRange* msg) { const google_protobuf_ExtensionRangeOptions* default_val = NULL; const google_protobuf_ExtensionRangeOptions* ret; const upb_MiniTableField field = {3, UPB_SIZE(12, 16), 3, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_options(const google_protobuf_DescriptorProto_ExtensionRange* msg) { const upb_MiniTableField field = {3, UPB_SIZE(12, 16), 3, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_start(google_protobuf_DescriptorProto_ExtensionRange *msg, int32_t value) { const upb_MiniTableField field = {1, 4, 1, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_end(google_protobuf_DescriptorProto_ExtensionRange *msg, int32_t value) { const upb_MiniTableField field = {2, 8, 2, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_options(google_protobuf_DescriptorProto_ExtensionRange *msg, google_protobuf_ExtensionRangeOptions* value) { const upb_MiniTableField field = {3, UPB_SIZE(12, 16), 3, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE struct google_protobuf_ExtensionRangeOptions* google_protobuf_DescriptorProto_ExtensionRange_mutable_options(google_protobuf_DescriptorProto_ExtensionRange* msg, upb_Arena* arena) { struct google_protobuf_ExtensionRangeOptions* sub = (struct google_protobuf_ExtensionRangeOptions*)google_protobuf_DescriptorProto_ExtensionRange_options(msg); if (sub == NULL) { @@ -4047,41 +4034,41 @@ UPB_INLINE char* google_protobuf_DescriptorProto_ReservedRange_serialize_ex(cons } UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_clear_start(google_protobuf_DescriptorProto_ReservedRange* msg) { const upb_MiniTableField field = {1, 4, 1, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t google_protobuf_DescriptorProto_ReservedRange_start(const google_protobuf_DescriptorProto_ReservedRange* msg) { int32_t default_val = (int32_t)0; int32_t ret; const upb_MiniTableField field = {1, 4, 1, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_DescriptorProto_ReservedRange_has_start(const google_protobuf_DescriptorProto_ReservedRange* msg) { const upb_MiniTableField field = {1, 4, 1, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_clear_end(google_protobuf_DescriptorProto_ReservedRange* msg) { const upb_MiniTableField field = {2, 8, 2, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t google_protobuf_DescriptorProto_ReservedRange_end(const google_protobuf_DescriptorProto_ReservedRange* msg) { int32_t default_val = (int32_t)0; int32_t ret; const upb_MiniTableField field = {2, 8, 2, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_DescriptorProto_ReservedRange_has_end(const google_protobuf_DescriptorProto_ReservedRange* msg) { const upb_MiniTableField field = {2, 8, 2, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_set_start(google_protobuf_DescriptorProto_ReservedRange *msg, int32_t value) { const upb_MiniTableField field = {1, 4, 1, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_set_end(google_protobuf_DescriptorProto_ReservedRange *msg, int32_t value) { const upb_MiniTableField field = {2, 8, 2, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); } /* google.protobuf.ExtensionRangeOptions */ @@ -4120,7 +4107,7 @@ UPB_INLINE char* google_protobuf_ExtensionRangeOptions_serialize_ex(const google } UPB_INLINE void google_protobuf_ExtensionRangeOptions_clear_uninterpreted_option(google_protobuf_ExtensionRangeOptions* msg) { const upb_MiniTableField field = {999, 0, 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_ExtensionRangeOptions_uninterpreted_option(const google_protobuf_ExtensionRangeOptions* msg, size_t* len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, 0, len); @@ -4181,194 +4168,194 @@ UPB_INLINE char* google_protobuf_FieldDescriptorProto_serialize_ex(const google_ } UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_name(google_protobuf_FieldDescriptorProto* msg) { const upb_MiniTableField field = {1, UPB_SIZE(28, 24), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_FieldDescriptorProto_name(const google_protobuf_FieldDescriptorProto* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {1, UPB_SIZE(28, 24), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_name(const google_protobuf_FieldDescriptorProto* msg) { const upb_MiniTableField field = {1, UPB_SIZE(28, 24), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_extendee(google_protobuf_FieldDescriptorProto* msg) { const upb_MiniTableField field = {2, UPB_SIZE(36, 40), 2, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_FieldDescriptorProto_extendee(const google_protobuf_FieldDescriptorProto* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {2, UPB_SIZE(36, 40), 2, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_extendee(const google_protobuf_FieldDescriptorProto* msg) { const upb_MiniTableField field = {2, UPB_SIZE(36, 40), 2, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_number(google_protobuf_FieldDescriptorProto* msg) { const upb_MiniTableField field = {3, 4, 3, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_number(const google_protobuf_FieldDescriptorProto* msg) { int32_t default_val = (int32_t)0; int32_t ret; const upb_MiniTableField field = {3, 4, 3, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_number(const google_protobuf_FieldDescriptorProto* msg) { const upb_MiniTableField field = {3, 4, 3, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_label(google_protobuf_FieldDescriptorProto* msg) { const upb_MiniTableField field = {4, 8, 4, 0, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_label(const google_protobuf_FieldDescriptorProto* msg) { int32_t default_val = 1; int32_t ret; const upb_MiniTableField field = {4, 8, 4, 0, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_label(const google_protobuf_FieldDescriptorProto* msg) { const upb_MiniTableField field = {4, 8, 4, 0, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_type(google_protobuf_FieldDescriptorProto* msg) { const upb_MiniTableField field = {5, 12, 5, 1, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_type(const google_protobuf_FieldDescriptorProto* msg) { int32_t default_val = 1; int32_t ret; const upb_MiniTableField field = {5, 12, 5, 1, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type(const google_protobuf_FieldDescriptorProto* msg) { const upb_MiniTableField field = {5, 12, 5, 1, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_type_name(google_protobuf_FieldDescriptorProto* msg) { const upb_MiniTableField field = {6, UPB_SIZE(44, 56), 6, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_FieldDescriptorProto_type_name(const google_protobuf_FieldDescriptorProto* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {6, UPB_SIZE(44, 56), 6, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type_name(const google_protobuf_FieldDescriptorProto* msg) { const upb_MiniTableField field = {6, UPB_SIZE(44, 56), 6, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_default_value(google_protobuf_FieldDescriptorProto* msg) { const upb_MiniTableField field = {7, UPB_SIZE(52, 72), 7, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_FieldDescriptorProto_default_value(const google_protobuf_FieldDescriptorProto* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {7, UPB_SIZE(52, 72), 7, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_default_value(const google_protobuf_FieldDescriptorProto* msg) { const upb_MiniTableField field = {7, UPB_SIZE(52, 72), 7, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_options(google_protobuf_FieldDescriptorProto* msg) { const upb_MiniTableField field = {8, UPB_SIZE(16, 88), 8, 2, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_FieldOptions* google_protobuf_FieldDescriptorProto_options(const google_protobuf_FieldDescriptorProto* msg) { const google_protobuf_FieldOptions* default_val = NULL; const google_protobuf_FieldOptions* ret; const upb_MiniTableField field = {8, UPB_SIZE(16, 88), 8, 2, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_options(const google_protobuf_FieldDescriptorProto* msg) { const upb_MiniTableField field = {8, UPB_SIZE(16, 88), 8, 2, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_oneof_index(google_protobuf_FieldDescriptorProto* msg) { const upb_MiniTableField field = {9, UPB_SIZE(20, 16), 9, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_oneof_index(const google_protobuf_FieldDescriptorProto* msg) { int32_t default_val = (int32_t)0; int32_t ret; const upb_MiniTableField field = {9, UPB_SIZE(20, 16), 9, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_oneof_index(const google_protobuf_FieldDescriptorProto* msg) { const upb_MiniTableField field = {9, UPB_SIZE(20, 16), 9, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_json_name(google_protobuf_FieldDescriptorProto* msg) { const upb_MiniTableField field = {10, UPB_SIZE(60, 96), 10, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_FieldDescriptorProto_json_name(const google_protobuf_FieldDescriptorProto* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {10, UPB_SIZE(60, 96), 10, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_json_name(const google_protobuf_FieldDescriptorProto* msg) { const upb_MiniTableField field = {10, UPB_SIZE(60, 96), 10, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_proto3_optional(google_protobuf_FieldDescriptorProto* msg) { const upb_MiniTableField field = {17, UPB_SIZE(24, 20), 11, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_FieldDescriptorProto_proto3_optional(const google_protobuf_FieldDescriptorProto* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {17, UPB_SIZE(24, 20), 11, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_proto3_optional(const google_protobuf_FieldDescriptorProto* msg) { const upb_MiniTableField field = {17, UPB_SIZE(24, 20), 11, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FieldDescriptorProto_set_name(google_protobuf_FieldDescriptorProto *msg, upb_StringView value) { const upb_MiniTableField field = {1, UPB_SIZE(28, 24), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FieldDescriptorProto_set_extendee(google_protobuf_FieldDescriptorProto *msg, upb_StringView value) { const upb_MiniTableField field = {2, UPB_SIZE(36, 40), 2, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FieldDescriptorProto_set_number(google_protobuf_FieldDescriptorProto *msg, int32_t value) { const upb_MiniTableField field = {3, 4, 3, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FieldDescriptorProto_set_label(google_protobuf_FieldDescriptorProto *msg, int32_t value) { const upb_MiniTableField field = {4, 8, 4, 0, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FieldDescriptorProto_set_type(google_protobuf_FieldDescriptorProto *msg, int32_t value) { const upb_MiniTableField field = {5, 12, 5, 1, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FieldDescriptorProto_set_type_name(google_protobuf_FieldDescriptorProto *msg, upb_StringView value) { const upb_MiniTableField field = {6, UPB_SIZE(44, 56), 6, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FieldDescriptorProto_set_default_value(google_protobuf_FieldDescriptorProto *msg, upb_StringView value) { const upb_MiniTableField field = {7, UPB_SIZE(52, 72), 7, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FieldDescriptorProto_set_options(google_protobuf_FieldDescriptorProto *msg, google_protobuf_FieldOptions* value) { const upb_MiniTableField field = {8, UPB_SIZE(16, 88), 8, 2, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE struct google_protobuf_FieldOptions* google_protobuf_FieldDescriptorProto_mutable_options(google_protobuf_FieldDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_FieldOptions* sub = (struct google_protobuf_FieldOptions*)google_protobuf_FieldDescriptorProto_options(msg); if (sub == NULL) { @@ -4379,13 +4366,13 @@ UPB_INLINE void google_protobuf_FieldDescriptorProto_set_name(google_protobuf_Fi } UPB_INLINE void google_protobuf_FieldDescriptorProto_set_oneof_index(google_protobuf_FieldDescriptorProto *msg, int32_t value) { const upb_MiniTableField field = {9, UPB_SIZE(20, 16), 9, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FieldDescriptorProto_set_json_name(google_protobuf_FieldDescriptorProto *msg, upb_StringView value) { const upb_MiniTableField field = {10, UPB_SIZE(60, 96), 10, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FieldDescriptorProto_set_proto3_optional(google_protobuf_FieldDescriptorProto *msg, bool value) { const upb_MiniTableField field = {17, UPB_SIZE(24, 20), 11, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); } /* google.protobuf.OneofDescriptorProto */ @@ -4424,41 +4411,41 @@ UPB_INLINE char* google_protobuf_OneofDescriptorProto_serialize_ex(const google_ } UPB_INLINE void google_protobuf_OneofDescriptorProto_clear_name(google_protobuf_OneofDescriptorProto* msg) { const upb_MiniTableField field = {1, 8, 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_OneofDescriptorProto_name(const google_protobuf_OneofDescriptorProto* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {1, 8, 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_OneofDescriptorProto_has_name(const google_protobuf_OneofDescriptorProto* msg) { const upb_MiniTableField field = {1, 8, 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_OneofDescriptorProto_clear_options(google_protobuf_OneofDescriptorProto* msg) { const upb_MiniTableField field = {2, UPB_SIZE(4, 24), 2, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_OneofOptions* google_protobuf_OneofDescriptorProto_options(const google_protobuf_OneofDescriptorProto* msg) { const google_protobuf_OneofOptions* default_val = NULL; const google_protobuf_OneofOptions* ret; const upb_MiniTableField field = {2, UPB_SIZE(4, 24), 2, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_OneofDescriptorProto_has_options(const google_protobuf_OneofDescriptorProto* msg) { const upb_MiniTableField field = {2, UPB_SIZE(4, 24), 2, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_OneofDescriptorProto_set_name(google_protobuf_OneofDescriptorProto *msg, upb_StringView value) { const upb_MiniTableField field = {1, 8, 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_OneofDescriptorProto_set_options(google_protobuf_OneofDescriptorProto *msg, google_protobuf_OneofOptions* value) { const upb_MiniTableField field = {2, UPB_SIZE(4, 24), 2, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE struct google_protobuf_OneofOptions* google_protobuf_OneofDescriptorProto_mutable_options(google_protobuf_OneofDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_OneofOptions* sub = (struct google_protobuf_OneofOptions*)google_protobuf_OneofDescriptorProto_options(msg); if (sub == NULL) { @@ -4505,22 +4492,22 @@ UPB_INLINE char* google_protobuf_EnumDescriptorProto_serialize_ex(const google_p } UPB_INLINE void google_protobuf_EnumDescriptorProto_clear_name(google_protobuf_EnumDescriptorProto* msg) { const upb_MiniTableField field = {1, UPB_SIZE(20, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_EnumDescriptorProto_name(const google_protobuf_EnumDescriptorProto* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {1, UPB_SIZE(20, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_name(const google_protobuf_EnumDescriptorProto* msg) { const upb_MiniTableField field = {1, UPB_SIZE(20, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_EnumDescriptorProto_clear_value(google_protobuf_EnumDescriptorProto* msg) { const upb_MiniTableField field = {2, UPB_SIZE(4, 24), 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_EnumValueDescriptorProto* const* google_protobuf_EnumDescriptorProto_value(const google_protobuf_EnumDescriptorProto* msg, size_t* len) { return (const google_protobuf_EnumValueDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(4, 24), len); @@ -4532,22 +4519,22 @@ UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_value(const google_proto } UPB_INLINE void google_protobuf_EnumDescriptorProto_clear_options(google_protobuf_EnumDescriptorProto* msg) { const upb_MiniTableField field = {3, UPB_SIZE(8, 32), 2, 1, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_EnumOptions* google_protobuf_EnumDescriptorProto_options(const google_protobuf_EnumDescriptorProto* msg) { const google_protobuf_EnumOptions* default_val = NULL; const google_protobuf_EnumOptions* ret; const upb_MiniTableField field = {3, UPB_SIZE(8, 32), 2, 1, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_options(const google_protobuf_EnumDescriptorProto* msg) { const upb_MiniTableField field = {3, UPB_SIZE(8, 32), 2, 1, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_EnumDescriptorProto_clear_reserved_range(google_protobuf_EnumDescriptorProto* msg) { const upb_MiniTableField field = {4, UPB_SIZE(12, 40), 0, 2, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_EnumDescriptorProto_EnumReservedRange* const* google_protobuf_EnumDescriptorProto_reserved_range(const google_protobuf_EnumDescriptorProto* msg, size_t* len) { return (const google_protobuf_EnumDescriptorProto_EnumReservedRange* const*)_upb_array_accessor(msg, UPB_SIZE(12, 40), len); @@ -4559,7 +4546,7 @@ UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_reserved_range(const goo } UPB_INLINE void google_protobuf_EnumDescriptorProto_clear_reserved_name(google_protobuf_EnumDescriptorProto* msg) { const upb_MiniTableField field = {5, UPB_SIZE(16, 48), 0, kUpb_NoSub, 12, kUpb_FieldMode_Array | kUpb_LabelFlags_IsAlternate | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView const* google_protobuf_EnumDescriptorProto_reserved_name(const google_protobuf_EnumDescriptorProto* msg, size_t* len) { return (upb_StringView const*)_upb_array_accessor(msg, UPB_SIZE(16, 48), len); @@ -4572,7 +4559,7 @@ UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_reserved_name(const goog UPB_INLINE void google_protobuf_EnumDescriptorProto_set_name(google_protobuf_EnumDescriptorProto *msg, upb_StringView value) { const upb_MiniTableField field = {1, UPB_SIZE(20, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE google_protobuf_EnumValueDescriptorProto** google_protobuf_EnumDescriptorProto_mutable_value(google_protobuf_EnumDescriptorProto* msg, size_t* len) { return (google_protobuf_EnumValueDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 24), len); } @@ -4587,7 +4574,7 @@ UPB_INLINE struct google_protobuf_EnumValueDescriptorProto* google_protobuf_Enum } UPB_INLINE void google_protobuf_EnumDescriptorProto_set_options(google_protobuf_EnumDescriptorProto *msg, google_protobuf_EnumOptions* value) { const upb_MiniTableField field = {3, UPB_SIZE(8, 32), 2, 1, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE struct google_protobuf_EnumOptions* google_protobuf_EnumDescriptorProto_mutable_options(google_protobuf_EnumDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_EnumOptions* sub = (struct google_protobuf_EnumOptions*)google_protobuf_EnumDescriptorProto_options(msg); if (sub == NULL) { @@ -4655,41 +4642,41 @@ UPB_INLINE char* google_protobuf_EnumDescriptorProto_EnumReservedRange_serialize } UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_clear_start(google_protobuf_EnumDescriptorProto_EnumReservedRange* msg) { const upb_MiniTableField field = {1, 4, 1, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t google_protobuf_EnumDescriptorProto_EnumReservedRange_start(const google_protobuf_EnumDescriptorProto_EnumReservedRange* msg) { int32_t default_val = (int32_t)0; int32_t ret; const upb_MiniTableField field = {1, 4, 1, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_EnumDescriptorProto_EnumReservedRange_has_start(const google_protobuf_EnumDescriptorProto_EnumReservedRange* msg) { const upb_MiniTableField field = {1, 4, 1, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_clear_end(google_protobuf_EnumDescriptorProto_EnumReservedRange* msg) { const upb_MiniTableField field = {2, 8, 2, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t google_protobuf_EnumDescriptorProto_EnumReservedRange_end(const google_protobuf_EnumDescriptorProto_EnumReservedRange* msg) { int32_t default_val = (int32_t)0; int32_t ret; const upb_MiniTableField field = {2, 8, 2, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_EnumDescriptorProto_EnumReservedRange_has_end(const google_protobuf_EnumDescriptorProto_EnumReservedRange* msg) { const upb_MiniTableField field = {2, 8, 2, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_set_start(google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, int32_t value) { const upb_MiniTableField field = {1, 4, 1, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_set_end(google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, int32_t value) { const upb_MiniTableField field = {2, 8, 2, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); } /* google.protobuf.EnumValueDescriptorProto */ @@ -4728,59 +4715,59 @@ UPB_INLINE char* google_protobuf_EnumValueDescriptorProto_serialize_ex(const goo } UPB_INLINE void google_protobuf_EnumValueDescriptorProto_clear_name(google_protobuf_EnumValueDescriptorProto* msg) { const upb_MiniTableField field = {1, UPB_SIZE(12, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_EnumValueDescriptorProto_name(const google_protobuf_EnumValueDescriptorProto* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {1, UPB_SIZE(12, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_name(const google_protobuf_EnumValueDescriptorProto* msg) { const upb_MiniTableField field = {1, UPB_SIZE(12, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_EnumValueDescriptorProto_clear_number(google_protobuf_EnumValueDescriptorProto* msg) { const upb_MiniTableField field = {2, 4, 2, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t google_protobuf_EnumValueDescriptorProto_number(const google_protobuf_EnumValueDescriptorProto* msg) { int32_t default_val = (int32_t)0; int32_t ret; const upb_MiniTableField field = {2, 4, 2, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_number(const google_protobuf_EnumValueDescriptorProto* msg) { const upb_MiniTableField field = {2, 4, 2, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_EnumValueDescriptorProto_clear_options(google_protobuf_EnumValueDescriptorProto* msg) { const upb_MiniTableField field = {3, UPB_SIZE(8, 24), 3, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_EnumValueOptions* google_protobuf_EnumValueDescriptorProto_options(const google_protobuf_EnumValueDescriptorProto* msg) { const google_protobuf_EnumValueOptions* default_val = NULL; const google_protobuf_EnumValueOptions* ret; const upb_MiniTableField field = {3, UPB_SIZE(8, 24), 3, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_options(const google_protobuf_EnumValueDescriptorProto* msg) { const upb_MiniTableField field = {3, UPB_SIZE(8, 24), 3, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_name(google_protobuf_EnumValueDescriptorProto *msg, upb_StringView value) { const upb_MiniTableField field = {1, UPB_SIZE(12, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_number(google_protobuf_EnumValueDescriptorProto *msg, int32_t value) { const upb_MiniTableField field = {2, 4, 2, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_options(google_protobuf_EnumValueDescriptorProto *msg, google_protobuf_EnumValueOptions* value) { const upb_MiniTableField field = {3, UPB_SIZE(8, 24), 3, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE struct google_protobuf_EnumValueOptions* google_protobuf_EnumValueDescriptorProto_mutable_options(google_protobuf_EnumValueDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_EnumValueOptions* sub = (struct google_protobuf_EnumValueOptions*)google_protobuf_EnumValueDescriptorProto_options(msg); if (sub == NULL) { @@ -4827,22 +4814,22 @@ UPB_INLINE char* google_protobuf_ServiceDescriptorProto_serialize_ex(const googl } UPB_INLINE void google_protobuf_ServiceDescriptorProto_clear_name(google_protobuf_ServiceDescriptorProto* msg) { const upb_MiniTableField field = {1, UPB_SIZE(12, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_ServiceDescriptorProto_name(const google_protobuf_ServiceDescriptorProto* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {1, UPB_SIZE(12, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_ServiceDescriptorProto_has_name(const google_protobuf_ServiceDescriptorProto* msg) { const upb_MiniTableField field = {1, UPB_SIZE(12, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_ServiceDescriptorProto_clear_method(google_protobuf_ServiceDescriptorProto* msg) { const upb_MiniTableField field = {2, UPB_SIZE(4, 24), 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_MethodDescriptorProto* const* google_protobuf_ServiceDescriptorProto_method(const google_protobuf_ServiceDescriptorProto* msg, size_t* len) { return (const google_protobuf_MethodDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(4, 24), len); @@ -4854,23 +4841,23 @@ UPB_INLINE bool google_protobuf_ServiceDescriptorProto_has_method(const google_p } UPB_INLINE void google_protobuf_ServiceDescriptorProto_clear_options(google_protobuf_ServiceDescriptorProto* msg) { const upb_MiniTableField field = {3, UPB_SIZE(8, 32), 2, 1, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_ServiceOptions* google_protobuf_ServiceDescriptorProto_options(const google_protobuf_ServiceDescriptorProto* msg) { const google_protobuf_ServiceOptions* default_val = NULL; const google_protobuf_ServiceOptions* ret; const upb_MiniTableField field = {3, UPB_SIZE(8, 32), 2, 1, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_ServiceDescriptorProto_has_options(const google_protobuf_ServiceDescriptorProto* msg) { const upb_MiniTableField field = {3, UPB_SIZE(8, 32), 2, 1, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_ServiceDescriptorProto_set_name(google_protobuf_ServiceDescriptorProto *msg, upb_StringView value) { const upb_MiniTableField field = {1, UPB_SIZE(12, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE google_protobuf_MethodDescriptorProto** google_protobuf_ServiceDescriptorProto_mutable_method(google_protobuf_ServiceDescriptorProto* msg, size_t* len) { return (google_protobuf_MethodDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 24), len); } @@ -4885,7 +4872,7 @@ UPB_INLINE struct google_protobuf_MethodDescriptorProto* google_protobuf_Service } UPB_INLINE void google_protobuf_ServiceDescriptorProto_set_options(google_protobuf_ServiceDescriptorProto *msg, google_protobuf_ServiceOptions* value) { const upb_MiniTableField field = {3, UPB_SIZE(8, 32), 2, 1, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE struct google_protobuf_ServiceOptions* google_protobuf_ServiceDescriptorProto_mutable_options(google_protobuf_ServiceDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_ServiceOptions* sub = (struct google_protobuf_ServiceOptions*)google_protobuf_ServiceDescriptorProto_options(msg); if (sub == NULL) { @@ -4932,107 +4919,107 @@ UPB_INLINE char* google_protobuf_MethodDescriptorProto_serialize_ex(const google } UPB_INLINE void google_protobuf_MethodDescriptorProto_clear_name(google_protobuf_MethodDescriptorProto* msg) { const upb_MiniTableField field = {1, UPB_SIZE(12, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_MethodDescriptorProto_name(const google_protobuf_MethodDescriptorProto* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {1, UPB_SIZE(12, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_name(const google_protobuf_MethodDescriptorProto* msg) { const upb_MiniTableField field = {1, UPB_SIZE(12, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_MethodDescriptorProto_clear_input_type(google_protobuf_MethodDescriptorProto* msg) { const upb_MiniTableField field = {2, UPB_SIZE(20, 24), 2, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_MethodDescriptorProto_input_type(const google_protobuf_MethodDescriptorProto* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {2, UPB_SIZE(20, 24), 2, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_input_type(const google_protobuf_MethodDescriptorProto* msg) { const upb_MiniTableField field = {2, UPB_SIZE(20, 24), 2, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_MethodDescriptorProto_clear_output_type(google_protobuf_MethodDescriptorProto* msg) { const upb_MiniTableField field = {3, UPB_SIZE(28, 40), 3, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_MethodDescriptorProto_output_type(const google_protobuf_MethodDescriptorProto* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {3, UPB_SIZE(28, 40), 3, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_output_type(const google_protobuf_MethodDescriptorProto* msg) { const upb_MiniTableField field = {3, UPB_SIZE(28, 40), 3, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_MethodDescriptorProto_clear_options(google_protobuf_MethodDescriptorProto* msg) { const upb_MiniTableField field = {4, UPB_SIZE(4, 56), 4, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_MethodOptions* google_protobuf_MethodDescriptorProto_options(const google_protobuf_MethodDescriptorProto* msg) { const google_protobuf_MethodOptions* default_val = NULL; const google_protobuf_MethodOptions* ret; const upb_MiniTableField field = {4, UPB_SIZE(4, 56), 4, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_options(const google_protobuf_MethodDescriptorProto* msg) { const upb_MiniTableField field = {4, UPB_SIZE(4, 56), 4, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_MethodDescriptorProto_clear_client_streaming(google_protobuf_MethodDescriptorProto* msg) { const upb_MiniTableField field = {5, UPB_SIZE(8, 1), 5, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_MethodDescriptorProto_client_streaming(const google_protobuf_MethodDescriptorProto* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {5, UPB_SIZE(8, 1), 5, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_client_streaming(const google_protobuf_MethodDescriptorProto* msg) { const upb_MiniTableField field = {5, UPB_SIZE(8, 1), 5, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_MethodDescriptorProto_clear_server_streaming(google_protobuf_MethodDescriptorProto* msg) { const upb_MiniTableField field = {6, UPB_SIZE(9, 2), 6, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_MethodDescriptorProto_server_streaming(const google_protobuf_MethodDescriptorProto* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {6, UPB_SIZE(9, 2), 6, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_server_streaming(const google_protobuf_MethodDescriptorProto* msg) { const upb_MiniTableField field = {6, UPB_SIZE(9, 2), 6, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_MethodDescriptorProto_set_name(google_protobuf_MethodDescriptorProto *msg, upb_StringView value) { const upb_MiniTableField field = {1, UPB_SIZE(12, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_MethodDescriptorProto_set_input_type(google_protobuf_MethodDescriptorProto *msg, upb_StringView value) { const upb_MiniTableField field = {2, UPB_SIZE(20, 24), 2, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_MethodDescriptorProto_set_output_type(google_protobuf_MethodDescriptorProto *msg, upb_StringView value) { const upb_MiniTableField field = {3, UPB_SIZE(28, 40), 3, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_MethodDescriptorProto_set_options(google_protobuf_MethodDescriptorProto *msg, google_protobuf_MethodOptions* value) { const upb_MiniTableField field = {4, UPB_SIZE(4, 56), 4, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE struct google_protobuf_MethodOptions* google_protobuf_MethodDescriptorProto_mutable_options(google_protobuf_MethodDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_MethodOptions* sub = (struct google_protobuf_MethodOptions*)google_protobuf_MethodDescriptorProto_options(msg); if (sub == NULL) { @@ -5043,10 +5030,10 @@ UPB_INLINE void google_protobuf_MethodDescriptorProto_set_name(google_protobuf_M } UPB_INLINE void google_protobuf_MethodDescriptorProto_set_client_streaming(google_protobuf_MethodDescriptorProto *msg, bool value) { const upb_MiniTableField field = {5, UPB_SIZE(8, 1), 5, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_MethodDescriptorProto_set_server_streaming(google_protobuf_MethodDescriptorProto *msg, bool value) { const upb_MiniTableField field = {6, UPB_SIZE(9, 2), 6, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); } /* google.protobuf.FileOptions */ @@ -5085,307 +5072,307 @@ UPB_INLINE char* google_protobuf_FileOptions_serialize_ex(const google_protobuf_ } UPB_INLINE void google_protobuf_FileOptions_clear_java_package(google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {1, 24, 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_FileOptions_java_package(const google_protobuf_FileOptions* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {1, 24, 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileOptions_has_java_package(const google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {1, 24, 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileOptions_clear_java_outer_classname(google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {8, UPB_SIZE(32, 40), 2, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_FileOptions_java_outer_classname(const google_protobuf_FileOptions* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {8, UPB_SIZE(32, 40), 2, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileOptions_has_java_outer_classname(const google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {8, UPB_SIZE(32, 40), 2, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileOptions_clear_optimize_for(google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {9, 4, 3, 0, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t google_protobuf_FileOptions_optimize_for(const google_protobuf_FileOptions* msg) { int32_t default_val = 1; int32_t ret; const upb_MiniTableField field = {9, 4, 3, 0, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileOptions_has_optimize_for(const google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {9, 4, 3, 0, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileOptions_clear_java_multiple_files(google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {10, 8, 4, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_FileOptions_java_multiple_files(const google_protobuf_FileOptions* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {10, 8, 4, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileOptions_has_java_multiple_files(const google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {10, 8, 4, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileOptions_clear_go_package(google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {11, UPB_SIZE(40, 56), 5, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_FileOptions_go_package(const google_protobuf_FileOptions* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {11, UPB_SIZE(40, 56), 5, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileOptions_has_go_package(const google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {11, UPB_SIZE(40, 56), 5, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileOptions_clear_cc_generic_services(google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {16, 9, 6, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_FileOptions_cc_generic_services(const google_protobuf_FileOptions* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {16, 9, 6, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileOptions_has_cc_generic_services(const google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {16, 9, 6, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileOptions_clear_java_generic_services(google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {17, 10, 7, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_FileOptions_java_generic_services(const google_protobuf_FileOptions* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {17, 10, 7, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileOptions_has_java_generic_services(const google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {17, 10, 7, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileOptions_clear_py_generic_services(google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {18, 11, 8, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_FileOptions_py_generic_services(const google_protobuf_FileOptions* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {18, 11, 8, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileOptions_has_py_generic_services(const google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {18, 11, 8, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileOptions_clear_java_generate_equals_and_hash(google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {20, 12, 9, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_FileOptions_java_generate_equals_and_hash(const google_protobuf_FileOptions* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {20, 12, 9, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileOptions_has_java_generate_equals_and_hash(const google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {20, 12, 9, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileOptions_clear_deprecated(google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {23, 13, 10, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_FileOptions_deprecated(const google_protobuf_FileOptions* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {23, 13, 10, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileOptions_has_deprecated(const google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {23, 13, 10, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileOptions_clear_java_string_check_utf8(google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {27, 14, 11, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_FileOptions_java_string_check_utf8(const google_protobuf_FileOptions* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {27, 14, 11, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileOptions_has_java_string_check_utf8(const google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {27, 14, 11, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileOptions_clear_cc_enable_arenas(google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {31, 15, 12, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_FileOptions_cc_enable_arenas(const google_protobuf_FileOptions* msg) { bool default_val = true; bool ret; const upb_MiniTableField field = {31, 15, 12, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileOptions_has_cc_enable_arenas(const google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {31, 15, 12, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileOptions_clear_objc_class_prefix(google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {36, UPB_SIZE(48, 72), 13, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_FileOptions_objc_class_prefix(const google_protobuf_FileOptions* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {36, UPB_SIZE(48, 72), 13, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileOptions_has_objc_class_prefix(const google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {36, UPB_SIZE(48, 72), 13, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileOptions_clear_csharp_namespace(google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {37, UPB_SIZE(56, 88), 14, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_FileOptions_csharp_namespace(const google_protobuf_FileOptions* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {37, UPB_SIZE(56, 88), 14, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileOptions_has_csharp_namespace(const google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {37, UPB_SIZE(56, 88), 14, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileOptions_clear_swift_prefix(google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {39, UPB_SIZE(64, 104), 15, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_FileOptions_swift_prefix(const google_protobuf_FileOptions* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {39, UPB_SIZE(64, 104), 15, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileOptions_has_swift_prefix(const google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {39, UPB_SIZE(64, 104), 15, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileOptions_clear_php_class_prefix(google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {40, UPB_SIZE(72, 120), 16, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_FileOptions_php_class_prefix(const google_protobuf_FileOptions* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {40, UPB_SIZE(72, 120), 16, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileOptions_has_php_class_prefix(const google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {40, UPB_SIZE(72, 120), 16, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileOptions_clear_php_namespace(google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {41, UPB_SIZE(80, 136), 17, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_FileOptions_php_namespace(const google_protobuf_FileOptions* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {41, UPB_SIZE(80, 136), 17, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileOptions_has_php_namespace(const google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {41, UPB_SIZE(80, 136), 17, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileOptions_clear_php_generic_services(google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {42, 16, 18, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_FileOptions_php_generic_services(const google_protobuf_FileOptions* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {42, 16, 18, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileOptions_has_php_generic_services(const google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {42, 16, 18, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileOptions_clear_php_metadata_namespace(google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {44, UPB_SIZE(88, 152), 19, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_FileOptions_php_metadata_namespace(const google_protobuf_FileOptions* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {44, UPB_SIZE(88, 152), 19, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileOptions_has_php_metadata_namespace(const google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {44, UPB_SIZE(88, 152), 19, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileOptions_clear_ruby_package(google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {45, UPB_SIZE(96, 168), 20, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_FileOptions_ruby_package(const google_protobuf_FileOptions* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {45, UPB_SIZE(96, 168), 20, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileOptions_has_ruby_package(const google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {45, UPB_SIZE(96, 168), 20, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileOptions_clear_uninterpreted_option(google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {999, UPB_SIZE(20, 184), 0, 1, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_FileOptions_uninterpreted_option(const google_protobuf_FileOptions* msg, size_t* len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(20, 184), len); @@ -5398,64 +5385,64 @@ UPB_INLINE bool google_protobuf_FileOptions_has_uninterpreted_option(const googl UPB_INLINE void google_protobuf_FileOptions_set_java_package(google_protobuf_FileOptions *msg, upb_StringView value) { const upb_MiniTableField field = {1, 24, 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FileOptions_set_java_outer_classname(google_protobuf_FileOptions *msg, upb_StringView value) { const upb_MiniTableField field = {8, UPB_SIZE(32, 40), 2, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FileOptions_set_optimize_for(google_protobuf_FileOptions *msg, int32_t value) { const upb_MiniTableField field = {9, 4, 3, 0, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FileOptions_set_java_multiple_files(google_protobuf_FileOptions *msg, bool value) { const upb_MiniTableField field = {10, 8, 4, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FileOptions_set_go_package(google_protobuf_FileOptions *msg, upb_StringView value) { const upb_MiniTableField field = {11, UPB_SIZE(40, 56), 5, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FileOptions_set_cc_generic_services(google_protobuf_FileOptions *msg, bool value) { const upb_MiniTableField field = {16, 9, 6, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FileOptions_set_java_generic_services(google_protobuf_FileOptions *msg, bool value) { const upb_MiniTableField field = {17, 10, 7, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FileOptions_set_py_generic_services(google_protobuf_FileOptions *msg, bool value) { const upb_MiniTableField field = {18, 11, 8, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FileOptions_set_java_generate_equals_and_hash(google_protobuf_FileOptions *msg, bool value) { const upb_MiniTableField field = {20, 12, 9, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FileOptions_set_deprecated(google_protobuf_FileOptions *msg, bool value) { const upb_MiniTableField field = {23, 13, 10, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FileOptions_set_java_string_check_utf8(google_protobuf_FileOptions *msg, bool value) { const upb_MiniTableField field = {27, 14, 11, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FileOptions_set_cc_enable_arenas(google_protobuf_FileOptions *msg, bool value) { const upb_MiniTableField field = {31, 15, 12, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FileOptions_set_objc_class_prefix(google_protobuf_FileOptions *msg, upb_StringView value) { const upb_MiniTableField field = {36, UPB_SIZE(48, 72), 13, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FileOptions_set_csharp_namespace(google_protobuf_FileOptions *msg, upb_StringView value) { const upb_MiniTableField field = {37, UPB_SIZE(56, 88), 14, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FileOptions_set_swift_prefix(google_protobuf_FileOptions *msg, upb_StringView value) { const upb_MiniTableField field = {39, UPB_SIZE(64, 104), 15, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FileOptions_set_php_class_prefix(google_protobuf_FileOptions *msg, upb_StringView value) { const upb_MiniTableField field = {40, UPB_SIZE(72, 120), 16, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FileOptions_set_php_namespace(google_protobuf_FileOptions *msg, upb_StringView value) { const upb_MiniTableField field = {41, UPB_SIZE(80, 136), 17, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FileOptions_set_php_generic_services(google_protobuf_FileOptions *msg, bool value) { const upb_MiniTableField field = {42, 16, 18, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FileOptions_set_php_metadata_namespace(google_protobuf_FileOptions *msg, upb_StringView value) { const upb_MiniTableField field = {44, UPB_SIZE(88, 152), 19, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FileOptions_set_ruby_package(google_protobuf_FileOptions *msg, upb_StringView value) { const upb_MiniTableField field = {45, UPB_SIZE(96, 168), 20, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FileOptions_mutable_uninterpreted_option(google_protobuf_FileOptions* msg, size_t* len) { return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 184), len); } @@ -5506,67 +5493,82 @@ UPB_INLINE char* google_protobuf_MessageOptions_serialize_ex(const google_protob } UPB_INLINE void google_protobuf_MessageOptions_clear_message_set_wire_format(google_protobuf_MessageOptions* msg) { const upb_MiniTableField field = {1, 1, 1, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_MessageOptions_message_set_wire_format(const google_protobuf_MessageOptions* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {1, 1, 1, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_MessageOptions_has_message_set_wire_format(const google_protobuf_MessageOptions* msg) { const upb_MiniTableField field = {1, 1, 1, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_MessageOptions_clear_no_standard_descriptor_accessor(google_protobuf_MessageOptions* msg) { const upb_MiniTableField field = {2, 2, 2, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_MessageOptions_no_standard_descriptor_accessor(const google_protobuf_MessageOptions* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {2, 2, 2, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_MessageOptions_has_no_standard_descriptor_accessor(const google_protobuf_MessageOptions* msg) { const upb_MiniTableField field = {2, 2, 2, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_MessageOptions_clear_deprecated(google_protobuf_MessageOptions* msg) { const upb_MiniTableField field = {3, 3, 3, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_MessageOptions_deprecated(const google_protobuf_MessageOptions* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {3, 3, 3, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_MessageOptions_has_deprecated(const google_protobuf_MessageOptions* msg) { const upb_MiniTableField field = {3, 3, 3, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_MessageOptions_clear_map_entry(google_protobuf_MessageOptions* msg) { const upb_MiniTableField field = {7, 4, 4, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_MessageOptions_map_entry(const google_protobuf_MessageOptions* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {7, 4, 4, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_MessageOptions_has_map_entry(const google_protobuf_MessageOptions* msg) { const upb_MiniTableField field = {7, 4, 4, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); +} +UPB_INLINE void google_protobuf_MessageOptions_clear_deprecated_legacy_json_field_conflicts(google_protobuf_MessageOptions* msg) { + const upb_MiniTableField field = {11, 5, 5, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; + _upb_MiniTable_ClearNonExtensionField(msg, &field); +} +UPB_INLINE bool google_protobuf_MessageOptions_deprecated_legacy_json_field_conflicts(const google_protobuf_MessageOptions* msg) { + bool default_val = false; + bool ret; + const upb_MiniTableField field = {11, 5, 5, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); + return ret; +} +UPB_INLINE bool google_protobuf_MessageOptions_has_deprecated_legacy_json_field_conflicts(const google_protobuf_MessageOptions* msg) { + const upb_MiniTableField field = {11, 5, 5, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_MessageOptions_clear_uninterpreted_option(google_protobuf_MessageOptions* msg) { const upb_MiniTableField field = {999, 8, 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_MessageOptions_uninterpreted_option(const google_protobuf_MessageOptions* msg, size_t* len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, 8, len); @@ -5579,16 +5581,19 @@ UPB_INLINE bool google_protobuf_MessageOptions_has_uninterpreted_option(const go UPB_INLINE void google_protobuf_MessageOptions_set_message_set_wire_format(google_protobuf_MessageOptions *msg, bool value) { const upb_MiniTableField field = {1, 1, 1, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_MessageOptions_set_no_standard_descriptor_accessor(google_protobuf_MessageOptions *msg, bool value) { const upb_MiniTableField field = {2, 2, 2, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_MessageOptions_set_deprecated(google_protobuf_MessageOptions *msg, bool value) { const upb_MiniTableField field = {3, 3, 3, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_MessageOptions_set_map_entry(google_protobuf_MessageOptions *msg, bool value) { const upb_MiniTableField field = {7, 4, 4, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); +}UPB_INLINE void google_protobuf_MessageOptions_set_deprecated_legacy_json_field_conflicts(google_protobuf_MessageOptions *msg, bool value) { + const upb_MiniTableField field = {11, 5, 5, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MessageOptions_mutable_uninterpreted_option(google_protobuf_MessageOptions* msg, size_t* len) { return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, 8, len); } @@ -5639,112 +5644,112 @@ UPB_INLINE char* google_protobuf_FieldOptions_serialize_ex(const google_protobuf } UPB_INLINE void google_protobuf_FieldOptions_clear_ctype(google_protobuf_FieldOptions* msg) { const upb_MiniTableField field = {1, 4, 1, 0, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t google_protobuf_FieldOptions_ctype(const google_protobuf_FieldOptions* msg) { int32_t default_val = 0; int32_t ret; const upb_MiniTableField field = {1, 4, 1, 0, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FieldOptions_has_ctype(const google_protobuf_FieldOptions* msg) { const upb_MiniTableField field = {1, 4, 1, 0, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FieldOptions_clear_packed(google_protobuf_FieldOptions* msg) { const upb_MiniTableField field = {2, 8, 2, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_FieldOptions_packed(const google_protobuf_FieldOptions* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {2, 8, 2, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FieldOptions_has_packed(const google_protobuf_FieldOptions* msg) { const upb_MiniTableField field = {2, 8, 2, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FieldOptions_clear_deprecated(google_protobuf_FieldOptions* msg) { const upb_MiniTableField field = {3, 9, 3, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_FieldOptions_deprecated(const google_protobuf_FieldOptions* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {3, 9, 3, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FieldOptions_has_deprecated(const google_protobuf_FieldOptions* msg) { const upb_MiniTableField field = {3, 9, 3, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FieldOptions_clear_lazy(google_protobuf_FieldOptions* msg) { const upb_MiniTableField field = {5, 10, 4, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_FieldOptions_lazy(const google_protobuf_FieldOptions* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {5, 10, 4, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FieldOptions_has_lazy(const google_protobuf_FieldOptions* msg) { const upb_MiniTableField field = {5, 10, 4, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FieldOptions_clear_jstype(google_protobuf_FieldOptions* msg) { const upb_MiniTableField field = {6, 12, 5, 1, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t google_protobuf_FieldOptions_jstype(const google_protobuf_FieldOptions* msg) { int32_t default_val = 0; int32_t ret; const upb_MiniTableField field = {6, 12, 5, 1, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FieldOptions_has_jstype(const google_protobuf_FieldOptions* msg) { const upb_MiniTableField field = {6, 12, 5, 1, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FieldOptions_clear_weak(google_protobuf_FieldOptions* msg) { const upb_MiniTableField field = {10, 16, 6, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_FieldOptions_weak(const google_protobuf_FieldOptions* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {10, 16, 6, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FieldOptions_has_weak(const google_protobuf_FieldOptions* msg) { const upb_MiniTableField field = {10, 16, 6, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FieldOptions_clear_unverified_lazy(google_protobuf_FieldOptions* msg) { const upb_MiniTableField field = {15, 17, 7, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_FieldOptions_unverified_lazy(const google_protobuf_FieldOptions* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {15, 17, 7, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FieldOptions_has_unverified_lazy(const google_protobuf_FieldOptions* msg) { const upb_MiniTableField field = {15, 17, 7, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FieldOptions_clear_uninterpreted_option(google_protobuf_FieldOptions* msg) { const upb_MiniTableField field = {999, UPB_SIZE(20, 24), 0, 2, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_FieldOptions_uninterpreted_option(const google_protobuf_FieldOptions* msg, size_t* len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(20, 24), len); @@ -5757,25 +5762,25 @@ UPB_INLINE bool google_protobuf_FieldOptions_has_uninterpreted_option(const goog UPB_INLINE void google_protobuf_FieldOptions_set_ctype(google_protobuf_FieldOptions *msg, int32_t value) { const upb_MiniTableField field = {1, 4, 1, 0, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FieldOptions_set_packed(google_protobuf_FieldOptions *msg, bool value) { const upb_MiniTableField field = {2, 8, 2, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FieldOptions_set_deprecated(google_protobuf_FieldOptions *msg, bool value) { const upb_MiniTableField field = {3, 9, 3, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FieldOptions_set_lazy(google_protobuf_FieldOptions *msg, bool value) { const upb_MiniTableField field = {5, 10, 4, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FieldOptions_set_jstype(google_protobuf_FieldOptions *msg, int32_t value) { const upb_MiniTableField field = {6, 12, 5, 1, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FieldOptions_set_weak(google_protobuf_FieldOptions *msg, bool value) { const upb_MiniTableField field = {10, 16, 6, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FieldOptions_set_unverified_lazy(google_protobuf_FieldOptions *msg, bool value) { const upb_MiniTableField field = {15, 17, 7, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FieldOptions_mutable_uninterpreted_option(google_protobuf_FieldOptions* msg, size_t* len) { return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 24), len); } @@ -5826,7 +5831,7 @@ UPB_INLINE char* google_protobuf_OneofOptions_serialize_ex(const google_protobuf } UPB_INLINE void google_protobuf_OneofOptions_clear_uninterpreted_option(google_protobuf_OneofOptions* msg) { const upb_MiniTableField field = {999, 0, 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_OneofOptions_uninterpreted_option(const google_protobuf_OneofOptions* msg, size_t* len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, 0, len); @@ -5887,37 +5892,52 @@ UPB_INLINE char* google_protobuf_EnumOptions_serialize_ex(const google_protobuf_ } UPB_INLINE void google_protobuf_EnumOptions_clear_allow_alias(google_protobuf_EnumOptions* msg) { const upb_MiniTableField field = {2, 1, 1, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_EnumOptions_allow_alias(const google_protobuf_EnumOptions* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {2, 1, 1, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_EnumOptions_has_allow_alias(const google_protobuf_EnumOptions* msg) { const upb_MiniTableField field = {2, 1, 1, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_EnumOptions_clear_deprecated(google_protobuf_EnumOptions* msg) { const upb_MiniTableField field = {3, 2, 2, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_EnumOptions_deprecated(const google_protobuf_EnumOptions* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {3, 2, 2, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_EnumOptions_has_deprecated(const google_protobuf_EnumOptions* msg) { const upb_MiniTableField field = {3, 2, 2, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); +} +UPB_INLINE void google_protobuf_EnumOptions_clear_deprecated_legacy_json_field_conflicts(google_protobuf_EnumOptions* msg) { + const upb_MiniTableField field = {6, 3, 3, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; + _upb_MiniTable_ClearNonExtensionField(msg, &field); +} +UPB_INLINE bool google_protobuf_EnumOptions_deprecated_legacy_json_field_conflicts(const google_protobuf_EnumOptions* msg) { + bool default_val = false; + bool ret; + const upb_MiniTableField field = {6, 3, 3, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); + return ret; +} +UPB_INLINE bool google_protobuf_EnumOptions_has_deprecated_legacy_json_field_conflicts(const google_protobuf_EnumOptions* msg) { + const upb_MiniTableField field = {6, 3, 3, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_EnumOptions_clear_uninterpreted_option(google_protobuf_EnumOptions* msg) { const upb_MiniTableField field = {999, UPB_SIZE(4, 8), 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_EnumOptions_uninterpreted_option(const google_protobuf_EnumOptions* msg, size_t* len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); @@ -5930,10 +5950,13 @@ UPB_INLINE bool google_protobuf_EnumOptions_has_uninterpreted_option(const googl UPB_INLINE void google_protobuf_EnumOptions_set_allow_alias(google_protobuf_EnumOptions *msg, bool value) { const upb_MiniTableField field = {2, 1, 1, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_EnumOptions_set_deprecated(google_protobuf_EnumOptions *msg, bool value) { const upb_MiniTableField field = {3, 2, 2, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); +}UPB_INLINE void google_protobuf_EnumOptions_set_deprecated_legacy_json_field_conflicts(google_protobuf_EnumOptions *msg, bool value) { + const upb_MiniTableField field = {6, 3, 3, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_EnumOptions_mutable_uninterpreted_option(google_protobuf_EnumOptions* msg, size_t* len) { return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len); } @@ -5984,22 +6007,22 @@ UPB_INLINE char* google_protobuf_EnumValueOptions_serialize_ex(const google_prot } UPB_INLINE void google_protobuf_EnumValueOptions_clear_deprecated(google_protobuf_EnumValueOptions* msg) { const upb_MiniTableField field = {1, 1, 1, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_EnumValueOptions_deprecated(const google_protobuf_EnumValueOptions* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {1, 1, 1, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_EnumValueOptions_has_deprecated(const google_protobuf_EnumValueOptions* msg) { const upb_MiniTableField field = {1, 1, 1, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_EnumValueOptions_clear_uninterpreted_option(google_protobuf_EnumValueOptions* msg) { const upb_MiniTableField field = {999, UPB_SIZE(4, 8), 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_EnumValueOptions_uninterpreted_option(const google_protobuf_EnumValueOptions* msg, size_t* len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); @@ -6012,7 +6035,7 @@ UPB_INLINE bool google_protobuf_EnumValueOptions_has_uninterpreted_option(const UPB_INLINE void google_protobuf_EnumValueOptions_set_deprecated(google_protobuf_EnumValueOptions *msg, bool value) { const upb_MiniTableField field = {1, 1, 1, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_EnumValueOptions_mutable_uninterpreted_option(google_protobuf_EnumValueOptions* msg, size_t* len) { return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len); } @@ -6063,22 +6086,22 @@ UPB_INLINE char* google_protobuf_ServiceOptions_serialize_ex(const google_protob } UPB_INLINE void google_protobuf_ServiceOptions_clear_deprecated(google_protobuf_ServiceOptions* msg) { const upb_MiniTableField field = {33, 1, 1, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_ServiceOptions_deprecated(const google_protobuf_ServiceOptions* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {33, 1, 1, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_ServiceOptions_has_deprecated(const google_protobuf_ServiceOptions* msg) { const upb_MiniTableField field = {33, 1, 1, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_ServiceOptions_clear_uninterpreted_option(google_protobuf_ServiceOptions* msg) { const upb_MiniTableField field = {999, UPB_SIZE(4, 8), 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_ServiceOptions_uninterpreted_option(const google_protobuf_ServiceOptions* msg, size_t* len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); @@ -6091,7 +6114,7 @@ UPB_INLINE bool google_protobuf_ServiceOptions_has_uninterpreted_option(const go UPB_INLINE void google_protobuf_ServiceOptions_set_deprecated(google_protobuf_ServiceOptions *msg, bool value) { const upb_MiniTableField field = {33, 1, 1, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_ServiceOptions_mutable_uninterpreted_option(google_protobuf_ServiceOptions* msg, size_t* len) { return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len); } @@ -6142,37 +6165,37 @@ UPB_INLINE char* google_protobuf_MethodOptions_serialize_ex(const google_protobu } UPB_INLINE void google_protobuf_MethodOptions_clear_deprecated(google_protobuf_MethodOptions* msg) { const upb_MiniTableField field = {33, 1, 1, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_MethodOptions_deprecated(const google_protobuf_MethodOptions* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {33, 1, 1, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_MethodOptions_has_deprecated(const google_protobuf_MethodOptions* msg) { const upb_MiniTableField field = {33, 1, 1, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_MethodOptions_clear_idempotency_level(google_protobuf_MethodOptions* msg) { const upb_MiniTableField field = {34, 4, 2, 0, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t google_protobuf_MethodOptions_idempotency_level(const google_protobuf_MethodOptions* msg) { int32_t default_val = 0; int32_t ret; const upb_MiniTableField field = {34, 4, 2, 0, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_MethodOptions_has_idempotency_level(const google_protobuf_MethodOptions* msg) { const upb_MiniTableField field = {34, 4, 2, 0, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_MethodOptions_clear_uninterpreted_option(google_protobuf_MethodOptions* msg) { const upb_MiniTableField field = {999, 8, 0, 1, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_MethodOptions_uninterpreted_option(const google_protobuf_MethodOptions* msg, size_t* len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, 8, len); @@ -6185,10 +6208,10 @@ UPB_INLINE bool google_protobuf_MethodOptions_has_uninterpreted_option(const goo UPB_INLINE void google_protobuf_MethodOptions_set_deprecated(google_protobuf_MethodOptions *msg, bool value) { const upb_MiniTableField field = {33, 1, 1, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_MethodOptions_set_idempotency_level(google_protobuf_MethodOptions *msg, int32_t value) { const upb_MiniTableField field = {34, 4, 2, 0, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MethodOptions_mutable_uninterpreted_option(google_protobuf_MethodOptions* msg, size_t* len) { return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, 8, len); } @@ -6239,7 +6262,7 @@ UPB_INLINE char* google_protobuf_UninterpretedOption_serialize_ex(const google_p } UPB_INLINE void google_protobuf_UninterpretedOption_clear_name(google_protobuf_UninterpretedOption* msg) { const upb_MiniTableField field = {2, UPB_SIZE(4, 8), 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_UninterpretedOption_NamePart* const* google_protobuf_UninterpretedOption_name(const google_protobuf_UninterpretedOption* msg, size_t* len) { return (const google_protobuf_UninterpretedOption_NamePart* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); @@ -6251,93 +6274,93 @@ UPB_INLINE bool google_protobuf_UninterpretedOption_has_name(const google_protob } UPB_INLINE void google_protobuf_UninterpretedOption_clear_identifier_value(google_protobuf_UninterpretedOption* msg) { const upb_MiniTableField field = {3, UPB_SIZE(8, 16), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_UninterpretedOption_identifier_value(const google_protobuf_UninterpretedOption* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {3, UPB_SIZE(8, 16), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_UninterpretedOption_has_identifier_value(const google_protobuf_UninterpretedOption* msg) { const upb_MiniTableField field = {3, UPB_SIZE(8, 16), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_UninterpretedOption_clear_positive_int_value(google_protobuf_UninterpretedOption* msg) { const upb_MiniTableField field = {4, UPB_SIZE(16, 32), 2, kUpb_NoSub, 4, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE uint64_t google_protobuf_UninterpretedOption_positive_int_value(const google_protobuf_UninterpretedOption* msg) { uint64_t default_val = (uint64_t)0ull; uint64_t ret; const upb_MiniTableField field = {4, UPB_SIZE(16, 32), 2, kUpb_NoSub, 4, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_UninterpretedOption_has_positive_int_value(const google_protobuf_UninterpretedOption* msg) { const upb_MiniTableField field = {4, UPB_SIZE(16, 32), 2, kUpb_NoSub, 4, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_UninterpretedOption_clear_negative_int_value(google_protobuf_UninterpretedOption* msg) { const upb_MiniTableField field = {5, UPB_SIZE(24, 40), 3, kUpb_NoSub, 3, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int64_t google_protobuf_UninterpretedOption_negative_int_value(const google_protobuf_UninterpretedOption* msg) { int64_t default_val = (int64_t)0ll; int64_t ret; const upb_MiniTableField field = {5, UPB_SIZE(24, 40), 3, kUpb_NoSub, 3, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_UninterpretedOption_has_negative_int_value(const google_protobuf_UninterpretedOption* msg) { const upb_MiniTableField field = {5, UPB_SIZE(24, 40), 3, kUpb_NoSub, 3, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_UninterpretedOption_clear_double_value(google_protobuf_UninterpretedOption* msg) { const upb_MiniTableField field = {6, UPB_SIZE(32, 48), 4, kUpb_NoSub, 1, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE double google_protobuf_UninterpretedOption_double_value(const google_protobuf_UninterpretedOption* msg) { double default_val = 0; double ret; const upb_MiniTableField field = {6, UPB_SIZE(32, 48), 4, kUpb_NoSub, 1, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_UninterpretedOption_has_double_value(const google_protobuf_UninterpretedOption* msg) { const upb_MiniTableField field = {6, UPB_SIZE(32, 48), 4, kUpb_NoSub, 1, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_UninterpretedOption_clear_string_value(google_protobuf_UninterpretedOption* msg) { const upb_MiniTableField field = {7, UPB_SIZE(40, 56), 5, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_UninterpretedOption_string_value(const google_protobuf_UninterpretedOption* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {7, UPB_SIZE(40, 56), 5, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_UninterpretedOption_has_string_value(const google_protobuf_UninterpretedOption* msg) { const upb_MiniTableField field = {7, UPB_SIZE(40, 56), 5, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_UninterpretedOption_clear_aggregate_value(google_protobuf_UninterpretedOption* msg) { const upb_MiniTableField field = {8, UPB_SIZE(48, 72), 6, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_UninterpretedOption_aggregate_value(const google_protobuf_UninterpretedOption* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {8, UPB_SIZE(48, 72), 6, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_UninterpretedOption_has_aggregate_value(const google_protobuf_UninterpretedOption* msg) { const upb_MiniTableField field = {8, UPB_SIZE(48, 72), 6, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE google_protobuf_UninterpretedOption_NamePart** google_protobuf_UninterpretedOption_mutable_name(google_protobuf_UninterpretedOption* msg, size_t* len) { @@ -6354,22 +6377,22 @@ UPB_INLINE struct google_protobuf_UninterpretedOption_NamePart* google_protobuf_ } UPB_INLINE void google_protobuf_UninterpretedOption_set_identifier_value(google_protobuf_UninterpretedOption *msg, upb_StringView value) { const upb_MiniTableField field = {3, UPB_SIZE(8, 16), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_UninterpretedOption_set_positive_int_value(google_protobuf_UninterpretedOption *msg, uint64_t value) { const upb_MiniTableField field = {4, UPB_SIZE(16, 32), 2, kUpb_NoSub, 4, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_UninterpretedOption_set_negative_int_value(google_protobuf_UninterpretedOption *msg, int64_t value) { const upb_MiniTableField field = {5, UPB_SIZE(24, 40), 3, kUpb_NoSub, 3, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_UninterpretedOption_set_double_value(google_protobuf_UninterpretedOption *msg, double value) { const upb_MiniTableField field = {6, UPB_SIZE(32, 48), 4, kUpb_NoSub, 1, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_UninterpretedOption_set_string_value(google_protobuf_UninterpretedOption *msg, upb_StringView value) { const upb_MiniTableField field = {7, UPB_SIZE(40, 56), 5, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_UninterpretedOption_set_aggregate_value(google_protobuf_UninterpretedOption *msg, upb_StringView value) { const upb_MiniTableField field = {8, UPB_SIZE(48, 72), 6, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); } /* google.protobuf.UninterpretedOption.NamePart */ @@ -6408,41 +6431,41 @@ UPB_INLINE char* google_protobuf_UninterpretedOption_NamePart_serialize_ex(const } UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_clear_name_part(google_protobuf_UninterpretedOption_NamePart* msg) { const upb_MiniTableField field = {1, UPB_SIZE(4, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_UninterpretedOption_NamePart_name_part(const google_protobuf_UninterpretedOption_NamePart* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {1, UPB_SIZE(4, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_has_name_part(const google_protobuf_UninterpretedOption_NamePart* msg) { const upb_MiniTableField field = {1, UPB_SIZE(4, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_clear_is_extension(google_protobuf_UninterpretedOption_NamePart* msg) { const upb_MiniTableField field = {2, 1, 2, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_is_extension(const google_protobuf_UninterpretedOption_NamePart* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {2, 1, 2, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_has_is_extension(const google_protobuf_UninterpretedOption_NamePart* msg) { const upb_MiniTableField field = {2, 1, 2, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_set_name_part(google_protobuf_UninterpretedOption_NamePart *msg, upb_StringView value) { const upb_MiniTableField field = {1, UPB_SIZE(4, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_set_is_extension(google_protobuf_UninterpretedOption_NamePart *msg, bool value) { const upb_MiniTableField field = {2, 1, 2, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); } /* google.protobuf.SourceCodeInfo */ @@ -6481,7 +6504,7 @@ UPB_INLINE char* google_protobuf_SourceCodeInfo_serialize_ex(const google_protob } UPB_INLINE void google_protobuf_SourceCodeInfo_clear_location(google_protobuf_SourceCodeInfo* msg) { const upb_MiniTableField field = {1, 0, 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_SourceCodeInfo_Location* const* google_protobuf_SourceCodeInfo_location(const google_protobuf_SourceCodeInfo* msg, size_t* len) { return (const google_protobuf_SourceCodeInfo_Location* const*)_upb_array_accessor(msg, 0, len); @@ -6542,7 +6565,7 @@ UPB_INLINE char* google_protobuf_SourceCodeInfo_Location_serialize_ex(const goog } UPB_INLINE void google_protobuf_SourceCodeInfo_Location_clear_path(google_protobuf_SourceCodeInfo_Location* msg) { const upb_MiniTableField field = {1, UPB_SIZE(4, 8), 0, kUpb_NoSub, 5, kUpb_FieldMode_Array | kUpb_LabelFlags_IsPacked | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t const* google_protobuf_SourceCodeInfo_Location_path(const google_protobuf_SourceCodeInfo_Location* msg, size_t* len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); @@ -6554,7 +6577,7 @@ UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_has_path(const google_pr } UPB_INLINE void google_protobuf_SourceCodeInfo_Location_clear_span(google_protobuf_SourceCodeInfo_Location* msg) { const upb_MiniTableField field = {2, UPB_SIZE(8, 16), 0, kUpb_NoSub, 5, kUpb_FieldMode_Array | kUpb_LabelFlags_IsPacked | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t const* google_protobuf_SourceCodeInfo_Location_span(const google_protobuf_SourceCodeInfo_Location* msg, size_t* len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); @@ -6566,37 +6589,37 @@ UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_has_span(const google_pr } UPB_INLINE void google_protobuf_SourceCodeInfo_Location_clear_leading_comments(google_protobuf_SourceCodeInfo_Location* msg) { const upb_MiniTableField field = {3, UPB_SIZE(16, 24), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_SourceCodeInfo_Location_leading_comments(const google_protobuf_SourceCodeInfo_Location* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {3, UPB_SIZE(16, 24), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_has_leading_comments(const google_protobuf_SourceCodeInfo_Location* msg) { const upb_MiniTableField field = {3, UPB_SIZE(16, 24), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_SourceCodeInfo_Location_clear_trailing_comments(google_protobuf_SourceCodeInfo_Location* msg) { const upb_MiniTableField field = {4, UPB_SIZE(24, 40), 2, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_SourceCodeInfo_Location_trailing_comments(const google_protobuf_SourceCodeInfo_Location* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {4, UPB_SIZE(24, 40), 2, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_has_trailing_comments(const google_protobuf_SourceCodeInfo_Location* msg) { const upb_MiniTableField field = {4, UPB_SIZE(24, 40), 2, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_SourceCodeInfo_Location_clear_leading_detached_comments(google_protobuf_SourceCodeInfo_Location* msg) { const upb_MiniTableField field = {6, UPB_SIZE(12, 56), 0, kUpb_NoSub, 12, kUpb_FieldMode_Array | kUpb_LabelFlags_IsAlternate | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView const* google_protobuf_SourceCodeInfo_Location_leading_detached_comments(const google_protobuf_SourceCodeInfo_Location* msg, size_t* len) { return (upb_StringView const*)_upb_array_accessor(msg, UPB_SIZE(12, 56), len); @@ -6627,10 +6650,10 @@ UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_add_span(google_protobuf } UPB_INLINE void google_protobuf_SourceCodeInfo_Location_set_leading_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_StringView value) { const upb_MiniTableField field = {3, UPB_SIZE(16, 24), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_SourceCodeInfo_Location_set_trailing_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_StringView value) { const upb_MiniTableField field = {4, UPB_SIZE(24, 40), 2, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE upb_StringView* google_protobuf_SourceCodeInfo_Location_mutable_leading_detached_comments(google_protobuf_SourceCodeInfo_Location* msg, size_t* len) { return (upb_StringView*)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 56), len); } @@ -6678,7 +6701,7 @@ UPB_INLINE char* google_protobuf_GeneratedCodeInfo_serialize_ex(const google_pro } UPB_INLINE void google_protobuf_GeneratedCodeInfo_clear_annotation(google_protobuf_GeneratedCodeInfo* msg) { const upb_MiniTableField field = {1, 0, 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_GeneratedCodeInfo_Annotation* const* google_protobuf_GeneratedCodeInfo_annotation(const google_protobuf_GeneratedCodeInfo* msg, size_t* len) { return (const google_protobuf_GeneratedCodeInfo_Annotation* const*)_upb_array_accessor(msg, 0, len); @@ -6739,7 +6762,7 @@ UPB_INLINE char* google_protobuf_GeneratedCodeInfo_Annotation_serialize_ex(const } UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_clear_path(google_protobuf_GeneratedCodeInfo_Annotation* msg) { const upb_MiniTableField field = {1, UPB_SIZE(4, 16), 0, kUpb_NoSub, 5, kUpb_FieldMode_Array | kUpb_LabelFlags_IsPacked | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t const* google_protobuf_GeneratedCodeInfo_Annotation_path(const google_protobuf_GeneratedCodeInfo_Annotation* msg, size_t* len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(4, 16), len); @@ -6751,63 +6774,63 @@ UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_path(const goog } UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_clear_source_file(google_protobuf_GeneratedCodeInfo_Annotation* msg) { const upb_MiniTableField field = {2, UPB_SIZE(20, 24), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_GeneratedCodeInfo_Annotation_source_file(const google_protobuf_GeneratedCodeInfo_Annotation* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {2, UPB_SIZE(20, 24), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_source_file(const google_protobuf_GeneratedCodeInfo_Annotation* msg) { const upb_MiniTableField field = {2, UPB_SIZE(20, 24), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_clear_begin(google_protobuf_GeneratedCodeInfo_Annotation* msg) { const upb_MiniTableField field = {3, UPB_SIZE(8, 4), 2, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t google_protobuf_GeneratedCodeInfo_Annotation_begin(const google_protobuf_GeneratedCodeInfo_Annotation* msg) { int32_t default_val = (int32_t)0; int32_t ret; const upb_MiniTableField field = {3, UPB_SIZE(8, 4), 2, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_begin(const google_protobuf_GeneratedCodeInfo_Annotation* msg) { const upb_MiniTableField field = {3, UPB_SIZE(8, 4), 2, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_clear_end(google_protobuf_GeneratedCodeInfo_Annotation* msg) { const upb_MiniTableField field = {4, UPB_SIZE(12, 8), 3, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t google_protobuf_GeneratedCodeInfo_Annotation_end(const google_protobuf_GeneratedCodeInfo_Annotation* msg) { int32_t default_val = (int32_t)0; int32_t ret; const upb_MiniTableField field = {4, UPB_SIZE(12, 8), 3, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_end(const google_protobuf_GeneratedCodeInfo_Annotation* msg) { const upb_MiniTableField field = {4, UPB_SIZE(12, 8), 3, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_clear_semantic(google_protobuf_GeneratedCodeInfo_Annotation* msg) { const upb_MiniTableField field = {5, UPB_SIZE(16, 12), 4, 0, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t google_protobuf_GeneratedCodeInfo_Annotation_semantic(const google_protobuf_GeneratedCodeInfo_Annotation* msg) { int32_t default_val = 0; int32_t ret; const upb_MiniTableField field = {5, UPB_SIZE(16, 12), 4, 0, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_semantic(const google_protobuf_GeneratedCodeInfo_Annotation* msg) { const upb_MiniTableField field = {5, UPB_SIZE(16, 12), 4, 0, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE int32_t* google_protobuf_GeneratedCodeInfo_Annotation_mutable_path(google_protobuf_GeneratedCodeInfo_Annotation* msg, size_t* len) { @@ -6821,16 +6844,16 @@ UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_add_path(google_pro } UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_source_file(google_protobuf_GeneratedCodeInfo_Annotation *msg, upb_StringView value) { const upb_MiniTableField field = {2, UPB_SIZE(20, 24), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_begin(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t value) { const upb_MiniTableField field = {3, UPB_SIZE(8, 4), 2, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_end(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t value) { const upb_MiniTableField field = {4, UPB_SIZE(12, 8), 3, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_semantic(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t value) { const upb_MiniTableField field = {5, UPB_SIZE(16, 12), 4, 0, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); } extern const upb_MiniTableFile google_protobuf_descriptor_proto_upb_file_layout; @@ -7900,6 +7923,32 @@ bool upb_Message_Next(const upb_Message* msg, const upb_MessageDef* m, bool upb_Message_DiscardUnknown(upb_Message* msg, const upb_MessageDef* m, int maxdepth); +// DEPRECATED FUNCTIONS +// PHP and Ruby need these until we can version-bump them to the current upb. + +UPB_INLINE void upb_Message_Clear(upb_Message* msg, const upb_MessageDef* m) { + return upb_Message_ClearByDef(msg, m); +} + +UPB_INLINE void upb_Message_ClearField(upb_Message* msg, + const upb_FieldDef* f) { + return upb_Message_ClearFieldByDef(msg, f); +} + +UPB_INLINE bool upb_Message_Has(const upb_Message* msg, const upb_FieldDef* f) { + return upb_Message_HasFieldByDef(msg, f); +} + +UPB_INLINE upb_MessageValue upb_Message_Get(const upb_Message* msg, + const upb_FieldDef* f) { + return upb_Message_GetFieldByDef(msg, f); +} + +UPB_INLINE bool upb_Message_Set(upb_Message* msg, const upb_FieldDef* f, + upb_MessageValue val, upb_Arena* a) { + return upb_Message_SetFieldByDef(msg, f, val, a); +} + #ifdef __cplusplus } /* extern "C" */ #endif @@ -8886,263 +8935,6 @@ enum { #ifndef UPB_WIRE_DECODE_INTERNAL_H_ #define UPB_WIRE_DECODE_INTERNAL_H_ - -#ifndef UPB_WIRE_EPS_COPY_INPUT_STREAM_H_ -#define UPB_WIRE_EPS_COPY_INPUT_STREAM_H_ - -#include - -// Must be last. - -// The maximum number of bytes a single protobuf field can take up in the -// wire format. We only want to do one bounds check per field, so the input -// stream guarantees that after upb_EpsCopyInputStream_IsDone() is called, -// the decoder can read this many bytes without performing another bounds -// check. The stream will copy into a patch buffer as necessary to guarantee -// this invariant. -#define kUpb_EpsCopyInputStream_SlopBytes 16 - -typedef struct { - const char* end; // Can read up to SlopBytes bytes beyond this. - const char* limit_ptr; // For bounds checks, = end + UPB_MIN(limit, 0) - int limit; // Submessage limit relative to end - char patch[kUpb_EpsCopyInputStream_SlopBytes * 2]; -} upb_EpsCopyInputStream; - -typedef const char* upb_EpsCopyInputStream_BufferFlipCallback( - upb_EpsCopyInputStream* e, const char* old_end, const char* new_start); - -typedef const char* upb_EpsCopyInputStream_IsDoneFallbackFunc( - upb_EpsCopyInputStream* e, const char* ptr, int overrun); - -// Initializes a upb_EpsCopyInputStream using the contents of the buffer -// [*ptr, size]. Updates `*ptr` as necessary to guarantee that at least -// kUpb_EpsCopyInputStream_SlopBytes, and returns true if the pointer has been -// updated. -UPB_INLINE bool upb_EpsCopyInputStream_Init(upb_EpsCopyInputStream* e, - const char** ptr, size_t size) { - bool ret; - if (size <= kUpb_EpsCopyInputStream_SlopBytes) { - memset(&e->patch, 0, 32); - if (size) memcpy(&e->patch, *ptr, size); - *ptr = e->patch; - e->end = *ptr + size; - e->limit = 0; - ret = true; - } else { - e->end = *ptr + size - kUpb_EpsCopyInputStream_SlopBytes; - e->limit = kUpb_EpsCopyInputStream_SlopBytes; - ret = false; - } - e->limit_ptr = e->end; - return ret; -} - -typedef enum { - // The current stream position is at a limit. - kUpb_IsDoneStatus_Done, - - // The current stream position is not at a limit. - kUpb_IsDoneStatus_NotDone, - - // The current stream position is not at a limit, and the stream needs to - // be flipped to a new buffer before more data can be read. - kUpb_IsDoneStatus_NeedFallback, -} upb_IsDoneStatus; - -// Returns the status of the current stream position. This is a low-level -// function, it is simpler to call upb_EpsCopyInputStream_IsDone() if possible. -UPB_INLINE upb_IsDoneStatus upb_EpsCopyInputStream_IsDoneStatus( - upb_EpsCopyInputStream* e, const char* ptr, int* overrun) { - *overrun = ptr - e->end; - if (UPB_LIKELY(ptr < e->limit_ptr)) { - return kUpb_IsDoneStatus_NotDone; - } else if (UPB_LIKELY(*overrun == e->limit)) { - return kUpb_IsDoneStatus_Done; - } else { - return kUpb_IsDoneStatus_NeedFallback; - } -} - -// Returns true if the stream has hit a limit, either the current delimited -// limit or the overall end-of-stream. As a side effect, this function may flip -// the pointer to a new buffer if there are less than -// kUpb_EpsCopyInputStream_SlopBytes of data to be read in the current buffer. -// -// Postcondition: if the function returns false, there are at least -// kUpb_EpsCopyInputStream_SlopBytes of data available to read at *ptr. -UPB_INLINE bool upb_EpsCopyInputStream_IsDone( - upb_EpsCopyInputStream* e, const char** ptr, - upb_EpsCopyInputStream_IsDoneFallbackFunc* func) { - int overrun; - switch (upb_EpsCopyInputStream_IsDoneStatus(e, *ptr, &overrun)) { - case kUpb_IsDoneStatus_Done: - return true; - case kUpb_IsDoneStatus_NotDone: - return false; - case kUpb_IsDoneStatus_NeedFallback: - *ptr = func(e, *ptr, overrun); - return *ptr == NULL; - } -} - -// Returns the total number of bytes that are safe to read from the current -// buffer without reading uninitialized or unallocated memory. -// -// Note that this check does not respect any semantic limits on the stream, -// either limits from PushLimit() or the overall stream end, so some of these -// bytes may have unpredictable, nonsense values in them. The guarantee is only -// that the bytes are valid to read from the perspective of the C language -// (ie. you can read without triggering UBSAN or ASAN). -UPB_INLINE size_t upb_EpsCopyInputStream_BytesAvailable( - upb_EpsCopyInputStream* e, const char* ptr) { - return (e->end - ptr) + kUpb_EpsCopyInputStream_SlopBytes; -} - -// Returns true if the given delimited field size is valid (it does not extend -// beyond any previously-pushed limits). `ptr` should point to the beginning -// of the field data, after the delimited size. -// -// Note that this does *not* guarantee that all of the data for this field is in -// the current buffer. -UPB_INLINE bool upb_EpsCopyInputStream_CheckSize( - const upb_EpsCopyInputStream* e, const char* ptr, int size) { - UPB_ASSERT(size >= 0); - return ptr - e->end + size <= e->limit; -} - -UPB_INLINE bool _upb_EpsCopyInputStream_CheckSizeAvailable( - upb_EpsCopyInputStream* e, const char* ptr, int size, bool submessage) { - // This is one extra branch compared to the more normal: - // return (size_t)(end - ptr) < size; - // However it is one less computation if we are just about to use "ptr + len": - // https://godbolt.org/z/35YGPz - // In microbenchmarks this shows a small improvement. - uintptr_t uptr = (uintptr_t)ptr; - uintptr_t uend = (uintptr_t)e->limit_ptr; - uintptr_t res = uptr + (size_t)size; - if (!submessage) uend += kUpb_EpsCopyInputStream_SlopBytes; - // NOTE: this check depends on having a linear address space. This is not - // technically guaranteed by uintptr_t. - bool ret = res >= uptr && res <= uend; - if (size < 0) UPB_ASSERT(!ret); - return ret; -} - -// Returns true if the given delimited field size is valid (it does not extend -// beyond any previously-pushed limited) *and* all of the data for this field is -// available to be read in the current buffer. -// -// If the size is negative, this function will always return false. This -// property can be useful in some cases. -UPB_INLINE bool upb_EpsCopyInputStream_CheckDataSizeAvailable( - upb_EpsCopyInputStream* e, const char* ptr, int size) { - return _upb_EpsCopyInputStream_CheckSizeAvailable(e, ptr, size, false); -} - -// Returns true if the given sub-message size is valid (it does not extend -// beyond any previously-pushed limited) *and* all of the data for this -// sub-message is available to be parsed in the current buffer. -// -// This implies that all fields from the sub-message can be parsed from the -// current buffer while maintaining the invariant that we always have at least -// kUpb_EpsCopyInputStream_SlopBytes of data available past the beginning of -// any individual field start. -// -// If the size is negative, this function will always return false. This -// property can be useful in some cases. -UPB_INLINE bool upb_EpsCopyInputStream_CheckSubMessageSizeAvailable( - upb_EpsCopyInputStream* e, const char* ptr, int size) { - return _upb_EpsCopyInputStream_CheckSizeAvailable(e, ptr, size, true); -} - -UPB_INLINE void _upb_EpsCopyInputStream_CheckLimit(upb_EpsCopyInputStream* e) { - UPB_ASSERT(e->limit_ptr == e->end + UPB_MIN(0, e->limit)); -} - -// Pushes a limit onto the stack of limits for the current stream. The limit -// will extend for `size` bytes beyond the position in `ptr`. Future calls to -// upb_EpsCopyInputStream_IsDone() will return `true` when the stream position -// reaches this limit. -// -// Returns a delta that the caller must store and supply to PopLimit() below. -UPB_INLINE int upb_EpsCopyInputStream_PushLimit(upb_EpsCopyInputStream* e, - const char* ptr, int size) { - int limit = size + (int)(ptr - e->end); - int delta = e->limit - limit; - _upb_EpsCopyInputStream_CheckLimit(e); - e->limit = limit; - e->limit_ptr = e->end + UPB_MIN(0, limit); - _upb_EpsCopyInputStream_CheckLimit(e); - return delta; -} - -// Pops the last limit that was pushed on this stream. This may only be called -// once IsDone() returns true. The user must pass the delta that was returned -// from PushLimit(). -UPB_INLINE void upb_EpsCopyInputStream_PopLimit(upb_EpsCopyInputStream* e, - const char* ptr, - int saved_delta) { - UPB_ASSERT(ptr - e->end == e->limit); - _upb_EpsCopyInputStream_CheckLimit(e); - e->limit += saved_delta; - e->limit_ptr = e->end + UPB_MIN(0, e->limit); - _upb_EpsCopyInputStream_CheckLimit(e); -} - -UPB_INLINE const char* _upb_EpsCopyInputStream_IsDoneFallbackInline( - upb_EpsCopyInputStream* e, const char* ptr, int overrun, - upb_EpsCopyInputStream_BufferFlipCallback* callback) { - if (overrun < e->limit) { - // Need to copy remaining data into patch buffer. - UPB_ASSERT(overrun < kUpb_EpsCopyInputStream_SlopBytes); - const char* old_end = ptr; - const char* new_start = &e->patch[0] + overrun; - memset(e->patch + kUpb_EpsCopyInputStream_SlopBytes, 0, - kUpb_EpsCopyInputStream_SlopBytes); - memcpy(e->patch, e->end, kUpb_EpsCopyInputStream_SlopBytes); - ptr = new_start; - e->end = &e->patch[kUpb_EpsCopyInputStream_SlopBytes]; - e->limit -= kUpb_EpsCopyInputStream_SlopBytes; - e->limit_ptr = e->end + e->limit; - UPB_ASSERT(ptr < e->limit_ptr); - return callback(e, old_end, new_start); - } else { - return callback(e, NULL, NULL); - } -} - -typedef const char* upb_EpsCopyInputStream_ParseDelimitedFunc( - upb_EpsCopyInputStream* e, const char* ptr, void* ctx); - -// Tries to perform a fast-path handling of the given delimited message data. -// If the sub-message beginning at `*ptr` and extending for `len` is short and -// fits within this buffer, calls `func` with `ctx` as a parameter, where the -// pushing and popping of limits is handled automatically and with lower cost -// than the normal PushLimit()/PopLimit() sequence. -static UPB_FORCEINLINE bool upb_EpsCopyInputStream_TryParseDelimitedFast( - upb_EpsCopyInputStream* e, const char** ptr, int len, - upb_EpsCopyInputStream_ParseDelimitedFunc* func, void* ctx) { - if (!upb_EpsCopyInputStream_CheckSubMessageSizeAvailable(e, *ptr, len)) { - return false; - } - - // Fast case: Sub-message is <128 bytes and fits in the current buffer. - // This means we can preserve limit/limit_ptr verbatim. - const char* saved_limit_ptr = e->limit_ptr; - int saved_limit = e->limit; - e->limit_ptr = *ptr + len; - e->limit = e->limit_ptr - e->end; - UPB_ASSERT(e->limit_ptr == e->end + UPB_MIN(0, e->limit)); - *ptr = func(e, *ptr, ctx); - e->limit_ptr = saved_limit_ptr; - e->limit = saved_limit; - UPB_ASSERT(e->limit_ptr == e->end + UPB_MIN(0, e->limit)); - return true; -} - - -#endif // UPB_WIRE_EPS_COPY_INPUT_STREAM_H_ #include "utf8_range.h" // Must be last. @@ -9150,14 +8942,18 @@ static UPB_FORCEINLINE bool upb_EpsCopyInputStream_TryParseDelimitedFast( #define DECODE_NOGROUP (uint32_t) - 1 typedef struct upb_Decoder { - upb_EpsCopyInputStream input; - const upb_ExtensionRegistry* extreg; - const char* unknown; // Start of unknown data, preserve at buffer flip - upb_Message* unknown_msg; // Pointer to preserve data to - int depth; // Tracks recursion depth to bound stack usage. - uint32_t end_group; // field number of END_GROUP tag, else DECODE_NOGROUP. + const char* end; /* Can read up to 16 bytes slop beyond this. */ + const char* limit_ptr; /* = end + UPB_MIN(limit, 0) */ + upb_Message* unknown_msg; /* Used for preserving unknown data. */ + const char* unknown; /* Start of unknown data, preserve at buffer flip. */ + const upb_ExtensionRegistry* + extreg; /* For looking up extensions during the parse. */ + int limit; /* Submessage limit relative to end. */ + int depth; /* Tracks recursion depth to bound stack usage. */ + uint32_t end_group; /* field number of END_GROUP tag, else DECODE_NOGROUP */ uint16_t options; bool missing_required; + char patch[32]; upb_Arena arena; jmp_buf err; @@ -9216,29 +9012,49 @@ UPB_INLINE const upb_MiniTable* decode_totablep(intptr_t table) { return (const upb_MiniTable*)(table >> 8); } -const char* _upb_Decoder_IsDoneFallback(upb_EpsCopyInputStream* e, - const char* ptr, int overrun); - -UPB_INLINE bool _upb_Decoder_IsDone(upb_Decoder* d, const char** ptr) { - return upb_EpsCopyInputStream_IsDone(&d->input, ptr, - &_upb_Decoder_IsDoneFallback); +UPB_INLINE +const char* _upb_Decoder_IsDoneFallbackInline(upb_Decoder* d, const char* ptr, + int overrun, int* status) { + if (overrun < d->limit) { + /* Need to copy remaining data into patch buffer. */ + UPB_ASSERT(overrun < 16); + if (d->unknown) { + if (!_upb_Message_AddUnknown(d->unknown_msg, d->unknown, ptr - d->unknown, + &d->arena)) { + *status = kUpb_DecodeStatus_OutOfMemory; + return NULL; + } + d->unknown = &d->patch[0] + overrun; + } + memset(d->patch + 16, 0, 16); + memcpy(d->patch, d->end, 16); + ptr = &d->patch[0] + overrun; + d->end = &d->patch[16]; + d->limit -= 16; + d->limit_ptr = d->end + d->limit; + d->options &= ~kUpb_DecodeOption_AliasString; + UPB_ASSERT(ptr < d->limit_ptr); + return ptr; + } else { + *status = kUpb_DecodeStatus_Malformed; + return NULL; + } } -UPB_INLINE const char* _upb_Decoder_BufferFlipCallback( - upb_EpsCopyInputStream* e, const char* old_end, const char* new_start) { - upb_Decoder* d = (upb_Decoder*)e; - if (!old_end) _upb_FastDecoder_ErrorJmp(d, kUpb_DecodeStatus_Malformed); +const char* _upb_Decoder_IsDoneFallback(upb_Decoder* d, const char* ptr, + int overrun); - if (d->unknown) { - if (!_upb_Message_AddUnknown(d->unknown_msg, d->unknown, - old_end - d->unknown, &d->arena)) { - _upb_FastDecoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory); - } - d->unknown = new_start; +UPB_INLINE +bool _upb_Decoder_IsDone(upb_Decoder* d, const char** ptr) { + int overrun = *ptr - d->end; + if (UPB_LIKELY(*ptr < d->limit_ptr)) { + return false; + } else if (UPB_LIKELY(overrun == d->limit)) { + return true; + } else { + *ptr = _upb_Decoder_IsDoneFallback(d, *ptr, overrun); + return false; } - - d->options &= ~kUpb_DecodeOption_AliasString; - return new_start; } #if UPB_FASTTABLE @@ -9264,6 +9080,30 @@ UPB_INLINE uint32_t _upb_FastDecoder_LoadTag(const char* ptr) { return tag; } +UPB_INLINE void _upb_Decoder_CheckLimit(upb_Decoder* d) { + UPB_ASSERT(d->limit_ptr == d->end + UPB_MIN(0, d->limit)); +} + +UPB_INLINE int _upb_Decoder_PushLimit(upb_Decoder* d, const char* ptr, + int size) { + int limit = size + (int)(ptr - d->end); + int delta = d->limit - limit; + _upb_Decoder_CheckLimit(d); + d->limit = limit; + d->limit_ptr = d->end + UPB_MIN(0, limit); + _upb_Decoder_CheckLimit(d); + return delta; +} + +UPB_INLINE void _upb_Decoder_PopLimit(upb_Decoder* d, const char* ptr, + int saved_delta) { + UPB_ASSERT(ptr - d->end == d->limit); + _upb_Decoder_CheckLimit(d); + d->limit += saved_delta; + d->limit_ptr = d->end + UPB_MIN(0, d->limit); + _upb_Decoder_CheckLimit(d); +} + #endif /* UPB_WIRE_DECODE_INTERNAL_H_ */ diff --git a/python/google/protobuf/pyext/proto2_api_test.proto b/python/google/protobuf/pyext/proto2_api_test.proto deleted file mode 100644 index 1fd78e8402005..0000000000000 --- a/python/google/protobuf/pyext/proto2_api_test.proto +++ /dev/null @@ -1,40 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package google.protobuf.python.internal; - -import "google/protobuf/internal/cpp/proto1_api_test.proto"; - -message TestNestedProto1APIMessage { - optional int32 a = 1; - optional TestMessage.NestedMessage b = 2; -} diff --git a/ruby/ext/google/protobuf_c/ruby-upb.c b/ruby/ext/google/protobuf_c/ruby-upb.c index 69e63f4cc37e2..b1f58b998921d 100644 --- a/ruby/ext/google/protobuf_c/ruby-upb.c +++ b/ruby/ext/google/protobuf_c/ruby-upb.c @@ -147,12 +147,6 @@ #if defined(__GNUC__) || defined(__clang__) #define UPB_UNREACHABLE() do { assert(0); __builtin_unreachable(); } while(0) -#elif defined(_MSC_VER) -#define UPB_UNREACHABLE() \ - do { \ - assert(0); \ - __assume(0); \ - } while (0) #else #define UPB_UNREACHABLE() do { assert(0); } while(0) #endif @@ -978,18 +972,19 @@ static const upb_MiniTableSub google_protobuf_MessageOptions_submsgs[1] = { {.submsg = &google_protobuf_UninterpretedOption_msg_init}, }; -static const upb_MiniTableField google_protobuf_MessageOptions__fields[5] = { +static const upb_MiniTableField google_protobuf_MessageOptions__fields[6] = { {1, 1, 1, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, {2, 2, 2, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, {3, 3, 3, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, {7, 4, 4, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, + {11, 5, 5, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, {999, 8, 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, }; const upb_MiniTable google_protobuf_MessageOptions_msg_init = { &google_protobuf_MessageOptions_submsgs[0], &google_protobuf_MessageOptions__fields[0], - 16, 5, kUpb_ExtMode_Extendable, 3, 255, 0, + 16, 6, kUpb_ExtMode_Extendable, 3, 255, 0, }; static const upb_MiniTableSub google_protobuf_FieldOptions_submsgs[3] = { @@ -1033,16 +1028,17 @@ static const upb_MiniTableSub google_protobuf_EnumOptions_submsgs[1] = { {.submsg = &google_protobuf_UninterpretedOption_msg_init}, }; -static const upb_MiniTableField google_protobuf_EnumOptions__fields[3] = { +static const upb_MiniTableField google_protobuf_EnumOptions__fields[4] = { {2, 1, 1, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, {3, 2, 2, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, + {6, 3, 3, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, {999, UPB_SIZE(4, 8), 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, }; const upb_MiniTable google_protobuf_EnumOptions_msg_init = { &google_protobuf_EnumOptions_submsgs[0], &google_protobuf_EnumOptions__fields[0], - UPB_SIZE(8, 16), 3, kUpb_ExtMode_Extendable, 0, 255, 0, + UPB_SIZE(8, 16), 4, kUpb_ExtMode_Extendable, 0, 255, 0, }; static const upb_MiniTableSub google_protobuf_EnumValueOptions_submsgs[1] = { @@ -5180,11 +5176,6 @@ upb_UnknownToMessage_Status upb_MiniTable_PromoteUnknownToMessageArray( if (ret.status == kUpb_UnknownToMessage_Ok) { upb_MessageValue value; value.msg_val = ret.message; - // Allocate array on demand before append. - if (!repeated_messages) { - upb_MiniTable_ResizeArray(msg, field, 0, arena); - repeated_messages = upb_MiniTable_GetMutableArray(msg, field); - } if (!upb_Array_Append(repeated_messages, value, arena)) { return kUpb_UnknownToMessage_OutOfMemory; } @@ -5327,6 +5318,20 @@ const upb_Message_Extension* _upb_Message_Getext( return NULL; } +void _upb_Message_Clearext(upb_Message* msg, + const upb_MiniTableExtension* ext_l) { + upb_Message_Internal* in = upb_Message_Getinternal(msg); + if (!in->internal) return; + const upb_Message_Extension* base = + UPB_PTR_AT(in->internal, in->internal->ext_begin, void); + upb_Message_Extension* ext = + (upb_Message_Extension*)_upb_Message_Getext(msg, ext_l); + if (ext) { + *ext = *base; + in->internal->ext_begin += sizeof(upb_Message_Extension); + } +} + upb_Message_Extension* _upb_Message_GetOrCreateExtension( upb_Message* msg, const upb_MiniTableExtension* e, upb_Arena* arena) { upb_Message_Extension* ext = @@ -6054,21 +6059,6 @@ static void upb_MtDecoder_ParseMap(upb_MtDecoder* d, const char* data, } upb_MtDecoder_ParseMessage(d, data, len); - if (UPB_UNLIKELY(d->table->field_count != 2)) { - upb_MtDecoder_ErrorFormat(d, "%hu fields in map", d->table->field_count); - UPB_UNREACHABLE(); - } - if (UPB_UNLIKELY(d->table->fields[0].number != 1)) { - upb_MtDecoder_ErrorFormat(d, "field %d in map key", - d->table->fields[0].number); - UPB_UNREACHABLE(); - } - if (UPB_UNLIKELY(d->table->fields[1].number != 2)) { - upb_MtDecoder_ErrorFormat(d, "field %d in map val", - d->table->fields[1].number); - UPB_UNREACHABLE(); - } - upb_MtDecoder_AssignHasbits(d->table); // Map entries have a pre-determined layout, regardless of types. @@ -7757,6 +7747,7 @@ upb_EnumReservedRange* _upb_EnumReservedRanges_New( google_protobuf_EnumDescriptorProto_EnumReservedRange_start(protos[i]); const int32_t end = google_protobuf_EnumDescriptorProto_EnumReservedRange_end(protos[i]); + const int32_t max = kUpb_MaxFieldNumber + 1; // A full validation would also check that each range is disjoint, and that // none of the fields overlap with the extension ranges, but we are just @@ -7764,7 +7755,7 @@ upb_EnumReservedRange* _upb_EnumReservedRanges_New( // Note: Not a typo! Unlike extension ranges and message reserved ranges, // the end value of an enum reserved range is *inclusive*! - if (end < start) { + if (start < 1 || end < start || end > max) { _upb_DefBuilder_Errf(ctx, "Reserved range (%d, %d) is invalid, enum=%s\n", (int)start, (int)end, upb_EnumDef_FullName(e)); } @@ -9159,7 +9150,7 @@ void _upb_FileDef_Create(upb_DefBuilder* ctx, bool upb_Message_HasFieldByDef(const upb_Message* msg, const upb_FieldDef* f) { UPB_ASSERT(upb_FieldDef_HasPresence(f)); - return upb_Message_HasField(msg, upb_FieldDef_MiniTable(f)); + return _upb_MiniTable_HasField(msg, upb_FieldDef_MiniTable(f)); } const upb_FieldDef* upb_Message_WhichOneof(const upb_Message* msg, @@ -9181,7 +9172,7 @@ upb_MessageValue upb_Message_GetFieldByDef(const upb_Message* msg, const upb_FieldDef* f) { upb_MessageValue default_val = upb_FieldDef_Default(f); upb_MessageValue ret; - _upb_Message_GetField(msg, upb_FieldDef_MiniTable(f), &default_val, &ret); + _upb_MiniTable_GetField(msg, upb_FieldDef_MiniTable(f), &default_val, &ret); return ret; } @@ -9226,11 +9217,11 @@ upb_MutableMessageValue upb_Message_Mutable(upb_Message* msg, bool upb_Message_SetFieldByDef(upb_Message* msg, const upb_FieldDef* f, upb_MessageValue val, upb_Arena* a) { - return _upb_Message_SetField(msg, upb_FieldDef_MiniTable(f), &val, a); + return _upb_MiniTable_SetField(msg, upb_FieldDef_MiniTable(f), &val, a); } void upb_Message_ClearFieldByDef(upb_Message* msg, const upb_FieldDef* f) { - upb_Message_ClearField(msg, upb_FieldDef_MiniTable(f)); + _upb_MiniTable_ClearField(msg, upb_FieldDef_MiniTable(f)); } void upb_Message_ClearByDef(upb_Message* msg, const upb_MessageDef* m) { @@ -10465,7 +10456,6 @@ const char* _upb_FastDecoder_ErrorJmp(upb_Decoder* d, int status) { UPB_LONGJMP(d->err, status); return NULL; } - static void _upb_Decoder_VerifyUtf8(upb_Decoder* d, const char* buf, int len) { if (!_upb_Decoder_VerifyUtf8Inline(buf, len)) { _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_BadUtf8); @@ -10541,8 +10531,7 @@ static const char* upb_Decoder_DecodeSize(upb_Decoder* d, const char* ptr, uint32_t* size) { uint64_t size64; ptr = _upb_Decoder_DecodeVarint(d, ptr, &size64); - if (size64 >= INT32_MAX || - !upb_EpsCopyInputStream_CheckSize(&d->input, ptr, (int)size64)) { + if (size64 >= INT32_MAX || ptr - d->end + (int)size64 > d->limit) { _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_Malformed); } *size = size64; @@ -10589,6 +10578,15 @@ static upb_Message* _upb_Decoder_NewSubMessage( return msg; } +UPB_NOINLINE +const char* _upb_Decoder_IsDoneFallback(upb_Decoder* d, const char* ptr, + int overrun) { + int status; + ptr = _upb_Decoder_IsDoneFallbackInline(d, ptr, overrun, &status); + if (ptr == NULL) _upb_Decoder_ErrorJmp(d, status); + return ptr; +} + static const char* _upb_Decoder_ReadString(upb_Decoder* d, const char* ptr, int size, upb_StringView* str) { if (d->options & kUpb_DecodeOption_AliasString) { @@ -10624,11 +10622,11 @@ UPB_FORCEINLINE static const char* _upb_Decoder_DecodeSubMessage( upb_Decoder* d, const char* ptr, upb_Message* submsg, const upb_MiniTableSub* subs, const upb_MiniTableField* field, int size) { - int saved_delta = upb_EpsCopyInputStream_PushLimit(&d->input, ptr, size); + int saved_delta = _upb_Decoder_PushLimit(d, ptr, size); const upb_MiniTable* subl = subs[field->submsg_index].submsg; UPB_ASSERT(subl); ptr = _upb_Decoder_RecurseSubMessage(d, ptr, submsg, subl, DECODE_NOGROUP); - upb_EpsCopyInputStream_PopLimit(&d->input, ptr, saved_delta); + _upb_Decoder_PopLimit(d, ptr, saved_delta); return ptr; } @@ -10775,7 +10773,7 @@ static const char* _upb_Decoder_DecodeVarintPacked( upb_Decoder* d, const char* ptr, upb_Array* arr, wireval* val, const upb_MiniTableField* field, int lg2) { int scale = 1 << lg2; - int saved_limit = upb_EpsCopyInputStream_PushLimit(&d->input, ptr, val->size); + int saved_limit = _upb_Decoder_PushLimit(d, ptr, val->size); char* out = UPB_PTR_AT(_upb_array_ptr(arr), arr->size << lg2, void); while (!_upb_Decoder_IsDone(d, &ptr)) { wireval elem; @@ -10788,7 +10786,7 @@ static const char* _upb_Decoder_DecodeVarintPacked( memcpy(out, &elem, scale); out += scale; } - upb_EpsCopyInputStream_PopLimit(&d->input, ptr, saved_limit); + _upb_Decoder_PopLimit(d, ptr, saved_limit); return ptr; } @@ -10798,7 +10796,7 @@ static const char* _upb_Decoder_DecodeEnumPacked( const upb_MiniTableSub* subs, const upb_MiniTableField* field, wireval* val) { const upb_MiniTableEnum* e = subs[field->submsg_index].subenum; - int saved_limit = upb_EpsCopyInputStream_PushLimit(&d->input, ptr, val->size); + int saved_limit = _upb_Decoder_PushLimit(d, ptr, val->size); char* out = UPB_PTR_AT(_upb_array_ptr(arr), arr->size * 4, void); while (!_upb_Decoder_IsDone(d, &ptr)) { wireval elem; @@ -10814,7 +10812,7 @@ static const char* _upb_Decoder_DecodeEnumPacked( memcpy(out, &elem, 4); out += 4; } - upb_EpsCopyInputStream_PopLimit(&d->input, ptr, saved_limit); + _upb_Decoder_PopLimit(d, ptr, saved_limit); return ptr; } @@ -11562,7 +11560,7 @@ static const char* _upb_Decoder_DecodeMessage(upb_Decoder* d, const char* ptr, d->debug_tagstart = ptr; #endif - UPB_ASSERT(ptr < d->input.limit_ptr); + UPB_ASSERT(ptr < d->limit_ptr); ptr = _upb_Decoder_DecodeTag(d, ptr, &tag); field_number = tag >> 3; wire_type = tag & 7; @@ -11620,13 +11618,6 @@ static upb_DecodeStatus _upb_Decoder_DecodeTop(struct upb_Decoder* d, return kUpb_DecodeStatus_Ok; } -UPB_NOINLINE -const char* _upb_Decoder_IsDoneFallback(upb_EpsCopyInputStream* e, - const char* ptr, int overrun) { - return _upb_EpsCopyInputStream_IsDoneFallbackInline( - e, ptr, overrun, _upb_Decoder_BufferFlipCallback); -} - upb_DecodeStatus upb_Decode(const char* buf, size_t size, void* msg, const upb_MiniTable* l, const upb_ExtensionRegistry* extreg, int options, @@ -11634,11 +11625,20 @@ upb_DecodeStatus upb_Decode(const char* buf, size_t size, void* msg, upb_Decoder state; unsigned depth = (unsigned)options >> 16; - if (upb_EpsCopyInputStream_Init(&state.input, &buf, size)) { + if (size <= 16) { + memset(&state.patch, 0, 32); + if (size) memcpy(&state.patch, buf, size); + buf = state.patch; + state.end = buf + size; + state.limit = 0; options &= ~kUpb_DecodeOption_AliasString; // Can't alias patch buf. + } else { + state.end = buf + size - 16; + state.limit = 16; } state.extreg = extreg; + state.limit_ptr = state.end; state.unknown = NULL; state.depth = depth ? depth : 64; state.end_group = DECODE_NOGROUP; @@ -11703,27 +11703,28 @@ typedef enum { UPB_NOINLINE static const char* fastdecode_isdonefallback(UPB_PARSE_PARAMS) { int overrun = data; - ptr = _upb_EpsCopyInputStream_IsDoneFallbackInline( - &d->input, ptr, overrun, _upb_Decoder_BufferFlipCallback); + int status; + ptr = _upb_Decoder_IsDoneFallbackInline(d, ptr, overrun, &status); + if (ptr == NULL) _upb_FastDecoder_ErrorJmp(d, status); data = _upb_FastDecoder_LoadTag(ptr); UPB_MUSTTAIL return _upb_FastDecoder_TagDispatch(UPB_PARSE_ARGS); } UPB_FORCEINLINE static const char* fastdecode_dispatch(UPB_PARSE_PARAMS) { - int overrun; - switch (upb_EpsCopyInputStream_IsDoneStatus(&d->input, ptr, &overrun)) { - case kUpb_IsDoneStatus_Done: + if (UPB_UNLIKELY(ptr >= d->limit_ptr)) { + int overrun = ptr - d->end; + if (UPB_LIKELY(overrun == d->limit)) { + // Parse is finished. *(uint32_t*)msg |= hasbits; // Sync hasbits. const upb_MiniTable* l = decode_totablep(table); return UPB_UNLIKELY(l->required_count) ? _upb_Decoder_CheckRequired(d, ptr, msg, l) : ptr; - case kUpb_IsDoneStatus_NotDone: - break; - case kUpb_IsDoneStatus_NeedFallback: + } else { data = overrun; UPB_MUSTTAIL return fastdecode_isdonefallback(UPB_PARSE_ARGS); + } } // Read two bytes of tag data (for a one-byte tag, the high byte is junk). @@ -11761,17 +11762,37 @@ static const char* fastdecode_longsize(const char* ptr, int* size) { } UPB_FORCEINLINE -static const char* fastdecode_delimited( - upb_Decoder* d, const char* ptr, - upb_EpsCopyInputStream_ParseDelimitedFunc* func, void* ctx) { - ptr++; +static bool fastdecode_boundscheck(const char* ptr, size_t len, + const char* end) { + uintptr_t uptr = (uintptr_t)ptr; + uintptr_t uend = (uintptr_t)end + 16; + uintptr_t res = uptr + len; + return res < uptr || res > uend; +} - // Sign-extend so varint greater than one byte becomes negative, causing - // fast delimited parse to fail. - int len = (int8_t)ptr[-1]; +UPB_FORCEINLINE +static bool fastdecode_boundscheck2(const char* ptr, size_t len, + const char* end) { + // This is one extra branch compared to the more normal: + // return (size_t)(end - ptr) < size; + // However it is one less computation if we are just about to use "ptr + len": + // https://godbolt.org/z/35YGPz + // In microbenchmarks this shows an overall 4% improvement. + uintptr_t uptr = (uintptr_t)ptr; + uintptr_t uend = (uintptr_t)end; + uintptr_t res = uptr + len; + return res < uptr || res > uend; +} + +typedef const char* fastdecode_delimfunc(upb_Decoder* d, const char* ptr, + void* ctx); - if (!upb_EpsCopyInputStream_TryParseDelimitedFast(&d->input, &ptr, len, func, - ctx)) { +UPB_FORCEINLINE +static const char* fastdecode_delimited(upb_Decoder* d, const char* ptr, + fastdecode_delimfunc* func, void* ctx) { + ptr++; + int len = (int8_t)ptr[-1]; + if (fastdecode_boundscheck2(ptr, len, d->limit_ptr)) { // Slow case: Sub-message is >=128 bytes and/or exceeds the current buffer. // If it exceeds the buffer limit, limit/limit_ptr will change during // sub-message parsing, so we need to preserve delta, not limit. @@ -11783,13 +11804,25 @@ static const char* fastdecode_delimited( return NULL; } } - if (!upb_EpsCopyInputStream_CheckSize(&d->input, ptr, len)) { + if (ptr - d->end + (int)len > d->limit) { // Corrupt wire format: invalid limit. return NULL; } - int delta = upb_EpsCopyInputStream_PushLimit(&d->input, ptr, len); - ptr = func(&d->input, ptr, ctx); - upb_EpsCopyInputStream_PopLimit(&d->input, ptr, delta); + int delta = _upb_Decoder_PushLimit(d, ptr, len); + ptr = func(d, ptr, ctx); + _upb_Decoder_PopLimit(d, ptr, delta); + } else { + // Fast case: Sub-message is <128 bytes and fits in the current buffer. + // This means we can preserve limit/limit_ptr verbatim. + const char* saved_limit_ptr = d->limit_ptr; + int saved_limit = d->limit; + d->limit_ptr = ptr + len; + d->limit = d->limit_ptr - d->end; + UPB_ASSERT(d->limit_ptr == d->end + UPB_MIN(0, d->limit)); + ptr = func(d, ptr, ctx); + d->limit_ptr = saved_limit_ptr; + d->limit = saved_limit; + UPB_ASSERT(d->limit_ptr == d->end + UPB_MIN(0, d->limit)); } return ptr; } @@ -12030,9 +12063,8 @@ typedef struct { } fastdecode_varintdata; UPB_FORCEINLINE -static const char* fastdecode_topackedvarint(upb_EpsCopyInputStream* e, - const char* ptr, void* ctx) { - upb_Decoder* d = (upb_Decoder*)e; +static const char* fastdecode_topackedvarint(upb_Decoder* d, const char* ptr, + void* ctx) { fastdecode_varintdata* data = ctx; void* dst = data->dst; uint64_t val; @@ -12180,8 +12212,7 @@ TAGBYTES(p) ptr = fastdecode_longsize(ptr, &size); \ } \ \ - if (UPB_UNLIKELY(!upb_EpsCopyInputStream_CheckDataSizeAvailable( \ - &d->input, ptr, size) || \ + if (UPB_UNLIKELY(fastdecode_boundscheck(ptr, size, d->limit_ptr) || \ (size % valbytes) != 0)) { \ _upb_FastDecoder_ErrorJmp(d, kUpb_DecodeStatus_Malformed); \ } \ @@ -12273,8 +12304,7 @@ static const char* fastdecode_verifyutf8(upb_Decoder* d, const char* ptr, ptr = fastdecode_longsize(ptr, &size); \ } \ \ - if (UPB_UNLIKELY(!upb_EpsCopyInputStream_CheckDataSizeAvailable( \ - &d->input, ptr, size))) { \ + if (UPB_UNLIKELY(fastdecode_boundscheck(ptr, size, d->limit_ptr))) { \ dst->size = 0; \ _upb_FastDecoder_ErrorJmp(d, kUpb_DecodeStatus_Malformed); \ } \ @@ -12327,92 +12357,91 @@ static void fastdecode_docopy(upb_Decoder* d, const char* ptr, uint32_t size, UPB_POISON_MEMORY_REGION(data + size, copy - size); } -#define FASTDECODE_COPYSTRING(d, ptr, msg, table, hasbits, data, tagbytes, \ - card, validate_utf8) \ - upb_StringView* dst; \ - fastdecode_arr farr; \ - int64_t size; \ - size_t arena_has; \ - size_t common_has; \ - char* buf; \ - \ - UPB_ASSERT((d->options & kUpb_DecodeOption_AliasString) == 0); \ - UPB_ASSERT(fastdecode_checktag(data, tagbytes)); \ - \ - dst = fastdecode_getfield(d, ptr, msg, &data, &hasbits, &farr, \ - sizeof(upb_StringView), card); \ - \ - again: \ - if (card == CARD_r) { \ - dst = fastdecode_resizearr(d, dst, &farr, sizeof(upb_StringView)); \ - } \ - \ - size = (uint8_t)ptr[tagbytes]; \ - ptr += tagbytes + 1; \ - dst->size = size; \ - \ - buf = d->arena.head.ptr; \ - arena_has = _upb_ArenaHas(&d->arena); \ - common_has = UPB_MIN(arena_has, \ - upb_EpsCopyInputStream_BytesAvailable(&d->input, ptr)); \ - \ - if (UPB_LIKELY(size <= 15 - tagbytes)) { \ - if (arena_has < 16) goto longstr; \ - d->arena.head.ptr += 16; \ - memcpy(buf, ptr - tagbytes - 1, 16); \ - dst->data = buf + tagbytes + 1; \ - } else if (UPB_LIKELY(size <= 32)) { \ - if (UPB_UNLIKELY(common_has < 32)) goto longstr; \ - fastdecode_docopy(d, ptr, size, 32, buf, dst); \ - } else if (UPB_LIKELY(size <= 64)) { \ - if (UPB_UNLIKELY(common_has < 64)) goto longstr; \ - fastdecode_docopy(d, ptr, size, 64, buf, dst); \ - } else if (UPB_LIKELY(size < 128)) { \ - if (UPB_UNLIKELY(common_has < 128)) goto longstr; \ - fastdecode_docopy(d, ptr, size, 128, buf, dst); \ - } else { \ - goto longstr; \ - } \ - \ - ptr += size; \ - \ - if (card == CARD_r) { \ - if (validate_utf8 && \ - !_upb_Decoder_VerifyUtf8Inline(dst->data, dst->size)) { \ - _upb_FastDecoder_ErrorJmp(d, kUpb_DecodeStatus_BadUtf8); \ - } \ - fastdecode_nextret ret = fastdecode_nextrepeated( \ - d, dst, &ptr, &farr, data, tagbytes, sizeof(upb_StringView)); \ - switch (ret.next) { \ - case FD_NEXT_SAMEFIELD: \ - dst = ret.dst; \ - goto again; \ - case FD_NEXT_OTHERFIELD: \ - data = ret.tag; \ - UPB_MUSTTAIL return _upb_FastDecoder_TagDispatch(UPB_PARSE_ARGS); \ - case FD_NEXT_ATLIMIT: \ - return ptr; \ - } \ - } \ - \ - if (card != CARD_r && validate_utf8) { \ - data = (uint64_t)dst; \ - UPB_MUSTTAIL return fastdecode_verifyutf8(UPB_PARSE_ARGS); \ - } \ - \ - UPB_MUSTTAIL return fastdecode_dispatch(UPB_PARSE_ARGS); \ - \ - longstr: \ - if (card == CARD_r) { \ - fastdecode_commitarr(dst + 1, &farr, sizeof(upb_StringView)); \ - } \ - ptr--; \ - if (validate_utf8) { \ - UPB_MUSTTAIL return fastdecode_longstring_utf8(d, ptr, msg, table, \ - hasbits, (uint64_t)dst); \ - } else { \ - UPB_MUSTTAIL return fastdecode_longstring_noutf8(d, ptr, msg, table, \ - hasbits, (uint64_t)dst); \ +#define FASTDECODE_COPYSTRING(d, ptr, msg, table, hasbits, data, tagbytes, \ + card, validate_utf8) \ + upb_StringView* dst; \ + fastdecode_arr farr; \ + int64_t size; \ + size_t arena_has; \ + size_t common_has; \ + char* buf; \ + \ + UPB_ASSERT((d->options & kUpb_DecodeOption_AliasString) == 0); \ + UPB_ASSERT(fastdecode_checktag(data, tagbytes)); \ + \ + dst = fastdecode_getfield(d, ptr, msg, &data, &hasbits, &farr, \ + sizeof(upb_StringView), card); \ + \ + again: \ + if (card == CARD_r) { \ + dst = fastdecode_resizearr(d, dst, &farr, sizeof(upb_StringView)); \ + } \ + \ + size = (uint8_t)ptr[tagbytes]; \ + ptr += tagbytes + 1; \ + dst->size = size; \ + \ + buf = d->arena.head.ptr; \ + arena_has = _upb_ArenaHas(&d->arena); \ + common_has = UPB_MIN(arena_has, (d->end - ptr) + 16); \ + \ + if (UPB_LIKELY(size <= 15 - tagbytes)) { \ + if (arena_has < 16) goto longstr; \ + d->arena.head.ptr += 16; \ + memcpy(buf, ptr - tagbytes - 1, 16); \ + dst->data = buf + tagbytes + 1; \ + } else if (UPB_LIKELY(size <= 32)) { \ + if (UPB_UNLIKELY(common_has < 32)) goto longstr; \ + fastdecode_docopy(d, ptr, size, 32, buf, dst); \ + } else if (UPB_LIKELY(size <= 64)) { \ + if (UPB_UNLIKELY(common_has < 64)) goto longstr; \ + fastdecode_docopy(d, ptr, size, 64, buf, dst); \ + } else if (UPB_LIKELY(size < 128)) { \ + if (UPB_UNLIKELY(common_has < 128)) goto longstr; \ + fastdecode_docopy(d, ptr, size, 128, buf, dst); \ + } else { \ + goto longstr; \ + } \ + \ + ptr += size; \ + \ + if (card == CARD_r) { \ + if (validate_utf8 && \ + !_upb_Decoder_VerifyUtf8Inline(dst->data, dst->size)) { \ + _upb_FastDecoder_ErrorJmp(d, kUpb_DecodeStatus_BadUtf8); \ + } \ + fastdecode_nextret ret = fastdecode_nextrepeated( \ + d, dst, &ptr, &farr, data, tagbytes, sizeof(upb_StringView)); \ + switch (ret.next) { \ + case FD_NEXT_SAMEFIELD: \ + dst = ret.dst; \ + goto again; \ + case FD_NEXT_OTHERFIELD: \ + data = ret.tag; \ + UPB_MUSTTAIL return _upb_FastDecoder_TagDispatch(UPB_PARSE_ARGS); \ + case FD_NEXT_ATLIMIT: \ + return ptr; \ + } \ + } \ + \ + if (card != CARD_r && validate_utf8) { \ + data = (uint64_t)dst; \ + UPB_MUSTTAIL return fastdecode_verifyutf8(UPB_PARSE_ARGS); \ + } \ + \ + UPB_MUSTTAIL return fastdecode_dispatch(UPB_PARSE_ARGS); \ + \ + longstr: \ + if (card == CARD_r) { \ + fastdecode_commitarr(dst + 1, &farr, sizeof(upb_StringView)); \ + } \ + ptr--; \ + if (validate_utf8) { \ + UPB_MUSTTAIL return fastdecode_longstring_utf8(d, ptr, msg, table, \ + hasbits, (uint64_t)dst); \ + } else { \ + UPB_MUSTTAIL return fastdecode_longstring_noutf8(d, ptr, msg, table, \ + hasbits, (uint64_t)dst); \ } #define FASTDECODE_STRING(d, ptr, msg, table, hasbits, data, tagbytes, card, \ @@ -12442,8 +12471,7 @@ static void fastdecode_docopy(upb_Decoder* d, const char* ptr, uint32_t size, dst->data = ptr; \ dst->size = size; \ \ - if (UPB_UNLIKELY(!upb_EpsCopyInputStream_CheckDataSizeAvailable( \ - &d->input, ptr, size))) { \ + if (UPB_UNLIKELY(fastdecode_boundscheck(ptr, size, d->end))) { \ ptr--; \ if (validate_utf8) { \ return fastdecode_longstring_utf8(d, ptr, msg, table, hasbits, \ @@ -12556,9 +12584,8 @@ typedef struct { } fastdecode_submsgdata; UPB_FORCEINLINE -static const char* fastdecode_tosubmsg(upb_EpsCopyInputStream* e, - const char* ptr, void* ctx) { - upb_Decoder* d = (upb_Decoder*)e; +static const char* fastdecode_tosubmsg(upb_Decoder* d, const char* ptr, + void* ctx) { fastdecode_submsgdata* submsg = ctx; ptr = fastdecode_dispatch(d, ptr, submsg->msg, submsg->table, 0, 0); UPB_ASSUME(ptr != NULL); diff --git a/ruby/ext/google/protobuf_c/ruby-upb.h b/ruby/ext/google/protobuf_c/ruby-upb.h index a05f7cdd962a2..d5300c6b9212e 100755 --- a/ruby/ext/google/protobuf_c/ruby-upb.h +++ b/ruby/ext/google/protobuf_c/ruby-upb.h @@ -148,12 +148,6 @@ #if defined(__GNUC__) || defined(__clang__) #define UPB_UNREACHABLE() do { assert(0); __builtin_unreachable(); } while(0) -#elif defined(_MSC_VER) -#define UPB_UNREACHABLE() \ - do { \ - assert(0); \ - __assume(0); \ - } while (0) #else #define UPB_UNREACHABLE() do { assert(0); } while(0) #endif @@ -1659,8 +1653,7 @@ extern "C" { #endif // Creates a new message with the given mini_table on the given arena. -UPB_API upb_Message* upb_Message_New(const upb_MiniTable* mini_table, - upb_Arena* arena); +upb_Message* upb_Message_New(const upb_MiniTable* mini_table, upb_Arena* arena); // Adds unknown data (serialized protobuf data) to the given message. // The data is copied into the message instance. @@ -1902,6 +1895,8 @@ const upb_Message_Extension* _upb_Message_Getexts(const upb_Message* msg, const upb_Message_Extension* _upb_Message_Getext( const upb_Message* msg, const upb_MiniTableExtension* ext); +void _upb_Message_Clearext(upb_Message* msg, const upb_MiniTableExtension* ext); + #ifdef __cplusplus } /* extern "C" */ #endif @@ -1957,7 +1952,7 @@ typedef struct upb_ExtensionRegistry upb_ExtensionRegistry; // Creates a upb_ExtensionRegistry in the given arena. // The arena must outlive any use of the extreg. -UPB_API upb_ExtensionRegistry* upb_ExtensionRegistry_New(upb_Arena* arena); +upb_ExtensionRegistry* upb_ExtensionRegistry_New(upb_Arena* arena); // Adds the given extension info for the array |e| of size |count| into the // registry. If there are any errors, the entire array is backed out. @@ -2331,8 +2326,8 @@ UPB_INLINE const void* _upb_MiniTableField_GetConstPtr( return (char*)msg + field->offset; } -UPB_INLINE void _upb_Message_SetPresence(upb_Message* msg, - const upb_MiniTableField* field) { +UPB_INLINE void _upb_MiniTable_SetPresence(upb_Message* msg, + const upb_MiniTableField* field) { if (field->presence > 0) { _upb_sethas_field(msg, field); } else if (_upb_MiniTableField_InOneOf(field)) { @@ -2340,6 +2335,9 @@ UPB_INLINE void _upb_Message_SetPresence(upb_Message* msg, } } +UPB_INLINE bool upb_MiniTable_HasField(const upb_Message* msg, + const upb_MiniTableField* field); + UPB_INLINE bool _upb_MiniTable_ValueIsNonZero(const void* default_val, const upb_MiniTableField* field) { char zero[16] = {0}; @@ -2388,52 +2386,31 @@ UPB_INLINE void _upb_MiniTable_CopyFieldData(void* to, const void* from, // bool FooMessage_set_bool_field(const upb_Message* msg, bool val) { // const upb_MiniTableField field = {1, 0, 0, /* etc... */}; // // All value in "field" are compile-time known. -// _upb_Message_SetNonExtensionField(msg, &field, &value); +// _upb_MiniTable_SetNonExtensionField(msg, &field, &value); // } // // // Via UPB_ASSUME(). -// UPB_INLINE bool upb_Message_SetBool(upb_Message* msg, -// const upb_MiniTableField* field, -// bool value, upb_Arena* a) { +// UPB_INLINE void upb_MiniTable_SetBool(upb_Message* msg, +// const upb_MiniTableField* field, +// bool value) { // UPB_ASSUME(field->descriptortype == kUpb_FieldType_Bool); // UPB_ASSUME(!upb_IsRepeatedOrMap(field)); // UPB_ASSUME(_upb_MiniTableField_GetRep(field) == kUpb_FieldRep_1Byte); -// _upb_Message_SetField(msg, field, &value, a); +// _upb_MiniTable_SetNonExtensionField(msg, field, &value); // } // // As a result, we can use these universal getters/setters for *all* message // accessors: generated code, MiniTable accessors, and reflection. The only // exception is the binary encoder/decoder, which need to be a bit more clever // about how the read/write the message data, for efficiency. -// -// These functions work on both extensions and non-extensions. If the field -// of a setter is known to be a non-extension, the arena may be NULL and the -// returned bool value may be ignored since it will always succeed. - -UPB_INLINE bool _upb_Message_HasExtensionField( - const upb_Message* msg, const upb_MiniTableExtension* ext) { - UPB_ASSERT(upb_MiniTableField_HasPresence(&ext->field)); - return _upb_Message_Getext(msg, ext) != NULL; -} -UPB_INLINE bool _upb_Message_HasNonExtensionField( - const upb_Message* msg, const upb_MiniTableField* field) { - UPB_ASSERT(upb_MiniTableField_HasPresence(field)); - UPB_ASSUME(!upb_MiniTableField_IsExtension(field)); - if (_upb_MiniTableField_InOneOf(field)) { - return _upb_getoneofcase_field(msg, field) == field->number; - } else { - return _upb_hasbit_field(msg, field); - } -} - -static UPB_FORCEINLINE void _upb_Message_GetNonExtensionField( +static UPB_FORCEINLINE void _upb_MiniTable_GetNonExtensionField( const upb_Message* msg, const upb_MiniTableField* field, const void* default_val, void* val) { UPB_ASSUME(!upb_MiniTableField_IsExtension(field)); if ((_upb_MiniTableField_InOneOf(field) || _upb_MiniTable_ValueIsNonZero(default_val, field)) && - !_upb_Message_HasNonExtensionField(msg, field)) { + !upb_MiniTable_HasField(msg, field)) { _upb_MiniTable_CopyFieldData(val, default_val, field); return; } @@ -2441,7 +2418,7 @@ static UPB_FORCEINLINE void _upb_Message_GetNonExtensionField( field); } -UPB_INLINE void _upb_Message_GetExtensionField( +UPB_INLINE void _upb_MiniTable_GetExtensionField( const upb_Message* msg, const upb_MiniTableExtension* mt_ext, const void* default_val, void* val) { UPB_ASSUME(upb_MiniTableField_IsExtension(&mt_ext->field)); @@ -2453,29 +2430,28 @@ UPB_INLINE void _upb_Message_GetExtensionField( } } -UPB_INLINE void _upb_Message_GetField(const upb_Message* msg, - const upb_MiniTableField* field, - const void* default_val, void* val) { +UPB_INLINE void _upb_MiniTable_GetField(const upb_Message* msg, + const upb_MiniTableField* field, + const void* default_val, void* val) { if (upb_MiniTableField_IsExtension(field)) { - _upb_Message_GetExtensionField(msg, (upb_MiniTableExtension*)field, - default_val, val); + _upb_MiniTable_GetExtensionField(msg, (upb_MiniTableExtension*)field, + default_val, val); } else { - _upb_Message_GetNonExtensionField(msg, field, default_val, val); + _upb_MiniTable_GetNonExtensionField(msg, field, default_val, val); } } -UPB_INLINE void _upb_Message_SetNonExtensionField( +UPB_INLINE void _upb_MiniTable_SetNonExtensionField( upb_Message* msg, const upb_MiniTableField* field, const void* val) { UPB_ASSUME(!upb_MiniTableField_IsExtension(field)); - _upb_Message_SetPresence(msg, field); + _upb_MiniTable_SetPresence(msg, field); _upb_MiniTable_CopyFieldData(_upb_MiniTableField_GetPtr(msg, field), val, field); } -UPB_INLINE bool _upb_Message_SetExtensionField( +UPB_INLINE bool _upb_MiniTable_SetExtensionField( upb_Message* msg, const upb_MiniTableExtension* mt_ext, const void* val, upb_Arena* a) { - UPB_ASSERT(a); upb_Message_Extension* ext = _upb_Message_GetOrCreateExtension(msg, mt_ext, a); if (!ext) return false; @@ -2483,33 +2459,51 @@ UPB_INLINE bool _upb_Message_SetExtensionField( return true; } -UPB_INLINE bool _upb_Message_SetField(upb_Message* msg, - const upb_MiniTableField* field, - const void* val, upb_Arena* a) { +UPB_INLINE bool _upb_MiniTable_SetField(upb_Message* msg, + const upb_MiniTableField* field, + const void* val, upb_Arena* a) { if (upb_MiniTableField_IsExtension(field)) { - const upb_MiniTableExtension* ext = (const upb_MiniTableExtension*)field; - return _upb_Message_SetExtensionField(msg, ext, val, a); + return _upb_MiniTable_SetExtensionField( + msg, (const upb_MiniTableExtension*)field, val, a); } else { - _upb_Message_SetNonExtensionField(msg, field, val); + _upb_MiniTable_SetNonExtensionField(msg, field, val); return true; } } -UPB_INLINE void _upb_Message_ClearExtensionField( - upb_Message* msg, const upb_MiniTableExtension* ext_l) { - upb_Message_Internal* in = upb_Message_Getinternal(msg); - if (!in->internal) return; - const upb_Message_Extension* base = - UPB_PTR_AT(in->internal, in->internal->ext_begin, upb_Message_Extension); - upb_Message_Extension* ext = - (upb_Message_Extension*)_upb_Message_Getext(msg, ext_l); - if (ext) { - *ext = *base; - in->internal->ext_begin += sizeof(upb_Message_Extension); +UPB_INLINE bool _upb_MiniTable_HasExtensionField( + const upb_Message* msg, const upb_MiniTableExtension* ext) { + UPB_ASSERT(upb_MiniTableField_HasPresence(&ext->field)); + return _upb_Message_Getext(msg, ext) != NULL; +} + +UPB_INLINE bool _upb_MiniTable_HasNonExtensionField( + const upb_Message* msg, const upb_MiniTableField* field) { + UPB_ASSERT(upb_MiniTableField_HasPresence(field)); + UPB_ASSUME(!upb_MiniTableField_IsExtension(field)); + if (_upb_MiniTableField_InOneOf(field)) { + return _upb_getoneofcase_field(msg, field) == field->number; + } else { + return _upb_hasbit_field(msg, field); } } -UPB_INLINE void _upb_Message_ClearNonExtensionField( +UPB_INLINE bool _upb_MiniTable_HasField(const upb_Message* msg, + const upb_MiniTableField* field) { + if (upb_MiniTableField_IsExtension(field)) { + return _upb_MiniTable_HasExtensionField( + msg, (const upb_MiniTableExtension*)field); + } else { + return _upb_MiniTable_HasNonExtensionField(msg, field); + } +} + +UPB_INLINE void _upb_MiniTable_ClearExtensionField( + upb_Message* msg, const upb_MiniTableExtension* ext) { + _upb_Message_Clearext(msg, ext); +} + +UPB_INLINE void _upb_MiniTable_ClearNonExtensionField( upb_Message* msg, const upb_MiniTableField* field) { if (field->presence > 0) { _upb_clearhas_field(msg, field); @@ -2523,51 +2517,50 @@ UPB_INLINE void _upb_Message_ClearNonExtensionField( field); } -// EVERYTHING ABOVE THIS LINE IS INTERNAL - DO NOT USE ///////////////////////// - -UPB_API_INLINE void upb_Message_ClearField(upb_Message* msg, - const upb_MiniTableField* field) { +UPB_INLINE void _upb_MiniTable_ClearField(upb_Message* msg, + const upb_MiniTableField* field) { if (upb_MiniTableField_IsExtension(field)) { - const upb_MiniTableExtension* ext = (const upb_MiniTableExtension*)field; - _upb_Message_ClearExtensionField(msg, ext); + _upb_Message_Clearext(msg, (const upb_MiniTableExtension*)field); } else { - _upb_Message_ClearNonExtensionField(msg, field); + _upb_MiniTable_ClearNonExtensionField(msg, field); } } -UPB_API_INLINE bool upb_Message_HasField(const upb_Message* msg, - const upb_MiniTableField* field) { - if (upb_MiniTableField_IsExtension(field)) { - const upb_MiniTableExtension* ext = (const upb_MiniTableExtension*)field; - return _upb_Message_HasExtensionField(msg, ext); - } else { - return _upb_Message_HasNonExtensionField(msg, field); - } +// EVERYTHING ABOVE THIS LINE IS INTERNAL - DO NOT USE ///////////////////////// + +UPB_API_INLINE void upb_MiniTable_ClearField(upb_Message* msg, + const upb_MiniTableField* field) { + _upb_MiniTable_ClearNonExtensionField(msg, field); } -UPB_API_INLINE bool upb_Message_GetBool(const upb_Message* msg, - const upb_MiniTableField* field, - bool default_val) { +UPB_API_INLINE bool upb_MiniTable_HasField(const upb_Message* msg, + const upb_MiniTableField* field) { + return _upb_MiniTable_HasNonExtensionField(msg, field); +} + +UPB_API_INLINE bool upb_MiniTable_GetBool(const upb_Message* msg, + const upb_MiniTableField* field, + bool default_val) { UPB_ASSUME(field->descriptortype == kUpb_FieldType_Bool); UPB_ASSUME(!upb_IsRepeatedOrMap(field)); UPB_ASSUME(_upb_MiniTableField_GetRep(field) == kUpb_FieldRep_1Byte); bool ret; - _upb_Message_GetField(msg, field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, field, &default_val, &ret); return ret; } -UPB_API_INLINE bool upb_Message_SetBool(upb_Message* msg, - const upb_MiniTableField* field, - bool value, upb_Arena* a) { +UPB_API_INLINE void upb_MiniTable_SetBool(upb_Message* msg, + const upb_MiniTableField* field, + bool value) { UPB_ASSUME(field->descriptortype == kUpb_FieldType_Bool); UPB_ASSUME(!upb_IsRepeatedOrMap(field)); UPB_ASSUME(_upb_MiniTableField_GetRep(field) == kUpb_FieldRep_1Byte); - return _upb_Message_SetField(msg, field, &value, a); + _upb_MiniTable_SetNonExtensionField(msg, field, &value); } -UPB_API_INLINE int32_t upb_Message_GetInt32(const upb_Message* msg, - const upb_MiniTableField* field, - int32_t default_val) { +UPB_API_INLINE int32_t upb_MiniTable_GetInt32(const upb_Message* msg, + const upb_MiniTableField* field, + int32_t default_val) { UPB_ASSUME(field->descriptortype == kUpb_FieldType_Int32 || field->descriptortype == kUpb_FieldType_SInt32 || field->descriptortype == kUpb_FieldType_SFixed32 || @@ -2575,41 +2568,41 @@ UPB_API_INLINE int32_t upb_Message_GetInt32(const upb_Message* msg, UPB_ASSUME(!upb_IsRepeatedOrMap(field)); UPB_ASSUME(_upb_MiniTableField_GetRep(field) == kUpb_FieldRep_4Byte); int32_t ret; - _upb_Message_GetField(msg, field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, field, &default_val, &ret); return ret; } -UPB_API_INLINE bool upb_Message_SetInt32(upb_Message* msg, - const upb_MiniTableField* field, - int32_t value, upb_Arena* a) { +UPB_API_INLINE void upb_MiniTable_SetInt32(upb_Message* msg, + const upb_MiniTableField* field, + int32_t value) { UPB_ASSUME(field->descriptortype == kUpb_FieldType_Int32 || field->descriptortype == kUpb_FieldType_SInt32 || field->descriptortype == kUpb_FieldType_SFixed32); UPB_ASSUME(!upb_IsRepeatedOrMap(field)); UPB_ASSUME(_upb_MiniTableField_GetRep(field) == kUpb_FieldRep_4Byte); - return _upb_Message_SetField(msg, field, &value, a); + _upb_MiniTable_SetNonExtensionField(msg, field, &value); } -UPB_API_INLINE uint32_t upb_Message_GetUInt32(const upb_Message* msg, - const upb_MiniTableField* field, - uint32_t default_val) { +UPB_API_INLINE uint32_t upb_MiniTable_GetUInt32(const upb_Message* msg, + const upb_MiniTableField* field, + uint32_t default_val) { UPB_ASSUME(field->descriptortype == kUpb_FieldType_UInt32 || field->descriptortype == kUpb_FieldType_Fixed32); UPB_ASSUME(!upb_IsRepeatedOrMap(field)); UPB_ASSUME(_upb_MiniTableField_GetRep(field) == kUpb_FieldRep_4Byte); uint32_t ret; - _upb_Message_GetField(msg, field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, field, &default_val, &ret); return ret; } -UPB_API_INLINE bool upb_Message_SetUInt32(upb_Message* msg, - const upb_MiniTableField* field, - uint32_t value, upb_Arena* a) { +UPB_API_INLINE void upb_MiniTable_SetUInt32(upb_Message* msg, + const upb_MiniTableField* field, + uint32_t value) { UPB_ASSUME(field->descriptortype == kUpb_FieldType_UInt32 || field->descriptortype == kUpb_FieldType_Fixed32); UPB_ASSUME(!upb_IsRepeatedOrMap(field)); UPB_ASSUME(_upb_MiniTableField_GetRep(field) == kUpb_FieldRep_4Byte); - return _upb_Message_SetField(msg, field, &value, a); + _upb_MiniTable_SetNonExtensionField(msg, field, &value); } UPB_API_INLINE void upb_MiniTable_SetEnumProto2( @@ -2620,115 +2613,115 @@ UPB_API_INLINE void upb_MiniTable_SetEnumProto2( UPB_ASSUME(_upb_MiniTableField_GetRep(field) == kUpb_FieldRep_4Byte); UPB_ASSERT(upb_MiniTableEnum_CheckValue( upb_MiniTable_GetSubEnumTable(msg_mini_table, field), value)); - _upb_Message_SetNonExtensionField(msg, field, &value); + _upb_MiniTable_SetNonExtensionField(msg, field, &value); } -UPB_API_INLINE int64_t upb_Message_GetInt64(const upb_Message* msg, - const upb_MiniTableField* field, - uint64_t default_val) { +UPB_API_INLINE int64_t upb_MiniTable_GetInt64(const upb_Message* msg, + const upb_MiniTableField* field, + uint64_t default_val) { UPB_ASSERT(field->descriptortype == kUpb_FieldType_Int64 || field->descriptortype == kUpb_FieldType_SInt64 || field->descriptortype == kUpb_FieldType_SFixed64); UPB_ASSUME(!upb_IsRepeatedOrMap(field)); UPB_ASSUME(_upb_MiniTableField_GetRep(field) == kUpb_FieldRep_8Byte); int64_t ret; - _upb_Message_GetField(msg, field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, field, &default_val, &ret); return ret; } -UPB_API_INLINE bool upb_Message_SetInt64(upb_Message* msg, - const upb_MiniTableField* field, - int64_t value, upb_Arena* a) { +UPB_API_INLINE void upb_MiniTable_SetInt64(upb_Message* msg, + const upb_MiniTableField* field, + int64_t value) { UPB_ASSERT(field->descriptortype == kUpb_FieldType_Int64 || field->descriptortype == kUpb_FieldType_SInt64 || field->descriptortype == kUpb_FieldType_SFixed64); UPB_ASSUME(!upb_IsRepeatedOrMap(field)); UPB_ASSUME(_upb_MiniTableField_GetRep(field) == kUpb_FieldRep_8Byte); - return _upb_Message_SetField(msg, field, &value, a); + _upb_MiniTable_SetNonExtensionField(msg, field, &value); } -UPB_API_INLINE uint64_t upb_Message_GetUInt64(const upb_Message* msg, - const upb_MiniTableField* field, - uint64_t default_val) { +UPB_API_INLINE uint64_t upb_MiniTable_GetUInt64(const upb_Message* msg, + const upb_MiniTableField* field, + uint64_t default_val) { UPB_ASSERT(field->descriptortype == kUpb_FieldType_UInt64 || field->descriptortype == kUpb_FieldType_Fixed64); UPB_ASSUME(!upb_IsRepeatedOrMap(field)); UPB_ASSUME(_upb_MiniTableField_GetRep(field) == kUpb_FieldRep_8Byte); uint64_t ret; - _upb_Message_GetField(msg, field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, field, &default_val, &ret); return ret; } -UPB_API_INLINE bool upb_Message_SetUInt64(upb_Message* msg, - const upb_MiniTableField* field, - uint64_t value, upb_Arena* a) { +UPB_API_INLINE void upb_MiniTable_SetUInt64(upb_Message* msg, + const upb_MiniTableField* field, + uint64_t value) { UPB_ASSERT(field->descriptortype == kUpb_FieldType_UInt64 || field->descriptortype == kUpb_FieldType_Fixed64); UPB_ASSUME(!upb_IsRepeatedOrMap(field)); UPB_ASSUME(_upb_MiniTableField_GetRep(field) == kUpb_FieldRep_8Byte); - return _upb_Message_SetField(msg, field, &value, a); + _upb_MiniTable_SetNonExtensionField(msg, field, &value); } -UPB_API_INLINE float upb_Message_GetFloat(const upb_Message* msg, - const upb_MiniTableField* field, - float default_val) { +UPB_API_INLINE float upb_MiniTable_GetFloat(const upb_Message* msg, + const upb_MiniTableField* field, + float default_val) { UPB_ASSERT(field->descriptortype == kUpb_FieldType_Float); UPB_ASSUME(!upb_IsRepeatedOrMap(field)); UPB_ASSUME(_upb_MiniTableField_GetRep(field) == kUpb_FieldRep_4Byte); float ret; - _upb_Message_GetField(msg, field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, field, &default_val, &ret); return ret; } -UPB_API_INLINE bool upb_Message_SetFloat(upb_Message* msg, - const upb_MiniTableField* field, - float value, upb_Arena* a) { +UPB_API_INLINE void upb_MiniTable_SetFloat(upb_Message* msg, + const upb_MiniTableField* field, + float value) { UPB_ASSERT(field->descriptortype == kUpb_FieldType_Float); UPB_ASSUME(!upb_IsRepeatedOrMap(field)); UPB_ASSUME(_upb_MiniTableField_GetRep(field) == kUpb_FieldRep_4Byte); - return _upb_Message_SetField(msg, field, &value, a); + _upb_MiniTable_SetNonExtensionField(msg, field, &value); } -UPB_API_INLINE double upb_Message_GetDouble(const upb_Message* msg, - const upb_MiniTableField* field, - double default_val) { +UPB_API_INLINE double upb_MiniTable_GetDouble(const upb_Message* msg, + const upb_MiniTableField* field, + double default_val) { UPB_ASSERT(field->descriptortype == kUpb_FieldType_Double); UPB_ASSUME(!upb_IsRepeatedOrMap(field)); UPB_ASSUME(_upb_MiniTableField_GetRep(field) == kUpb_FieldRep_8Byte); double ret; - _upb_Message_GetField(msg, field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, field, &default_val, &ret); return ret; } -UPB_API_INLINE bool upb_Message_SetDouble(upb_Message* msg, - const upb_MiniTableField* field, - double value, upb_Arena* a) { +UPB_API_INLINE void upb_MiniTable_SetDouble(upb_Message* msg, + const upb_MiniTableField* field, + double value) { UPB_ASSERT(field->descriptortype == kUpb_FieldType_Double); UPB_ASSUME(!upb_IsRepeatedOrMap(field)); UPB_ASSUME(_upb_MiniTableField_GetRep(field) == kUpb_FieldRep_8Byte); - return _upb_Message_SetField(msg, field, &value, a); + _upb_MiniTable_SetNonExtensionField(msg, field, &value); } UPB_API_INLINE upb_StringView -upb_Message_GetString(const upb_Message* msg, const upb_MiniTableField* field, - upb_StringView def_val) { +upb_MiniTable_GetString(const upb_Message* msg, const upb_MiniTableField* field, + upb_StringView def_val) { UPB_ASSERT(field->descriptortype == kUpb_FieldType_Bytes || field->descriptortype == kUpb_FieldType_String); UPB_ASSUME(!upb_IsRepeatedOrMap(field)); UPB_ASSUME(_upb_MiniTableField_GetRep(field) == kUpb_FieldRep_StringView); upb_StringView ret; - _upb_Message_GetField(msg, field, &def_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, field, &def_val, &ret); return ret; } -UPB_API_INLINE bool upb_Message_SetString(upb_Message* msg, - const upb_MiniTableField* field, - upb_StringView value, upb_Arena* a) { +UPB_API_INLINE void upb_MiniTable_SetString(upb_Message* msg, + const upb_MiniTableField* field, + upb_StringView value) { UPB_ASSERT(field->descriptortype == kUpb_FieldType_Bytes || field->descriptortype == kUpb_FieldType_String); UPB_ASSUME(!upb_IsRepeatedOrMap(field)); UPB_ASSUME(_upb_MiniTableField_GetRep(field) == kUpb_FieldRep_StringView); - return _upb_Message_SetField(msg, field, &value, a); + _upb_MiniTable_SetNonExtensionField(msg, field, &value); } UPB_API_INLINE const upb_Message* upb_MiniTable_GetMessage( @@ -2740,7 +2733,7 @@ UPB_API_INLINE const upb_Message* upb_MiniTable_GetMessage( UPB_ASSUME(_upb_MiniTableField_GetRep(field) == UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte)); upb_Message* ret; - _upb_Message_GetNonExtensionField(msg, field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, field, &default_val, &ret); return ret; } @@ -2754,7 +2747,7 @@ UPB_API_INLINE void upb_MiniTable_SetMessage(upb_Message* msg, UPB_ASSUME(_upb_MiniTableField_GetRep(field) == UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte)); UPB_ASSERT(mini_table->subs[field->submsg_index].submsg); - _upb_Message_SetNonExtensionField(msg, field, &sub_message); + _upb_MiniTable_SetNonExtensionField(msg, field, &sub_message); } UPB_API_INLINE upb_Message* upb_MiniTable_GetMutableMessage( @@ -2769,7 +2762,7 @@ UPB_API_INLINE upb_Message* upb_MiniTable_GetMutableMessage( UPB_ASSERT(sub_mini_table); sub_message = _upb_Message_New(sub_mini_table, arena); *UPB_PTR_AT(msg, field->offset, upb_Message*) = sub_message; - _upb_Message_SetPresence(msg, field); + _upb_MiniTable_SetPresence(msg, field); } return sub_message; } @@ -2778,7 +2771,7 @@ UPB_API_INLINE const upb_Array* upb_MiniTable_GetArray( const upb_Message* msg, const upb_MiniTableField* field) { const upb_Array* ret; const upb_Array* default_val = NULL; - _upb_Message_GetNonExtensionField(msg, field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, field, &default_val, &ret); return ret; } @@ -2790,12 +2783,6 @@ UPB_API_INLINE upb_Array* upb_MiniTable_GetMutableArray( void* upb_MiniTable_ResizeArray(upb_Message* msg, const upb_MiniTableField* field, size_t len, upb_Arena* arena); - -UPB_API_INLINE bool upb_MiniTableField_IsClosedEnum( - const upb_MiniTableField* field) { - return field->descriptortype == kUpb_FieldType_Enum; -} - typedef enum { kUpb_GetExtension_Ok, kUpb_GetExtension_NotPresent, @@ -2936,10 +2923,10 @@ typedef enum { kUpb_DecodeStatus_MissingRequired = 5, } upb_DecodeStatus; -UPB_API upb_DecodeStatus upb_Decode(const char* buf, size_t size, - upb_Message* msg, const upb_MiniTable* l, - const upb_ExtensionRegistry* extreg, - int options, upb_Arena* arena); +upb_DecodeStatus upb_Decode(const char* buf, size_t size, upb_Message* msg, + const upb_MiniTable* l, + const upb_ExtensionRegistry* extreg, int options, + upb_Arena* arena); #ifdef __cplusplus } /* extern "C" */ @@ -3299,7 +3286,7 @@ UPB_INLINE char* google_protobuf_FileDescriptorSet_serialize_ex(const google_pro } UPB_INLINE void google_protobuf_FileDescriptorSet_clear_file(google_protobuf_FileDescriptorSet* msg) { const upb_MiniTableField field = {1, 0, 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_FileDescriptorProto* const* google_protobuf_FileDescriptorSet_file(const google_protobuf_FileDescriptorSet* msg, size_t* len) { return (const google_protobuf_FileDescriptorProto* const*)_upb_array_accessor(msg, 0, len); @@ -3360,37 +3347,37 @@ UPB_INLINE char* google_protobuf_FileDescriptorProto_serialize_ex(const google_p } UPB_INLINE void google_protobuf_FileDescriptorProto_clear_name(google_protobuf_FileDescriptorProto* msg) { const upb_MiniTableField field = {1, UPB_SIZE(40, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_FileDescriptorProto_name(const google_protobuf_FileDescriptorProto* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {1, UPB_SIZE(40, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileDescriptorProto_has_name(const google_protobuf_FileDescriptorProto* msg) { const upb_MiniTableField field = {1, UPB_SIZE(40, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileDescriptorProto_clear_package(google_protobuf_FileDescriptorProto* msg) { const upb_MiniTableField field = {2, UPB_SIZE(48, 24), 2, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_FileDescriptorProto_package(const google_protobuf_FileDescriptorProto* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {2, UPB_SIZE(48, 24), 2, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileDescriptorProto_has_package(const google_protobuf_FileDescriptorProto* msg) { const upb_MiniTableField field = {2, UPB_SIZE(48, 24), 2, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileDescriptorProto_clear_dependency(google_protobuf_FileDescriptorProto* msg) { const upb_MiniTableField field = {3, UPB_SIZE(4, 40), 0, kUpb_NoSub, 12, kUpb_FieldMode_Array | kUpb_LabelFlags_IsAlternate | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView const* google_protobuf_FileDescriptorProto_dependency(const google_protobuf_FileDescriptorProto* msg, size_t* len) { return (upb_StringView const*)_upb_array_accessor(msg, UPB_SIZE(4, 40), len); @@ -3402,7 +3389,7 @@ UPB_INLINE bool google_protobuf_FileDescriptorProto_has_dependency(const google_ } UPB_INLINE void google_protobuf_FileDescriptorProto_clear_message_type(google_protobuf_FileDescriptorProto* msg) { const upb_MiniTableField field = {4, UPB_SIZE(8, 48), 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_DescriptorProto* const* google_protobuf_FileDescriptorProto_message_type(const google_protobuf_FileDescriptorProto* msg, size_t* len) { return (const google_protobuf_DescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(8, 48), len); @@ -3414,7 +3401,7 @@ UPB_INLINE bool google_protobuf_FileDescriptorProto_has_message_type(const googl } UPB_INLINE void google_protobuf_FileDescriptorProto_clear_enum_type(google_protobuf_FileDescriptorProto* msg) { const upb_MiniTableField field = {5, UPB_SIZE(12, 56), 0, 1, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_EnumDescriptorProto* const* google_protobuf_FileDescriptorProto_enum_type(const google_protobuf_FileDescriptorProto* msg, size_t* len) { return (const google_protobuf_EnumDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(12, 56), len); @@ -3426,7 +3413,7 @@ UPB_INLINE bool google_protobuf_FileDescriptorProto_has_enum_type(const google_p } UPB_INLINE void google_protobuf_FileDescriptorProto_clear_service(google_protobuf_FileDescriptorProto* msg) { const upb_MiniTableField field = {6, UPB_SIZE(16, 64), 0, 2, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_ServiceDescriptorProto* const* google_protobuf_FileDescriptorProto_service(const google_protobuf_FileDescriptorProto* msg, size_t* len) { return (const google_protobuf_ServiceDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(16, 64), len); @@ -3438,7 +3425,7 @@ UPB_INLINE bool google_protobuf_FileDescriptorProto_has_service(const google_pro } UPB_INLINE void google_protobuf_FileDescriptorProto_clear_extension(google_protobuf_FileDescriptorProto* msg) { const upb_MiniTableField field = {7, UPB_SIZE(20, 72), 0, 3, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_FieldDescriptorProto* const* google_protobuf_FileDescriptorProto_extension(const google_protobuf_FileDescriptorProto* msg, size_t* len) { return (const google_protobuf_FieldDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(20, 72), len); @@ -3450,37 +3437,37 @@ UPB_INLINE bool google_protobuf_FileDescriptorProto_has_extension(const google_p } UPB_INLINE void google_protobuf_FileDescriptorProto_clear_options(google_protobuf_FileDescriptorProto* msg) { const upb_MiniTableField field = {8, UPB_SIZE(24, 80), 3, 4, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_FileOptions* google_protobuf_FileDescriptorProto_options(const google_protobuf_FileDescriptorProto* msg) { const google_protobuf_FileOptions* default_val = NULL; const google_protobuf_FileOptions* ret; const upb_MiniTableField field = {8, UPB_SIZE(24, 80), 3, 4, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileDescriptorProto_has_options(const google_protobuf_FileDescriptorProto* msg) { const upb_MiniTableField field = {8, UPB_SIZE(24, 80), 3, 4, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileDescriptorProto_clear_source_code_info(google_protobuf_FileDescriptorProto* msg) { const upb_MiniTableField field = {9, UPB_SIZE(28, 88), 4, 5, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_SourceCodeInfo* google_protobuf_FileDescriptorProto_source_code_info(const google_protobuf_FileDescriptorProto* msg) { const google_protobuf_SourceCodeInfo* default_val = NULL; const google_protobuf_SourceCodeInfo* ret; const upb_MiniTableField field = {9, UPB_SIZE(28, 88), 4, 5, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileDescriptorProto_has_source_code_info(const google_protobuf_FileDescriptorProto* msg) { const upb_MiniTableField field = {9, UPB_SIZE(28, 88), 4, 5, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileDescriptorProto_clear_public_dependency(google_protobuf_FileDescriptorProto* msg) { const upb_MiniTableField field = {10, UPB_SIZE(32, 96), 0, kUpb_NoSub, 5, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t const* google_protobuf_FileDescriptorProto_public_dependency(const google_protobuf_FileDescriptorProto* msg, size_t* len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(32, 96), len); @@ -3492,7 +3479,7 @@ UPB_INLINE bool google_protobuf_FileDescriptorProto_has_public_dependency(const } UPB_INLINE void google_protobuf_FileDescriptorProto_clear_weak_dependency(google_protobuf_FileDescriptorProto* msg) { const upb_MiniTableField field = {11, UPB_SIZE(36, 104), 0, kUpb_NoSub, 5, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t const* google_protobuf_FileDescriptorProto_weak_dependency(const google_protobuf_FileDescriptorProto* msg, size_t* len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(36, 104), len); @@ -3504,41 +3491,41 @@ UPB_INLINE bool google_protobuf_FileDescriptorProto_has_weak_dependency(const go } UPB_INLINE void google_protobuf_FileDescriptorProto_clear_syntax(google_protobuf_FileDescriptorProto* msg) { const upb_MiniTableField field = {12, UPB_SIZE(56, 112), 5, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_FileDescriptorProto_syntax(const google_protobuf_FileDescriptorProto* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {12, UPB_SIZE(56, 112), 5, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileDescriptorProto_has_syntax(const google_protobuf_FileDescriptorProto* msg) { const upb_MiniTableField field = {12, UPB_SIZE(56, 112), 5, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileDescriptorProto_clear_edition(google_protobuf_FileDescriptorProto* msg) { const upb_MiniTableField field = {13, UPB_SIZE(64, 128), 6, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_FileDescriptorProto_edition(const google_protobuf_FileDescriptorProto* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {13, UPB_SIZE(64, 128), 6, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileDescriptorProto_has_edition(const google_protobuf_FileDescriptorProto* msg) { const upb_MiniTableField field = {13, UPB_SIZE(64, 128), 6, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileDescriptorProto_set_name(google_protobuf_FileDescriptorProto *msg, upb_StringView value) { const upb_MiniTableField field = {1, UPB_SIZE(40, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FileDescriptorProto_set_package(google_protobuf_FileDescriptorProto *msg, upb_StringView value) { const upb_MiniTableField field = {2, UPB_SIZE(48, 24), 2, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE upb_StringView* google_protobuf_FileDescriptorProto_mutable_dependency(google_protobuf_FileDescriptorProto* msg, size_t* len) { return (upb_StringView*)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 40), len); } @@ -3598,7 +3585,7 @@ UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_FileDesc } UPB_INLINE void google_protobuf_FileDescriptorProto_set_options(google_protobuf_FileDescriptorProto *msg, google_protobuf_FileOptions* value) { const upb_MiniTableField field = {8, UPB_SIZE(24, 80), 3, 4, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE struct google_protobuf_FileOptions* google_protobuf_FileDescriptorProto_mutable_options(google_protobuf_FileDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_FileOptions* sub = (struct google_protobuf_FileOptions*)google_protobuf_FileDescriptorProto_options(msg); if (sub == NULL) { @@ -3609,7 +3596,7 @@ UPB_INLINE void google_protobuf_FileDescriptorProto_set_options(google_protobuf_ } UPB_INLINE void google_protobuf_FileDescriptorProto_set_source_code_info(google_protobuf_FileDescriptorProto *msg, google_protobuf_SourceCodeInfo* value) { const upb_MiniTableField field = {9, UPB_SIZE(28, 88), 4, 5, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE struct google_protobuf_SourceCodeInfo* google_protobuf_FileDescriptorProto_mutable_source_code_info(google_protobuf_FileDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_SourceCodeInfo* sub = (struct google_protobuf_SourceCodeInfo*)google_protobuf_FileDescriptorProto_source_code_info(msg); if (sub == NULL) { @@ -3638,10 +3625,10 @@ UPB_INLINE bool google_protobuf_FileDescriptorProto_add_weak_dependency(google_p } UPB_INLINE void google_protobuf_FileDescriptorProto_set_syntax(google_protobuf_FileDescriptorProto *msg, upb_StringView value) { const upb_MiniTableField field = {12, UPB_SIZE(56, 112), 5, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FileDescriptorProto_set_edition(google_protobuf_FileDescriptorProto *msg, upb_StringView value) { const upb_MiniTableField field = {13, UPB_SIZE(64, 128), 6, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); } /* google.protobuf.DescriptorProto */ @@ -3680,22 +3667,22 @@ UPB_INLINE char* google_protobuf_DescriptorProto_serialize_ex(const google_proto } UPB_INLINE void google_protobuf_DescriptorProto_clear_name(google_protobuf_DescriptorProto* msg) { const upb_MiniTableField field = {1, UPB_SIZE(40, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_DescriptorProto_name(const google_protobuf_DescriptorProto* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {1, UPB_SIZE(40, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_DescriptorProto_has_name(const google_protobuf_DescriptorProto* msg) { const upb_MiniTableField field = {1, UPB_SIZE(40, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_DescriptorProto_clear_field(google_protobuf_DescriptorProto* msg) { const upb_MiniTableField field = {2, UPB_SIZE(4, 24), 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_FieldDescriptorProto* const* google_protobuf_DescriptorProto_field(const google_protobuf_DescriptorProto* msg, size_t* len) { return (const google_protobuf_FieldDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(4, 24), len); @@ -3707,7 +3694,7 @@ UPB_INLINE bool google_protobuf_DescriptorProto_has_field(const google_protobuf_ } UPB_INLINE void google_protobuf_DescriptorProto_clear_nested_type(google_protobuf_DescriptorProto* msg) { const upb_MiniTableField field = {3, UPB_SIZE(8, 32), 0, 1, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_DescriptorProto* const* google_protobuf_DescriptorProto_nested_type(const google_protobuf_DescriptorProto* msg, size_t* len) { return (const google_protobuf_DescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(8, 32), len); @@ -3719,7 +3706,7 @@ UPB_INLINE bool google_protobuf_DescriptorProto_has_nested_type(const google_pro } UPB_INLINE void google_protobuf_DescriptorProto_clear_enum_type(google_protobuf_DescriptorProto* msg) { const upb_MiniTableField field = {4, UPB_SIZE(12, 40), 0, 2, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_EnumDescriptorProto* const* google_protobuf_DescriptorProto_enum_type(const google_protobuf_DescriptorProto* msg, size_t* len) { return (const google_protobuf_EnumDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(12, 40), len); @@ -3731,7 +3718,7 @@ UPB_INLINE bool google_protobuf_DescriptorProto_has_enum_type(const google_proto } UPB_INLINE void google_protobuf_DescriptorProto_clear_extension_range(google_protobuf_DescriptorProto* msg) { const upb_MiniTableField field = {5, UPB_SIZE(16, 48), 0, 3, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_DescriptorProto_ExtensionRange* const* google_protobuf_DescriptorProto_extension_range(const google_protobuf_DescriptorProto* msg, size_t* len) { return (const google_protobuf_DescriptorProto_ExtensionRange* const*)_upb_array_accessor(msg, UPB_SIZE(16, 48), len); @@ -3743,7 +3730,7 @@ UPB_INLINE bool google_protobuf_DescriptorProto_has_extension_range(const google } UPB_INLINE void google_protobuf_DescriptorProto_clear_extension(google_protobuf_DescriptorProto* msg) { const upb_MiniTableField field = {6, UPB_SIZE(20, 56), 0, 4, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_FieldDescriptorProto* const* google_protobuf_DescriptorProto_extension(const google_protobuf_DescriptorProto* msg, size_t* len) { return (const google_protobuf_FieldDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(20, 56), len); @@ -3755,22 +3742,22 @@ UPB_INLINE bool google_protobuf_DescriptorProto_has_extension(const google_proto } UPB_INLINE void google_protobuf_DescriptorProto_clear_options(google_protobuf_DescriptorProto* msg) { const upb_MiniTableField field = {7, UPB_SIZE(24, 64), 2, 5, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_MessageOptions* google_protobuf_DescriptorProto_options(const google_protobuf_DescriptorProto* msg) { const google_protobuf_MessageOptions* default_val = NULL; const google_protobuf_MessageOptions* ret; const upb_MiniTableField field = {7, UPB_SIZE(24, 64), 2, 5, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_DescriptorProto_has_options(const google_protobuf_DescriptorProto* msg) { const upb_MiniTableField field = {7, UPB_SIZE(24, 64), 2, 5, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_DescriptorProto_clear_oneof_decl(google_protobuf_DescriptorProto* msg) { const upb_MiniTableField field = {8, UPB_SIZE(28, 72), 0, 6, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_OneofDescriptorProto* const* google_protobuf_DescriptorProto_oneof_decl(const google_protobuf_DescriptorProto* msg, size_t* len) { return (const google_protobuf_OneofDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(28, 72), len); @@ -3782,7 +3769,7 @@ UPB_INLINE bool google_protobuf_DescriptorProto_has_oneof_decl(const google_prot } UPB_INLINE void google_protobuf_DescriptorProto_clear_reserved_range(google_protobuf_DescriptorProto* msg) { const upb_MiniTableField field = {9, UPB_SIZE(32, 80), 0, 7, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_DescriptorProto_ReservedRange* const* google_protobuf_DescriptorProto_reserved_range(const google_protobuf_DescriptorProto* msg, size_t* len) { return (const google_protobuf_DescriptorProto_ReservedRange* const*)_upb_array_accessor(msg, UPB_SIZE(32, 80), len); @@ -3794,7 +3781,7 @@ UPB_INLINE bool google_protobuf_DescriptorProto_has_reserved_range(const google_ } UPB_INLINE void google_protobuf_DescriptorProto_clear_reserved_name(google_protobuf_DescriptorProto* msg) { const upb_MiniTableField field = {10, UPB_SIZE(36, 88), 0, kUpb_NoSub, 12, kUpb_FieldMode_Array | kUpb_LabelFlags_IsAlternate | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView const* google_protobuf_DescriptorProto_reserved_name(const google_protobuf_DescriptorProto* msg, size_t* len) { return (upb_StringView const*)_upb_array_accessor(msg, UPB_SIZE(36, 88), len); @@ -3807,7 +3794,7 @@ UPB_INLINE bool google_protobuf_DescriptorProto_has_reserved_name(const google_p UPB_INLINE void google_protobuf_DescriptorProto_set_name(google_protobuf_DescriptorProto *msg, upb_StringView value) { const upb_MiniTableField field = {1, UPB_SIZE(40, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_DescriptorProto_mutable_field(google_protobuf_DescriptorProto* msg, size_t* len) { return (google_protobuf_FieldDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 24), len); } @@ -3870,7 +3857,7 @@ UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_Descript } UPB_INLINE void google_protobuf_DescriptorProto_set_options(google_protobuf_DescriptorProto *msg, google_protobuf_MessageOptions* value) { const upb_MiniTableField field = {7, UPB_SIZE(24, 64), 2, 5, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE struct google_protobuf_MessageOptions* google_protobuf_DescriptorProto_mutable_options(google_protobuf_DescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_MessageOptions* sub = (struct google_protobuf_MessageOptions*)google_protobuf_DescriptorProto_options(msg); if (sub == NULL) { @@ -3950,59 +3937,59 @@ UPB_INLINE char* google_protobuf_DescriptorProto_ExtensionRange_serialize_ex(con } UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_clear_start(google_protobuf_DescriptorProto_ExtensionRange* msg) { const upb_MiniTableField field = {1, 4, 1, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t google_protobuf_DescriptorProto_ExtensionRange_start(const google_protobuf_DescriptorProto_ExtensionRange* msg) { int32_t default_val = (int32_t)0; int32_t ret; const upb_MiniTableField field = {1, 4, 1, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_start(const google_protobuf_DescriptorProto_ExtensionRange* msg) { const upb_MiniTableField field = {1, 4, 1, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_clear_end(google_protobuf_DescriptorProto_ExtensionRange* msg) { const upb_MiniTableField field = {2, 8, 2, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t google_protobuf_DescriptorProto_ExtensionRange_end(const google_protobuf_DescriptorProto_ExtensionRange* msg) { int32_t default_val = (int32_t)0; int32_t ret; const upb_MiniTableField field = {2, 8, 2, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_end(const google_protobuf_DescriptorProto_ExtensionRange* msg) { const upb_MiniTableField field = {2, 8, 2, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_clear_options(google_protobuf_DescriptorProto_ExtensionRange* msg) { const upb_MiniTableField field = {3, UPB_SIZE(12, 16), 3, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_ExtensionRangeOptions* google_protobuf_DescriptorProto_ExtensionRange_options(const google_protobuf_DescriptorProto_ExtensionRange* msg) { const google_protobuf_ExtensionRangeOptions* default_val = NULL; const google_protobuf_ExtensionRangeOptions* ret; const upb_MiniTableField field = {3, UPB_SIZE(12, 16), 3, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_options(const google_protobuf_DescriptorProto_ExtensionRange* msg) { const upb_MiniTableField field = {3, UPB_SIZE(12, 16), 3, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_start(google_protobuf_DescriptorProto_ExtensionRange *msg, int32_t value) { const upb_MiniTableField field = {1, 4, 1, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_end(google_protobuf_DescriptorProto_ExtensionRange *msg, int32_t value) { const upb_MiniTableField field = {2, 8, 2, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_options(google_protobuf_DescriptorProto_ExtensionRange *msg, google_protobuf_ExtensionRangeOptions* value) { const upb_MiniTableField field = {3, UPB_SIZE(12, 16), 3, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE struct google_protobuf_ExtensionRangeOptions* google_protobuf_DescriptorProto_ExtensionRange_mutable_options(google_protobuf_DescriptorProto_ExtensionRange* msg, upb_Arena* arena) { struct google_protobuf_ExtensionRangeOptions* sub = (struct google_protobuf_ExtensionRangeOptions*)google_protobuf_DescriptorProto_ExtensionRange_options(msg); if (sub == NULL) { @@ -4049,41 +4036,41 @@ UPB_INLINE char* google_protobuf_DescriptorProto_ReservedRange_serialize_ex(cons } UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_clear_start(google_protobuf_DescriptorProto_ReservedRange* msg) { const upb_MiniTableField field = {1, 4, 1, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t google_protobuf_DescriptorProto_ReservedRange_start(const google_protobuf_DescriptorProto_ReservedRange* msg) { int32_t default_val = (int32_t)0; int32_t ret; const upb_MiniTableField field = {1, 4, 1, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_DescriptorProto_ReservedRange_has_start(const google_protobuf_DescriptorProto_ReservedRange* msg) { const upb_MiniTableField field = {1, 4, 1, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_clear_end(google_protobuf_DescriptorProto_ReservedRange* msg) { const upb_MiniTableField field = {2, 8, 2, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t google_protobuf_DescriptorProto_ReservedRange_end(const google_protobuf_DescriptorProto_ReservedRange* msg) { int32_t default_val = (int32_t)0; int32_t ret; const upb_MiniTableField field = {2, 8, 2, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_DescriptorProto_ReservedRange_has_end(const google_protobuf_DescriptorProto_ReservedRange* msg) { const upb_MiniTableField field = {2, 8, 2, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_set_start(google_protobuf_DescriptorProto_ReservedRange *msg, int32_t value) { const upb_MiniTableField field = {1, 4, 1, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_set_end(google_protobuf_DescriptorProto_ReservedRange *msg, int32_t value) { const upb_MiniTableField field = {2, 8, 2, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); } /* google.protobuf.ExtensionRangeOptions */ @@ -4122,7 +4109,7 @@ UPB_INLINE char* google_protobuf_ExtensionRangeOptions_serialize_ex(const google } UPB_INLINE void google_protobuf_ExtensionRangeOptions_clear_uninterpreted_option(google_protobuf_ExtensionRangeOptions* msg) { const upb_MiniTableField field = {999, 0, 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_ExtensionRangeOptions_uninterpreted_option(const google_protobuf_ExtensionRangeOptions* msg, size_t* len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, 0, len); @@ -4183,194 +4170,194 @@ UPB_INLINE char* google_protobuf_FieldDescriptorProto_serialize_ex(const google_ } UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_name(google_protobuf_FieldDescriptorProto* msg) { const upb_MiniTableField field = {1, UPB_SIZE(28, 24), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_FieldDescriptorProto_name(const google_protobuf_FieldDescriptorProto* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {1, UPB_SIZE(28, 24), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_name(const google_protobuf_FieldDescriptorProto* msg) { const upb_MiniTableField field = {1, UPB_SIZE(28, 24), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_extendee(google_protobuf_FieldDescriptorProto* msg) { const upb_MiniTableField field = {2, UPB_SIZE(36, 40), 2, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_FieldDescriptorProto_extendee(const google_protobuf_FieldDescriptorProto* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {2, UPB_SIZE(36, 40), 2, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_extendee(const google_protobuf_FieldDescriptorProto* msg) { const upb_MiniTableField field = {2, UPB_SIZE(36, 40), 2, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_number(google_protobuf_FieldDescriptorProto* msg) { const upb_MiniTableField field = {3, 4, 3, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_number(const google_protobuf_FieldDescriptorProto* msg) { int32_t default_val = (int32_t)0; int32_t ret; const upb_MiniTableField field = {3, 4, 3, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_number(const google_protobuf_FieldDescriptorProto* msg) { const upb_MiniTableField field = {3, 4, 3, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_label(google_protobuf_FieldDescriptorProto* msg) { const upb_MiniTableField field = {4, 8, 4, 0, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_label(const google_protobuf_FieldDescriptorProto* msg) { int32_t default_val = 1; int32_t ret; const upb_MiniTableField field = {4, 8, 4, 0, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_label(const google_protobuf_FieldDescriptorProto* msg) { const upb_MiniTableField field = {4, 8, 4, 0, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_type(google_protobuf_FieldDescriptorProto* msg) { const upb_MiniTableField field = {5, 12, 5, 1, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_type(const google_protobuf_FieldDescriptorProto* msg) { int32_t default_val = 1; int32_t ret; const upb_MiniTableField field = {5, 12, 5, 1, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type(const google_protobuf_FieldDescriptorProto* msg) { const upb_MiniTableField field = {5, 12, 5, 1, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_type_name(google_protobuf_FieldDescriptorProto* msg) { const upb_MiniTableField field = {6, UPB_SIZE(44, 56), 6, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_FieldDescriptorProto_type_name(const google_protobuf_FieldDescriptorProto* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {6, UPB_SIZE(44, 56), 6, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type_name(const google_protobuf_FieldDescriptorProto* msg) { const upb_MiniTableField field = {6, UPB_SIZE(44, 56), 6, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_default_value(google_protobuf_FieldDescriptorProto* msg) { const upb_MiniTableField field = {7, UPB_SIZE(52, 72), 7, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_FieldDescriptorProto_default_value(const google_protobuf_FieldDescriptorProto* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {7, UPB_SIZE(52, 72), 7, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_default_value(const google_protobuf_FieldDescriptorProto* msg) { const upb_MiniTableField field = {7, UPB_SIZE(52, 72), 7, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_options(google_protobuf_FieldDescriptorProto* msg) { const upb_MiniTableField field = {8, UPB_SIZE(16, 88), 8, 2, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_FieldOptions* google_protobuf_FieldDescriptorProto_options(const google_protobuf_FieldDescriptorProto* msg) { const google_protobuf_FieldOptions* default_val = NULL; const google_protobuf_FieldOptions* ret; const upb_MiniTableField field = {8, UPB_SIZE(16, 88), 8, 2, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_options(const google_protobuf_FieldDescriptorProto* msg) { const upb_MiniTableField field = {8, UPB_SIZE(16, 88), 8, 2, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_oneof_index(google_protobuf_FieldDescriptorProto* msg) { const upb_MiniTableField field = {9, UPB_SIZE(20, 16), 9, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_oneof_index(const google_protobuf_FieldDescriptorProto* msg) { int32_t default_val = (int32_t)0; int32_t ret; const upb_MiniTableField field = {9, UPB_SIZE(20, 16), 9, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_oneof_index(const google_protobuf_FieldDescriptorProto* msg) { const upb_MiniTableField field = {9, UPB_SIZE(20, 16), 9, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_json_name(google_protobuf_FieldDescriptorProto* msg) { const upb_MiniTableField field = {10, UPB_SIZE(60, 96), 10, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_FieldDescriptorProto_json_name(const google_protobuf_FieldDescriptorProto* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {10, UPB_SIZE(60, 96), 10, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_json_name(const google_protobuf_FieldDescriptorProto* msg) { const upb_MiniTableField field = {10, UPB_SIZE(60, 96), 10, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_proto3_optional(google_protobuf_FieldDescriptorProto* msg) { const upb_MiniTableField field = {17, UPB_SIZE(24, 20), 11, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_FieldDescriptorProto_proto3_optional(const google_protobuf_FieldDescriptorProto* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {17, UPB_SIZE(24, 20), 11, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_proto3_optional(const google_protobuf_FieldDescriptorProto* msg) { const upb_MiniTableField field = {17, UPB_SIZE(24, 20), 11, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FieldDescriptorProto_set_name(google_protobuf_FieldDescriptorProto *msg, upb_StringView value) { const upb_MiniTableField field = {1, UPB_SIZE(28, 24), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FieldDescriptorProto_set_extendee(google_protobuf_FieldDescriptorProto *msg, upb_StringView value) { const upb_MiniTableField field = {2, UPB_SIZE(36, 40), 2, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FieldDescriptorProto_set_number(google_protobuf_FieldDescriptorProto *msg, int32_t value) { const upb_MiniTableField field = {3, 4, 3, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FieldDescriptorProto_set_label(google_protobuf_FieldDescriptorProto *msg, int32_t value) { const upb_MiniTableField field = {4, 8, 4, 0, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FieldDescriptorProto_set_type(google_protobuf_FieldDescriptorProto *msg, int32_t value) { const upb_MiniTableField field = {5, 12, 5, 1, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FieldDescriptorProto_set_type_name(google_protobuf_FieldDescriptorProto *msg, upb_StringView value) { const upb_MiniTableField field = {6, UPB_SIZE(44, 56), 6, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FieldDescriptorProto_set_default_value(google_protobuf_FieldDescriptorProto *msg, upb_StringView value) { const upb_MiniTableField field = {7, UPB_SIZE(52, 72), 7, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FieldDescriptorProto_set_options(google_protobuf_FieldDescriptorProto *msg, google_protobuf_FieldOptions* value) { const upb_MiniTableField field = {8, UPB_SIZE(16, 88), 8, 2, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE struct google_protobuf_FieldOptions* google_protobuf_FieldDescriptorProto_mutable_options(google_protobuf_FieldDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_FieldOptions* sub = (struct google_protobuf_FieldOptions*)google_protobuf_FieldDescriptorProto_options(msg); if (sub == NULL) { @@ -4381,13 +4368,13 @@ UPB_INLINE void google_protobuf_FieldDescriptorProto_set_name(google_protobuf_Fi } UPB_INLINE void google_protobuf_FieldDescriptorProto_set_oneof_index(google_protobuf_FieldDescriptorProto *msg, int32_t value) { const upb_MiniTableField field = {9, UPB_SIZE(20, 16), 9, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FieldDescriptorProto_set_json_name(google_protobuf_FieldDescriptorProto *msg, upb_StringView value) { const upb_MiniTableField field = {10, UPB_SIZE(60, 96), 10, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FieldDescriptorProto_set_proto3_optional(google_protobuf_FieldDescriptorProto *msg, bool value) { const upb_MiniTableField field = {17, UPB_SIZE(24, 20), 11, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); } /* google.protobuf.OneofDescriptorProto */ @@ -4426,41 +4413,41 @@ UPB_INLINE char* google_protobuf_OneofDescriptorProto_serialize_ex(const google_ } UPB_INLINE void google_protobuf_OneofDescriptorProto_clear_name(google_protobuf_OneofDescriptorProto* msg) { const upb_MiniTableField field = {1, 8, 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_OneofDescriptorProto_name(const google_protobuf_OneofDescriptorProto* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {1, 8, 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_OneofDescriptorProto_has_name(const google_protobuf_OneofDescriptorProto* msg) { const upb_MiniTableField field = {1, 8, 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_OneofDescriptorProto_clear_options(google_protobuf_OneofDescriptorProto* msg) { const upb_MiniTableField field = {2, UPB_SIZE(4, 24), 2, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_OneofOptions* google_protobuf_OneofDescriptorProto_options(const google_protobuf_OneofDescriptorProto* msg) { const google_protobuf_OneofOptions* default_val = NULL; const google_protobuf_OneofOptions* ret; const upb_MiniTableField field = {2, UPB_SIZE(4, 24), 2, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_OneofDescriptorProto_has_options(const google_protobuf_OneofDescriptorProto* msg) { const upb_MiniTableField field = {2, UPB_SIZE(4, 24), 2, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_OneofDescriptorProto_set_name(google_protobuf_OneofDescriptorProto *msg, upb_StringView value) { const upb_MiniTableField field = {1, 8, 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_OneofDescriptorProto_set_options(google_protobuf_OneofDescriptorProto *msg, google_protobuf_OneofOptions* value) { const upb_MiniTableField field = {2, UPB_SIZE(4, 24), 2, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE struct google_protobuf_OneofOptions* google_protobuf_OneofDescriptorProto_mutable_options(google_protobuf_OneofDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_OneofOptions* sub = (struct google_protobuf_OneofOptions*)google_protobuf_OneofDescriptorProto_options(msg); if (sub == NULL) { @@ -4507,22 +4494,22 @@ UPB_INLINE char* google_protobuf_EnumDescriptorProto_serialize_ex(const google_p } UPB_INLINE void google_protobuf_EnumDescriptorProto_clear_name(google_protobuf_EnumDescriptorProto* msg) { const upb_MiniTableField field = {1, UPB_SIZE(20, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_EnumDescriptorProto_name(const google_protobuf_EnumDescriptorProto* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {1, UPB_SIZE(20, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_name(const google_protobuf_EnumDescriptorProto* msg) { const upb_MiniTableField field = {1, UPB_SIZE(20, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_EnumDescriptorProto_clear_value(google_protobuf_EnumDescriptorProto* msg) { const upb_MiniTableField field = {2, UPB_SIZE(4, 24), 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_EnumValueDescriptorProto* const* google_protobuf_EnumDescriptorProto_value(const google_protobuf_EnumDescriptorProto* msg, size_t* len) { return (const google_protobuf_EnumValueDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(4, 24), len); @@ -4534,22 +4521,22 @@ UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_value(const google_proto } UPB_INLINE void google_protobuf_EnumDescriptorProto_clear_options(google_protobuf_EnumDescriptorProto* msg) { const upb_MiniTableField field = {3, UPB_SIZE(8, 32), 2, 1, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_EnumOptions* google_protobuf_EnumDescriptorProto_options(const google_protobuf_EnumDescriptorProto* msg) { const google_protobuf_EnumOptions* default_val = NULL; const google_protobuf_EnumOptions* ret; const upb_MiniTableField field = {3, UPB_SIZE(8, 32), 2, 1, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_options(const google_protobuf_EnumDescriptorProto* msg) { const upb_MiniTableField field = {3, UPB_SIZE(8, 32), 2, 1, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_EnumDescriptorProto_clear_reserved_range(google_protobuf_EnumDescriptorProto* msg) { const upb_MiniTableField field = {4, UPB_SIZE(12, 40), 0, 2, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_EnumDescriptorProto_EnumReservedRange* const* google_protobuf_EnumDescriptorProto_reserved_range(const google_protobuf_EnumDescriptorProto* msg, size_t* len) { return (const google_protobuf_EnumDescriptorProto_EnumReservedRange* const*)_upb_array_accessor(msg, UPB_SIZE(12, 40), len); @@ -4561,7 +4548,7 @@ UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_reserved_range(const goo } UPB_INLINE void google_protobuf_EnumDescriptorProto_clear_reserved_name(google_protobuf_EnumDescriptorProto* msg) { const upb_MiniTableField field = {5, UPB_SIZE(16, 48), 0, kUpb_NoSub, 12, kUpb_FieldMode_Array | kUpb_LabelFlags_IsAlternate | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView const* google_protobuf_EnumDescriptorProto_reserved_name(const google_protobuf_EnumDescriptorProto* msg, size_t* len) { return (upb_StringView const*)_upb_array_accessor(msg, UPB_SIZE(16, 48), len); @@ -4574,7 +4561,7 @@ UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_reserved_name(const goog UPB_INLINE void google_protobuf_EnumDescriptorProto_set_name(google_protobuf_EnumDescriptorProto *msg, upb_StringView value) { const upb_MiniTableField field = {1, UPB_SIZE(20, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE google_protobuf_EnumValueDescriptorProto** google_protobuf_EnumDescriptorProto_mutable_value(google_protobuf_EnumDescriptorProto* msg, size_t* len) { return (google_protobuf_EnumValueDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 24), len); } @@ -4589,7 +4576,7 @@ UPB_INLINE struct google_protobuf_EnumValueDescriptorProto* google_protobuf_Enum } UPB_INLINE void google_protobuf_EnumDescriptorProto_set_options(google_protobuf_EnumDescriptorProto *msg, google_protobuf_EnumOptions* value) { const upb_MiniTableField field = {3, UPB_SIZE(8, 32), 2, 1, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE struct google_protobuf_EnumOptions* google_protobuf_EnumDescriptorProto_mutable_options(google_protobuf_EnumDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_EnumOptions* sub = (struct google_protobuf_EnumOptions*)google_protobuf_EnumDescriptorProto_options(msg); if (sub == NULL) { @@ -4657,41 +4644,41 @@ UPB_INLINE char* google_protobuf_EnumDescriptorProto_EnumReservedRange_serialize } UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_clear_start(google_protobuf_EnumDescriptorProto_EnumReservedRange* msg) { const upb_MiniTableField field = {1, 4, 1, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t google_protobuf_EnumDescriptorProto_EnumReservedRange_start(const google_protobuf_EnumDescriptorProto_EnumReservedRange* msg) { int32_t default_val = (int32_t)0; int32_t ret; const upb_MiniTableField field = {1, 4, 1, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_EnumDescriptorProto_EnumReservedRange_has_start(const google_protobuf_EnumDescriptorProto_EnumReservedRange* msg) { const upb_MiniTableField field = {1, 4, 1, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_clear_end(google_protobuf_EnumDescriptorProto_EnumReservedRange* msg) { const upb_MiniTableField field = {2, 8, 2, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t google_protobuf_EnumDescriptorProto_EnumReservedRange_end(const google_protobuf_EnumDescriptorProto_EnumReservedRange* msg) { int32_t default_val = (int32_t)0; int32_t ret; const upb_MiniTableField field = {2, 8, 2, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_EnumDescriptorProto_EnumReservedRange_has_end(const google_protobuf_EnumDescriptorProto_EnumReservedRange* msg) { const upb_MiniTableField field = {2, 8, 2, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_set_start(google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, int32_t value) { const upb_MiniTableField field = {1, 4, 1, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_set_end(google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, int32_t value) { const upb_MiniTableField field = {2, 8, 2, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); } /* google.protobuf.EnumValueDescriptorProto */ @@ -4730,59 +4717,59 @@ UPB_INLINE char* google_protobuf_EnumValueDescriptorProto_serialize_ex(const goo } UPB_INLINE void google_protobuf_EnumValueDescriptorProto_clear_name(google_protobuf_EnumValueDescriptorProto* msg) { const upb_MiniTableField field = {1, UPB_SIZE(12, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_EnumValueDescriptorProto_name(const google_protobuf_EnumValueDescriptorProto* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {1, UPB_SIZE(12, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_name(const google_protobuf_EnumValueDescriptorProto* msg) { const upb_MiniTableField field = {1, UPB_SIZE(12, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_EnumValueDescriptorProto_clear_number(google_protobuf_EnumValueDescriptorProto* msg) { const upb_MiniTableField field = {2, 4, 2, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t google_protobuf_EnumValueDescriptorProto_number(const google_protobuf_EnumValueDescriptorProto* msg) { int32_t default_val = (int32_t)0; int32_t ret; const upb_MiniTableField field = {2, 4, 2, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_number(const google_protobuf_EnumValueDescriptorProto* msg) { const upb_MiniTableField field = {2, 4, 2, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_EnumValueDescriptorProto_clear_options(google_protobuf_EnumValueDescriptorProto* msg) { const upb_MiniTableField field = {3, UPB_SIZE(8, 24), 3, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_EnumValueOptions* google_protobuf_EnumValueDescriptorProto_options(const google_protobuf_EnumValueDescriptorProto* msg) { const google_protobuf_EnumValueOptions* default_val = NULL; const google_protobuf_EnumValueOptions* ret; const upb_MiniTableField field = {3, UPB_SIZE(8, 24), 3, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_options(const google_protobuf_EnumValueDescriptorProto* msg) { const upb_MiniTableField field = {3, UPB_SIZE(8, 24), 3, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_name(google_protobuf_EnumValueDescriptorProto *msg, upb_StringView value) { const upb_MiniTableField field = {1, UPB_SIZE(12, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_number(google_protobuf_EnumValueDescriptorProto *msg, int32_t value) { const upb_MiniTableField field = {2, 4, 2, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_options(google_protobuf_EnumValueDescriptorProto *msg, google_protobuf_EnumValueOptions* value) { const upb_MiniTableField field = {3, UPB_SIZE(8, 24), 3, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE struct google_protobuf_EnumValueOptions* google_protobuf_EnumValueDescriptorProto_mutable_options(google_protobuf_EnumValueDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_EnumValueOptions* sub = (struct google_protobuf_EnumValueOptions*)google_protobuf_EnumValueDescriptorProto_options(msg); if (sub == NULL) { @@ -4829,22 +4816,22 @@ UPB_INLINE char* google_protobuf_ServiceDescriptorProto_serialize_ex(const googl } UPB_INLINE void google_protobuf_ServiceDescriptorProto_clear_name(google_protobuf_ServiceDescriptorProto* msg) { const upb_MiniTableField field = {1, UPB_SIZE(12, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_ServiceDescriptorProto_name(const google_protobuf_ServiceDescriptorProto* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {1, UPB_SIZE(12, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_ServiceDescriptorProto_has_name(const google_protobuf_ServiceDescriptorProto* msg) { const upb_MiniTableField field = {1, UPB_SIZE(12, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_ServiceDescriptorProto_clear_method(google_protobuf_ServiceDescriptorProto* msg) { const upb_MiniTableField field = {2, UPB_SIZE(4, 24), 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_MethodDescriptorProto* const* google_protobuf_ServiceDescriptorProto_method(const google_protobuf_ServiceDescriptorProto* msg, size_t* len) { return (const google_protobuf_MethodDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(4, 24), len); @@ -4856,23 +4843,23 @@ UPB_INLINE bool google_protobuf_ServiceDescriptorProto_has_method(const google_p } UPB_INLINE void google_protobuf_ServiceDescriptorProto_clear_options(google_protobuf_ServiceDescriptorProto* msg) { const upb_MiniTableField field = {3, UPB_SIZE(8, 32), 2, 1, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_ServiceOptions* google_protobuf_ServiceDescriptorProto_options(const google_protobuf_ServiceDescriptorProto* msg) { const google_protobuf_ServiceOptions* default_val = NULL; const google_protobuf_ServiceOptions* ret; const upb_MiniTableField field = {3, UPB_SIZE(8, 32), 2, 1, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_ServiceDescriptorProto_has_options(const google_protobuf_ServiceDescriptorProto* msg) { const upb_MiniTableField field = {3, UPB_SIZE(8, 32), 2, 1, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_ServiceDescriptorProto_set_name(google_protobuf_ServiceDescriptorProto *msg, upb_StringView value) { const upb_MiniTableField field = {1, UPB_SIZE(12, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE google_protobuf_MethodDescriptorProto** google_protobuf_ServiceDescriptorProto_mutable_method(google_protobuf_ServiceDescriptorProto* msg, size_t* len) { return (google_protobuf_MethodDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 24), len); } @@ -4887,7 +4874,7 @@ UPB_INLINE struct google_protobuf_MethodDescriptorProto* google_protobuf_Service } UPB_INLINE void google_protobuf_ServiceDescriptorProto_set_options(google_protobuf_ServiceDescriptorProto *msg, google_protobuf_ServiceOptions* value) { const upb_MiniTableField field = {3, UPB_SIZE(8, 32), 2, 1, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE struct google_protobuf_ServiceOptions* google_protobuf_ServiceDescriptorProto_mutable_options(google_protobuf_ServiceDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_ServiceOptions* sub = (struct google_protobuf_ServiceOptions*)google_protobuf_ServiceDescriptorProto_options(msg); if (sub == NULL) { @@ -4934,107 +4921,107 @@ UPB_INLINE char* google_protobuf_MethodDescriptorProto_serialize_ex(const google } UPB_INLINE void google_protobuf_MethodDescriptorProto_clear_name(google_protobuf_MethodDescriptorProto* msg) { const upb_MiniTableField field = {1, UPB_SIZE(12, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_MethodDescriptorProto_name(const google_protobuf_MethodDescriptorProto* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {1, UPB_SIZE(12, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_name(const google_protobuf_MethodDescriptorProto* msg) { const upb_MiniTableField field = {1, UPB_SIZE(12, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_MethodDescriptorProto_clear_input_type(google_protobuf_MethodDescriptorProto* msg) { const upb_MiniTableField field = {2, UPB_SIZE(20, 24), 2, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_MethodDescriptorProto_input_type(const google_protobuf_MethodDescriptorProto* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {2, UPB_SIZE(20, 24), 2, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_input_type(const google_protobuf_MethodDescriptorProto* msg) { const upb_MiniTableField field = {2, UPB_SIZE(20, 24), 2, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_MethodDescriptorProto_clear_output_type(google_protobuf_MethodDescriptorProto* msg) { const upb_MiniTableField field = {3, UPB_SIZE(28, 40), 3, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_MethodDescriptorProto_output_type(const google_protobuf_MethodDescriptorProto* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {3, UPB_SIZE(28, 40), 3, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_output_type(const google_protobuf_MethodDescriptorProto* msg) { const upb_MiniTableField field = {3, UPB_SIZE(28, 40), 3, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_MethodDescriptorProto_clear_options(google_protobuf_MethodDescriptorProto* msg) { const upb_MiniTableField field = {4, UPB_SIZE(4, 56), 4, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_MethodOptions* google_protobuf_MethodDescriptorProto_options(const google_protobuf_MethodDescriptorProto* msg) { const google_protobuf_MethodOptions* default_val = NULL; const google_protobuf_MethodOptions* ret; const upb_MiniTableField field = {4, UPB_SIZE(4, 56), 4, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_options(const google_protobuf_MethodDescriptorProto* msg) { const upb_MiniTableField field = {4, UPB_SIZE(4, 56), 4, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_MethodDescriptorProto_clear_client_streaming(google_protobuf_MethodDescriptorProto* msg) { const upb_MiniTableField field = {5, UPB_SIZE(8, 1), 5, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_MethodDescriptorProto_client_streaming(const google_protobuf_MethodDescriptorProto* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {5, UPB_SIZE(8, 1), 5, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_client_streaming(const google_protobuf_MethodDescriptorProto* msg) { const upb_MiniTableField field = {5, UPB_SIZE(8, 1), 5, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_MethodDescriptorProto_clear_server_streaming(google_protobuf_MethodDescriptorProto* msg) { const upb_MiniTableField field = {6, UPB_SIZE(9, 2), 6, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_MethodDescriptorProto_server_streaming(const google_protobuf_MethodDescriptorProto* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {6, UPB_SIZE(9, 2), 6, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_server_streaming(const google_protobuf_MethodDescriptorProto* msg) { const upb_MiniTableField field = {6, UPB_SIZE(9, 2), 6, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_MethodDescriptorProto_set_name(google_protobuf_MethodDescriptorProto *msg, upb_StringView value) { const upb_MiniTableField field = {1, UPB_SIZE(12, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_MethodDescriptorProto_set_input_type(google_protobuf_MethodDescriptorProto *msg, upb_StringView value) { const upb_MiniTableField field = {2, UPB_SIZE(20, 24), 2, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_MethodDescriptorProto_set_output_type(google_protobuf_MethodDescriptorProto *msg, upb_StringView value) { const upb_MiniTableField field = {3, UPB_SIZE(28, 40), 3, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_MethodDescriptorProto_set_options(google_protobuf_MethodDescriptorProto *msg, google_protobuf_MethodOptions* value) { const upb_MiniTableField field = {4, UPB_SIZE(4, 56), 4, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE struct google_protobuf_MethodOptions* google_protobuf_MethodDescriptorProto_mutable_options(google_protobuf_MethodDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_MethodOptions* sub = (struct google_protobuf_MethodOptions*)google_protobuf_MethodDescriptorProto_options(msg); if (sub == NULL) { @@ -5045,10 +5032,10 @@ UPB_INLINE void google_protobuf_MethodDescriptorProto_set_name(google_protobuf_M } UPB_INLINE void google_protobuf_MethodDescriptorProto_set_client_streaming(google_protobuf_MethodDescriptorProto *msg, bool value) { const upb_MiniTableField field = {5, UPB_SIZE(8, 1), 5, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_MethodDescriptorProto_set_server_streaming(google_protobuf_MethodDescriptorProto *msg, bool value) { const upb_MiniTableField field = {6, UPB_SIZE(9, 2), 6, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); } /* google.protobuf.FileOptions */ @@ -5087,307 +5074,307 @@ UPB_INLINE char* google_protobuf_FileOptions_serialize_ex(const google_protobuf_ } UPB_INLINE void google_protobuf_FileOptions_clear_java_package(google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {1, 24, 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_FileOptions_java_package(const google_protobuf_FileOptions* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {1, 24, 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileOptions_has_java_package(const google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {1, 24, 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileOptions_clear_java_outer_classname(google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {8, UPB_SIZE(32, 40), 2, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_FileOptions_java_outer_classname(const google_protobuf_FileOptions* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {8, UPB_SIZE(32, 40), 2, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileOptions_has_java_outer_classname(const google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {8, UPB_SIZE(32, 40), 2, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileOptions_clear_optimize_for(google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {9, 4, 3, 0, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t google_protobuf_FileOptions_optimize_for(const google_protobuf_FileOptions* msg) { int32_t default_val = 1; int32_t ret; const upb_MiniTableField field = {9, 4, 3, 0, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileOptions_has_optimize_for(const google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {9, 4, 3, 0, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileOptions_clear_java_multiple_files(google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {10, 8, 4, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_FileOptions_java_multiple_files(const google_protobuf_FileOptions* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {10, 8, 4, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileOptions_has_java_multiple_files(const google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {10, 8, 4, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileOptions_clear_go_package(google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {11, UPB_SIZE(40, 56), 5, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_FileOptions_go_package(const google_protobuf_FileOptions* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {11, UPB_SIZE(40, 56), 5, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileOptions_has_go_package(const google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {11, UPB_SIZE(40, 56), 5, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileOptions_clear_cc_generic_services(google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {16, 9, 6, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_FileOptions_cc_generic_services(const google_protobuf_FileOptions* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {16, 9, 6, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileOptions_has_cc_generic_services(const google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {16, 9, 6, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileOptions_clear_java_generic_services(google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {17, 10, 7, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_FileOptions_java_generic_services(const google_protobuf_FileOptions* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {17, 10, 7, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileOptions_has_java_generic_services(const google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {17, 10, 7, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileOptions_clear_py_generic_services(google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {18, 11, 8, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_FileOptions_py_generic_services(const google_protobuf_FileOptions* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {18, 11, 8, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileOptions_has_py_generic_services(const google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {18, 11, 8, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileOptions_clear_java_generate_equals_and_hash(google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {20, 12, 9, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_FileOptions_java_generate_equals_and_hash(const google_protobuf_FileOptions* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {20, 12, 9, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileOptions_has_java_generate_equals_and_hash(const google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {20, 12, 9, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileOptions_clear_deprecated(google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {23, 13, 10, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_FileOptions_deprecated(const google_protobuf_FileOptions* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {23, 13, 10, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileOptions_has_deprecated(const google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {23, 13, 10, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileOptions_clear_java_string_check_utf8(google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {27, 14, 11, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_FileOptions_java_string_check_utf8(const google_protobuf_FileOptions* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {27, 14, 11, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileOptions_has_java_string_check_utf8(const google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {27, 14, 11, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileOptions_clear_cc_enable_arenas(google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {31, 15, 12, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_FileOptions_cc_enable_arenas(const google_protobuf_FileOptions* msg) { bool default_val = true; bool ret; const upb_MiniTableField field = {31, 15, 12, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileOptions_has_cc_enable_arenas(const google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {31, 15, 12, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileOptions_clear_objc_class_prefix(google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {36, UPB_SIZE(48, 72), 13, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_FileOptions_objc_class_prefix(const google_protobuf_FileOptions* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {36, UPB_SIZE(48, 72), 13, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileOptions_has_objc_class_prefix(const google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {36, UPB_SIZE(48, 72), 13, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileOptions_clear_csharp_namespace(google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {37, UPB_SIZE(56, 88), 14, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_FileOptions_csharp_namespace(const google_protobuf_FileOptions* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {37, UPB_SIZE(56, 88), 14, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileOptions_has_csharp_namespace(const google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {37, UPB_SIZE(56, 88), 14, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileOptions_clear_swift_prefix(google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {39, UPB_SIZE(64, 104), 15, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_FileOptions_swift_prefix(const google_protobuf_FileOptions* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {39, UPB_SIZE(64, 104), 15, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileOptions_has_swift_prefix(const google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {39, UPB_SIZE(64, 104), 15, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileOptions_clear_php_class_prefix(google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {40, UPB_SIZE(72, 120), 16, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_FileOptions_php_class_prefix(const google_protobuf_FileOptions* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {40, UPB_SIZE(72, 120), 16, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileOptions_has_php_class_prefix(const google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {40, UPB_SIZE(72, 120), 16, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileOptions_clear_php_namespace(google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {41, UPB_SIZE(80, 136), 17, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_FileOptions_php_namespace(const google_protobuf_FileOptions* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {41, UPB_SIZE(80, 136), 17, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileOptions_has_php_namespace(const google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {41, UPB_SIZE(80, 136), 17, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileOptions_clear_php_generic_services(google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {42, 16, 18, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_FileOptions_php_generic_services(const google_protobuf_FileOptions* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {42, 16, 18, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileOptions_has_php_generic_services(const google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {42, 16, 18, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileOptions_clear_php_metadata_namespace(google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {44, UPB_SIZE(88, 152), 19, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_FileOptions_php_metadata_namespace(const google_protobuf_FileOptions* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {44, UPB_SIZE(88, 152), 19, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileOptions_has_php_metadata_namespace(const google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {44, UPB_SIZE(88, 152), 19, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileOptions_clear_ruby_package(google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {45, UPB_SIZE(96, 168), 20, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_FileOptions_ruby_package(const google_protobuf_FileOptions* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {45, UPB_SIZE(96, 168), 20, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FileOptions_has_ruby_package(const google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {45, UPB_SIZE(96, 168), 20, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FileOptions_clear_uninterpreted_option(google_protobuf_FileOptions* msg) { const upb_MiniTableField field = {999, UPB_SIZE(20, 184), 0, 1, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_FileOptions_uninterpreted_option(const google_protobuf_FileOptions* msg, size_t* len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(20, 184), len); @@ -5400,64 +5387,64 @@ UPB_INLINE bool google_protobuf_FileOptions_has_uninterpreted_option(const googl UPB_INLINE void google_protobuf_FileOptions_set_java_package(google_protobuf_FileOptions *msg, upb_StringView value) { const upb_MiniTableField field = {1, 24, 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FileOptions_set_java_outer_classname(google_protobuf_FileOptions *msg, upb_StringView value) { const upb_MiniTableField field = {8, UPB_SIZE(32, 40), 2, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FileOptions_set_optimize_for(google_protobuf_FileOptions *msg, int32_t value) { const upb_MiniTableField field = {9, 4, 3, 0, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FileOptions_set_java_multiple_files(google_protobuf_FileOptions *msg, bool value) { const upb_MiniTableField field = {10, 8, 4, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FileOptions_set_go_package(google_protobuf_FileOptions *msg, upb_StringView value) { const upb_MiniTableField field = {11, UPB_SIZE(40, 56), 5, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FileOptions_set_cc_generic_services(google_protobuf_FileOptions *msg, bool value) { const upb_MiniTableField field = {16, 9, 6, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FileOptions_set_java_generic_services(google_protobuf_FileOptions *msg, bool value) { const upb_MiniTableField field = {17, 10, 7, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FileOptions_set_py_generic_services(google_protobuf_FileOptions *msg, bool value) { const upb_MiniTableField field = {18, 11, 8, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FileOptions_set_java_generate_equals_and_hash(google_protobuf_FileOptions *msg, bool value) { const upb_MiniTableField field = {20, 12, 9, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FileOptions_set_deprecated(google_protobuf_FileOptions *msg, bool value) { const upb_MiniTableField field = {23, 13, 10, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FileOptions_set_java_string_check_utf8(google_protobuf_FileOptions *msg, bool value) { const upb_MiniTableField field = {27, 14, 11, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FileOptions_set_cc_enable_arenas(google_protobuf_FileOptions *msg, bool value) { const upb_MiniTableField field = {31, 15, 12, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FileOptions_set_objc_class_prefix(google_protobuf_FileOptions *msg, upb_StringView value) { const upb_MiniTableField field = {36, UPB_SIZE(48, 72), 13, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FileOptions_set_csharp_namespace(google_protobuf_FileOptions *msg, upb_StringView value) { const upb_MiniTableField field = {37, UPB_SIZE(56, 88), 14, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FileOptions_set_swift_prefix(google_protobuf_FileOptions *msg, upb_StringView value) { const upb_MiniTableField field = {39, UPB_SIZE(64, 104), 15, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FileOptions_set_php_class_prefix(google_protobuf_FileOptions *msg, upb_StringView value) { const upb_MiniTableField field = {40, UPB_SIZE(72, 120), 16, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FileOptions_set_php_namespace(google_protobuf_FileOptions *msg, upb_StringView value) { const upb_MiniTableField field = {41, UPB_SIZE(80, 136), 17, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FileOptions_set_php_generic_services(google_protobuf_FileOptions *msg, bool value) { const upb_MiniTableField field = {42, 16, 18, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FileOptions_set_php_metadata_namespace(google_protobuf_FileOptions *msg, upb_StringView value) { const upb_MiniTableField field = {44, UPB_SIZE(88, 152), 19, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FileOptions_set_ruby_package(google_protobuf_FileOptions *msg, upb_StringView value) { const upb_MiniTableField field = {45, UPB_SIZE(96, 168), 20, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FileOptions_mutable_uninterpreted_option(google_protobuf_FileOptions* msg, size_t* len) { return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 184), len); } @@ -5508,67 +5495,82 @@ UPB_INLINE char* google_protobuf_MessageOptions_serialize_ex(const google_protob } UPB_INLINE void google_protobuf_MessageOptions_clear_message_set_wire_format(google_protobuf_MessageOptions* msg) { const upb_MiniTableField field = {1, 1, 1, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_MessageOptions_message_set_wire_format(const google_protobuf_MessageOptions* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {1, 1, 1, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_MessageOptions_has_message_set_wire_format(const google_protobuf_MessageOptions* msg) { const upb_MiniTableField field = {1, 1, 1, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_MessageOptions_clear_no_standard_descriptor_accessor(google_protobuf_MessageOptions* msg) { const upb_MiniTableField field = {2, 2, 2, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_MessageOptions_no_standard_descriptor_accessor(const google_protobuf_MessageOptions* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {2, 2, 2, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_MessageOptions_has_no_standard_descriptor_accessor(const google_protobuf_MessageOptions* msg) { const upb_MiniTableField field = {2, 2, 2, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_MessageOptions_clear_deprecated(google_protobuf_MessageOptions* msg) { const upb_MiniTableField field = {3, 3, 3, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_MessageOptions_deprecated(const google_protobuf_MessageOptions* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {3, 3, 3, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_MessageOptions_has_deprecated(const google_protobuf_MessageOptions* msg) { const upb_MiniTableField field = {3, 3, 3, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_MessageOptions_clear_map_entry(google_protobuf_MessageOptions* msg) { const upb_MiniTableField field = {7, 4, 4, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_MessageOptions_map_entry(const google_protobuf_MessageOptions* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {7, 4, 4, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_MessageOptions_has_map_entry(const google_protobuf_MessageOptions* msg) { const upb_MiniTableField field = {7, 4, 4, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); +} +UPB_INLINE void google_protobuf_MessageOptions_clear_deprecated_legacy_json_field_conflicts(google_protobuf_MessageOptions* msg) { + const upb_MiniTableField field = {11, 5, 5, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; + _upb_MiniTable_ClearNonExtensionField(msg, &field); +} +UPB_INLINE bool google_protobuf_MessageOptions_deprecated_legacy_json_field_conflicts(const google_protobuf_MessageOptions* msg) { + bool default_val = false; + bool ret; + const upb_MiniTableField field = {11, 5, 5, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); + return ret; +} +UPB_INLINE bool google_protobuf_MessageOptions_has_deprecated_legacy_json_field_conflicts(const google_protobuf_MessageOptions* msg) { + const upb_MiniTableField field = {11, 5, 5, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_MessageOptions_clear_uninterpreted_option(google_protobuf_MessageOptions* msg) { const upb_MiniTableField field = {999, 8, 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_MessageOptions_uninterpreted_option(const google_protobuf_MessageOptions* msg, size_t* len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, 8, len); @@ -5581,16 +5583,19 @@ UPB_INLINE bool google_protobuf_MessageOptions_has_uninterpreted_option(const go UPB_INLINE void google_protobuf_MessageOptions_set_message_set_wire_format(google_protobuf_MessageOptions *msg, bool value) { const upb_MiniTableField field = {1, 1, 1, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_MessageOptions_set_no_standard_descriptor_accessor(google_protobuf_MessageOptions *msg, bool value) { const upb_MiniTableField field = {2, 2, 2, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_MessageOptions_set_deprecated(google_protobuf_MessageOptions *msg, bool value) { const upb_MiniTableField field = {3, 3, 3, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_MessageOptions_set_map_entry(google_protobuf_MessageOptions *msg, bool value) { const upb_MiniTableField field = {7, 4, 4, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); +}UPB_INLINE void google_protobuf_MessageOptions_set_deprecated_legacy_json_field_conflicts(google_protobuf_MessageOptions *msg, bool value) { + const upb_MiniTableField field = {11, 5, 5, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MessageOptions_mutable_uninterpreted_option(google_protobuf_MessageOptions* msg, size_t* len) { return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, 8, len); } @@ -5641,112 +5646,112 @@ UPB_INLINE char* google_protobuf_FieldOptions_serialize_ex(const google_protobuf } UPB_INLINE void google_protobuf_FieldOptions_clear_ctype(google_protobuf_FieldOptions* msg) { const upb_MiniTableField field = {1, 4, 1, 0, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t google_protobuf_FieldOptions_ctype(const google_protobuf_FieldOptions* msg) { int32_t default_val = 0; int32_t ret; const upb_MiniTableField field = {1, 4, 1, 0, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FieldOptions_has_ctype(const google_protobuf_FieldOptions* msg) { const upb_MiniTableField field = {1, 4, 1, 0, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FieldOptions_clear_packed(google_protobuf_FieldOptions* msg) { const upb_MiniTableField field = {2, 8, 2, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_FieldOptions_packed(const google_protobuf_FieldOptions* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {2, 8, 2, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FieldOptions_has_packed(const google_protobuf_FieldOptions* msg) { const upb_MiniTableField field = {2, 8, 2, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FieldOptions_clear_deprecated(google_protobuf_FieldOptions* msg) { const upb_MiniTableField field = {3, 9, 3, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_FieldOptions_deprecated(const google_protobuf_FieldOptions* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {3, 9, 3, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FieldOptions_has_deprecated(const google_protobuf_FieldOptions* msg) { const upb_MiniTableField field = {3, 9, 3, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FieldOptions_clear_lazy(google_protobuf_FieldOptions* msg) { const upb_MiniTableField field = {5, 10, 4, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_FieldOptions_lazy(const google_protobuf_FieldOptions* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {5, 10, 4, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FieldOptions_has_lazy(const google_protobuf_FieldOptions* msg) { const upb_MiniTableField field = {5, 10, 4, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FieldOptions_clear_jstype(google_protobuf_FieldOptions* msg) { const upb_MiniTableField field = {6, 12, 5, 1, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t google_protobuf_FieldOptions_jstype(const google_protobuf_FieldOptions* msg) { int32_t default_val = 0; int32_t ret; const upb_MiniTableField field = {6, 12, 5, 1, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FieldOptions_has_jstype(const google_protobuf_FieldOptions* msg) { const upb_MiniTableField field = {6, 12, 5, 1, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FieldOptions_clear_weak(google_protobuf_FieldOptions* msg) { const upb_MiniTableField field = {10, 16, 6, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_FieldOptions_weak(const google_protobuf_FieldOptions* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {10, 16, 6, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FieldOptions_has_weak(const google_protobuf_FieldOptions* msg) { const upb_MiniTableField field = {10, 16, 6, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FieldOptions_clear_unverified_lazy(google_protobuf_FieldOptions* msg) { const upb_MiniTableField field = {15, 17, 7, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_FieldOptions_unverified_lazy(const google_protobuf_FieldOptions* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {15, 17, 7, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_FieldOptions_has_unverified_lazy(const google_protobuf_FieldOptions* msg) { const upb_MiniTableField field = {15, 17, 7, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_FieldOptions_clear_uninterpreted_option(google_protobuf_FieldOptions* msg) { const upb_MiniTableField field = {999, UPB_SIZE(20, 24), 0, 2, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_FieldOptions_uninterpreted_option(const google_protobuf_FieldOptions* msg, size_t* len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(20, 24), len); @@ -5759,25 +5764,25 @@ UPB_INLINE bool google_protobuf_FieldOptions_has_uninterpreted_option(const goog UPB_INLINE void google_protobuf_FieldOptions_set_ctype(google_protobuf_FieldOptions *msg, int32_t value) { const upb_MiniTableField field = {1, 4, 1, 0, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FieldOptions_set_packed(google_protobuf_FieldOptions *msg, bool value) { const upb_MiniTableField field = {2, 8, 2, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FieldOptions_set_deprecated(google_protobuf_FieldOptions *msg, bool value) { const upb_MiniTableField field = {3, 9, 3, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FieldOptions_set_lazy(google_protobuf_FieldOptions *msg, bool value) { const upb_MiniTableField field = {5, 10, 4, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FieldOptions_set_jstype(google_protobuf_FieldOptions *msg, int32_t value) { const upb_MiniTableField field = {6, 12, 5, 1, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FieldOptions_set_weak(google_protobuf_FieldOptions *msg, bool value) { const upb_MiniTableField field = {10, 16, 6, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_FieldOptions_set_unverified_lazy(google_protobuf_FieldOptions *msg, bool value) { const upb_MiniTableField field = {15, 17, 7, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FieldOptions_mutable_uninterpreted_option(google_protobuf_FieldOptions* msg, size_t* len) { return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 24), len); } @@ -5828,7 +5833,7 @@ UPB_INLINE char* google_protobuf_OneofOptions_serialize_ex(const google_protobuf } UPB_INLINE void google_protobuf_OneofOptions_clear_uninterpreted_option(google_protobuf_OneofOptions* msg) { const upb_MiniTableField field = {999, 0, 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_OneofOptions_uninterpreted_option(const google_protobuf_OneofOptions* msg, size_t* len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, 0, len); @@ -5889,37 +5894,52 @@ UPB_INLINE char* google_protobuf_EnumOptions_serialize_ex(const google_protobuf_ } UPB_INLINE void google_protobuf_EnumOptions_clear_allow_alias(google_protobuf_EnumOptions* msg) { const upb_MiniTableField field = {2, 1, 1, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_EnumOptions_allow_alias(const google_protobuf_EnumOptions* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {2, 1, 1, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_EnumOptions_has_allow_alias(const google_protobuf_EnumOptions* msg) { const upb_MiniTableField field = {2, 1, 1, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_EnumOptions_clear_deprecated(google_protobuf_EnumOptions* msg) { const upb_MiniTableField field = {3, 2, 2, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_EnumOptions_deprecated(const google_protobuf_EnumOptions* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {3, 2, 2, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_EnumOptions_has_deprecated(const google_protobuf_EnumOptions* msg) { const upb_MiniTableField field = {3, 2, 2, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); +} +UPB_INLINE void google_protobuf_EnumOptions_clear_deprecated_legacy_json_field_conflicts(google_protobuf_EnumOptions* msg) { + const upb_MiniTableField field = {6, 3, 3, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; + _upb_MiniTable_ClearNonExtensionField(msg, &field); +} +UPB_INLINE bool google_protobuf_EnumOptions_deprecated_legacy_json_field_conflicts(const google_protobuf_EnumOptions* msg) { + bool default_val = false; + bool ret; + const upb_MiniTableField field = {6, 3, 3, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); + return ret; +} +UPB_INLINE bool google_protobuf_EnumOptions_has_deprecated_legacy_json_field_conflicts(const google_protobuf_EnumOptions* msg) { + const upb_MiniTableField field = {6, 3, 3, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_EnumOptions_clear_uninterpreted_option(google_protobuf_EnumOptions* msg) { const upb_MiniTableField field = {999, UPB_SIZE(4, 8), 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_EnumOptions_uninterpreted_option(const google_protobuf_EnumOptions* msg, size_t* len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); @@ -5932,10 +5952,13 @@ UPB_INLINE bool google_protobuf_EnumOptions_has_uninterpreted_option(const googl UPB_INLINE void google_protobuf_EnumOptions_set_allow_alias(google_protobuf_EnumOptions *msg, bool value) { const upb_MiniTableField field = {2, 1, 1, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_EnumOptions_set_deprecated(google_protobuf_EnumOptions *msg, bool value) { const upb_MiniTableField field = {3, 2, 2, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); +}UPB_INLINE void google_protobuf_EnumOptions_set_deprecated_legacy_json_field_conflicts(google_protobuf_EnumOptions *msg, bool value) { + const upb_MiniTableField field = {6, 3, 3, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_EnumOptions_mutable_uninterpreted_option(google_protobuf_EnumOptions* msg, size_t* len) { return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len); } @@ -5986,22 +6009,22 @@ UPB_INLINE char* google_protobuf_EnumValueOptions_serialize_ex(const google_prot } UPB_INLINE void google_protobuf_EnumValueOptions_clear_deprecated(google_protobuf_EnumValueOptions* msg) { const upb_MiniTableField field = {1, 1, 1, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_EnumValueOptions_deprecated(const google_protobuf_EnumValueOptions* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {1, 1, 1, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_EnumValueOptions_has_deprecated(const google_protobuf_EnumValueOptions* msg) { const upb_MiniTableField field = {1, 1, 1, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_EnumValueOptions_clear_uninterpreted_option(google_protobuf_EnumValueOptions* msg) { const upb_MiniTableField field = {999, UPB_SIZE(4, 8), 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_EnumValueOptions_uninterpreted_option(const google_protobuf_EnumValueOptions* msg, size_t* len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); @@ -6014,7 +6037,7 @@ UPB_INLINE bool google_protobuf_EnumValueOptions_has_uninterpreted_option(const UPB_INLINE void google_protobuf_EnumValueOptions_set_deprecated(google_protobuf_EnumValueOptions *msg, bool value) { const upb_MiniTableField field = {1, 1, 1, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_EnumValueOptions_mutable_uninterpreted_option(google_protobuf_EnumValueOptions* msg, size_t* len) { return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len); } @@ -6065,22 +6088,22 @@ UPB_INLINE char* google_protobuf_ServiceOptions_serialize_ex(const google_protob } UPB_INLINE void google_protobuf_ServiceOptions_clear_deprecated(google_protobuf_ServiceOptions* msg) { const upb_MiniTableField field = {33, 1, 1, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_ServiceOptions_deprecated(const google_protobuf_ServiceOptions* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {33, 1, 1, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_ServiceOptions_has_deprecated(const google_protobuf_ServiceOptions* msg) { const upb_MiniTableField field = {33, 1, 1, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_ServiceOptions_clear_uninterpreted_option(google_protobuf_ServiceOptions* msg) { const upb_MiniTableField field = {999, UPB_SIZE(4, 8), 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_ServiceOptions_uninterpreted_option(const google_protobuf_ServiceOptions* msg, size_t* len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); @@ -6093,7 +6116,7 @@ UPB_INLINE bool google_protobuf_ServiceOptions_has_uninterpreted_option(const go UPB_INLINE void google_protobuf_ServiceOptions_set_deprecated(google_protobuf_ServiceOptions *msg, bool value) { const upb_MiniTableField field = {33, 1, 1, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_ServiceOptions_mutable_uninterpreted_option(google_protobuf_ServiceOptions* msg, size_t* len) { return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len); } @@ -6144,37 +6167,37 @@ UPB_INLINE char* google_protobuf_MethodOptions_serialize_ex(const google_protobu } UPB_INLINE void google_protobuf_MethodOptions_clear_deprecated(google_protobuf_MethodOptions* msg) { const upb_MiniTableField field = {33, 1, 1, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_MethodOptions_deprecated(const google_protobuf_MethodOptions* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {33, 1, 1, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_MethodOptions_has_deprecated(const google_protobuf_MethodOptions* msg) { const upb_MiniTableField field = {33, 1, 1, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_MethodOptions_clear_idempotency_level(google_protobuf_MethodOptions* msg) { const upb_MiniTableField field = {34, 4, 2, 0, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t google_protobuf_MethodOptions_idempotency_level(const google_protobuf_MethodOptions* msg) { int32_t default_val = 0; int32_t ret; const upb_MiniTableField field = {34, 4, 2, 0, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_MethodOptions_has_idempotency_level(const google_protobuf_MethodOptions* msg) { const upb_MiniTableField field = {34, 4, 2, 0, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_MethodOptions_clear_uninterpreted_option(google_protobuf_MethodOptions* msg) { const upb_MiniTableField field = {999, 8, 0, 1, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_MethodOptions_uninterpreted_option(const google_protobuf_MethodOptions* msg, size_t* len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, 8, len); @@ -6187,10 +6210,10 @@ UPB_INLINE bool google_protobuf_MethodOptions_has_uninterpreted_option(const goo UPB_INLINE void google_protobuf_MethodOptions_set_deprecated(google_protobuf_MethodOptions *msg, bool value) { const upb_MiniTableField field = {33, 1, 1, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_MethodOptions_set_idempotency_level(google_protobuf_MethodOptions *msg, int32_t value) { const upb_MiniTableField field = {34, 4, 2, 0, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MethodOptions_mutable_uninterpreted_option(google_protobuf_MethodOptions* msg, size_t* len) { return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, 8, len); } @@ -6241,7 +6264,7 @@ UPB_INLINE char* google_protobuf_UninterpretedOption_serialize_ex(const google_p } UPB_INLINE void google_protobuf_UninterpretedOption_clear_name(google_protobuf_UninterpretedOption* msg) { const upb_MiniTableField field = {2, UPB_SIZE(4, 8), 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_UninterpretedOption_NamePart* const* google_protobuf_UninterpretedOption_name(const google_protobuf_UninterpretedOption* msg, size_t* len) { return (const google_protobuf_UninterpretedOption_NamePart* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); @@ -6253,93 +6276,93 @@ UPB_INLINE bool google_protobuf_UninterpretedOption_has_name(const google_protob } UPB_INLINE void google_protobuf_UninterpretedOption_clear_identifier_value(google_protobuf_UninterpretedOption* msg) { const upb_MiniTableField field = {3, UPB_SIZE(8, 16), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_UninterpretedOption_identifier_value(const google_protobuf_UninterpretedOption* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {3, UPB_SIZE(8, 16), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_UninterpretedOption_has_identifier_value(const google_protobuf_UninterpretedOption* msg) { const upb_MiniTableField field = {3, UPB_SIZE(8, 16), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_UninterpretedOption_clear_positive_int_value(google_protobuf_UninterpretedOption* msg) { const upb_MiniTableField field = {4, UPB_SIZE(16, 32), 2, kUpb_NoSub, 4, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE uint64_t google_protobuf_UninterpretedOption_positive_int_value(const google_protobuf_UninterpretedOption* msg) { uint64_t default_val = (uint64_t)0ull; uint64_t ret; const upb_MiniTableField field = {4, UPB_SIZE(16, 32), 2, kUpb_NoSub, 4, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_UninterpretedOption_has_positive_int_value(const google_protobuf_UninterpretedOption* msg) { const upb_MiniTableField field = {4, UPB_SIZE(16, 32), 2, kUpb_NoSub, 4, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_UninterpretedOption_clear_negative_int_value(google_protobuf_UninterpretedOption* msg) { const upb_MiniTableField field = {5, UPB_SIZE(24, 40), 3, kUpb_NoSub, 3, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int64_t google_protobuf_UninterpretedOption_negative_int_value(const google_protobuf_UninterpretedOption* msg) { int64_t default_val = (int64_t)0ll; int64_t ret; const upb_MiniTableField field = {5, UPB_SIZE(24, 40), 3, kUpb_NoSub, 3, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_UninterpretedOption_has_negative_int_value(const google_protobuf_UninterpretedOption* msg) { const upb_MiniTableField field = {5, UPB_SIZE(24, 40), 3, kUpb_NoSub, 3, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_UninterpretedOption_clear_double_value(google_protobuf_UninterpretedOption* msg) { const upb_MiniTableField field = {6, UPB_SIZE(32, 48), 4, kUpb_NoSub, 1, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE double google_protobuf_UninterpretedOption_double_value(const google_protobuf_UninterpretedOption* msg) { double default_val = 0; double ret; const upb_MiniTableField field = {6, UPB_SIZE(32, 48), 4, kUpb_NoSub, 1, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_UninterpretedOption_has_double_value(const google_protobuf_UninterpretedOption* msg) { const upb_MiniTableField field = {6, UPB_SIZE(32, 48), 4, kUpb_NoSub, 1, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_UninterpretedOption_clear_string_value(google_protobuf_UninterpretedOption* msg) { const upb_MiniTableField field = {7, UPB_SIZE(40, 56), 5, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_UninterpretedOption_string_value(const google_protobuf_UninterpretedOption* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {7, UPB_SIZE(40, 56), 5, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_UninterpretedOption_has_string_value(const google_protobuf_UninterpretedOption* msg) { const upb_MiniTableField field = {7, UPB_SIZE(40, 56), 5, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_UninterpretedOption_clear_aggregate_value(google_protobuf_UninterpretedOption* msg) { const upb_MiniTableField field = {8, UPB_SIZE(48, 72), 6, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_UninterpretedOption_aggregate_value(const google_protobuf_UninterpretedOption* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {8, UPB_SIZE(48, 72), 6, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_UninterpretedOption_has_aggregate_value(const google_protobuf_UninterpretedOption* msg) { const upb_MiniTableField field = {8, UPB_SIZE(48, 72), 6, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE google_protobuf_UninterpretedOption_NamePart** google_protobuf_UninterpretedOption_mutable_name(google_protobuf_UninterpretedOption* msg, size_t* len) { @@ -6356,22 +6379,22 @@ UPB_INLINE struct google_protobuf_UninterpretedOption_NamePart* google_protobuf_ } UPB_INLINE void google_protobuf_UninterpretedOption_set_identifier_value(google_protobuf_UninterpretedOption *msg, upb_StringView value) { const upb_MiniTableField field = {3, UPB_SIZE(8, 16), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_UninterpretedOption_set_positive_int_value(google_protobuf_UninterpretedOption *msg, uint64_t value) { const upb_MiniTableField field = {4, UPB_SIZE(16, 32), 2, kUpb_NoSub, 4, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_UninterpretedOption_set_negative_int_value(google_protobuf_UninterpretedOption *msg, int64_t value) { const upb_MiniTableField field = {5, UPB_SIZE(24, 40), 3, kUpb_NoSub, 3, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_UninterpretedOption_set_double_value(google_protobuf_UninterpretedOption *msg, double value) { const upb_MiniTableField field = {6, UPB_SIZE(32, 48), 4, kUpb_NoSub, 1, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_UninterpretedOption_set_string_value(google_protobuf_UninterpretedOption *msg, upb_StringView value) { const upb_MiniTableField field = {7, UPB_SIZE(40, 56), 5, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_UninterpretedOption_set_aggregate_value(google_protobuf_UninterpretedOption *msg, upb_StringView value) { const upb_MiniTableField field = {8, UPB_SIZE(48, 72), 6, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); } /* google.protobuf.UninterpretedOption.NamePart */ @@ -6410,41 +6433,41 @@ UPB_INLINE char* google_protobuf_UninterpretedOption_NamePart_serialize_ex(const } UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_clear_name_part(google_protobuf_UninterpretedOption_NamePart* msg) { const upb_MiniTableField field = {1, UPB_SIZE(4, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_UninterpretedOption_NamePart_name_part(const google_protobuf_UninterpretedOption_NamePart* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {1, UPB_SIZE(4, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_has_name_part(const google_protobuf_UninterpretedOption_NamePart* msg) { const upb_MiniTableField field = {1, UPB_SIZE(4, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_clear_is_extension(google_protobuf_UninterpretedOption_NamePart* msg) { const upb_MiniTableField field = {2, 1, 2, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_is_extension(const google_protobuf_UninterpretedOption_NamePart* msg) { bool default_val = false; bool ret; const upb_MiniTableField field = {2, 1, 2, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_has_is_extension(const google_protobuf_UninterpretedOption_NamePart* msg) { const upb_MiniTableField field = {2, 1, 2, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_set_name_part(google_protobuf_UninterpretedOption_NamePart *msg, upb_StringView value) { const upb_MiniTableField field = {1, UPB_SIZE(4, 8), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_set_is_extension(google_protobuf_UninterpretedOption_NamePart *msg, bool value) { const upb_MiniTableField field = {2, 1, 2, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); } /* google.protobuf.SourceCodeInfo */ @@ -6483,7 +6506,7 @@ UPB_INLINE char* google_protobuf_SourceCodeInfo_serialize_ex(const google_protob } UPB_INLINE void google_protobuf_SourceCodeInfo_clear_location(google_protobuf_SourceCodeInfo* msg) { const upb_MiniTableField field = {1, 0, 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_SourceCodeInfo_Location* const* google_protobuf_SourceCodeInfo_location(const google_protobuf_SourceCodeInfo* msg, size_t* len) { return (const google_protobuf_SourceCodeInfo_Location* const*)_upb_array_accessor(msg, 0, len); @@ -6544,7 +6567,7 @@ UPB_INLINE char* google_protobuf_SourceCodeInfo_Location_serialize_ex(const goog } UPB_INLINE void google_protobuf_SourceCodeInfo_Location_clear_path(google_protobuf_SourceCodeInfo_Location* msg) { const upb_MiniTableField field = {1, UPB_SIZE(4, 8), 0, kUpb_NoSub, 5, kUpb_FieldMode_Array | kUpb_LabelFlags_IsPacked | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t const* google_protobuf_SourceCodeInfo_Location_path(const google_protobuf_SourceCodeInfo_Location* msg, size_t* len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); @@ -6556,7 +6579,7 @@ UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_has_path(const google_pr } UPB_INLINE void google_protobuf_SourceCodeInfo_Location_clear_span(google_protobuf_SourceCodeInfo_Location* msg) { const upb_MiniTableField field = {2, UPB_SIZE(8, 16), 0, kUpb_NoSub, 5, kUpb_FieldMode_Array | kUpb_LabelFlags_IsPacked | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t const* google_protobuf_SourceCodeInfo_Location_span(const google_protobuf_SourceCodeInfo_Location* msg, size_t* len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); @@ -6568,37 +6591,37 @@ UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_has_span(const google_pr } UPB_INLINE void google_protobuf_SourceCodeInfo_Location_clear_leading_comments(google_protobuf_SourceCodeInfo_Location* msg) { const upb_MiniTableField field = {3, UPB_SIZE(16, 24), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_SourceCodeInfo_Location_leading_comments(const google_protobuf_SourceCodeInfo_Location* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {3, UPB_SIZE(16, 24), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_has_leading_comments(const google_protobuf_SourceCodeInfo_Location* msg) { const upb_MiniTableField field = {3, UPB_SIZE(16, 24), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_SourceCodeInfo_Location_clear_trailing_comments(google_protobuf_SourceCodeInfo_Location* msg) { const upb_MiniTableField field = {4, UPB_SIZE(24, 40), 2, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_SourceCodeInfo_Location_trailing_comments(const google_protobuf_SourceCodeInfo_Location* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {4, UPB_SIZE(24, 40), 2, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_has_trailing_comments(const google_protobuf_SourceCodeInfo_Location* msg) { const upb_MiniTableField field = {4, UPB_SIZE(24, 40), 2, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_SourceCodeInfo_Location_clear_leading_detached_comments(google_protobuf_SourceCodeInfo_Location* msg) { const upb_MiniTableField field = {6, UPB_SIZE(12, 56), 0, kUpb_NoSub, 12, kUpb_FieldMode_Array | kUpb_LabelFlags_IsAlternate | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView const* google_protobuf_SourceCodeInfo_Location_leading_detached_comments(const google_protobuf_SourceCodeInfo_Location* msg, size_t* len) { return (upb_StringView const*)_upb_array_accessor(msg, UPB_SIZE(12, 56), len); @@ -6629,10 +6652,10 @@ UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_add_span(google_protobuf } UPB_INLINE void google_protobuf_SourceCodeInfo_Location_set_leading_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_StringView value) { const upb_MiniTableField field = {3, UPB_SIZE(16, 24), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_SourceCodeInfo_Location_set_trailing_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_StringView value) { const upb_MiniTableField field = {4, UPB_SIZE(24, 40), 2, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE upb_StringView* google_protobuf_SourceCodeInfo_Location_mutable_leading_detached_comments(google_protobuf_SourceCodeInfo_Location* msg, size_t* len) { return (upb_StringView*)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 56), len); } @@ -6680,7 +6703,7 @@ UPB_INLINE char* google_protobuf_GeneratedCodeInfo_serialize_ex(const google_pro } UPB_INLINE void google_protobuf_GeneratedCodeInfo_clear_annotation(google_protobuf_GeneratedCodeInfo* msg) { const upb_MiniTableField field = {1, 0, 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE const google_protobuf_GeneratedCodeInfo_Annotation* const* google_protobuf_GeneratedCodeInfo_annotation(const google_protobuf_GeneratedCodeInfo* msg, size_t* len) { return (const google_protobuf_GeneratedCodeInfo_Annotation* const*)_upb_array_accessor(msg, 0, len); @@ -6741,7 +6764,7 @@ UPB_INLINE char* google_protobuf_GeneratedCodeInfo_Annotation_serialize_ex(const } UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_clear_path(google_protobuf_GeneratedCodeInfo_Annotation* msg) { const upb_MiniTableField field = {1, UPB_SIZE(4, 16), 0, kUpb_NoSub, 5, kUpb_FieldMode_Array | kUpb_LabelFlags_IsPacked | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t const* google_protobuf_GeneratedCodeInfo_Annotation_path(const google_protobuf_GeneratedCodeInfo_Annotation* msg, size_t* len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(4, 16), len); @@ -6753,63 +6776,63 @@ UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_path(const goog } UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_clear_source_file(google_protobuf_GeneratedCodeInfo_Annotation* msg) { const upb_MiniTableField field = {2, UPB_SIZE(20, 24), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE upb_StringView google_protobuf_GeneratedCodeInfo_Annotation_source_file(const google_protobuf_GeneratedCodeInfo_Annotation* msg) { upb_StringView default_val = upb_StringView_FromString(""); upb_StringView ret; const upb_MiniTableField field = {2, UPB_SIZE(20, 24), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_source_file(const google_protobuf_GeneratedCodeInfo_Annotation* msg) { const upb_MiniTableField field = {2, UPB_SIZE(20, 24), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_clear_begin(google_protobuf_GeneratedCodeInfo_Annotation* msg) { const upb_MiniTableField field = {3, UPB_SIZE(8, 4), 2, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t google_protobuf_GeneratedCodeInfo_Annotation_begin(const google_protobuf_GeneratedCodeInfo_Annotation* msg) { int32_t default_val = (int32_t)0; int32_t ret; const upb_MiniTableField field = {3, UPB_SIZE(8, 4), 2, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_begin(const google_protobuf_GeneratedCodeInfo_Annotation* msg) { const upb_MiniTableField field = {3, UPB_SIZE(8, 4), 2, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_clear_end(google_protobuf_GeneratedCodeInfo_Annotation* msg) { const upb_MiniTableField field = {4, UPB_SIZE(12, 8), 3, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t google_protobuf_GeneratedCodeInfo_Annotation_end(const google_protobuf_GeneratedCodeInfo_Annotation* msg) { int32_t default_val = (int32_t)0; int32_t ret; const upb_MiniTableField field = {4, UPB_SIZE(12, 8), 3, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_end(const google_protobuf_GeneratedCodeInfo_Annotation* msg) { const upb_MiniTableField field = {4, UPB_SIZE(12, 8), 3, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_clear_semantic(google_protobuf_GeneratedCodeInfo_Annotation* msg) { const upb_MiniTableField field = {5, UPB_SIZE(16, 12), 4, 0, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_ClearNonExtensionField(msg, &field); + _upb_MiniTable_ClearNonExtensionField(msg, &field); } UPB_INLINE int32_t google_protobuf_GeneratedCodeInfo_Annotation_semantic(const google_protobuf_GeneratedCodeInfo_Annotation* msg) { int32_t default_val = 0; int32_t ret; const upb_MiniTableField field = {5, UPB_SIZE(16, 12), 4, 0, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); + _upb_MiniTable_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_semantic(const google_protobuf_GeneratedCodeInfo_Annotation* msg) { const upb_MiniTableField field = {5, UPB_SIZE(16, 12), 4, 0, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return _upb_Message_HasNonExtensionField(msg, &field); + return _upb_MiniTable_HasNonExtensionField(msg, &field); } UPB_INLINE int32_t* google_protobuf_GeneratedCodeInfo_Annotation_mutable_path(google_protobuf_GeneratedCodeInfo_Annotation* msg, size_t* len) { @@ -6823,16 +6846,16 @@ UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_add_path(google_pro } UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_source_file(google_protobuf_GeneratedCodeInfo_Annotation *msg, upb_StringView value) { const upb_MiniTableField field = {2, UPB_SIZE(20, 24), 1, kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_begin(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t value) { const upb_MiniTableField field = {3, UPB_SIZE(8, 4), 2, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_end(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t value) { const upb_MiniTableField field = {4, UPB_SIZE(12, 8), 3, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); }UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_semantic(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t value) { const upb_MiniTableField field = {5, UPB_SIZE(16, 12), 4, 0, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_SetNonExtensionField(msg, &field, &value); + _upb_MiniTable_SetNonExtensionField(msg, &field, &value); } extern const upb_MiniTableFile google_protobuf_descriptor_proto_upb_file_layout; @@ -7696,6 +7719,32 @@ bool upb_Message_Next(const upb_Message* msg, const upb_MessageDef* m, bool upb_Message_DiscardUnknown(upb_Message* msg, const upb_MessageDef* m, int maxdepth); +// DEPRECATED FUNCTIONS +// PHP and Ruby need these until we can version-bump them to the current upb. + +UPB_INLINE void upb_Message_Clear(upb_Message* msg, const upb_MessageDef* m) { + return upb_Message_ClearByDef(msg, m); +} + +UPB_INLINE void upb_Message_ClearField(upb_Message* msg, + const upb_FieldDef* f) { + return upb_Message_ClearFieldByDef(msg, f); +} + +UPB_INLINE bool upb_Message_Has(const upb_Message* msg, const upb_FieldDef* f) { + return upb_Message_HasFieldByDef(msg, f); +} + +UPB_INLINE upb_MessageValue upb_Message_Get(const upb_Message* msg, + const upb_FieldDef* f) { + return upb_Message_GetFieldByDef(msg, f); +} + +UPB_INLINE bool upb_Message_Set(upb_Message* msg, const upb_FieldDef* f, + upb_MessageValue val, upb_Arena* a) { + return upb_Message_SetFieldByDef(msg, f, val, a); +} + #ifdef __cplusplus } /* extern "C" */ #endif @@ -8728,263 +8777,6 @@ enum { #ifndef UPB_WIRE_DECODE_INTERNAL_H_ #define UPB_WIRE_DECODE_INTERNAL_H_ - -#ifndef UPB_WIRE_EPS_COPY_INPUT_STREAM_H_ -#define UPB_WIRE_EPS_COPY_INPUT_STREAM_H_ - -#include - -// Must be last. - -// The maximum number of bytes a single protobuf field can take up in the -// wire format. We only want to do one bounds check per field, so the input -// stream guarantees that after upb_EpsCopyInputStream_IsDone() is called, -// the decoder can read this many bytes without performing another bounds -// check. The stream will copy into a patch buffer as necessary to guarantee -// this invariant. -#define kUpb_EpsCopyInputStream_SlopBytes 16 - -typedef struct { - const char* end; // Can read up to SlopBytes bytes beyond this. - const char* limit_ptr; // For bounds checks, = end + UPB_MIN(limit, 0) - int limit; // Submessage limit relative to end - char patch[kUpb_EpsCopyInputStream_SlopBytes * 2]; -} upb_EpsCopyInputStream; - -typedef const char* upb_EpsCopyInputStream_BufferFlipCallback( - upb_EpsCopyInputStream* e, const char* old_end, const char* new_start); - -typedef const char* upb_EpsCopyInputStream_IsDoneFallbackFunc( - upb_EpsCopyInputStream* e, const char* ptr, int overrun); - -// Initializes a upb_EpsCopyInputStream using the contents of the buffer -// [*ptr, size]. Updates `*ptr` as necessary to guarantee that at least -// kUpb_EpsCopyInputStream_SlopBytes, and returns true if the pointer has been -// updated. -UPB_INLINE bool upb_EpsCopyInputStream_Init(upb_EpsCopyInputStream* e, - const char** ptr, size_t size) { - bool ret; - if (size <= kUpb_EpsCopyInputStream_SlopBytes) { - memset(&e->patch, 0, 32); - if (size) memcpy(&e->patch, *ptr, size); - *ptr = e->patch; - e->end = *ptr + size; - e->limit = 0; - ret = true; - } else { - e->end = *ptr + size - kUpb_EpsCopyInputStream_SlopBytes; - e->limit = kUpb_EpsCopyInputStream_SlopBytes; - ret = false; - } - e->limit_ptr = e->end; - return ret; -} - -typedef enum { - // The current stream position is at a limit. - kUpb_IsDoneStatus_Done, - - // The current stream position is not at a limit. - kUpb_IsDoneStatus_NotDone, - - // The current stream position is not at a limit, and the stream needs to - // be flipped to a new buffer before more data can be read. - kUpb_IsDoneStatus_NeedFallback, -} upb_IsDoneStatus; - -// Returns the status of the current stream position. This is a low-level -// function, it is simpler to call upb_EpsCopyInputStream_IsDone() if possible. -UPB_INLINE upb_IsDoneStatus upb_EpsCopyInputStream_IsDoneStatus( - upb_EpsCopyInputStream* e, const char* ptr, int* overrun) { - *overrun = ptr - e->end; - if (UPB_LIKELY(ptr < e->limit_ptr)) { - return kUpb_IsDoneStatus_NotDone; - } else if (UPB_LIKELY(*overrun == e->limit)) { - return kUpb_IsDoneStatus_Done; - } else { - return kUpb_IsDoneStatus_NeedFallback; - } -} - -// Returns true if the stream has hit a limit, either the current delimited -// limit or the overall end-of-stream. As a side effect, this function may flip -// the pointer to a new buffer if there are less than -// kUpb_EpsCopyInputStream_SlopBytes of data to be read in the current buffer. -// -// Postcondition: if the function returns false, there are at least -// kUpb_EpsCopyInputStream_SlopBytes of data available to read at *ptr. -UPB_INLINE bool upb_EpsCopyInputStream_IsDone( - upb_EpsCopyInputStream* e, const char** ptr, - upb_EpsCopyInputStream_IsDoneFallbackFunc* func) { - int overrun; - switch (upb_EpsCopyInputStream_IsDoneStatus(e, *ptr, &overrun)) { - case kUpb_IsDoneStatus_Done: - return true; - case kUpb_IsDoneStatus_NotDone: - return false; - case kUpb_IsDoneStatus_NeedFallback: - *ptr = func(e, *ptr, overrun); - return *ptr == NULL; - } -} - -// Returns the total number of bytes that are safe to read from the current -// buffer without reading uninitialized or unallocated memory. -// -// Note that this check does not respect any semantic limits on the stream, -// either limits from PushLimit() or the overall stream end, so some of these -// bytes may have unpredictable, nonsense values in them. The guarantee is only -// that the bytes are valid to read from the perspective of the C language -// (ie. you can read without triggering UBSAN or ASAN). -UPB_INLINE size_t upb_EpsCopyInputStream_BytesAvailable( - upb_EpsCopyInputStream* e, const char* ptr) { - return (e->end - ptr) + kUpb_EpsCopyInputStream_SlopBytes; -} - -// Returns true if the given delimited field size is valid (it does not extend -// beyond any previously-pushed limits). `ptr` should point to the beginning -// of the field data, after the delimited size. -// -// Note that this does *not* guarantee that all of the data for this field is in -// the current buffer. -UPB_INLINE bool upb_EpsCopyInputStream_CheckSize( - const upb_EpsCopyInputStream* e, const char* ptr, int size) { - UPB_ASSERT(size >= 0); - return ptr - e->end + size <= e->limit; -} - -UPB_INLINE bool _upb_EpsCopyInputStream_CheckSizeAvailable( - upb_EpsCopyInputStream* e, const char* ptr, int size, bool submessage) { - // This is one extra branch compared to the more normal: - // return (size_t)(end - ptr) < size; - // However it is one less computation if we are just about to use "ptr + len": - // https://godbolt.org/z/35YGPz - // In microbenchmarks this shows a small improvement. - uintptr_t uptr = (uintptr_t)ptr; - uintptr_t uend = (uintptr_t)e->limit_ptr; - uintptr_t res = uptr + (size_t)size; - if (!submessage) uend += kUpb_EpsCopyInputStream_SlopBytes; - // NOTE: this check depends on having a linear address space. This is not - // technically guaranteed by uintptr_t. - bool ret = res >= uptr && res <= uend; - if (size < 0) UPB_ASSERT(!ret); - return ret; -} - -// Returns true if the given delimited field size is valid (it does not extend -// beyond any previously-pushed limited) *and* all of the data for this field is -// available to be read in the current buffer. -// -// If the size is negative, this function will always return false. This -// property can be useful in some cases. -UPB_INLINE bool upb_EpsCopyInputStream_CheckDataSizeAvailable( - upb_EpsCopyInputStream* e, const char* ptr, int size) { - return _upb_EpsCopyInputStream_CheckSizeAvailable(e, ptr, size, false); -} - -// Returns true if the given sub-message size is valid (it does not extend -// beyond any previously-pushed limited) *and* all of the data for this -// sub-message is available to be parsed in the current buffer. -// -// This implies that all fields from the sub-message can be parsed from the -// current buffer while maintaining the invariant that we always have at least -// kUpb_EpsCopyInputStream_SlopBytes of data available past the beginning of -// any individual field start. -// -// If the size is negative, this function will always return false. This -// property can be useful in some cases. -UPB_INLINE bool upb_EpsCopyInputStream_CheckSubMessageSizeAvailable( - upb_EpsCopyInputStream* e, const char* ptr, int size) { - return _upb_EpsCopyInputStream_CheckSizeAvailable(e, ptr, size, true); -} - -UPB_INLINE void _upb_EpsCopyInputStream_CheckLimit(upb_EpsCopyInputStream* e) { - UPB_ASSERT(e->limit_ptr == e->end + UPB_MIN(0, e->limit)); -} - -// Pushes a limit onto the stack of limits for the current stream. The limit -// will extend for `size` bytes beyond the position in `ptr`. Future calls to -// upb_EpsCopyInputStream_IsDone() will return `true` when the stream position -// reaches this limit. -// -// Returns a delta that the caller must store and supply to PopLimit() below. -UPB_INLINE int upb_EpsCopyInputStream_PushLimit(upb_EpsCopyInputStream* e, - const char* ptr, int size) { - int limit = size + (int)(ptr - e->end); - int delta = e->limit - limit; - _upb_EpsCopyInputStream_CheckLimit(e); - e->limit = limit; - e->limit_ptr = e->end + UPB_MIN(0, limit); - _upb_EpsCopyInputStream_CheckLimit(e); - return delta; -} - -// Pops the last limit that was pushed on this stream. This may only be called -// once IsDone() returns true. The user must pass the delta that was returned -// from PushLimit(). -UPB_INLINE void upb_EpsCopyInputStream_PopLimit(upb_EpsCopyInputStream* e, - const char* ptr, - int saved_delta) { - UPB_ASSERT(ptr - e->end == e->limit); - _upb_EpsCopyInputStream_CheckLimit(e); - e->limit += saved_delta; - e->limit_ptr = e->end + UPB_MIN(0, e->limit); - _upb_EpsCopyInputStream_CheckLimit(e); -} - -UPB_INLINE const char* _upb_EpsCopyInputStream_IsDoneFallbackInline( - upb_EpsCopyInputStream* e, const char* ptr, int overrun, - upb_EpsCopyInputStream_BufferFlipCallback* callback) { - if (overrun < e->limit) { - // Need to copy remaining data into patch buffer. - UPB_ASSERT(overrun < kUpb_EpsCopyInputStream_SlopBytes); - const char* old_end = ptr; - const char* new_start = &e->patch[0] + overrun; - memset(e->patch + kUpb_EpsCopyInputStream_SlopBytes, 0, - kUpb_EpsCopyInputStream_SlopBytes); - memcpy(e->patch, e->end, kUpb_EpsCopyInputStream_SlopBytes); - ptr = new_start; - e->end = &e->patch[kUpb_EpsCopyInputStream_SlopBytes]; - e->limit -= kUpb_EpsCopyInputStream_SlopBytes; - e->limit_ptr = e->end + e->limit; - UPB_ASSERT(ptr < e->limit_ptr); - return callback(e, old_end, new_start); - } else { - return callback(e, NULL, NULL); - } -} - -typedef const char* upb_EpsCopyInputStream_ParseDelimitedFunc( - upb_EpsCopyInputStream* e, const char* ptr, void* ctx); - -// Tries to perform a fast-path handling of the given delimited message data. -// If the sub-message beginning at `*ptr` and extending for `len` is short and -// fits within this buffer, calls `func` with `ctx` as a parameter, where the -// pushing and popping of limits is handled automatically and with lower cost -// than the normal PushLimit()/PopLimit() sequence. -static UPB_FORCEINLINE bool upb_EpsCopyInputStream_TryParseDelimitedFast( - upb_EpsCopyInputStream* e, const char** ptr, int len, - upb_EpsCopyInputStream_ParseDelimitedFunc* func, void* ctx) { - if (!upb_EpsCopyInputStream_CheckSubMessageSizeAvailable(e, *ptr, len)) { - return false; - } - - // Fast case: Sub-message is <128 bytes and fits in the current buffer. - // This means we can preserve limit/limit_ptr verbatim. - const char* saved_limit_ptr = e->limit_ptr; - int saved_limit = e->limit; - e->limit_ptr = *ptr + len; - e->limit = e->limit_ptr - e->end; - UPB_ASSERT(e->limit_ptr == e->end + UPB_MIN(0, e->limit)); - *ptr = func(e, *ptr, ctx); - e->limit_ptr = saved_limit_ptr; - e->limit = saved_limit; - UPB_ASSERT(e->limit_ptr == e->end + UPB_MIN(0, e->limit)); - return true; -} - - -#endif // UPB_WIRE_EPS_COPY_INPUT_STREAM_H_ #include "utf8_range.h" // Must be last. @@ -8992,14 +8784,18 @@ static UPB_FORCEINLINE bool upb_EpsCopyInputStream_TryParseDelimitedFast( #define DECODE_NOGROUP (uint32_t) - 1 typedef struct upb_Decoder { - upb_EpsCopyInputStream input; - const upb_ExtensionRegistry* extreg; - const char* unknown; // Start of unknown data, preserve at buffer flip - upb_Message* unknown_msg; // Pointer to preserve data to - int depth; // Tracks recursion depth to bound stack usage. - uint32_t end_group; // field number of END_GROUP tag, else DECODE_NOGROUP. + const char* end; /* Can read up to 16 bytes slop beyond this. */ + const char* limit_ptr; /* = end + UPB_MIN(limit, 0) */ + upb_Message* unknown_msg; /* Used for preserving unknown data. */ + const char* unknown; /* Start of unknown data, preserve at buffer flip. */ + const upb_ExtensionRegistry* + extreg; /* For looking up extensions during the parse. */ + int limit; /* Submessage limit relative to end. */ + int depth; /* Tracks recursion depth to bound stack usage. */ + uint32_t end_group; /* field number of END_GROUP tag, else DECODE_NOGROUP */ uint16_t options; bool missing_required; + char patch[32]; upb_Arena arena; jmp_buf err; @@ -9058,29 +8854,49 @@ UPB_INLINE const upb_MiniTable* decode_totablep(intptr_t table) { return (const upb_MiniTable*)(table >> 8); } -const char* _upb_Decoder_IsDoneFallback(upb_EpsCopyInputStream* e, - const char* ptr, int overrun); - -UPB_INLINE bool _upb_Decoder_IsDone(upb_Decoder* d, const char** ptr) { - return upb_EpsCopyInputStream_IsDone(&d->input, ptr, - &_upb_Decoder_IsDoneFallback); +UPB_INLINE +const char* _upb_Decoder_IsDoneFallbackInline(upb_Decoder* d, const char* ptr, + int overrun, int* status) { + if (overrun < d->limit) { + /* Need to copy remaining data into patch buffer. */ + UPB_ASSERT(overrun < 16); + if (d->unknown) { + if (!_upb_Message_AddUnknown(d->unknown_msg, d->unknown, ptr - d->unknown, + &d->arena)) { + *status = kUpb_DecodeStatus_OutOfMemory; + return NULL; + } + d->unknown = &d->patch[0] + overrun; + } + memset(d->patch + 16, 0, 16); + memcpy(d->patch, d->end, 16); + ptr = &d->patch[0] + overrun; + d->end = &d->patch[16]; + d->limit -= 16; + d->limit_ptr = d->end + d->limit; + d->options &= ~kUpb_DecodeOption_AliasString; + UPB_ASSERT(ptr < d->limit_ptr); + return ptr; + } else { + *status = kUpb_DecodeStatus_Malformed; + return NULL; + } } -UPB_INLINE const char* _upb_Decoder_BufferFlipCallback( - upb_EpsCopyInputStream* e, const char* old_end, const char* new_start) { - upb_Decoder* d = (upb_Decoder*)e; - if (!old_end) _upb_FastDecoder_ErrorJmp(d, kUpb_DecodeStatus_Malformed); +const char* _upb_Decoder_IsDoneFallback(upb_Decoder* d, const char* ptr, + int overrun); - if (d->unknown) { - if (!_upb_Message_AddUnknown(d->unknown_msg, d->unknown, - old_end - d->unknown, &d->arena)) { - _upb_FastDecoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory); - } - d->unknown = new_start; +UPB_INLINE +bool _upb_Decoder_IsDone(upb_Decoder* d, const char** ptr) { + int overrun = *ptr - d->end; + if (UPB_LIKELY(*ptr < d->limit_ptr)) { + return false; + } else if (UPB_LIKELY(overrun == d->limit)) { + return true; + } else { + *ptr = _upb_Decoder_IsDoneFallback(d, *ptr, overrun); + return false; } - - d->options &= ~kUpb_DecodeOption_AliasString; - return new_start; } #if UPB_FASTTABLE @@ -9106,6 +8922,30 @@ UPB_INLINE uint32_t _upb_FastDecoder_LoadTag(const char* ptr) { return tag; } +UPB_INLINE void _upb_Decoder_CheckLimit(upb_Decoder* d) { + UPB_ASSERT(d->limit_ptr == d->end + UPB_MIN(0, d->limit)); +} + +UPB_INLINE int _upb_Decoder_PushLimit(upb_Decoder* d, const char* ptr, + int size) { + int limit = size + (int)(ptr - d->end); + int delta = d->limit - limit; + _upb_Decoder_CheckLimit(d); + d->limit = limit; + d->limit_ptr = d->end + UPB_MIN(0, limit); + _upb_Decoder_CheckLimit(d); + return delta; +} + +UPB_INLINE void _upb_Decoder_PopLimit(upb_Decoder* d, const char* ptr, + int saved_delta) { + UPB_ASSERT(ptr - d->end == d->limit); + _upb_Decoder_CheckLimit(d); + d->limit += saved_delta; + d->limit_ptr = d->end + UPB_MIN(0, d->limit); + _upb_Decoder_CheckLimit(d); +} + #endif /* UPB_WIRE_DECODE_INTERNAL_H_ */ diff --git a/src/google/protobuf/arena.cc b/src/google/protobuf/arena.cc index 8479f5dd00620..2a624145c582d 100644 --- a/src/google/protobuf/arena.cc +++ b/src/google/protobuf/arena.cc @@ -93,8 +93,8 @@ static SerialArena::Memory AllocateMemory(const AllocationPolicy* policy_ptr, size = policy.start_block_size; } // Verify that min_bytes + kBlockHeaderSize won't overflow. - GOOGLE_CHECK_LE(min_bytes, - std::numeric_limits::max() - SerialArena::kBlockHeaderSize); + GOOGLE_ABSL_CHECK_LE(min_bytes, std::numeric_limits::max() - + SerialArena::kBlockHeaderSize); size = std::max(size, SerialArena::kBlockHeaderSize + min_bytes); void* mem; @@ -139,7 +139,7 @@ SerialArena::SerialArena(ArenaBlock* b, ThreadSafeArena& parent) head_{b}, space_allocated_{b->size}, parent_{parent} { - GOOGLE_DCHECK(!b->IsSentry()); + GOOGLE_ABSL_DCHECK(!b->IsSentry()); } // It is guaranteed that this is the first SerialArena. Use sentry block. @@ -168,7 +168,8 @@ void SerialArena::Init(ArenaBlock* b, size_t offset) { } SerialArena* SerialArena::New(Memory mem, ThreadSafeArena& parent) { - GOOGLE_DCHECK_LE(kBlockHeaderSize + ThreadSafeArena::kSerialArenaSize, mem.size); + GOOGLE_ABSL_DCHECK_LE(kBlockHeaderSize + ThreadSafeArena::kSerialArenaSize, + mem.size); ThreadSafeArenaStats::RecordAllocateStats(parent.arena_stats_.MutableStats(), /*used=*/0, /*allocated=*/mem.size, /*wasted=*/0); @@ -277,7 +278,7 @@ void SerialArena::CleanupList() { do { char* limit = b->Limit(); char* it = reinterpret_cast(b->cleanup_nodes); - GOOGLE_DCHECK(!b->IsSentry() || it == limit); + GOOGLE_ABSL_DCHECK(!b->IsSentry() || it == limit); while (it < limit) { it += cleanup::DestroyNode(it); } @@ -350,7 +351,7 @@ class ThreadSafeArena::SerialArenaChunk { return Layout(capacity()).Slice(ptr()).first(safe_size()); } std::atomic& id(uint32_t i) { - GOOGLE_DCHECK_LT(i, capacity()); + GOOGLE_ABSL_DCHECK_LT(i, capacity()); return Layout(capacity()).Pointer(ptr())[i]; } @@ -362,11 +363,11 @@ class ThreadSafeArena::SerialArenaChunk { return Layout(capacity()).Slice(ptr()).first(safe_size()); } const std::atomic& arena(uint32_t i) const { - GOOGLE_DCHECK_LT(i, capacity()); + GOOGLE_ABSL_DCHECK_LT(i, capacity()); return Layout(capacity()).Pointer(ptr())[i]; } std::atomic& arena(uint32_t i) { - GOOGLE_DCHECK_LT(i, capacity()); + GOOGLE_ABSL_DCHECK_LT(i, capacity()); return Layout(capacity()).Pointer(ptr())[i]; } @@ -473,7 +474,7 @@ ThreadSafeArena::ThreadSafeArena(void* mem, size_t size, } ArenaBlock* ThreadSafeArena::FirstBlock(void* buf, size_t size) { - GOOGLE_DCHECK_EQ(reinterpret_cast(buf) & 7, 0u); + GOOGLE_ABSL_DCHECK_EQ(reinterpret_cast(buf) & 7, 0u); if (buf == nullptr || size <= kBlockHeaderSize) { return SentryArenaBlock(); } @@ -486,7 +487,7 @@ ArenaBlock* ThreadSafeArena::FirstBlock(void* buf, size_t size, const AllocationPolicy& policy) { if (policy.IsDefault()) return FirstBlock(buf, size); - GOOGLE_DCHECK_EQ(reinterpret_cast(buf) & 7, 0u); + GOOGLE_ABSL_DCHECK_EQ(reinterpret_cast(buf) & 7, 0u); SerialArena::Memory mem; if (buf == nullptr || size < kBlockHeaderSize + kAllocPolicySize) { @@ -508,26 +509,26 @@ void ThreadSafeArena::InitializeWithPolicy(const AllocationPolicy& policy) { #ifndef NDEBUG const uint64_t old_alloc_policy = alloc_policy_.get_raw(); // If there was a policy (e.g., in Reset()), make sure flags were preserved. -#define GOOGLE_DCHECK_POLICY_FLAGS_() \ - if (old_alloc_policy > 3) \ - GOOGLE_CHECK_EQ(old_alloc_policy & 3, alloc_policy_.get_raw() & 3) +#define GOOGLE_ABSL_DCHECK_POLICY_FLAGS_() \ + if (old_alloc_policy > 3) \ + GOOGLE_ABSL_CHECK_EQ(old_alloc_policy & 3, alloc_policy_.get_raw() & 3) #else -#define GOOGLE_DCHECK_POLICY_FLAGS_() +#define GOOGLE_ABSL_DCHECK_POLICY_FLAGS_() #endif // NDEBUG // We ensured enough space so this cannot fail. void* p; if (!first_arena_.MaybeAllocateAligned(kAllocPolicySize, &p)) { - GOOGLE_LOG(FATAL) << "MaybeAllocateAligned cannot fail here."; + GOOGLE_ABSL_LOG(FATAL) << "MaybeAllocateAligned cannot fail here."; return; } new (p) AllocationPolicy{policy}; // Low bits store flags, so they mustn't be overwritten. - GOOGLE_DCHECK_EQ(0, reinterpret_cast(p) & 3); + GOOGLE_ABSL_DCHECK_EQ(0, reinterpret_cast(p) & 3); alloc_policy_.set_policy(reinterpret_cast(p)); - GOOGLE_DCHECK_POLICY_FLAGS_(); + GOOGLE_ABSL_DCHECK_POLICY_FLAGS_(); -#undef GOOGLE_DCHECK_POLICY_FLAGS_ +#undef GOOGLE_ABSL_DCHECK_POLICY_FLAGS_ } uint64_t ThreadSafeArena::GetNextLifeCycleId() { @@ -602,7 +603,6 @@ void ThreadSafeArena::AddSerialArena(void* id, SerialArena* serial) { } void ThreadSafeArena::Init() { - // Message-owned arenas bypass thread cache and do not need life cycle ID. tag_and_id_ = GetNextLifeCycleId(); arena_stats_ = Sample(); head_.store(SentrySerialArenaChunk(), std::memory_order_relaxed); @@ -647,10 +647,10 @@ SerialArena::Memory ThreadSafeArena::Free(size_t* space_allocated) { // necessary to Free and we should revisit this. (b/247560530) for (auto it = span.rbegin(); it != span.rend(); ++it) { SerialArena* serial = it->load(std::memory_order_relaxed); - GOOGLE_DCHECK_NE(serial, nullptr); + GOOGLE_ABSL_DCHECK_NE(serial, nullptr); // Always frees the first block of "serial" as it cannot be user-provided. SerialArena::Memory mem = serial->Free(deallocator); - GOOGLE_DCHECK_NE(mem.ptr, nullptr); + GOOGLE_ABSL_DCHECK_NE(mem.ptr, nullptr); deallocator(mem); } @@ -794,7 +794,7 @@ void ThreadSafeArena::CleanupList() { // and required not to break inter-object dependencies. (b/247560530) for (auto it = span.rbegin(); it != span.rend(); ++it) { SerialArena* serial = it->load(std::memory_order_relaxed); - GOOGLE_DCHECK_NE(serial, nullptr); + GOOGLE_ABSL_DCHECK_NE(serial, nullptr); serial->CleanupList(); } }); @@ -817,7 +817,7 @@ SerialArena* ThreadSafeArena::GetSerialArenaFallback(size_t n) { for (uint32_t i = 0; i < ids.size(); ++i) { if (ids[i].load(std::memory_order_relaxed) == id) { serial = chunk->arena(i).load(std::memory_order_relaxed); - GOOGLE_DCHECK_NE(serial, nullptr); + GOOGLE_ABSL_DCHECK_NE(serial, nullptr); break; } } diff --git a/src/google/protobuf/arena.h b/src/google/protobuf/arena.h index d17f63f756dc2..29c5a106f5288 100644 --- a/src/google/protobuf/arena.h +++ b/src/google/protobuf/arena.h @@ -316,7 +316,7 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena final { "CreateArray requires a trivially constructible type"); static_assert(std::is_trivially_destructible::value, "CreateArray requires a trivially destructible type"); - GOOGLE_CHECK_LE(num_elements, std::numeric_limits::max() / sizeof(T)) + GOOGLE_ABSL_CHECK_LE(num_elements, std::numeric_limits::max() / sizeof(T)) << "Requested size is too large to fit into size_t."; if (arena == nullptr) { return static_cast(::operator new[](num_elements * sizeof(T))); @@ -600,7 +600,7 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena final { // type has a trivial constructor. template PROTOBUF_NDEBUG_INLINE T* CreateInternalRawArray(size_t num_elements) { - GOOGLE_CHECK_LE(num_elements, std::numeric_limits::max() / sizeof(T)) + GOOGLE_ABSL_CHECK_LE(num_elements, std::numeric_limits::max() / sizeof(T)) << "Requested size is too large to fit into size_t."; // We count on compiler to realize that if sizeof(T) is a multiple of // 8 AlignUpTo can be elided. diff --git a/src/google/protobuf/arena_align.h b/src/google/protobuf/arena_align.h index 0603972e38bc9..8881a93a71209 100644 --- a/src/google/protobuf/arena_align.h +++ b/src/google/protobuf/arena_align.h @@ -104,7 +104,7 @@ struct ArenaAlignDefault { // Address sanitizer enabled alignment check template static T* CheckAligned(T* ptr) { - GOOGLE_DCHECK(IsAligned(ptr)) << static_cast(ptr); + GOOGLE_ABSL_DCHECK(IsAligned(ptr)) << static_cast(ptr); return ptr; } }; @@ -138,15 +138,15 @@ struct ArenaAlign { // Address sanitizer enabled alignment check template T* CheckAligned(T* ptr) const { - GOOGLE_DCHECK(IsAligned(ptr)) << static_cast(ptr); + GOOGLE_ABSL_DCHECK(IsAligned(ptr)) << static_cast(ptr); return ptr; } }; inline ArenaAlign ArenaAlignAs(size_t align) { // align must be a non zero power of 2 >= 8 - GOOGLE_DCHECK_NE(align, 0); - GOOGLE_DCHECK(absl::has_single_bit(align)) << "Invalid alignment " << align; + GOOGLE_ABSL_DCHECK_NE(align, 0); + GOOGLE_ABSL_DCHECK(absl::has_single_bit(align)) << "Invalid alignment " << align; return ArenaAlign{align}; } diff --git a/src/google/protobuf/arena_cleanup.h b/src/google/protobuf/arena_cleanup.h index 40367667b520b..d48661f3d37f0 100644 --- a/src/google/protobuf/arena_cleanup.h +++ b/src/google/protobuf/arena_cleanup.h @@ -35,8 +35,9 @@ #include #include -#include "google/protobuf/stubs/logging.h" #include "absl/base/attributes.h" +#include "google/protobuf/stubs/logging.h" +#include "google/protobuf/stubs/logging.h" #include "absl/strings/cord.h" @@ -91,7 +92,7 @@ inline ABSL_ATTRIBUTE_ALWAYS_INLINE void CreateNode(Tag tag, void* pos, void (*destructor)(void*)) { auto elem = reinterpret_cast(elem_raw); if (EnableSpecializedTags()) { - GOOGLE_DCHECK_EQ(elem & 3, 0ULL); // Must be aligned + GOOGLE_ABSL_DCHECK_EQ(elem & 3, 0ULL); // Must be aligned switch (tag) { case Tag::kString: { TaggedNode n = {elem | static_cast(Tag::kString)}; @@ -186,7 +187,7 @@ inline ABSL_ATTRIBUTE_ALWAYS_INLINE Tag Type(void* raw) { case Tag::kCord: return Tag::kCord; default: - GOOGLE_LOG(FATAL) << "Corrupted cleanup tag: " << (elem & 0x7ULL); + GOOGLE_ABSL_LOG(FATAL) << "Corrupted cleanup tag: " << (elem & 0x7ULL); return Tag::kDynamic; } } @@ -203,7 +204,7 @@ inline ABSL_ATTRIBUTE_ALWAYS_INLINE size_t Size(Tag tag) { case Tag::kCord: return sizeof(TaggedNode); default: - GOOGLE_LOG(FATAL) << "Corrupted cleanup tag: " << static_cast(tag); + GOOGLE_ABSL_LOG(FATAL) << "Corrupted cleanup tag: " << static_cast(tag); return sizeof(DynamicNode); } } diff --git a/src/google/protobuf/arena_impl.h b/src/google/protobuf/arena_impl.h index a75f233a0f069..043f21f67fdf3 100644 --- a/src/google/protobuf/arena_impl.h +++ b/src/google/protobuf/arena_impl.h @@ -41,8 +41,8 @@ #include #include "google/protobuf/stubs/common.h" -#include "google/protobuf/stubs/logging.h" #include "absl/base/attributes.h" +#include "google/protobuf/stubs/logging.h" #include "absl/numeric/bits.h" #include "absl/synchronization/mutex.h" #include "google/protobuf/arena_allocation_policy.h" @@ -92,11 +92,11 @@ struct ArenaBlock { ArenaBlock(ArenaBlock* next, size_t size) : next(next), cleanup_nodes(nullptr), size(size) { - GOOGLE_DCHECK_GT(size, sizeof(ArenaBlock)); + GOOGLE_ABSL_DCHECK_GT(size, sizeof(ArenaBlock)); } char* Pointer(size_t n) { - GOOGLE_DCHECK_LE(n, size); + GOOGLE_ABSL_DCHECK_LE(n, size); return reinterpret_cast(this) + n; } char* Limit() { return Pointer(size & static_cast(-8)); } @@ -172,8 +172,8 @@ class PROTOBUF_EXPORT SerialArena { // from it. template void* AllocateAligned(size_t n) { - GOOGLE_DCHECK_EQ(internal::AlignUpTo8(n), n); // Must be already aligned. - GOOGLE_DCHECK_GE(limit_, ptr()); + GOOGLE_ABSL_DCHECK_EQ(internal::AlignUpTo8(n), n); // Must be already aligned. + GOOGLE_ABSL_DCHECK_GE(limit_, ptr()); if (alloc_client == AllocationClient::kArray) { if (void* res = TryAllocateFromCachedBlock(n)) { @@ -248,8 +248,8 @@ class PROTOBUF_EXPORT SerialArena { public: // Allocate space if the current region provides enough space. bool MaybeAllocateAligned(size_t n, void** out) { - GOOGLE_DCHECK_EQ(internal::AlignUpTo8(n), n); // Must be already aligned. - GOOGLE_DCHECK_GE(limit_, ptr()); + GOOGLE_ABSL_DCHECK_EQ(internal::AlignUpTo8(n), n); // Must be already aligned. + GOOGLE_ABSL_DCHECK_GE(limit_, ptr()); if (PROTOBUF_PREDICT_FALSE(!HasSpace(n))) return false; *out = AllocateFromExisting(n); return true; @@ -260,7 +260,7 @@ class PROTOBUF_EXPORT SerialArena { // and the memory returned is uninitialized. template PROTOBUF_ALWAYS_INLINE void* MaybeAllocateWithCleanup() { - GOOGLE_DCHECK_GE(limit_, ptr()); + GOOGLE_ABSL_DCHECK_GE(limit_, ptr()); static_assert(!std::is_trivially_destructible::value, "This function is only for non-trivial types."); @@ -302,7 +302,7 @@ class PROTOBUF_EXPORT SerialArena { PROTOBUF_UNPOISON_MEMORY_REGION(ptr(), n); void* ret = internal::AlignTo(ptr(), align); set_ptr(ptr() + n); - GOOGLE_DCHECK_GE(limit_, ptr()); + GOOGLE_ABSL_DCHECK_GE(limit_, ptr()); AddCleanupFromExisting(ret, destructor); return ret; } @@ -314,7 +314,7 @@ class PROTOBUF_EXPORT SerialArena { PROTOBUF_UNPOISON_MEMORY_REGION(limit_ - n, n); limit_ -= n; - GOOGLE_DCHECK_GE(limit_, ptr()); + GOOGLE_ABSL_DCHECK_GE(limit_, ptr()); cleanup::CreateNode(tag, limit_, elem, destructor); } diff --git a/src/google/protobuf/arena_test_util.cc b/src/google/protobuf/arena_test_util.cc index a3d11f56a3477..40dc3500b5128 100644 --- a/src/google/protobuf/arena_test_util.cc +++ b/src/google/protobuf/arena_test_util.cc @@ -33,7 +33,7 @@ #include "google/protobuf/stubs/logging.h" -#define EXPECT_EQ GOOGLE_CHECK_EQ +#define EXPECT_EQ GOOGLE_ABSL_CHECK_EQ namespace google { namespace protobuf { diff --git a/src/google/protobuf/arena_test_util.h b/src/google/protobuf/arena_test_util.h index d3399f66a3e80..e32ad4cc522ec 100644 --- a/src/google/protobuf/arena_test_util.h +++ b/src/google/protobuf/arena_test_util.h @@ -70,7 +70,7 @@ void TestParseCorruptedString(const T& message) { } // This next line is a low bar. But getting through the test without crashing // due to use-after-free or other bugs is a big part of what we're checking. - GOOGLE_CHECK_GT(success_count, 0); + GOOGLE_ABSL_CHECK_GT(success_count, 0); } namespace internal { @@ -105,8 +105,8 @@ class ArenaHolder { explicit ArenaHolder(Arena* arena) : field_(Arena::CreateMessage(arena)), owned_by_arena_(arena != nullptr) { - GOOGLE_DCHECK(google::protobuf::Arena::is_arena_constructable::value); - GOOGLE_DCHECK(google::protobuf::Arena::is_destructor_skippable::value); + GOOGLE_ABSL_DCHECK(google::protobuf::Arena::is_arena_constructable::value); + GOOGLE_ABSL_DCHECK(google::protobuf::Arena::is_destructor_skippable::value); } ~ArenaHolder() { diff --git a/src/google/protobuf/arena_unittest.cc b/src/google/protobuf/arena_unittest.cc index 19f957283f549..8b5bbbde50b27 100644 --- a/src/google/protobuf/arena_unittest.cc +++ b/src/google/protobuf/arena_unittest.cc @@ -39,9 +39,9 @@ #include #include -#include "google/protobuf/stubs/logging.h" #include #include +#include "google/protobuf/stubs/logging.h" #include "absl/strings/string_view.h" #include "absl/synchronization/barrier.h" #include "google/protobuf/arena_test_util.h" @@ -1467,7 +1467,7 @@ TEST(ArenaTest, Alignment) { Arena arena; for (int i = 0; i < 200; i++) { void* p = Arena::CreateArray(&arena, i); - GOOGLE_CHECK_EQ(reinterpret_cast(p) % 8, 0) << i << ": " << p; + GOOGLE_ABSL_CHECK_EQ(reinterpret_cast(p) % 8, 0) << i << ": " << p; } } diff --git a/src/google/protobuf/arenastring.cc b/src/google/protobuf/arenastring.cc index 3dd4d5f7047a0..de7c22cf04a2e 100644 --- a/src/google/protobuf/arenastring.cc +++ b/src/google/protobuf/arenastring.cc @@ -202,7 +202,7 @@ std::string* ArenaStringPtr::MutableNoCopy(Arena* arena) { if (tagged_ptr_.IsMutable()) { return tagged_ptr_.Get(); } else { - GOOGLE_DCHECK(IsDefault()); + GOOGLE_ABSL_DCHECK(IsDefault()); // Allocate empty. The contents are not relevant. return NewString(arena); } @@ -211,7 +211,7 @@ std::string* ArenaStringPtr::MutableNoCopy(Arena* arena) { template std::string* ArenaStringPtr::MutableSlow(::google::protobuf::Arena* arena, const Lazy&... lazy_default) { - GOOGLE_DCHECK(IsDefault()); + GOOGLE_ABSL_DCHECK(IsDefault()); // For empty defaults, this ends up calling the default constructor which is // more efficient than a copy construction from @@ -285,7 +285,7 @@ const char* EpsCopyInputStream::ReadArenaString(const char* ptr, ArenaStringPtr* s, Arena* arena) { ScopedCheckPtrInvariants check(&s->tagged_ptr_); - GOOGLE_DCHECK(arena != nullptr); + GOOGLE_ABSL_DCHECK(arena != nullptr); int size = ReadSize(&ptr); if (!ptr) return nullptr; diff --git a/src/google/protobuf/arenastring.h b/src/google/protobuf/arenastring.h index d32b5ca2a000b..38783aa4d84e9 100644 --- a/src/google/protobuf/arenastring.h +++ b/src/google/protobuf/arenastring.h @@ -197,11 +197,11 @@ class TaggedStringPtr { private: static inline void assert_aligned(const void* p) { - GOOGLE_DCHECK_EQ(reinterpret_cast(p) & kMask, 0UL); + GOOGLE_ABSL_DCHECK_EQ(reinterpret_cast(p) & kMask, 0UL); } inline std::string* TagAs(Type type, std::string* p) { - GOOGLE_DCHECK(p != nullptr); + GOOGLE_ABSL_DCHECK(p != nullptr); assert_aligned(p); ptr_ = reinterpret_cast(reinterpret_cast(p) | type); return p; @@ -478,8 +478,8 @@ inline void ArenaStringPtr::ClearNonDefaultToEmpty() { } inline std::string* ArenaStringPtr::UnsafeMutablePointer() { - GOOGLE_DCHECK(tagged_ptr_.IsMutable()); - GOOGLE_DCHECK(tagged_ptr_.Get() != nullptr); + GOOGLE_ABSL_DCHECK(tagged_ptr_.IsMutable()); + GOOGLE_ABSL_DCHECK(tagged_ptr_.Get() != nullptr); return tagged_ptr_.Get(); } diff --git a/src/google/protobuf/arenastring_unittest.cc b/src/google/protobuf/arenastring_unittest.cc index 51a5d763a0444..2809920056f16 100644 --- a/src/google/protobuf/arenastring_unittest.cc +++ b/src/google/protobuf/arenastring_unittest.cc @@ -37,10 +37,10 @@ #include #include -#include "google/protobuf/stubs/logging.h" #include "google/protobuf/generated_message_util.h" #include "google/protobuf/message_lite.h" #include +#include "google/protobuf/stubs/logging.h" #include "absl/strings/string_view.h" #include "google/protobuf/io/coded_stream.h" #include "google/protobuf/io/zero_copy_stream_impl.h" diff --git a/src/google/protobuf/arenaz_sampler_test.cc b/src/google/protobuf/arenaz_sampler_test.cc index 98ff0427bf8cc..0152d5f717981 100644 --- a/src/google/protobuf/arenaz_sampler_test.cc +++ b/src/google/protobuf/arenaz_sampler_test.cc @@ -445,7 +445,7 @@ class ThreadSafeArenazSamplerTestThread : public Thread { protobuf_test_messages::proto2::TestAllTypesProto2> message = google::protobuf::MakeArenaSafeUnique< protobuf_test_messages::proto2::TestAllTypesProto2>(arena_); - GOOGLE_CHECK(message != nullptr); + GOOGLE_ABSL_CHECK(message != nullptr); // Signal that a message on the arena has been created. This should create // a SerialArena for this thread. if (barrier_->Block()) { @@ -508,7 +508,7 @@ class SampleFirstArenaThread : public Thread { protobuf_test_messages::proto2::TestAllTypesProto2> message = google::protobuf::MakeArenaSafeUnique< protobuf_test_messages::proto2::TestAllTypesProto2>(&arena); - GOOGLE_CHECK(message != nullptr); + GOOGLE_ABSL_CHECK(message != nullptr); arena_created_.Notify(); samples_counted_.WaitForNotification(); } diff --git a/src/google/protobuf/compiler/cpp/message.cc b/src/google/protobuf/compiler/cpp/message.cc index 3ac44ad13c1a1..0f293a90e0eeb 100644 --- a/src/google/protobuf/compiler/cpp/message.cc +++ b/src/google/protobuf/compiler/cpp/message.cc @@ -3602,20 +3602,21 @@ void MessageGenerator::GenerateCopyFrom(io::Printer* p) { // It is also disabled if a message has neither message fields nor // extensions, as it's impossible to copy from its descendant. // - // Note that FailIfCopyFromDescendant is implemented by reflection and not - // available for lite runtime. In that case, check if the size of the source - // has changed after Clear. - format("#ifndef NDEBUG\n"); + // Note that IsDescendant is implemented by reflection and not available for + // lite runtime. In that case, check if the size of the source has changed + // after Clear. if (HasDescriptorMethods(descriptor_->file(), options_)) { - format("FailIfCopyFromDescendant(*this, from);\n"); + format( + "$DCHK$(!::_pbi::IsDescendant(*this, from))\n" + " << \"Source of CopyFrom cannot be a descendant of the " + "target.\";\n" + "Clear();\n"); } else { - format("::size_t from_size = from.ByteSizeLong();\n"); - } - format( - "#endif\n" - "Clear();\n"); - if (!HasDescriptorMethods(descriptor_->file(), options_)) { format( + "#ifndef NDEBUG\n" + "::size_t from_size = from.ByteSizeLong();\n" + "#endif\n" + "Clear();\n" "#ifndef NDEBUG\n" "$CHK$_EQ(from_size, from.ByteSizeLong())\n" " << \"Source of CopyFrom changed when clearing target. Either \"\n" diff --git a/src/google/protobuf/descriptor.cc b/src/google/protobuf/descriptor.cc index 399012f0ea912..542895714909e 100644 --- a/src/google/protobuf/descriptor.cc +++ b/src/google/protobuf/descriptor.cc @@ -48,13 +48,14 @@ #include #include "google/protobuf/stubs/common.h" -#include "google/protobuf/stubs/logging.h" #include "absl/base/call_once.h" #include "absl/base/casts.h" #include "absl/base/dynamic_annotations.h" #include "absl/container/flat_hash_map.h" #include "absl/container/flat_hash_set.h" #include "absl/hash/hash.h" +#include "google/protobuf/stubs/logging.h" +#include "google/protobuf/stubs/logging.h" #include "absl/strings/ascii.h" #include "absl/strings/escaping.h" #include "absl/strings/str_cat.h" @@ -361,7 +362,7 @@ class FlatAllocatorImpl { template void PlanArray(int array_size) { // We can't call PlanArray after FinalizePlanning has been called. - GOOGLE_CHECK(!has_allocated()); + GOOGLE_ABSL_CHECK(!has_allocated()); if (std::is_trivially_destructible::value) { // Trivial types are aligned to 8 bytes. static_assert(alignof(U) <= 8, ""); @@ -382,13 +383,13 @@ class FlatAllocatorImpl { using TypeToUse = typename std::conditional::type; // We can only allocate after FinalizePlanning has been called. - GOOGLE_CHECK(has_allocated()); + GOOGLE_ABSL_CHECK(has_allocated()); TypeToUse*& data = pointers_.template Get(); int& used = used_.template Get(); U* res = reinterpret_cast(data + used); used += trivial ? RoundUpTo<8>(array_size * sizeof(U)) : array_size; - GOOGLE_CHECK_LE(used, total_.template Get()); + GOOGLE_ABSL_CHECK_LE(used, total_.template Get()); return res; } @@ -407,7 +408,7 @@ class FlatAllocatorImpl { // and the other 3 indices are specified in the result. void PlanFieldNames(const std::string& name, const std::string* opt_json_name) { - GOOGLE_CHECK(!has_allocated()); + GOOGLE_ABSL_CHECK(!has_allocated()); // Fast path for snake_case names, which follow the style guide. if (opt_json_name == nullptr) { @@ -448,7 +449,7 @@ class FlatAllocatorImpl { FieldNamesResult AllocateFieldNames(const std::string& name, const std::string& scope, const std::string* opt_json_name) { - GOOGLE_CHECK(has_allocated()); + GOOGLE_ABSL_CHECK(has_allocated()); std::string full_name = scope.empty() ? name : absl::StrCat(scope, ".", name); @@ -504,11 +505,11 @@ class FlatAllocatorImpl { template void FinalizePlanning(Alloc& alloc) { - GOOGLE_CHECK(!has_allocated()); + GOOGLE_ABSL_CHECK(!has_allocated()); pointers_ = alloc->CreateFlatAlloc(total_)->Pointers(); - GOOGLE_CHECK(has_allocated()); + GOOGLE_ABSL_CHECK(has_allocated()); } void ExpectConsumed() const { @@ -544,7 +545,7 @@ class FlatAllocatorImpl { template bool ExpectConsumed() const { - GOOGLE_CHECK_EQ(total_.template Get(), used_.template Get()); + GOOGLE_ABSL_CHECK_EQ(total_.template Get(), used_.template Get()); return true; } @@ -693,7 +694,7 @@ class Symbol { return absl::string_view(sub_package_file_descriptor()->file->package()) .substr(0, sub_package_file_descriptor()->name_size); default: - GOOGLE_CHECK(false); + GOOGLE_ABSL_CHECK(false); } return ""; } @@ -726,7 +727,7 @@ class Symbol { case METHOD: return {method_descriptor()->service(), method_descriptor()->name()}; default: - GOOGLE_CHECK(false); + GOOGLE_ABSL_CHECK(false); } return {}; } @@ -814,7 +815,7 @@ const char* FileDescriptor::SyntaxName(FileDescriptor::Syntax syntax) { case SYNTAX_UNKNOWN: return "unknown"; } - GOOGLE_LOG(FATAL) << "can't reach here."; + GOOGLE_ABSL_LOG(FATAL) << "can't reach here."; return nullptr; } @@ -1393,7 +1394,7 @@ DescriptorPool::Tables::Tables() { }); } -DescriptorPool::Tables::~Tables() { GOOGLE_DCHECK(checkpoints_.empty()); } +DescriptorPool::Tables::~Tables() { GOOGLE_ABSL_DCHECK(checkpoints_.empty()); } FileDescriptorTables::FileDescriptorTables() {} @@ -1413,7 +1414,7 @@ void DescriptorPool::Tables::AddCheckpoint() { } void DescriptorPool::Tables::ClearLastCheckpoint() { - GOOGLE_DCHECK(!checkpoints_.empty()); + GOOGLE_ABSL_DCHECK(!checkpoints_.empty()); checkpoints_.pop_back(); if (checkpoints_.empty()) { // All checkpoints have been cleared: we can now commit all of the pending @@ -1425,7 +1426,7 @@ void DescriptorPool::Tables::ClearLastCheckpoint() { } void DescriptorPool::Tables::RollbackToLastCheckpoint() { - GOOGLE_DCHECK(!checkpoints_.empty()); + GOOGLE_ABSL_DCHECK(!checkpoints_.empty()); const CheckPoint& checkpoint = checkpoints_.back(); for (size_t i = checkpoint.pending_symbols_before_checkpoint; @@ -1679,7 +1680,7 @@ inline void DescriptorPool::Tables::FindAllExtensions( bool DescriptorPool::Tables::AddSymbol(const std::string& full_name, Symbol symbol) { - GOOGLE_DCHECK_EQ(full_name, symbol.full_name()); + GOOGLE_ABSL_DCHECK_EQ(full_name, symbol.full_name()); if (symbols_by_name_.insert(symbol).second) { symbols_after_checkpoint_.push_back(symbol); return true; @@ -1691,8 +1692,8 @@ bool DescriptorPool::Tables::AddSymbol(const std::string& full_name, bool FileDescriptorTables::AddAliasUnderParent(const void* parent, const std::string& name, Symbol symbol) { - GOOGLE_DCHECK_EQ(name, symbol.parent_name_key().second); - GOOGLE_DCHECK_EQ(parent, symbol.parent_name_key().first); + GOOGLE_ABSL_DCHECK_EQ(name, symbol.parent_name_key().second); + GOOGLE_ABSL_DCHECK_EQ(parent, symbol.parent_name_key().first); return symbols_by_parent_.insert(symbol).second; } @@ -1926,7 +1927,7 @@ void DescriptorPool::InternalAddGeneratedFile( // Therefore, when we parse one, we have to be very careful to avoid using // any descriptor-based operations, since this might cause infinite recursion // or deadlock. - GOOGLE_CHECK(GeneratedDatabase()->Add(encoded_file_descriptor, size)); + GOOGLE_ABSL_CHECK(GeneratedDatabase()->Add(encoded_file_descriptor, size)); } @@ -2230,13 +2231,13 @@ const EnumValueDescriptor* Descriptor::FindEnumValueByName( const FieldDescriptor* Descriptor::map_key() const { if (!options().map_entry()) return nullptr; - GOOGLE_DCHECK_EQ(field_count(), 2); + GOOGLE_ABSL_DCHECK_EQ(field_count(), 2); return field(0); } const FieldDescriptor* Descriptor::map_value() const { if (!options().map_entry()) return nullptr; - GOOGLE_DCHECK_EQ(field_count(), 2); + GOOGLE_ABSL_DCHECK_EQ(field_count(), 2); return field(1); } @@ -2473,7 +2474,7 @@ bool FieldDescriptor::is_map_message_type() const { std::string FieldDescriptor::DefaultValueAsString( bool quote_string_type) const { - GOOGLE_CHECK(has_default_value()) << "No default value"; + GOOGLE_ABSL_CHECK(has_default_value()) << "No default value"; switch (cpp_type()) { case CPPTYPE_INT32: return absl::StrCat(default_value_int32_t()); @@ -2502,10 +2503,10 @@ std::string FieldDescriptor::DefaultValueAsString( case CPPTYPE_ENUM: return default_value_enum()->name(); case CPPTYPE_MESSAGE: - GOOGLE_LOG(DFATAL) << "Messages can't have default values!"; + GOOGLE_ABSL_LOG(DFATAL) << "Messages can't have default values!"; break; } - GOOGLE_LOG(FATAL) << "Can't get here: failed to get default value as string"; + GOOGLE_ABSL_LOG(FATAL) << "Can't get here: failed to get default value as string"; return ""; } @@ -2559,7 +2560,7 @@ void FileDescriptor::CopyHeadingTo(FileDescriptorProto* proto) const { void FileDescriptor::CopyJsonNameTo(FileDescriptorProto* proto) const { if (message_type_count() != proto->message_type_size() || extension_count() != proto->extension_size()) { - GOOGLE_LOG(ERROR) << "Cannot copy json_name to a proto of a different size."; + GOOGLE_ABSL_LOG(ERROR) << "Cannot copy json_name to a proto of a different size."; return; } for (int i = 0; i < message_type_count(); i++) { @@ -2616,7 +2617,7 @@ void Descriptor::CopyJsonNameTo(DescriptorProto* proto) const { if (field_count() != proto->field_size() || nested_type_count() != proto->nested_type_size() || extension_count() != proto->extension_size()) { - GOOGLE_LOG(ERROR) << "Cannot copy json_name to a proto of a different size."; + GOOGLE_ABSL_LOG(ERROR) << "Cannot copy json_name to a proto of a different size."; return; } for (int i = 0; i < field_count(); i++) { @@ -2838,8 +2839,8 @@ bool RetrieveOptions(int depth, const Message& options, return RetrieveOptionsAssumingRightPool(depth, *dynamic_options, option_entries); } else { - GOOGLE_LOG(ERROR) << "Found invalid proto option data for: " - << options.GetDescriptor()->full_name(); + GOOGLE_ABSL_LOG(ERROR) << "Found invalid proto option data for: " + << options.GetDescriptor()->full_name(); return RetrieveOptionsAssumingRightPool(depth, options, option_entries); } } @@ -3461,7 +3462,7 @@ void MethodDescriptor::DebugString( bool FileDescriptor::GetSourceLocation(const std::vector& path, SourceLocation* out_location) const { - GOOGLE_CHECK(out_location != nullptr); + GOOGLE_ABSL_CHECK(out_location != nullptr); if (source_code_info_) { if (const SourceCodeInfo_Location* loc = tables_->GetSourceLocation(path, source_code_info_)) { @@ -4108,11 +4109,11 @@ class DescriptorBuilder { const FileDescriptor* DescriptorPool::BuildFile( const FileDescriptorProto& proto) { - GOOGLE_CHECK(fallback_database_ == nullptr) + GOOGLE_ABSL_CHECK(fallback_database_ == nullptr) << "Cannot call BuildFile on a DescriptorPool that uses a " "DescriptorDatabase. You must instead find a way to get your file " "into the underlying database."; - GOOGLE_CHECK(mutex_ == nullptr); // Implied by the above GOOGLE_CHECK. + GOOGLE_ABSL_CHECK(mutex_ == nullptr); // Implied by the above GOOGLE_ABSL_CHECK. tables_->known_bad_symbols_.clear(); tables_->known_bad_files_.clear(); return DescriptorBuilder::New(this, tables_.get(), nullptr)->BuildFile(proto); @@ -4120,11 +4121,11 @@ const FileDescriptor* DescriptorPool::BuildFile( const FileDescriptor* DescriptorPool::BuildFileCollectingErrors( const FileDescriptorProto& proto, ErrorCollector* error_collector) { - GOOGLE_CHECK(fallback_database_ == nullptr) + GOOGLE_ABSL_CHECK(fallback_database_ == nullptr) << "Cannot call BuildFile on a DescriptorPool that uses a " "DescriptorDatabase. You must instead find a way to get your file " "into the underlying database."; - GOOGLE_CHECK(mutex_ == nullptr); // Implied by the above GOOGLE_CHECK. + GOOGLE_ABSL_CHECK(mutex_ == nullptr); // Implied by the above GOOGLE_ABSL_CHECK. tables_->known_bad_symbols_.clear(); tables_->known_bad_files_.clear(); return DescriptorBuilder::New(this, tables_.get(), error_collector) @@ -4164,10 +4165,10 @@ PROTOBUF_NOINLINE void DescriptorBuilder::AddError( const std::string& error) { if (error_collector_ == nullptr) { if (!had_errors_) { - GOOGLE_LOG(ERROR) << "Invalid proto descriptor for file \"" << filename_ - << "\":"; + GOOGLE_ABSL_LOG(ERROR) << "Invalid proto descriptor for file \"" << filename_ + << "\":"; } - GOOGLE_LOG(ERROR) << " " << element_name << ": " << error; + GOOGLE_ABSL_LOG(ERROR) << " " << element_name << ": " << error; } else { error_collector_->AddError(filename_, element_name, &descriptor, location, error); @@ -4218,7 +4219,7 @@ PROTOBUF_NOINLINE void DescriptorBuilder::AddWarning( DescriptorPool::ErrorCollector::ErrorLocation location, const std::string& error) { if (error_collector_ == nullptr) { - GOOGLE_LOG(WARNING) << filename_ << " " << element_name << ": " << error; + GOOGLE_ABSL_LOG(WARNING) << filename_ << " " << element_name << ": " << error; } else { error_collector_->AddWarning(filename_, element_name, &descriptor, location, error); @@ -4596,10 +4597,10 @@ bool DescriptorBuilder::AddSymbol(const std::string& full_name, // This is only possible if there was already an error adding something of // the same name. if (!had_errors_) { - GOOGLE_LOG(DFATAL) << "\"" << full_name - << "\" not previously defined in " - "symbols_by_name_, but was defined in " - "symbols_by_parent_; this shouldn't be possible."; + GOOGLE_ABSL_LOG(DFATAL) << "\"" << full_name + << "\" not previously defined in " + "symbols_by_name_, but was defined in " + "symbols_by_parent_; this shouldn't be possible."; } return false; } @@ -4842,7 +4843,7 @@ PROTOBUF_NOINLINE static bool ExistingFileMatchesProto( // necessary memory allocations that BuildXXX functions below will do on the // Tables object. // They *must* be kept in sync. If we miss some PlanArray call we won't have -// enough memory and will GOOGLE_CHECK-fail. +// enough memory and will GOOGLE_ABSL_CHECK-fail. static void PlanAllocationSize( const RepeatedPtrField& values, internal::FlatAllocator& alloc) { @@ -6273,8 +6274,8 @@ void DescriptorBuilder::CrossLinkMessage(Descriptor* message, // Verify that they are contiguous. // This is assumed by OneofDescriptor::field(i). // But only if there are no errors. - GOOGLE_CHECK_EQ(out_oneof_decl.fields_ + out_oneof_decl.field_count_, - message->field(i)); + GOOGLE_ABSL_CHECK_EQ(out_oneof_decl.fields_ + out_oneof_decl.field_count_, + message->field(i)); } ++out_oneof_decl.field_count_; } @@ -7250,7 +7251,7 @@ void DescriptorBuilder::ValidateJSType(FieldDescriptor* field, DescriptorBuilder::OptionInterpreter::OptionInterpreter( DescriptorBuilder* builder) : builder_(builder) { - GOOGLE_CHECK(builder_); + GOOGLE_ABSL_CHECK(builder_); } DescriptorBuilder::OptionInterpreter::~OptionInterpreter() {} @@ -7269,7 +7270,7 @@ bool DescriptorBuilder::OptionInterpreter::InterpretOptions( // and clear them, since we're about to interpret them. const FieldDescriptor* uninterpreted_options_field = options->GetDescriptor()->FindFieldByName("uninterpreted_option"); - GOOGLE_CHECK(uninterpreted_options_field != nullptr) + GOOGLE_ABSL_CHECK(uninterpreted_options_field != nullptr) << "No field named \"uninterpreted_option\" in the Options proto."; options->GetReflection()->ClearField(options, uninterpreted_options_field); @@ -7280,7 +7281,7 @@ bool DescriptorBuilder::OptionInterpreter::InterpretOptions( const FieldDescriptor* original_uninterpreted_options_field = original_options->GetDescriptor()->FindFieldByName( "uninterpreted_option"); - GOOGLE_CHECK(original_uninterpreted_options_field != nullptr) + GOOGLE_ABSL_CHECK(original_uninterpreted_options_field != nullptr) << "No field named \"uninterpreted_option\" in the Options proto."; const int num_uninterpreted_options = @@ -7373,7 +7374,7 @@ bool DescriptorBuilder::OptionInterpreter::InterpretSingleOption( // generated pool's mutex, so we can search it the straightforward way. options_descriptor = options->GetDescriptor(); } - GOOGLE_CHECK(options_descriptor); + GOOGLE_ABSL_CHECK(options_descriptor); // We iterate over the name parts to drill into the submessages until we find // the leaf field for the option. As we drill down we remember the current @@ -7508,7 +7509,7 @@ bool DescriptorBuilder::OptionInterpreter::InterpretSingleOption( case FieldDescriptor::TYPE_MESSAGE: { std::string* outstr = parent_unknown_fields->AddLengthDelimited((*iter)->number()); - GOOGLE_CHECK(unknown_fields->SerializeToString(outstr)) + GOOGLE_ABSL_CHECK(unknown_fields->SerializeToString(outstr)) << "Unexpected failure while serializing option submessage " << debug_msg_name << "\"."; break; @@ -7521,8 +7522,8 @@ bool DescriptorBuilder::OptionInterpreter::InterpretSingleOption( } default: - GOOGLE_LOG(FATAL) << "Invalid wire type for CPPTYPE_MESSAGE: " - << (*iter)->type(); + GOOGLE_ABSL_LOG(FATAL) << "Invalid wire type for CPPTYPE_MESSAGE: " + << (*iter)->type(); return false; } unknown_fields.reset(parent_unknown_fields.release()); @@ -7640,7 +7641,7 @@ void DescriptorBuilder::OptionInterpreter::AddWithoutInterpreting( const UninterpretedOption& uninterpreted_option, Message* options) { const FieldDescriptor* field = options->GetDescriptor()->FindFieldByName("uninterpreted_option"); - GOOGLE_CHECK(field != nullptr); + GOOGLE_ABSL_CHECK(field != nullptr); options->GetReflection() ->AddMessage(options, field) @@ -7700,7 +7701,7 @@ bool DescriptorBuilder::OptionInterpreter::ExamineIfOptionIsSet( break; default: - GOOGLE_LOG(FATAL) << "Invalid wire type for CPPTYPE_MESSAGE: " << type; + GOOGLE_ABSL_LOG(FATAL) << "Invalid wire type for CPPTYPE_MESSAGE: " << type; return false; } } @@ -8023,7 +8024,7 @@ bool DescriptorBuilder::OptionInterpreter::SetAggregateOption( const Descriptor* type = option_field->message_type(); std::unique_ptr dynamic(dynamic_factory_.GetPrototype(type)->New()); - GOOGLE_CHECK(dynamic.get() != nullptr) + GOOGLE_ABSL_CHECK(dynamic.get() != nullptr) << "Could not create an instance of " << option_field->DebugString(); AggregateErrorCollector collector; @@ -8043,7 +8044,7 @@ bool DescriptorBuilder::OptionInterpreter::SetAggregateOption( if (option_field->type() == FieldDescriptor::TYPE_MESSAGE) { unknown_fields->AddLengthDelimited(option_field->number(), serial); } else { - GOOGLE_CHECK_EQ(option_field->type(), FieldDescriptor::TYPE_GROUP); + GOOGLE_ABSL_CHECK_EQ(option_field->type(), FieldDescriptor::TYPE_GROUP); UnknownFieldSet* group = unknown_fields->AddGroup(option_field->number()); group->ParseFromString(serial); } @@ -8070,7 +8071,7 @@ void DescriptorBuilder::OptionInterpreter::SetInt32( break; default: - GOOGLE_LOG(FATAL) << "Invalid wire type for CPPTYPE_INT32: " << type; + GOOGLE_ABSL_LOG(FATAL) << "Invalid wire type for CPPTYPE_INT32: " << type; break; } } @@ -8093,7 +8094,7 @@ void DescriptorBuilder::OptionInterpreter::SetInt64( break; default: - GOOGLE_LOG(FATAL) << "Invalid wire type for CPPTYPE_INT64: " << type; + GOOGLE_ABSL_LOG(FATAL) << "Invalid wire type for CPPTYPE_INT64: " << type; break; } } @@ -8111,7 +8112,7 @@ void DescriptorBuilder::OptionInterpreter::SetUInt32( break; default: - GOOGLE_LOG(FATAL) << "Invalid wire type for CPPTYPE_UINT32: " << type; + GOOGLE_ABSL_LOG(FATAL) << "Invalid wire type for CPPTYPE_UINT32: " << type; break; } } @@ -8129,7 +8130,7 @@ void DescriptorBuilder::OptionInterpreter::SetUInt64( break; default: - GOOGLE_LOG(FATAL) << "Invalid wire type for CPPTYPE_UINT64: " << type; + GOOGLE_ABSL_LOG(FATAL) << "Invalid wire type for CPPTYPE_UINT64: " << type; break; } } @@ -8171,7 +8172,7 @@ Symbol DescriptorPool::CrossLinkOnDemandHelper(absl::string_view name, // be looked up when the accessor for the type was called. Set type_, // enum_type_, message_type_, and default_value_enum_ appropriately. void FieldDescriptor::InternalTypeOnceInit() const { - GOOGLE_CHECK(file()->finished_building_ == true); + GOOGLE_ABSL_CHECK(file()->finished_building_ == true); const EnumDescriptor* enum_type = nullptr; const char* lazy_type_name = reinterpret_cast(type_once_ + 1); const char* lazy_default_value_enum_name = @@ -8206,7 +8207,7 @@ void FieldDescriptor::InternalTypeOnceInit() const { if (!default_value_enum_) { // We use the first defined value as the default // if a default is not explicitly defined. - GOOGLE_CHECK(enum_type->value_count()); + GOOGLE_ABSL_CHECK(enum_type->value_count()); default_value_enum_ = enum_type->value(0); } } @@ -8252,7 +8253,7 @@ const std::string& FieldDescriptor::PrintableNameForExtension() const { } void FileDescriptor::InternalDependenciesOnceInit() const { - GOOGLE_CHECK(finished_building_ == true); + GOOGLE_ABSL_CHECK(finished_building_ == true); const char* names_ptr = reinterpret_cast(dependencies_once_ + 1); for (int i = 0; i < dependency_count(); i++) { const char* name = names_ptr; @@ -8287,18 +8288,18 @@ const Descriptor* MethodDescriptor::output_type() const { namespace internal { void LazyDescriptor::Set(const Descriptor* descriptor) { - GOOGLE_CHECK(!once_); + GOOGLE_ABSL_CHECK(!once_); descriptor_ = descriptor; } void LazyDescriptor::SetLazy(absl::string_view name, const FileDescriptor* file) { // verify Init() has been called and Set hasn't been called yet. - GOOGLE_CHECK(!descriptor_); - GOOGLE_CHECK(!once_); - GOOGLE_CHECK(file && file->pool_); - GOOGLE_CHECK(file->pool_->lazily_build_dependencies_); - GOOGLE_CHECK(!file->finished_building_); + GOOGLE_ABSL_CHECK(!descriptor_); + GOOGLE_ABSL_CHECK(!once_); + GOOGLE_ABSL_CHECK(file && file->pool_); + GOOGLE_ABSL_CHECK(file->pool_->lazily_build_dependencies_); + GOOGLE_ABSL_CHECK(!file->finished_building_); once_ = ::new (file->pool_->tables_->AllocateBytes(static_cast( sizeof(absl::once_flag) + name.size() + 1))) absl::once_flag{}; char* lazy_name = reinterpret_cast(once_ + 1); @@ -8310,7 +8311,7 @@ void LazyDescriptor::Once(const ServiceDescriptor* service) { if (once_) { absl::call_once(*once_, [&] { auto* file = service->file(); - GOOGLE_CHECK(file->finished_building_); + GOOGLE_ABSL_CHECK(file->finished_building_); const char* lazy_name = reinterpret_cast(once_ + 1); descriptor_ = file->pool_->CrossLinkOnDemandHelper(lazy_name, false).descriptor(); diff --git a/src/google/protobuf/descriptor.h b/src/google/protobuf/descriptor.h index 5a8b5f3661b33..a8062418ed329 100644 --- a/src/google/protobuf/descriptor.h +++ b/src/google/protobuf/descriptor.h @@ -64,9 +64,10 @@ #include #include "google/protobuf/stubs/common.h" -#include "google/protobuf/stubs/logging.h" #include "google/protobuf/port.h" #include "absl/base/call_once.h" +#include "google/protobuf/stubs/logging.h" +#include "google/protobuf/stubs/logging.h" #include "absl/strings/string_view.h" #include "absl/synchronization/mutex.h" #include "google/protobuf/port.h" @@ -1799,7 +1800,7 @@ class PROTOBUF_EXPORT DescriptorPool { // this pool will be slower, since they will have to obtain locks too. // - An ErrorCollector may optionally be given to collect validation errors // in files loaded from the database. If not given, errors will be printed - // to GOOGLE_LOG(ERROR). Remember that files are built on-demand, so this + // to GOOGLE_ABSL_LOG(ERROR). Remember that files are built on-demand, so this // ErrorCollector may be called from any thread that calls one of the // Find*By*() methods. // - The DescriptorDatabase must not be mutated during the lifetime of @@ -1926,7 +1927,7 @@ class PROTOBUF_EXPORT DescriptorPool { // this DescriptorPool. All dependencies of the file must already be in // the pool. Returns the resulting FileDescriptor, or nullptr if there were // problems with the input (e.g. the message was invalid, or dependencies - // were missing). Details about the errors are written to GOOGLE_LOG(ERROR). + // were missing). Details about the errors are written to GOOGLE_ABSL_LOG(ERROR). const FileDescriptor* BuildFile(const FileDescriptorProto& proto); // Same as BuildFile() except errors are sent to the given ErrorCollector. @@ -2325,12 +2326,12 @@ inline const OneofDescriptor* FieldDescriptor::containing_oneof() const { } inline int FieldDescriptor::index_in_oneof() const { - GOOGLE_DCHECK(is_oneof_); + GOOGLE_ABSL_DCHECK(is_oneof_); return static_cast(this - scope_.containing_oneof->field(0)); } inline const Descriptor* FieldDescriptor::extension_scope() const { - GOOGLE_CHECK(is_extension_); + GOOGLE_ABSL_CHECK(is_extension_); return scope_.extension_scope; } @@ -2514,7 +2515,7 @@ struct FieldRangeImpl { value_type operator*() { return descriptor->field(idx); } friend bool operator==(const Iterator& a, const Iterator& b) { - GOOGLE_DCHECK(a.descriptor == b.descriptor); + GOOGLE_ABSL_DCHECK(a.descriptor == b.descriptor); return a.idx == b.idx; } friend bool operator!=(const Iterator& a, const Iterator& b) { diff --git a/src/google/protobuf/descriptor.pb.cc b/src/google/protobuf/descriptor.pb.cc index 985b0c294c58b..047c605f63581 100644 --- a/src/google/protobuf/descriptor.pb.cc +++ b/src/google/protobuf/descriptor.pb.cc @@ -307,7 +307,8 @@ PROTOBUF_CONSTEXPR MessageOptions::MessageOptions( , /*decltype(_impl_.message_set_wire_format_)*/false , /*decltype(_impl_.no_standard_descriptor_accessor_)*/false , /*decltype(_impl_.deprecated_)*/false - , /*decltype(_impl_.map_entry_)*/false} {} + , /*decltype(_impl_.map_entry_)*/false + , /*decltype(_impl_.deprecated_legacy_json_field_conflicts_)*/false} {} struct MessageOptionsDefaultTypeInternal { PROTOBUF_CONSTEXPR MessageOptionsDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~MessageOptionsDefaultTypeInternal() {} @@ -363,7 +364,8 @@ PROTOBUF_CONSTEXPR EnumOptions::EnumOptions( , /*decltype(_impl_._cached_size_)*/{} , /*decltype(_impl_.uninterpreted_option_)*/{} , /*decltype(_impl_.allow_alias_)*/false - , /*decltype(_impl_.deprecated_)*/false} {} + , /*decltype(_impl_.deprecated_)*/false + , /*decltype(_impl_.deprecated_legacy_json_field_conflicts_)*/false} {} struct EnumOptionsDefaultTypeInternal { PROTOBUF_CONSTEXPR EnumOptionsDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~EnumOptionsDefaultTypeInternal() {} @@ -827,11 +829,13 @@ const ::uint32_t TableStruct_google_2fprotobuf_2fdescriptor_2eproto::offsets[] P PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MessageOptions, _impl_.no_standard_descriptor_accessor_), PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MessageOptions, _impl_.deprecated_), PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MessageOptions, _impl_.map_entry_), + PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MessageOptions, _impl_.deprecated_legacy_json_field_conflicts_), PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MessageOptions, _impl_.uninterpreted_option_), 0, 1, 2, 3, + 4, ~0u, PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldOptions, _impl_._has_bits_), PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldOptions, _internal_metadata_), @@ -876,9 +880,11 @@ const ::uint32_t TableStruct_google_2fprotobuf_2fdescriptor_2eproto::offsets[] P ~0u, // no sizeof(Split) PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumOptions, _impl_.allow_alias_), PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumOptions, _impl_.deprecated_), + PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumOptions, _impl_.deprecated_legacy_json_field_conflicts_), PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumOptions, _impl_.uninterpreted_option_), 0, 1, + 2, ~0u, PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumValueOptions, _impl_._has_bits_), PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumValueOptions, _internal_metadata_), @@ -1024,19 +1030,19 @@ static const ::_pbi::MigrationSchema { 192, 203, -1, sizeof(::PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto)}, { 206, 220, -1, sizeof(::PROTOBUF_NAMESPACE_ID::MethodDescriptorProto)}, { 226, 255, -1, sizeof(::PROTOBUF_NAMESPACE_ID::FileOptions)}, - { 276, 289, -1, sizeof(::PROTOBUF_NAMESPACE_ID::MessageOptions)}, - { 294, 310, -1, sizeof(::PROTOBUF_NAMESPACE_ID::FieldOptions)}, - { 318, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::OneofOptions)}, - { 327, 338, -1, sizeof(::PROTOBUF_NAMESPACE_ID::EnumOptions)}, - { 341, 351, -1, sizeof(::PROTOBUF_NAMESPACE_ID::EnumValueOptions)}, - { 353, 363, -1, sizeof(::PROTOBUF_NAMESPACE_ID::ServiceOptions)}, - { 365, 376, -1, sizeof(::PROTOBUF_NAMESPACE_ID::MethodOptions)}, - { 379, 389, -1, sizeof(::PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart)}, - { 391, 406, -1, sizeof(::PROTOBUF_NAMESPACE_ID::UninterpretedOption)}, - { 413, 426, -1, sizeof(::PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location)}, - { 431, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::SourceCodeInfo)}, - { 440, 453, -1, sizeof(::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation)}, - { 458, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo)}, + { 276, 290, -1, sizeof(::PROTOBUF_NAMESPACE_ID::MessageOptions)}, + { 296, 312, -1, sizeof(::PROTOBUF_NAMESPACE_ID::FieldOptions)}, + { 320, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::OneofOptions)}, + { 329, 341, -1, sizeof(::PROTOBUF_NAMESPACE_ID::EnumOptions)}, + { 345, 355, -1, sizeof(::PROTOBUF_NAMESPACE_ID::EnumValueOptions)}, + { 357, 367, -1, sizeof(::PROTOBUF_NAMESPACE_ID::ServiceOptions)}, + { 369, 380, -1, sizeof(::PROTOBUF_NAMESPACE_ID::MethodOptions)}, + { 383, 393, -1, sizeof(::PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart)}, + { 395, 410, -1, sizeof(::PROTOBUF_NAMESPACE_ID::UninterpretedOption)}, + { 417, 430, -1, sizeof(::PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location)}, + { 435, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::SourceCodeInfo)}, + { 444, 457, -1, sizeof(::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation)}, + { 462, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo)}, }; static const ::_pb::Message* const file_default_instances[] = { @@ -1163,74 +1169,76 @@ const char descriptor_table_protodef_google_2fprotobuf_2fdescriptor_2eproto[] PR "terpreted_option\030\347\007 \003(\0132$.google.protobu" "f.UninterpretedOption\":\n\014OptimizeMode\022\t\n" "\005SPEED\020\001\022\r\n\tCODE_SIZE\020\002\022\020\n\014LITE_RUNTIME\020" - "\003*\t\010\350\007\020\200\200\200\200\002J\004\010&\020\'\"\204\002\n\016MessageOptions\022&\n" + "\003*\t\010\350\007\020\200\200\200\200\002J\004\010&\020\'\"\270\002\n\016MessageOptions\022&\n" "\027message_set_wire_format\030\001 \001(\010:\005false\022.\n" "\037no_standard_descriptor_accessor\030\002 \001(\010:\005" "false\022\031\n\ndeprecated\030\003 \001(\010:\005false\022\021\n\tmap_" - "entry\030\007 \001(\010\022C\n\024uninterpreted_option\030\347\007 \003" - "(\0132$.google.protobuf.UninterpretedOption" - "*\t\010\350\007\020\200\200\200\200\002J\004\010\004\020\005J\004\010\005\020\006J\004\010\006\020\007J\004\010\010\020\tJ\004\010\t\020" - "\n\"\276\003\n\014FieldOptions\022:\n\005ctype\030\001 \001(\0162#.goog" - "le.protobuf.FieldOptions.CType:\006STRING\022\016" - "\n\006packed\030\002 \001(\010\022\?\n\006jstype\030\006 \001(\0162$.google." - "protobuf.FieldOptions.JSType:\tJS_NORMAL\022" - "\023\n\004lazy\030\005 \001(\010:\005false\022\036\n\017unverified_lazy\030" - "\017 \001(\010:\005false\022\031\n\ndeprecated\030\003 \001(\010:\005false\022" - "\023\n\004weak\030\n \001(\010:\005false\022C\n\024uninterpreted_op" - "tion\030\347\007 \003(\0132$.google.protobuf.Uninterpre" - "tedOption\"/\n\005CType\022\n\n\006STRING\020\000\022\010\n\004CORD\020\001" - "\022\020\n\014STRING_PIECE\020\002\"5\n\006JSType\022\r\n\tJS_NORMA" - "L\020\000\022\r\n\tJS_STRING\020\001\022\r\n\tJS_NUMBER\020\002*\t\010\350\007\020\200" - "\200\200\200\002J\004\010\004\020\005\"^\n\014OneofOptions\022C\n\024uninterpre" - "ted_option\030\347\007 \003(\0132$.google.protobuf.Unin" - "terpretedOption*\t\010\350\007\020\200\200\200\200\002\"\223\001\n\013EnumOptio" - "ns\022\023\n\013allow_alias\030\002 \001(\010\022\031\n\ndeprecated\030\003 " - "\001(\010:\005false\022C\n\024uninterpreted_option\030\347\007 \003(" - "\0132$.google.protobuf.UninterpretedOption*" - "\t\010\350\007\020\200\200\200\200\002J\004\010\005\020\006\"}\n\020EnumValueOptions\022\031\n\n" - "deprecated\030\001 \001(\010:\005false\022C\n\024uninterpreted" + "entry\030\007 \001(\010\0222\n&deprecated_legacy_json_fi" + "eld_conflicts\030\013 \001(\010B\002\030\001\022C\n\024uninterpreted" "_option\030\347\007 \003(\0132$.google.protobuf.Uninter" - "pretedOption*\t\010\350\007\020\200\200\200\200\002\"{\n\016ServiceOption" - "s\022\031\n\ndeprecated\030! \001(\010:\005false\022C\n\024uninterp" - "reted_option\030\347\007 \003(\0132$.google.protobuf.Un" - "interpretedOption*\t\010\350\007\020\200\200\200\200\002\"\255\002\n\rMethodO" - "ptions\022\031\n\ndeprecated\030! \001(\010:\005false\022_\n\021ide" - "mpotency_level\030\" \001(\0162/.google.protobuf.M" - "ethodOptions.IdempotencyLevel:\023IDEMPOTEN" - "CY_UNKNOWN\022C\n\024uninterpreted_option\030\347\007 \003(" - "\0132$.google.protobuf.UninterpretedOption\"" - "P\n\020IdempotencyLevel\022\027\n\023IDEMPOTENCY_UNKNO" - "WN\020\000\022\023\n\017NO_SIDE_EFFECTS\020\001\022\016\n\nIDEMPOTENT\020" - "\002*\t\010\350\007\020\200\200\200\200\002\"\236\002\n\023UninterpretedOption\022;\n\004" - "name\030\002 \003(\0132-.google.protobuf.Uninterpret" - "edOption.NamePart\022\030\n\020identifier_value\030\003 " - "\001(\t\022\032\n\022positive_int_value\030\004 \001(\004\022\032\n\022negat" - "ive_int_value\030\005 \001(\003\022\024\n\014double_value\030\006 \001(" - "\001\022\024\n\014string_value\030\007 \001(\014\022\027\n\017aggregate_val" - "ue\030\010 \001(\t\0323\n\010NamePart\022\021\n\tname_part\030\001 \002(\t\022" - "\024\n\014is_extension\030\002 \002(\010\"\325\001\n\016SourceCodeInfo" - "\022:\n\010location\030\001 \003(\0132(.google.protobuf.Sou" - "rceCodeInfo.Location\032\206\001\n\010Location\022\020\n\004pat" - "h\030\001 \003(\005B\002\020\001\022\020\n\004span\030\002 \003(\005B\002\020\001\022\030\n\020leading" - "_comments\030\003 \001(\t\022\031\n\021trailing_comments\030\004 \001" - "(\t\022!\n\031leading_detached_comments\030\006 \003(\t\"\234\002" - "\n\021GeneratedCodeInfo\022A\n\nannotation\030\001 \003(\0132" - "-.google.protobuf.GeneratedCodeInfo.Anno" - "tation\032\303\001\n\nAnnotation\022\020\n\004path\030\001 \003(\005B\002\020\001\022" - "\023\n\013source_file\030\002 \001(\t\022\r\n\005begin\030\003 \001(\005\022\013\n\003e" - "nd\030\004 \001(\005\022H\n\010semantic\030\005 \001(\01626.google.prot" - "obuf.GeneratedCodeInfo.Annotation.Semant" - "ic\"(\n\010Semantic\022\010\n\004NONE\020\000\022\007\n\003SET\020\001\022\t\n\005ALI" - "AS\020\002B~\n\023com.google.protobufB\020DescriptorP" - "rotosH\001Z-google.golang.org/protobuf/type" - "s/descriptorpb\370\001\001\242\002\003GPB\252\002\032Google.Protobu" - "f.Reflection" + "pretedOption*\t\010\350\007\020\200\200\200\200\002J\004\010\004\020\005J\004\010\005\020\006J\004\010\006\020" + "\007J\004\010\010\020\tJ\004\010\t\020\n\"\276\003\n\014FieldOptions\022:\n\005ctype\030" + "\001 \001(\0162#.google.protobuf.FieldOptions.CTy" + "pe:\006STRING\022\016\n\006packed\030\002 \001(\010\022\?\n\006jstype\030\006 \001" + "(\0162$.google.protobuf.FieldOptions.JSType" + ":\tJS_NORMAL\022\023\n\004lazy\030\005 \001(\010:\005false\022\036\n\017unve" + "rified_lazy\030\017 \001(\010:\005false\022\031\n\ndeprecated\030\003" + " \001(\010:\005false\022\023\n\004weak\030\n \001(\010:\005false\022C\n\024unin" + "terpreted_option\030\347\007 \003(\0132$.google.protobu" + "f.UninterpretedOption\"/\n\005CType\022\n\n\006STRING" + "\020\000\022\010\n\004CORD\020\001\022\020\n\014STRING_PIECE\020\002\"5\n\006JSType" + "\022\r\n\tJS_NORMAL\020\000\022\r\n\tJS_STRING\020\001\022\r\n\tJS_NUM" + "BER\020\002*\t\010\350\007\020\200\200\200\200\002J\004\010\004\020\005\"^\n\014OneofOptions\022C" + "\n\024uninterpreted_option\030\347\007 \003(\0132$.google.p" + "rotobuf.UninterpretedOption*\t\010\350\007\020\200\200\200\200\002\"\307" + "\001\n\013EnumOptions\022\023\n\013allow_alias\030\002 \001(\010\022\031\n\nd" + "eprecated\030\003 \001(\010:\005false\0222\n&deprecated_leg" + "acy_json_field_conflicts\030\006 \001(\010B\002\030\001\022C\n\024un" + "interpreted_option\030\347\007 \003(\0132$.google.proto" + "buf.UninterpretedOption*\t\010\350\007\020\200\200\200\200\002J\004\010\005\020\006" + "\"}\n\020EnumValueOptions\022\031\n\ndeprecated\030\001 \001(\010" + ":\005false\022C\n\024uninterpreted_option\030\347\007 \003(\0132$" + ".google.protobuf.UninterpretedOption*\t\010\350" + "\007\020\200\200\200\200\002\"{\n\016ServiceOptions\022\031\n\ndeprecated\030" + "! \001(\010:\005false\022C\n\024uninterpreted_option\030\347\007 " + "\003(\0132$.google.protobuf.UninterpretedOptio" + "n*\t\010\350\007\020\200\200\200\200\002\"\255\002\n\rMethodOptions\022\031\n\ndeprec" + "ated\030! \001(\010:\005false\022_\n\021idempotency_level\030\"" + " \001(\0162/.google.protobuf.MethodOptions.Ide" + "mpotencyLevel:\023IDEMPOTENCY_UNKNOWN\022C\n\024un" + "interpreted_option\030\347\007 \003(\0132$.google.proto" + "buf.UninterpretedOption\"P\n\020IdempotencyLe" + "vel\022\027\n\023IDEMPOTENCY_UNKNOWN\020\000\022\023\n\017NO_SIDE_" + "EFFECTS\020\001\022\016\n\nIDEMPOTENT\020\002*\t\010\350\007\020\200\200\200\200\002\"\236\002\n" + "\023UninterpretedOption\022;\n\004name\030\002 \003(\0132-.goo" + "gle.protobuf.UninterpretedOption.NamePar" + "t\022\030\n\020identifier_value\030\003 \001(\t\022\032\n\022positive_" + "int_value\030\004 \001(\004\022\032\n\022negative_int_value\030\005 " + "\001(\003\022\024\n\014double_value\030\006 \001(\001\022\024\n\014string_valu" + "e\030\007 \001(\014\022\027\n\017aggregate_value\030\010 \001(\t\0323\n\010Name" + "Part\022\021\n\tname_part\030\001 \002(\t\022\024\n\014is_extension\030" + "\002 \002(\010\"\325\001\n\016SourceCodeInfo\022:\n\010location\030\001 \003" + "(\0132(.google.protobuf.SourceCodeInfo.Loca" + "tion\032\206\001\n\010Location\022\020\n\004path\030\001 \003(\005B\002\020\001\022\020\n\004s" + "pan\030\002 \003(\005B\002\020\001\022\030\n\020leading_comments\030\003 \001(\t\022" + "\031\n\021trailing_comments\030\004 \001(\t\022!\n\031leading_de" + "tached_comments\030\006 \003(\t\"\234\002\n\021GeneratedCodeI" + "nfo\022A\n\nannotation\030\001 \003(\0132-.google.protobu" + "f.GeneratedCodeInfo.Annotation\032\303\001\n\nAnnot" + "ation\022\020\n\004path\030\001 \003(\005B\002\020\001\022\023\n\013source_file\030\002" + " \001(\t\022\r\n\005begin\030\003 \001(\005\022\013\n\003end\030\004 \001(\005\022H\n\010sema" + "ntic\030\005 \001(\01626.google.protobuf.GeneratedCo" + "deInfo.Annotation.Semantic\"(\n\010Semantic\022\010" + "\n\004NONE\020\000\022\007\n\003SET\020\001\022\t\n\005ALIAS\020\002B~\n\023com.goog" + "le.protobufB\020DescriptorProtosH\001Z-google." + "golang.org/protobuf/types/descriptorpb\370\001" + "\001\242\002\003GPB\252\002\032Google.Protobuf.Reflection" }; static ::absl::once_flag descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_google_2fprotobuf_2fdescriptor_2eproto = { false, false, - 6212, + 6316, descriptor_table_protodef_google_2fprotobuf_2fdescriptor_2eproto, "google/protobuf/descriptor.proto", &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once, @@ -1481,9 +1489,10 @@ class FileDescriptorSet::_Internal { public: }; -FileDescriptorSet::FileDescriptorSet(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(arena); +FileDescriptorSet::FileDescriptorSet(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); // @@protoc_insertion_point(arena_constructor:google.protobuf.FileDescriptorSet) } FileDescriptorSet::FileDescriptorSet(const FileDescriptorSet& from) @@ -1497,8 +1506,10 @@ FileDescriptorSet::FileDescriptorSet(const FileDescriptorSet& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.FileDescriptorSet) } -inline void FileDescriptorSet::SharedCtor(::_pb::Arena* arena) { +inline void FileDescriptorSet::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { (void)arena; + (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_.file_){arena} , /*decltype(_impl_._cached_size_)*/{} @@ -1515,7 +1526,7 @@ FileDescriptorSet::~FileDescriptorSet() { } inline void FileDescriptorSet::SharedDtor() { - GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr); + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); _impl_.file_.~RepeatedPtrField(); } @@ -1631,7 +1642,7 @@ void FileDescriptorSet::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, cons auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FileDescriptorSet) - GOOGLE_ABSL_DCHECK_NE(&from, _this); + GOOGLE_DCHECK_NE(&from, _this); ::uint32_t cached_has_bits = 0; (void) cached_has_bits; @@ -1701,9 +1712,10 @@ const ::PROTOBUF_NAMESPACE_ID::SourceCodeInfo& FileDescriptorProto::_Internal::source_code_info(const FileDescriptorProto* msg) { return *msg->_impl_.source_code_info_; } -FileDescriptorProto::FileDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(arena); +FileDescriptorProto::FileDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); // @@protoc_insertion_point(arena_constructor:google.protobuf.FileDescriptorProto) } FileDescriptorProto::FileDescriptorProto(const FileDescriptorProto& from) @@ -1768,8 +1780,10 @@ FileDescriptorProto::FileDescriptorProto(const FileDescriptorProto& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.FileDescriptorProto) } -inline void FileDescriptorProto::SharedCtor(::_pb::Arena* arena) { +inline void FileDescriptorProto::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { (void)arena; + (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_._has_bits_){} , /*decltype(_impl_._cached_size_)*/{} @@ -1815,7 +1829,7 @@ FileDescriptorProto::~FileDescriptorProto() { } inline void FileDescriptorProto::SharedDtor() { - GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr); + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); _impl_.dependency_.~RepeatedPtrField(); _impl_.message_type_.~RepeatedPtrField(); _impl_.enum_type_.~RepeatedPtrField(); @@ -1863,11 +1877,11 @@ void FileDescriptorProto::Clear() { _impl_.edition_.ClearNonDefaultToEmpty(); } if (cached_has_bits & 0x00000010u) { - GOOGLE_ABSL_DCHECK(_impl_.options_ != nullptr); + GOOGLE_DCHECK(_impl_.options_ != nullptr); _impl_.options_->Clear(); } if (cached_has_bits & 0x00000020u) { - GOOGLE_ABSL_DCHECK(_impl_.source_code_info_ != nullptr); + GOOGLE_DCHECK(_impl_.source_code_info_ != nullptr); _impl_.source_code_info_->Clear(); } } @@ -2332,7 +2346,7 @@ void FileDescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, co auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FileDescriptorProto) - GOOGLE_ABSL_DCHECK_NE(&from, _this); + GOOGLE_DCHECK_NE(&from, _this); ::uint32_t cached_has_bits = 0; (void) cached_has_bits; @@ -2457,9 +2471,10 @@ const ::PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions& DescriptorProto_ExtensionRange::_Internal::options(const DescriptorProto_ExtensionRange* msg) { return *msg->_impl_.options_; } -DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(arena); +DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); // @@protoc_insertion_point(arena_constructor:google.protobuf.DescriptorProto.ExtensionRange) } DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange(const DescriptorProto_ExtensionRange& from) @@ -2482,8 +2497,10 @@ DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange(const DescriptorP // @@protoc_insertion_point(copy_constructor:google.protobuf.DescriptorProto.ExtensionRange) } -inline void DescriptorProto_ExtensionRange::SharedCtor(::_pb::Arena* arena) { +inline void DescriptorProto_ExtensionRange::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { (void)arena; + (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_._has_bits_){} , /*decltype(_impl_._cached_size_)*/{} @@ -2503,7 +2520,7 @@ DescriptorProto_ExtensionRange::~DescriptorProto_ExtensionRange() { } inline void DescriptorProto_ExtensionRange::SharedDtor() { - GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr); + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); if (this != internal_default_instance()) delete _impl_.options_; } @@ -2519,7 +2536,7 @@ void DescriptorProto_ExtensionRange::Clear() { cached_has_bits = _impl_._has_bits_[0]; if (cached_has_bits & 0x00000001u) { - GOOGLE_ABSL_DCHECK(_impl_.options_ != nullptr); + GOOGLE_DCHECK(_impl_.options_ != nullptr); _impl_.options_->Clear(); } if (cached_has_bits & 0x00000006u) { @@ -2671,7 +2688,7 @@ void DescriptorProto_ExtensionRange::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.DescriptorProto.ExtensionRange) - GOOGLE_ABSL_DCHECK_NE(&from, _this); + GOOGLE_DCHECK_NE(&from, _this); ::uint32_t cached_has_bits = 0; (void) cached_has_bits; @@ -2739,9 +2756,10 @@ class DescriptorProto_ReservedRange::_Internal { } }; -DescriptorProto_ReservedRange::DescriptorProto_ReservedRange(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(arena); +DescriptorProto_ReservedRange::DescriptorProto_ReservedRange(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); // @@protoc_insertion_point(arena_constructor:google.protobuf.DescriptorProto.ReservedRange) } DescriptorProto_ReservedRange::DescriptorProto_ReservedRange(const DescriptorProto_ReservedRange& from) @@ -2751,8 +2769,10 @@ DescriptorProto_ReservedRange::DescriptorProto_ReservedRange(const DescriptorPro // @@protoc_insertion_point(copy_constructor:google.protobuf.DescriptorProto.ReservedRange) } -inline void DescriptorProto_ReservedRange::SharedCtor(::_pb::Arena* arena) { +inline void DescriptorProto_ReservedRange::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { (void)arena; + (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_._has_bits_){} , /*decltype(_impl_._cached_size_)*/{} @@ -2771,7 +2791,7 @@ DescriptorProto_ReservedRange::~DescriptorProto_ReservedRange() { } inline void DescriptorProto_ReservedRange::SharedDtor() { - GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr); + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); } void DescriptorProto_ReservedRange::SetCachedSize(int size) const { @@ -2911,7 +2931,7 @@ void DescriptorProto_ReservedRange::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.DescriptorProto.ReservedRange) - GOOGLE_ABSL_DCHECK_NE(&from, _this); + GOOGLE_DCHECK_NE(&from, _this); ::uint32_t cached_has_bits = 0; (void) cached_has_bits; @@ -2977,9 +2997,10 @@ const ::PROTOBUF_NAMESPACE_ID::MessageOptions& DescriptorProto::_Internal::options(const DescriptorProto* msg) { return *msg->_impl_.options_; } -DescriptorProto::DescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(arena); +DescriptorProto::DescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); // @@protoc_insertion_point(arena_constructor:google.protobuf.DescriptorProto) } DescriptorProto::DescriptorProto(const DescriptorProto& from) @@ -3014,8 +3035,10 @@ DescriptorProto::DescriptorProto(const DescriptorProto& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.DescriptorProto) } -inline void DescriptorProto::SharedCtor(::_pb::Arena* arena) { +inline void DescriptorProto::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { (void)arena; + (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_._has_bits_){} , /*decltype(_impl_._cached_size_)*/{} @@ -3046,7 +3069,7 @@ DescriptorProto::~DescriptorProto() { } inline void DescriptorProto::SharedDtor() { - GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr); + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); _impl_.field_.~RepeatedPtrField(); _impl_.nested_type_.~RepeatedPtrField(); _impl_.enum_type_.~RepeatedPtrField(); @@ -3083,7 +3106,7 @@ void DescriptorProto::Clear() { _impl_.name_.ClearNonDefaultToEmpty(); } if (cached_has_bits & 0x00000002u) { - GOOGLE_ABSL_DCHECK(_impl_.options_ != nullptr); + GOOGLE_DCHECK(_impl_.options_ != nullptr); _impl_.options_->Clear(); } } @@ -3458,7 +3481,7 @@ void DescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.DescriptorProto) - GOOGLE_ABSL_DCHECK_NE(&from, _this); + GOOGLE_DCHECK_NE(&from, _this); ::uint32_t cached_has_bits = 0; (void) cached_has_bits; @@ -3542,9 +3565,10 @@ class ExtensionRangeOptions::_Internal { public: }; -ExtensionRangeOptions::ExtensionRangeOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(arena); +ExtensionRangeOptions::ExtensionRangeOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); // @@protoc_insertion_point(arena_constructor:google.protobuf.ExtensionRangeOptions) } ExtensionRangeOptions::ExtensionRangeOptions(const ExtensionRangeOptions& from) @@ -3560,8 +3584,10 @@ ExtensionRangeOptions::ExtensionRangeOptions(const ExtensionRangeOptions& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.ExtensionRangeOptions) } -inline void ExtensionRangeOptions::SharedCtor(::_pb::Arena* arena) { +inline void ExtensionRangeOptions::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { (void)arena; + (void)is_message_owned; new (&_impl_) Impl_{ /*decltype(_impl_._extensions_)*/{::_pbi::ArenaInitialized(), arena} , decltype(_impl_.uninterpreted_option_){arena} @@ -3579,7 +3605,7 @@ ExtensionRangeOptions::~ExtensionRangeOptions() { } inline void ExtensionRangeOptions::SharedDtor() { - GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr); + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); _impl_._extensions_.~ExtensionSet(); _impl_.uninterpreted_option_.~RepeatedPtrField(); } @@ -3708,7 +3734,7 @@ void ExtensionRangeOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.ExtensionRangeOptions) - GOOGLE_ABSL_DCHECK_NE(&from, _this); + GOOGLE_DCHECK_NE(&from, _this); ::uint32_t cached_has_bits = 0; (void) cached_has_bits; @@ -3794,9 +3820,10 @@ const ::PROTOBUF_NAMESPACE_ID::FieldOptions& FieldDescriptorProto::_Internal::options(const FieldDescriptorProto* msg) { return *msg->_impl_.options_; } -FieldDescriptorProto::FieldDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(arena); +FieldDescriptorProto::FieldDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); // @@protoc_insertion_point(arena_constructor:google.protobuf.FieldDescriptorProto) } FieldDescriptorProto::FieldDescriptorProto(const FieldDescriptorProto& from) @@ -3867,8 +3894,10 @@ FieldDescriptorProto::FieldDescriptorProto(const FieldDescriptorProto& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.FieldDescriptorProto) } -inline void FieldDescriptorProto::SharedCtor(::_pb::Arena* arena) { +inline void FieldDescriptorProto::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { (void)arena; + (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_._has_bits_){} , /*decltype(_impl_._cached_size_)*/{} @@ -3916,7 +3945,7 @@ FieldDescriptorProto::~FieldDescriptorProto() { } inline void FieldDescriptorProto::SharedDtor() { - GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr); + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); _impl_.name_.Destroy(); _impl_.extendee_.Destroy(); _impl_.type_name_.Destroy(); @@ -3953,7 +3982,7 @@ void FieldDescriptorProto::Clear() { _impl_.json_name_.ClearNonDefaultToEmpty(); } if (cached_has_bits & 0x00000020u) { - GOOGLE_ABSL_DCHECK(_impl_.options_ != nullptr); + GOOGLE_DCHECK(_impl_.options_ != nullptr); _impl_.options_->Clear(); } } @@ -4338,7 +4367,7 @@ void FieldDescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, c auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FieldDescriptorProto) - GOOGLE_ABSL_DCHECK_NE(&from, _this); + GOOGLE_DCHECK_NE(&from, _this); ::uint32_t cached_has_bits = 0; (void) cached_has_bits; @@ -4460,9 +4489,10 @@ const ::PROTOBUF_NAMESPACE_ID::OneofOptions& OneofDescriptorProto::_Internal::options(const OneofDescriptorProto* msg) { return *msg->_impl_.options_; } -OneofDescriptorProto::OneofDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(arena); +OneofDescriptorProto::OneofDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); // @@protoc_insertion_point(arena_constructor:google.protobuf.OneofDescriptorProto) } OneofDescriptorProto::OneofDescriptorProto(const OneofDescriptorProto& from) @@ -4489,8 +4519,10 @@ OneofDescriptorProto::OneofDescriptorProto(const OneofDescriptorProto& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.OneofDescriptorProto) } -inline void OneofDescriptorProto::SharedCtor(::_pb::Arena* arena) { +inline void OneofDescriptorProto::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { (void)arena; + (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_._has_bits_){} , /*decltype(_impl_._cached_size_)*/{} @@ -4513,7 +4545,7 @@ OneofDescriptorProto::~OneofDescriptorProto() { } inline void OneofDescriptorProto::SharedDtor() { - GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr); + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); _impl_.name_.Destroy(); if (this != internal_default_instance()) delete _impl_.options_; } @@ -4534,7 +4566,7 @@ void OneofDescriptorProto::Clear() { _impl_.name_.ClearNonDefaultToEmpty(); } if (cached_has_bits & 0x00000002u) { - GOOGLE_ABSL_DCHECK(_impl_.options_ != nullptr); + GOOGLE_DCHECK(_impl_.options_ != nullptr); _impl_.options_->Clear(); } } @@ -4670,7 +4702,7 @@ void OneofDescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, c auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.OneofDescriptorProto) - GOOGLE_ABSL_DCHECK_NE(&from, _this); + GOOGLE_DCHECK_NE(&from, _this); ::uint32_t cached_has_bits = 0; (void) cached_has_bits; @@ -4735,9 +4767,10 @@ class EnumDescriptorProto_EnumReservedRange::_Internal { } }; -EnumDescriptorProto_EnumReservedRange::EnumDescriptorProto_EnumReservedRange(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(arena); +EnumDescriptorProto_EnumReservedRange::EnumDescriptorProto_EnumReservedRange(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); // @@protoc_insertion_point(arena_constructor:google.protobuf.EnumDescriptorProto.EnumReservedRange) } EnumDescriptorProto_EnumReservedRange::EnumDescriptorProto_EnumReservedRange(const EnumDescriptorProto_EnumReservedRange& from) @@ -4747,8 +4780,10 @@ EnumDescriptorProto_EnumReservedRange::EnumDescriptorProto_EnumReservedRange(con // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumDescriptorProto.EnumReservedRange) } -inline void EnumDescriptorProto_EnumReservedRange::SharedCtor(::_pb::Arena* arena) { +inline void EnumDescriptorProto_EnumReservedRange::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { (void)arena; + (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_._has_bits_){} , /*decltype(_impl_._cached_size_)*/{} @@ -4767,7 +4802,7 @@ EnumDescriptorProto_EnumReservedRange::~EnumDescriptorProto_EnumReservedRange() } inline void EnumDescriptorProto_EnumReservedRange::SharedDtor() { - GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr); + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); } void EnumDescriptorProto_EnumReservedRange::SetCachedSize(int size) const { @@ -4907,7 +4942,7 @@ void EnumDescriptorProto_EnumReservedRange::MergeImpl(::PROTOBUF_NAMESPACE_ID::M auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumDescriptorProto.EnumReservedRange) - GOOGLE_ABSL_DCHECK_NE(&from, _this); + GOOGLE_DCHECK_NE(&from, _this); ::uint32_t cached_has_bits = 0; (void) cached_has_bits; @@ -4973,9 +5008,10 @@ const ::PROTOBUF_NAMESPACE_ID::EnumOptions& EnumDescriptorProto::_Internal::options(const EnumDescriptorProto* msg) { return *msg->_impl_.options_; } -EnumDescriptorProto::EnumDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(arena); +EnumDescriptorProto::EnumDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); // @@protoc_insertion_point(arena_constructor:google.protobuf.EnumDescriptorProto) } EnumDescriptorProto::EnumDescriptorProto(const EnumDescriptorProto& from) @@ -5005,8 +5041,10 @@ EnumDescriptorProto::EnumDescriptorProto(const EnumDescriptorProto& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumDescriptorProto) } -inline void EnumDescriptorProto::SharedCtor(::_pb::Arena* arena) { +inline void EnumDescriptorProto::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { (void)arena; + (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_._has_bits_){} , /*decltype(_impl_._cached_size_)*/{} @@ -5032,7 +5070,7 @@ EnumDescriptorProto::~EnumDescriptorProto() { } inline void EnumDescriptorProto::SharedDtor() { - GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr); + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); _impl_.value_.~RepeatedPtrField(); _impl_.reserved_range_.~RepeatedPtrField(); _impl_.reserved_name_.~RepeatedPtrField(); @@ -5059,7 +5097,7 @@ void EnumDescriptorProto::Clear() { _impl_.name_.ClearNonDefaultToEmpty(); } if (cached_has_bits & 0x00000002u) { - GOOGLE_ABSL_DCHECK(_impl_.options_ != nullptr); + GOOGLE_DCHECK(_impl_.options_ != nullptr); _impl_.options_->Clear(); } } @@ -5289,7 +5327,7 @@ void EnumDescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, co auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumDescriptorProto) - GOOGLE_ABSL_DCHECK_NE(&from, _this); + GOOGLE_DCHECK_NE(&from, _this); ::uint32_t cached_has_bits = 0; (void) cached_has_bits; @@ -5370,9 +5408,10 @@ const ::PROTOBUF_NAMESPACE_ID::EnumValueOptions& EnumValueDescriptorProto::_Internal::options(const EnumValueDescriptorProto* msg) { return *msg->_impl_.options_; } -EnumValueDescriptorProto::EnumValueDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(arena); +EnumValueDescriptorProto::EnumValueDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); // @@protoc_insertion_point(arena_constructor:google.protobuf.EnumValueDescriptorProto) } EnumValueDescriptorProto::EnumValueDescriptorProto(const EnumValueDescriptorProto& from) @@ -5401,8 +5440,10 @@ EnumValueDescriptorProto::EnumValueDescriptorProto(const EnumValueDescriptorProt // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumValueDescriptorProto) } -inline void EnumValueDescriptorProto::SharedCtor(::_pb::Arena* arena) { +inline void EnumValueDescriptorProto::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { (void)arena; + (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_._has_bits_){} , /*decltype(_impl_._cached_size_)*/{} @@ -5426,7 +5467,7 @@ EnumValueDescriptorProto::~EnumValueDescriptorProto() { } inline void EnumValueDescriptorProto::SharedDtor() { - GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr); + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); _impl_.name_.Destroy(); if (this != internal_default_instance()) delete _impl_.options_; } @@ -5447,7 +5488,7 @@ void EnumValueDescriptorProto::Clear() { _impl_.name_.ClearNonDefaultToEmpty(); } if (cached_has_bits & 0x00000002u) { - GOOGLE_ABSL_DCHECK(_impl_.options_ != nullptr); + GOOGLE_DCHECK(_impl_.options_ != nullptr); _impl_.options_->Clear(); } } @@ -5605,7 +5646,7 @@ void EnumValueDescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_ms auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumValueDescriptorProto) - GOOGLE_ABSL_DCHECK_NE(&from, _this); + GOOGLE_DCHECK_NE(&from, _this); ::uint32_t cached_has_bits = 0; (void) cached_has_bits; @@ -5684,9 +5725,10 @@ const ::PROTOBUF_NAMESPACE_ID::ServiceOptions& ServiceDescriptorProto::_Internal::options(const ServiceDescriptorProto* msg) { return *msg->_impl_.options_; } -ServiceDescriptorProto::ServiceDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(arena); +ServiceDescriptorProto::ServiceDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); // @@protoc_insertion_point(arena_constructor:google.protobuf.ServiceDescriptorProto) } ServiceDescriptorProto::ServiceDescriptorProto(const ServiceDescriptorProto& from) @@ -5714,8 +5756,10 @@ ServiceDescriptorProto::ServiceDescriptorProto(const ServiceDescriptorProto& fro // @@protoc_insertion_point(copy_constructor:google.protobuf.ServiceDescriptorProto) } -inline void ServiceDescriptorProto::SharedCtor(::_pb::Arena* arena) { +inline void ServiceDescriptorProto::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { (void)arena; + (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_._has_bits_){} , /*decltype(_impl_._cached_size_)*/{} @@ -5739,7 +5783,7 @@ ServiceDescriptorProto::~ServiceDescriptorProto() { } inline void ServiceDescriptorProto::SharedDtor() { - GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr); + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); _impl_.method_.~RepeatedPtrField(); _impl_.name_.Destroy(); if (this != internal_default_instance()) delete _impl_.options_; @@ -5762,7 +5806,7 @@ void ServiceDescriptorProto::Clear() { _impl_.name_.ClearNonDefaultToEmpty(); } if (cached_has_bits & 0x00000002u) { - GOOGLE_ABSL_DCHECK(_impl_.options_ != nullptr); + GOOGLE_DCHECK(_impl_.options_ != nullptr); _impl_.options_->Clear(); } } @@ -5927,7 +5971,7 @@ void ServiceDescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.ServiceDescriptorProto) - GOOGLE_ABSL_DCHECK_NE(&from, _this); + GOOGLE_DCHECK_NE(&from, _this); ::uint32_t cached_has_bits = 0; (void) cached_has_bits; @@ -6013,9 +6057,10 @@ const ::PROTOBUF_NAMESPACE_ID::MethodOptions& MethodDescriptorProto::_Internal::options(const MethodDescriptorProto* msg) { return *msg->_impl_.options_; } -MethodDescriptorProto::MethodDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(arena); +MethodDescriptorProto::MethodDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); // @@protoc_insertion_point(arena_constructor:google.protobuf.MethodDescriptorProto) } MethodDescriptorProto::MethodDescriptorProto(const MethodDescriptorProto& from) @@ -6065,8 +6110,10 @@ MethodDescriptorProto::MethodDescriptorProto(const MethodDescriptorProto& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.MethodDescriptorProto) } -inline void MethodDescriptorProto::SharedCtor(::_pb::Arena* arena) { +inline void MethodDescriptorProto::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { (void)arena; + (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_._has_bits_){} , /*decltype(_impl_._cached_size_)*/{} @@ -6101,7 +6148,7 @@ MethodDescriptorProto::~MethodDescriptorProto() { } inline void MethodDescriptorProto::SharedDtor() { - GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr); + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); _impl_.name_.Destroy(); _impl_.input_type_.Destroy(); _impl_.output_type_.Destroy(); @@ -6130,7 +6177,7 @@ void MethodDescriptorProto::Clear() { _impl_.output_type_.ClearNonDefaultToEmpty(); } if (cached_has_bits & 0x00000008u) { - GOOGLE_ABSL_DCHECK(_impl_.options_ != nullptr); + GOOGLE_DCHECK(_impl_.options_ != nullptr); _impl_.options_->Clear(); } } @@ -6371,7 +6418,7 @@ void MethodDescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.MethodDescriptorProto) - GOOGLE_ABSL_DCHECK_NE(&from, _this); + GOOGLE_DCHECK_NE(&from, _this); ::uint32_t cached_has_bits = 0; (void) cached_has_bits; @@ -6516,9 +6563,10 @@ class FileOptions::_Internal { } }; -FileOptions::FileOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(arena); +FileOptions::FileOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); // @@protoc_insertion_point(arena_constructor:google.protobuf.FileOptions) } FileOptions::FileOptions(const FileOptions& from) @@ -6638,8 +6686,10 @@ FileOptions::FileOptions(const FileOptions& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.FileOptions) } -inline void FileOptions::SharedCtor(::_pb::Arena* arena) { +inline void FileOptions::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { (void)arena; + (void)is_message_owned; new (&_impl_) Impl_{ /*decltype(_impl_._extensions_)*/{::_pbi::ArenaInitialized(), arena} , decltype(_impl_._has_bits_){} @@ -6718,7 +6768,7 @@ FileOptions::~FileOptions() { } inline void FileOptions::SharedDtor() { - GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr); + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); _impl_._extensions_.~ExtensionSet(); _impl_.uninterpreted_option_.~RepeatedPtrField(); _impl_.java_package_.Destroy(); @@ -7431,7 +7481,7 @@ void FileOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PR auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FileOptions) - GOOGLE_ABSL_DCHECK_NE(&from, _this); + GOOGLE_DCHECK_NE(&from, _this); ::uint32_t cached_has_bits = 0; (void) cached_has_bits; @@ -7607,11 +7657,15 @@ class MessageOptions::_Internal { static void set_has_map_entry(HasBits* has_bits) { (*has_bits)[0] |= 8u; } + static void set_has_deprecated_legacy_json_field_conflicts(HasBits* has_bits) { + (*has_bits)[0] |= 16u; + } }; -MessageOptions::MessageOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(arena); +MessageOptions::MessageOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); // @@protoc_insertion_point(arena_constructor:google.protobuf.MessageOptions) } MessageOptions::MessageOptions(const MessageOptions& from) @@ -7625,18 +7679,21 @@ MessageOptions::MessageOptions(const MessageOptions& from) , decltype(_impl_.message_set_wire_format_){} , decltype(_impl_.no_standard_descriptor_accessor_){} , decltype(_impl_.deprecated_){} - , decltype(_impl_.map_entry_){}}; + , decltype(_impl_.map_entry_){} + , decltype(_impl_.deprecated_legacy_json_field_conflicts_){}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); _impl_._extensions_.MergeFrom(internal_default_instance(), from._impl_._extensions_); ::memcpy(&_impl_.message_set_wire_format_, &from._impl_.message_set_wire_format_, - static_cast<::size_t>(reinterpret_cast(&_impl_.map_entry_) - - reinterpret_cast(&_impl_.message_set_wire_format_)) + sizeof(_impl_.map_entry_)); + static_cast<::size_t>(reinterpret_cast(&_impl_.deprecated_legacy_json_field_conflicts_) - + reinterpret_cast(&_impl_.message_set_wire_format_)) + sizeof(_impl_.deprecated_legacy_json_field_conflicts_)); // @@protoc_insertion_point(copy_constructor:google.protobuf.MessageOptions) } -inline void MessageOptions::SharedCtor(::_pb::Arena* arena) { +inline void MessageOptions::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { (void)arena; + (void)is_message_owned; new (&_impl_) Impl_{ /*decltype(_impl_._extensions_)*/{::_pbi::ArenaInitialized(), arena} , decltype(_impl_._has_bits_){} @@ -7646,6 +7703,7 @@ inline void MessageOptions::SharedCtor(::_pb::Arena* arena) { , decltype(_impl_.no_standard_descriptor_accessor_){false} , decltype(_impl_.deprecated_){false} , decltype(_impl_.map_entry_){false} + , decltype(_impl_.deprecated_legacy_json_field_conflicts_){false} }; } @@ -7659,7 +7717,7 @@ MessageOptions::~MessageOptions() { } inline void MessageOptions::SharedDtor() { - GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr); + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); _impl_._extensions_.~ExtensionSet(); _impl_.uninterpreted_option_.~RepeatedPtrField(); } @@ -7676,9 +7734,12 @@ void MessageOptions::Clear() { _impl_._extensions_.Clear(); _impl_.uninterpreted_option_.Clear(); - ::memset(&_impl_.message_set_wire_format_, 0, static_cast<::size_t>( - reinterpret_cast(&_impl_.map_entry_) - - reinterpret_cast(&_impl_.message_set_wire_format_)) + sizeof(_impl_.map_entry_)); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x0000001fu) { + ::memset(&_impl_.message_set_wire_format_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.deprecated_legacy_json_field_conflicts_) - + reinterpret_cast(&_impl_.message_set_wire_format_)) + sizeof(_impl_.deprecated_legacy_json_field_conflicts_)); + } _impl_._has_bits_.Clear(); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -7731,6 +7792,16 @@ const char* MessageOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext goto handle_unusual; } continue; + // optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true]; + case 11: + if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 88)) { + _Internal::set_has_deprecated_legacy_json_field_conflicts(&has_bits); + _impl_.deprecated_legacy_json_field_conflicts_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else { + goto handle_unusual; + } + continue; // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; case 999: if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) { @@ -7806,6 +7877,12 @@ ::uint8_t* MessageOptions::_InternalSerialize( target = ::_pbi::WireFormatLite::WriteBoolToArray(7, this->_internal_map_entry(), target); } + // optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true]; + if (cached_has_bits & 0x00000010u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(11, this->_internal_deprecated_legacy_json_field_conflicts(), target); + } + // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; for (unsigned i = 0, n = static_cast(this->_internal_uninterpreted_option_size()); i < n; i++) { @@ -7845,7 +7922,7 @@ ::size_t MessageOptions::ByteSizeLong() const { } cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x0000000fu) { + if (cached_has_bits & 0x0000001fu) { // optional bool message_set_wire_format = 1 [default = false]; if (cached_has_bits & 0x00000001u) { total_size += 1 + 1; @@ -7866,6 +7943,11 @@ ::size_t MessageOptions::ByteSizeLong() const { total_size += 1 + 1; } + // optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true]; + if (cached_has_bits & 0x00000010u) { + total_size += 1 + 1; + } + } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } @@ -7882,13 +7964,13 @@ void MessageOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const : auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.MessageOptions) - GOOGLE_ABSL_DCHECK_NE(&from, _this); + GOOGLE_DCHECK_NE(&from, _this); ::uint32_t cached_has_bits = 0; (void) cached_has_bits; _this->_impl_.uninterpreted_option_.MergeFrom(from._impl_.uninterpreted_option_); cached_has_bits = from._impl_._has_bits_[0]; - if (cached_has_bits & 0x0000000fu) { + if (cached_has_bits & 0x0000001fu) { if (cached_has_bits & 0x00000001u) { _this->_impl_.message_set_wire_format_ = from._impl_.message_set_wire_format_; } @@ -7901,6 +7983,9 @@ void MessageOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const : if (cached_has_bits & 0x00000008u) { _this->_impl_.map_entry_ = from._impl_.map_entry_; } + if (cached_has_bits & 0x00000010u) { + _this->_impl_.deprecated_legacy_json_field_conflicts_ = from._impl_.deprecated_legacy_json_field_conflicts_; + } _this->_impl_._has_bits_[0] |= cached_has_bits; } _this->_impl_._extensions_.MergeFrom(internal_default_instance(), from._impl_._extensions_); @@ -7931,8 +8016,8 @@ void MessageOptions::InternalSwap(MessageOptions* other) { swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); _impl_.uninterpreted_option_.InternalSwap(&other->_impl_.uninterpreted_option_); ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(MessageOptions, _impl_.map_entry_) - + sizeof(MessageOptions::_impl_.map_entry_) + PROTOBUF_FIELD_OFFSET(MessageOptions, _impl_.deprecated_legacy_json_field_conflicts_) + + sizeof(MessageOptions::_impl_.deprecated_legacy_json_field_conflicts_) - PROTOBUF_FIELD_OFFSET(MessageOptions, _impl_.message_set_wire_format_)>( reinterpret_cast(&_impl_.message_set_wire_format_), reinterpret_cast(&other->_impl_.message_set_wire_format_)); @@ -7974,9 +8059,10 @@ class FieldOptions::_Internal { } }; -FieldOptions::FieldOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(arena); +FieldOptions::FieldOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); // @@protoc_insertion_point(arena_constructor:google.protobuf.FieldOptions) } FieldOptions::FieldOptions(const FieldOptions& from) @@ -8003,8 +8089,10 @@ FieldOptions::FieldOptions(const FieldOptions& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.FieldOptions) } -inline void FieldOptions::SharedCtor(::_pb::Arena* arena) { +inline void FieldOptions::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { (void)arena; + (void)is_message_owned; new (&_impl_) Impl_{ /*decltype(_impl_._extensions_)*/{::_pbi::ArenaInitialized(), arena} , decltype(_impl_._has_bits_){} @@ -8030,7 +8118,7 @@ FieldOptions::~FieldOptions() { } inline void FieldOptions::SharedDtor() { - GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr); + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); _impl_._extensions_.~ExtensionSet(); _impl_.uninterpreted_option_.~RepeatedPtrField(); } @@ -8331,7 +8419,7 @@ void FieldOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::P auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FieldOptions) - GOOGLE_ABSL_DCHECK_NE(&from, _this); + GOOGLE_DCHECK_NE(&from, _this); ::uint32_t cached_has_bits = 0; (void) cached_has_bits; @@ -8408,9 +8496,10 @@ class OneofOptions::_Internal { public: }; -OneofOptions::OneofOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(arena); +OneofOptions::OneofOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); // @@protoc_insertion_point(arena_constructor:google.protobuf.OneofOptions) } OneofOptions::OneofOptions(const OneofOptions& from) @@ -8426,8 +8515,10 @@ OneofOptions::OneofOptions(const OneofOptions& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.OneofOptions) } -inline void OneofOptions::SharedCtor(::_pb::Arena* arena) { +inline void OneofOptions::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { (void)arena; + (void)is_message_owned; new (&_impl_) Impl_{ /*decltype(_impl_._extensions_)*/{::_pbi::ArenaInitialized(), arena} , decltype(_impl_.uninterpreted_option_){arena} @@ -8445,7 +8536,7 @@ OneofOptions::~OneofOptions() { } inline void OneofOptions::SharedDtor() { - GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr); + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); _impl_._extensions_.~ExtensionSet(); _impl_.uninterpreted_option_.~RepeatedPtrField(); } @@ -8574,7 +8665,7 @@ void OneofOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::P auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.OneofOptions) - GOOGLE_ABSL_DCHECK_NE(&from, _this); + GOOGLE_DCHECK_NE(&from, _this); ::uint32_t cached_has_bits = 0; (void) cached_has_bits; @@ -8626,11 +8717,15 @@ class EnumOptions::_Internal { static void set_has_deprecated(HasBits* has_bits) { (*has_bits)[0] |= 2u; } + static void set_has_deprecated_legacy_json_field_conflicts(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } }; -EnumOptions::EnumOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(arena); +EnumOptions::EnumOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); // @@protoc_insertion_point(arena_constructor:google.protobuf.EnumOptions) } EnumOptions::EnumOptions(const EnumOptions& from) @@ -8642,18 +8737,21 @@ EnumOptions::EnumOptions(const EnumOptions& from) , /*decltype(_impl_._cached_size_)*/{} , decltype(_impl_.uninterpreted_option_){from._impl_.uninterpreted_option_} , decltype(_impl_.allow_alias_){} - , decltype(_impl_.deprecated_){}}; + , decltype(_impl_.deprecated_){} + , decltype(_impl_.deprecated_legacy_json_field_conflicts_){}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); _impl_._extensions_.MergeFrom(internal_default_instance(), from._impl_._extensions_); ::memcpy(&_impl_.allow_alias_, &from._impl_.allow_alias_, - static_cast<::size_t>(reinterpret_cast(&_impl_.deprecated_) - - reinterpret_cast(&_impl_.allow_alias_)) + sizeof(_impl_.deprecated_)); + static_cast<::size_t>(reinterpret_cast(&_impl_.deprecated_legacy_json_field_conflicts_) - + reinterpret_cast(&_impl_.allow_alias_)) + sizeof(_impl_.deprecated_legacy_json_field_conflicts_)); // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumOptions) } -inline void EnumOptions::SharedCtor(::_pb::Arena* arena) { +inline void EnumOptions::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { (void)arena; + (void)is_message_owned; new (&_impl_) Impl_{ /*decltype(_impl_._extensions_)*/{::_pbi::ArenaInitialized(), arena} , decltype(_impl_._has_bits_){} @@ -8661,6 +8759,7 @@ inline void EnumOptions::SharedCtor(::_pb::Arena* arena) { , decltype(_impl_.uninterpreted_option_){arena} , decltype(_impl_.allow_alias_){false} , decltype(_impl_.deprecated_){false} + , decltype(_impl_.deprecated_legacy_json_field_conflicts_){false} }; } @@ -8674,7 +8773,7 @@ EnumOptions::~EnumOptions() { } inline void EnumOptions::SharedDtor() { - GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr); + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); _impl_._extensions_.~ExtensionSet(); _impl_.uninterpreted_option_.~RepeatedPtrField(); } @@ -8692,8 +8791,8 @@ void EnumOptions::Clear() { _impl_._extensions_.Clear(); _impl_.uninterpreted_option_.Clear(); ::memset(&_impl_.allow_alias_, 0, static_cast<::size_t>( - reinterpret_cast(&_impl_.deprecated_) - - reinterpret_cast(&_impl_.allow_alias_)) + sizeof(_impl_.deprecated_)); + reinterpret_cast(&_impl_.deprecated_legacy_json_field_conflicts_) - + reinterpret_cast(&_impl_.allow_alias_)) + sizeof(_impl_.deprecated_legacy_json_field_conflicts_)); _impl_._has_bits_.Clear(); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -8726,6 +8825,16 @@ const char* EnumOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext* c goto handle_unusual; } continue; + // optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true]; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) { + _Internal::set_has_deprecated_legacy_json_field_conflicts(&has_bits); + _impl_.deprecated_legacy_json_field_conflicts_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else { + goto handle_unusual; + } + continue; // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; case 999: if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) { @@ -8789,6 +8898,12 @@ ::uint8_t* EnumOptions::_InternalSerialize( target = ::_pbi::WireFormatLite::WriteBoolToArray(3, this->_internal_deprecated(), target); } + // optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true]; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(6, this->_internal_deprecated_legacy_json_field_conflicts(), target); + } + // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; for (unsigned i = 0, n = static_cast(this->_internal_uninterpreted_option_size()); i < n; i++) { @@ -8828,7 +8943,7 @@ ::size_t EnumOptions::ByteSizeLong() const { } cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000007u) { // optional bool allow_alias = 2; if (cached_has_bits & 0x00000001u) { total_size += 1 + 1; @@ -8839,6 +8954,11 @@ ::size_t EnumOptions::ByteSizeLong() const { total_size += 1 + 1; } + // optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true]; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + 1; + } + } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } @@ -8855,19 +8975,22 @@ void EnumOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PR auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumOptions) - GOOGLE_ABSL_DCHECK_NE(&from, _this); + GOOGLE_DCHECK_NE(&from, _this); ::uint32_t cached_has_bits = 0; (void) cached_has_bits; _this->_impl_.uninterpreted_option_.MergeFrom(from._impl_.uninterpreted_option_); cached_has_bits = from._impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000007u) { if (cached_has_bits & 0x00000001u) { _this->_impl_.allow_alias_ = from._impl_.allow_alias_; } if (cached_has_bits & 0x00000002u) { _this->_impl_.deprecated_ = from._impl_.deprecated_; } + if (cached_has_bits & 0x00000004u) { + _this->_impl_.deprecated_legacy_json_field_conflicts_ = from._impl_.deprecated_legacy_json_field_conflicts_; + } _this->_impl_._has_bits_[0] |= cached_has_bits; } _this->_impl_._extensions_.MergeFrom(internal_default_instance(), from._impl_._extensions_); @@ -8898,8 +9021,8 @@ void EnumOptions::InternalSwap(EnumOptions* other) { swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); _impl_.uninterpreted_option_.InternalSwap(&other->_impl_.uninterpreted_option_); ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(EnumOptions, _impl_.deprecated_) - + sizeof(EnumOptions::_impl_.deprecated_) + PROTOBUF_FIELD_OFFSET(EnumOptions, _impl_.deprecated_legacy_json_field_conflicts_) + + sizeof(EnumOptions::_impl_.deprecated_legacy_json_field_conflicts_) - PROTOBUF_FIELD_OFFSET(EnumOptions, _impl_.allow_alias_)>( reinterpret_cast(&_impl_.allow_alias_), reinterpret_cast(&other->_impl_.allow_alias_)); @@ -8923,9 +9046,10 @@ class EnumValueOptions::_Internal { } }; -EnumValueOptions::EnumValueOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(arena); +EnumValueOptions::EnumValueOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); // @@protoc_insertion_point(arena_constructor:google.protobuf.EnumValueOptions) } EnumValueOptions::EnumValueOptions(const EnumValueOptions& from) @@ -8944,8 +9068,10 @@ EnumValueOptions::EnumValueOptions(const EnumValueOptions& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumValueOptions) } -inline void EnumValueOptions::SharedCtor(::_pb::Arena* arena) { +inline void EnumValueOptions::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { (void)arena; + (void)is_message_owned; new (&_impl_) Impl_{ /*decltype(_impl_._extensions_)*/{::_pbi::ArenaInitialized(), arena} , decltype(_impl_._has_bits_){} @@ -8965,7 +9091,7 @@ EnumValueOptions::~EnumValueOptions() { } inline void EnumValueOptions::SharedDtor() { - GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr); + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); _impl_._extensions_.~ExtensionSet(); _impl_.uninterpreted_option_.~RepeatedPtrField(); } @@ -9121,7 +9247,7 @@ void EnumValueOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumValueOptions) - GOOGLE_ABSL_DCHECK_NE(&from, _this); + GOOGLE_DCHECK_NE(&from, _this); ::uint32_t cached_has_bits = 0; (void) cached_has_bits; @@ -9177,9 +9303,10 @@ class ServiceOptions::_Internal { } }; -ServiceOptions::ServiceOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(arena); +ServiceOptions::ServiceOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); // @@protoc_insertion_point(arena_constructor:google.protobuf.ServiceOptions) } ServiceOptions::ServiceOptions(const ServiceOptions& from) @@ -9198,8 +9325,10 @@ ServiceOptions::ServiceOptions(const ServiceOptions& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.ServiceOptions) } -inline void ServiceOptions::SharedCtor(::_pb::Arena* arena) { +inline void ServiceOptions::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { (void)arena; + (void)is_message_owned; new (&_impl_) Impl_{ /*decltype(_impl_._extensions_)*/{::_pbi::ArenaInitialized(), arena} , decltype(_impl_._has_bits_){} @@ -9219,7 +9348,7 @@ ServiceOptions::~ServiceOptions() { } inline void ServiceOptions::SharedDtor() { - GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr); + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); _impl_._extensions_.~ExtensionSet(); _impl_.uninterpreted_option_.~RepeatedPtrField(); } @@ -9375,7 +9504,7 @@ void ServiceOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const : auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.ServiceOptions) - GOOGLE_ABSL_DCHECK_NE(&from, _this); + GOOGLE_DCHECK_NE(&from, _this); ::uint32_t cached_has_bits = 0; (void) cached_has_bits; @@ -9434,9 +9563,10 @@ class MethodOptions::_Internal { } }; -MethodOptions::MethodOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(arena); +MethodOptions::MethodOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); // @@protoc_insertion_point(arena_constructor:google.protobuf.MethodOptions) } MethodOptions::MethodOptions(const MethodOptions& from) @@ -9458,8 +9588,10 @@ MethodOptions::MethodOptions(const MethodOptions& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.MethodOptions) } -inline void MethodOptions::SharedCtor(::_pb::Arena* arena) { +inline void MethodOptions::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { (void)arena; + (void)is_message_owned; new (&_impl_) Impl_{ /*decltype(_impl_._extensions_)*/{::_pbi::ArenaInitialized(), arena} , decltype(_impl_._has_bits_){} @@ -9480,7 +9612,7 @@ MethodOptions::~MethodOptions() { } inline void MethodOptions::SharedDtor() { - GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr); + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); _impl_._extensions_.~ExtensionSet(); _impl_.uninterpreted_option_.~RepeatedPtrField(); } @@ -9670,7 +9802,7 @@ void MethodOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const :: auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.MethodOptions) - GOOGLE_ABSL_DCHECK_NE(&from, _this); + GOOGLE_DCHECK_NE(&from, _this); ::uint32_t cached_has_bits = 0; (void) cached_has_bits; @@ -9744,9 +9876,10 @@ class UninterpretedOption_NamePart::_Internal { } }; -UninterpretedOption_NamePart::UninterpretedOption_NamePart(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(arena); +UninterpretedOption_NamePart::UninterpretedOption_NamePart(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); // @@protoc_insertion_point(arena_constructor:google.protobuf.UninterpretedOption.NamePart) } UninterpretedOption_NamePart::UninterpretedOption_NamePart(const UninterpretedOption_NamePart& from) @@ -9771,8 +9904,10 @@ UninterpretedOption_NamePart::UninterpretedOption_NamePart(const UninterpretedOp // @@protoc_insertion_point(copy_constructor:google.protobuf.UninterpretedOption.NamePart) } -inline void UninterpretedOption_NamePart::SharedCtor(::_pb::Arena* arena) { +inline void UninterpretedOption_NamePart::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { (void)arena; + (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_._has_bits_){} , /*decltype(_impl_._cached_size_)*/{} @@ -9795,7 +9930,7 @@ UninterpretedOption_NamePart::~UninterpretedOption_NamePart() { } inline void UninterpretedOption_NamePart::SharedDtor() { - GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr); + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); _impl_.name_part_.Destroy(); } @@ -9959,7 +10094,7 @@ void UninterpretedOption_NamePart::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& t auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.UninterpretedOption.NamePart) - GOOGLE_ABSL_DCHECK_NE(&from, _this); + GOOGLE_DCHECK_NE(&from, _this); ::uint32_t cached_has_bits = 0; (void) cached_has_bits; @@ -10034,9 +10169,10 @@ class UninterpretedOption::_Internal { } }; -UninterpretedOption::UninterpretedOption(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(arena); +UninterpretedOption::UninterpretedOption(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); // @@protoc_insertion_point(arena_constructor:google.protobuf.UninterpretedOption) } UninterpretedOption::UninterpretedOption(const UninterpretedOption& from) @@ -10084,8 +10220,10 @@ UninterpretedOption::UninterpretedOption(const UninterpretedOption& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.UninterpretedOption) } -inline void UninterpretedOption::SharedCtor(::_pb::Arena* arena) { +inline void UninterpretedOption::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { (void)arena; + (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_._has_bits_){} , /*decltype(_impl_._cached_size_)*/{} @@ -10121,7 +10259,7 @@ UninterpretedOption::~UninterpretedOption() { } inline void UninterpretedOption::SharedDtor() { - GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr); + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); _impl_.name_.~RepeatedPtrField(); _impl_.identifier_value_.Destroy(); _impl_.string_value_.Destroy(); @@ -10410,7 +10548,7 @@ void UninterpretedOption::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, co auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.UninterpretedOption) - GOOGLE_ABSL_DCHECK_NE(&from, _this); + GOOGLE_DCHECK_NE(&from, _this); ::uint32_t cached_has_bits = 0; (void) cached_has_bits; @@ -10501,9 +10639,10 @@ class SourceCodeInfo_Location::_Internal { } }; -SourceCodeInfo_Location::SourceCodeInfo_Location(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(arena); +SourceCodeInfo_Location::SourceCodeInfo_Location(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); // @@protoc_insertion_point(arena_constructor:google.protobuf.SourceCodeInfo.Location) } SourceCodeInfo_Location::SourceCodeInfo_Location(const SourceCodeInfo_Location& from) @@ -10540,8 +10679,10 @@ SourceCodeInfo_Location::SourceCodeInfo_Location(const SourceCodeInfo_Location& // @@protoc_insertion_point(copy_constructor:google.protobuf.SourceCodeInfo.Location) } -inline void SourceCodeInfo_Location::SharedCtor(::_pb::Arena* arena) { +inline void SourceCodeInfo_Location::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { (void)arena; + (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_._has_bits_){} , /*decltype(_impl_._cached_size_)*/{} @@ -10573,7 +10714,7 @@ SourceCodeInfo_Location::~SourceCodeInfo_Location() { } inline void SourceCodeInfo_Location::SharedDtor() { - GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr); + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); _impl_.path_.~RepeatedField(); _impl_.span_.~RepeatedField(); _impl_.leading_detached_comments_.~RepeatedPtrField(); @@ -10846,7 +10987,7 @@ void SourceCodeInfo_Location::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.SourceCodeInfo.Location) - GOOGLE_ABSL_DCHECK_NE(&from, _this); + GOOGLE_DCHECK_NE(&from, _this); ::uint32_t cached_has_bits = 0; (void) cached_has_bits; @@ -10907,9 +11048,10 @@ class SourceCodeInfo::_Internal { public: }; -SourceCodeInfo::SourceCodeInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(arena); +SourceCodeInfo::SourceCodeInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); // @@protoc_insertion_point(arena_constructor:google.protobuf.SourceCodeInfo) } SourceCodeInfo::SourceCodeInfo(const SourceCodeInfo& from) @@ -10923,8 +11065,10 @@ SourceCodeInfo::SourceCodeInfo(const SourceCodeInfo& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.SourceCodeInfo) } -inline void SourceCodeInfo::SharedCtor(::_pb::Arena* arena) { +inline void SourceCodeInfo::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { (void)arena; + (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_.location_){arena} , /*decltype(_impl_._cached_size_)*/{} @@ -10941,7 +11085,7 @@ SourceCodeInfo::~SourceCodeInfo() { } inline void SourceCodeInfo::SharedDtor() { - GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr); + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); _impl_.location_.~RepeatedPtrField(); } @@ -11057,7 +11201,7 @@ void SourceCodeInfo::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const : auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.SourceCodeInfo) - GOOGLE_ABSL_DCHECK_NE(&from, _this); + GOOGLE_DCHECK_NE(&from, _this); ::uint32_t cached_has_bits = 0; (void) cached_has_bits; @@ -11109,9 +11253,10 @@ class GeneratedCodeInfo_Annotation::_Internal { } }; -GeneratedCodeInfo_Annotation::GeneratedCodeInfo_Annotation(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(arena); +GeneratedCodeInfo_Annotation::GeneratedCodeInfo_Annotation(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); // @@protoc_insertion_point(arena_constructor:google.protobuf.GeneratedCodeInfo.Annotation) } GeneratedCodeInfo_Annotation::GeneratedCodeInfo_Annotation(const GeneratedCodeInfo_Annotation& from) @@ -11142,8 +11287,10 @@ GeneratedCodeInfo_Annotation::GeneratedCodeInfo_Annotation(const GeneratedCodeIn // @@protoc_insertion_point(copy_constructor:google.protobuf.GeneratedCodeInfo.Annotation) } -inline void GeneratedCodeInfo_Annotation::SharedCtor(::_pb::Arena* arena) { +inline void GeneratedCodeInfo_Annotation::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { (void)arena; + (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_._has_bits_){} , /*decltype(_impl_._cached_size_)*/{} @@ -11170,7 +11317,7 @@ GeneratedCodeInfo_Annotation::~GeneratedCodeInfo_Annotation() { } inline void GeneratedCodeInfo_Annotation::SharedDtor() { - GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr); + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); _impl_.path_.~RepeatedField(); _impl_.source_file_.Destroy(); } @@ -11407,7 +11554,7 @@ void GeneratedCodeInfo_Annotation::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& t auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.GeneratedCodeInfo.Annotation) - GOOGLE_ABSL_DCHECK_NE(&from, _this); + GOOGLE_DCHECK_NE(&from, _this); ::uint32_t cached_has_bits = 0; (void) cached_has_bits; @@ -11473,9 +11620,10 @@ class GeneratedCodeInfo::_Internal { public: }; -GeneratedCodeInfo::GeneratedCodeInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(arena); +GeneratedCodeInfo::GeneratedCodeInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); // @@protoc_insertion_point(arena_constructor:google.protobuf.GeneratedCodeInfo) } GeneratedCodeInfo::GeneratedCodeInfo(const GeneratedCodeInfo& from) @@ -11489,8 +11637,10 @@ GeneratedCodeInfo::GeneratedCodeInfo(const GeneratedCodeInfo& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.GeneratedCodeInfo) } -inline void GeneratedCodeInfo::SharedCtor(::_pb::Arena* arena) { +inline void GeneratedCodeInfo::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { (void)arena; + (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_.annotation_){arena} , /*decltype(_impl_._cached_size_)*/{} @@ -11507,7 +11657,7 @@ GeneratedCodeInfo::~GeneratedCodeInfo() { } inline void GeneratedCodeInfo::SharedDtor() { - GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr); + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); _impl_.annotation_.~RepeatedPtrField(); } @@ -11623,7 +11773,7 @@ void GeneratedCodeInfo::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, cons auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.GeneratedCodeInfo) - GOOGLE_ABSL_DCHECK_NE(&from, _this); + GOOGLE_DCHECK_NE(&from, _this); ::uint32_t cached_has_bits = 0; (void) cached_has_bits; diff --git a/src/google/protobuf/descriptor.pb.h b/src/google/protobuf/descriptor.pb.h index 3b253fef077b9..4fabe386cb466 100644 --- a/src/google/protobuf/descriptor.pb.h +++ b/src/google/protobuf/descriptor.pb.h @@ -489,7 +489,7 @@ class PROTOBUF_EXPORT FileDescriptorSet final : } void UnsafeArenaSwap(FileDescriptorSet* other) { if (other == this) return; - GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); } @@ -517,7 +517,7 @@ class PROTOBUF_EXPORT FileDescriptorSet final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(FileDescriptorSet* other); @@ -528,7 +528,8 @@ class PROTOBUF_EXPORT FileDescriptorSet final : return "google.protobuf.FileDescriptorSet"; } protected: - explicit FileDescriptorSet(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit FileDescriptorSet(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); public: static const ClassData _class_data_; @@ -651,7 +652,7 @@ class PROTOBUF_EXPORT FileDescriptorProto final : } void UnsafeArenaSwap(FileDescriptorProto* other) { if (other == this) return; - GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); } @@ -679,7 +680,7 @@ class PROTOBUF_EXPORT FileDescriptorProto final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(FileDescriptorProto* other); @@ -690,7 +691,8 @@ class PROTOBUF_EXPORT FileDescriptorProto final : return "google.protobuf.FileDescriptorProto"; } protected: - explicit FileDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit FileDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); public: static const ClassData _class_data_; @@ -1050,7 +1052,7 @@ class PROTOBUF_EXPORT DescriptorProto_ExtensionRange final : } void UnsafeArenaSwap(DescriptorProto_ExtensionRange* other) { if (other == this) return; - GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); } @@ -1078,7 +1080,7 @@ class PROTOBUF_EXPORT DescriptorProto_ExtensionRange final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(DescriptorProto_ExtensionRange* other); @@ -1089,7 +1091,8 @@ class PROTOBUF_EXPORT DescriptorProto_ExtensionRange final : return "google.protobuf.DescriptorProto.ExtensionRange"; } protected: - explicit DescriptorProto_ExtensionRange(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit DescriptorProto_ExtensionRange(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); public: static const ClassData _class_data_; @@ -1234,7 +1237,7 @@ class PROTOBUF_EXPORT DescriptorProto_ReservedRange final : } void UnsafeArenaSwap(DescriptorProto_ReservedRange* other) { if (other == this) return; - GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); } @@ -1262,7 +1265,7 @@ class PROTOBUF_EXPORT DescriptorProto_ReservedRange final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(DescriptorProto_ReservedRange* other); @@ -1273,7 +1276,8 @@ class PROTOBUF_EXPORT DescriptorProto_ReservedRange final : return "google.protobuf.DescriptorProto.ReservedRange"; } protected: - explicit DescriptorProto_ReservedRange(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit DescriptorProto_ReservedRange(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); public: static const ClassData _class_data_; @@ -1401,7 +1405,7 @@ class PROTOBUF_EXPORT DescriptorProto final : } void UnsafeArenaSwap(DescriptorProto* other) { if (other == this) return; - GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); } @@ -1429,7 +1433,7 @@ class PROTOBUF_EXPORT DescriptorProto final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(DescriptorProto* other); @@ -1440,7 +1444,8 @@ class PROTOBUF_EXPORT DescriptorProto final : return "google.protobuf.DescriptorProto"; } protected: - explicit DescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit DescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); public: static const ClassData _class_data_; @@ -1747,7 +1752,7 @@ class PROTOBUF_EXPORT ExtensionRangeOptions final : } void UnsafeArenaSwap(ExtensionRangeOptions* other) { if (other == this) return; - GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); } @@ -1775,7 +1780,7 @@ class PROTOBUF_EXPORT ExtensionRangeOptions final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(ExtensionRangeOptions* other); @@ -1786,7 +1791,8 @@ class PROTOBUF_EXPORT ExtensionRangeOptions final : return "google.protobuf.ExtensionRangeOptions"; } protected: - explicit ExtensionRangeOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit ExtensionRangeOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); public: static const ClassData _class_data_; @@ -2101,7 +2107,7 @@ class PROTOBUF_EXPORT FieldDescriptorProto final : } void UnsafeArenaSwap(FieldDescriptorProto* other) { if (other == this) return; - GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); } @@ -2129,7 +2135,7 @@ class PROTOBUF_EXPORT FieldDescriptorProto final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(FieldDescriptorProto* other); @@ -2140,7 +2146,8 @@ class PROTOBUF_EXPORT FieldDescriptorProto final : return "google.protobuf.FieldDescriptorProto"; } protected: - explicit FieldDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit FieldDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); public: static const ClassData _class_data_; @@ -2463,7 +2470,7 @@ class PROTOBUF_EXPORT OneofDescriptorProto final : } void UnsafeArenaSwap(OneofDescriptorProto* other) { if (other == this) return; - GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); } @@ -2491,7 +2498,7 @@ class PROTOBUF_EXPORT OneofDescriptorProto final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(OneofDescriptorProto* other); @@ -2502,7 +2509,8 @@ class PROTOBUF_EXPORT OneofDescriptorProto final : return "google.protobuf.OneofDescriptorProto"; } protected: - explicit OneofDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit OneofDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); public: static const ClassData _class_data_; @@ -2640,7 +2648,7 @@ class PROTOBUF_EXPORT EnumDescriptorProto_EnumReservedRange final : } void UnsafeArenaSwap(EnumDescriptorProto_EnumReservedRange* other) { if (other == this) return; - GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); } @@ -2668,7 +2676,7 @@ class PROTOBUF_EXPORT EnumDescriptorProto_EnumReservedRange final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(EnumDescriptorProto_EnumReservedRange* other); @@ -2679,7 +2687,8 @@ class PROTOBUF_EXPORT EnumDescriptorProto_EnumReservedRange final : return "google.protobuf.EnumDescriptorProto.EnumReservedRange"; } protected: - explicit EnumDescriptorProto_EnumReservedRange(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit EnumDescriptorProto_EnumReservedRange(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); public: static const ClassData _class_data_; @@ -2807,7 +2816,7 @@ class PROTOBUF_EXPORT EnumDescriptorProto final : } void UnsafeArenaSwap(EnumDescriptorProto* other) { if (other == this) return; - GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); } @@ -2835,7 +2844,7 @@ class PROTOBUF_EXPORT EnumDescriptorProto final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(EnumDescriptorProto* other); @@ -2846,7 +2855,8 @@ class PROTOBUF_EXPORT EnumDescriptorProto final : return "google.protobuf.EnumDescriptorProto"; } protected: - explicit EnumDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit EnumDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); public: static const ClassData _class_data_; @@ -3052,7 +3062,7 @@ class PROTOBUF_EXPORT EnumValueDescriptorProto final : } void UnsafeArenaSwap(EnumValueDescriptorProto* other) { if (other == this) return; - GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); } @@ -3080,7 +3090,7 @@ class PROTOBUF_EXPORT EnumValueDescriptorProto final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(EnumValueDescriptorProto* other); @@ -3091,7 +3101,8 @@ class PROTOBUF_EXPORT EnumValueDescriptorProto final : return "google.protobuf.EnumValueDescriptorProto"; } protected: - explicit EnumValueDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit EnumValueDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); public: static const ClassData _class_data_; @@ -3241,7 +3252,7 @@ class PROTOBUF_EXPORT ServiceDescriptorProto final : } void UnsafeArenaSwap(ServiceDescriptorProto* other) { if (other == this) return; - GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); } @@ -3269,7 +3280,7 @@ class PROTOBUF_EXPORT ServiceDescriptorProto final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(ServiceDescriptorProto* other); @@ -3280,7 +3291,8 @@ class PROTOBUF_EXPORT ServiceDescriptorProto final : return "google.protobuf.ServiceDescriptorProto"; } protected: - explicit ServiceDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit ServiceDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); public: static const ClassData _class_data_; @@ -3438,7 +3450,7 @@ class PROTOBUF_EXPORT MethodDescriptorProto final : } void UnsafeArenaSwap(MethodDescriptorProto* other) { if (other == this) return; - GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); } @@ -3466,7 +3478,7 @@ class PROTOBUF_EXPORT MethodDescriptorProto final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(MethodDescriptorProto* other); @@ -3477,7 +3489,8 @@ class PROTOBUF_EXPORT MethodDescriptorProto final : return "google.protobuf.MethodDescriptorProto"; } protected: - explicit MethodDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit MethodDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); public: static const ClassData _class_data_; @@ -3673,7 +3686,7 @@ class PROTOBUF_EXPORT FileOptions final : } void UnsafeArenaSwap(FileOptions* other) { if (other == this) return; - GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); } @@ -3701,7 +3714,7 @@ class PROTOBUF_EXPORT FileOptions final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(FileOptions* other); @@ -3712,7 +3725,8 @@ class PROTOBUF_EXPORT FileOptions final : return "google.protobuf.FileOptions"; } protected: - explicit FileOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit FileOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); public: static const ClassData _class_data_; @@ -4339,7 +4353,7 @@ class PROTOBUF_EXPORT MessageOptions final : } void UnsafeArenaSwap(MessageOptions* other) { if (other == this) return; - GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); } @@ -4367,7 +4381,7 @@ class PROTOBUF_EXPORT MessageOptions final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(MessageOptions* other); @@ -4378,7 +4392,8 @@ class PROTOBUF_EXPORT MessageOptions final : return "google.protobuf.MessageOptions"; } protected: - explicit MessageOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit MessageOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); public: static const ClassData _class_data_; @@ -4396,6 +4411,7 @@ class PROTOBUF_EXPORT MessageOptions final : kNoStandardDescriptorAccessorFieldNumber = 2, kDeprecatedFieldNumber = 3, kMapEntryFieldNumber = 7, + kDeprecatedLegacyJsonFieldConflictsFieldNumber = 11, }; // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; int uninterpreted_option_size() const; @@ -4455,6 +4471,16 @@ class PROTOBUF_EXPORT MessageOptions final : void _internal_set_map_entry(bool value); public: + // optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true]; + PROTOBUF_DEPRECATED bool has_deprecated_legacy_json_field_conflicts() const; + PROTOBUF_DEPRECATED void clear_deprecated_legacy_json_field_conflicts(); + PROTOBUF_DEPRECATED bool deprecated_legacy_json_field_conflicts() const; + PROTOBUF_DEPRECATED void set_deprecated_legacy_json_field_conflicts(bool value); + private: + bool _internal_deprecated_legacy_json_field_conflicts() const; + void _internal_set_deprecated_legacy_json_field_conflicts(bool value); + public: + template GetOwningArena()); + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); } @@ -4770,7 +4797,7 @@ class PROTOBUF_EXPORT FieldOptions final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(FieldOptions* other); @@ -4781,7 +4808,8 @@ class PROTOBUF_EXPORT FieldOptions final : return "google.protobuf.FieldOptions"; } protected: - explicit FieldOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit FieldOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); public: static const ClassData _class_data_; @@ -5223,7 +5251,7 @@ class PROTOBUF_EXPORT OneofOptions final : } void UnsafeArenaSwap(OneofOptions* other) { if (other == this) return; - GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); } @@ -5251,7 +5279,7 @@ class PROTOBUF_EXPORT OneofOptions final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(OneofOptions* other); @@ -5262,7 +5290,8 @@ class PROTOBUF_EXPORT OneofOptions final : return "google.protobuf.OneofOptions"; } protected: - explicit OneofOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit OneofOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); public: static const ClassData _class_data_; @@ -5577,7 +5606,7 @@ class PROTOBUF_EXPORT EnumOptions final : } void UnsafeArenaSwap(EnumOptions* other) { if (other == this) return; - GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); } @@ -5605,7 +5634,7 @@ class PROTOBUF_EXPORT EnumOptions final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(EnumOptions* other); @@ -5616,7 +5645,8 @@ class PROTOBUF_EXPORT EnumOptions final : return "google.protobuf.EnumOptions"; } protected: - explicit EnumOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit EnumOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); public: static const ClassData _class_data_; @@ -5632,6 +5662,7 @@ class PROTOBUF_EXPORT EnumOptions final : kUninterpretedOptionFieldNumber = 999, kAllowAliasFieldNumber = 2, kDeprecatedFieldNumber = 3, + kDeprecatedLegacyJsonFieldConflictsFieldNumber = 6, }; // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; int uninterpreted_option_size() const; @@ -5671,6 +5702,16 @@ class PROTOBUF_EXPORT EnumOptions final : void _internal_set_deprecated(bool value); public: + // optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true]; + PROTOBUF_DEPRECATED bool has_deprecated_legacy_json_field_conflicts() const; + PROTOBUF_DEPRECATED void clear_deprecated_legacy_json_field_conflicts(); + PROTOBUF_DEPRECATED bool deprecated_legacy_json_field_conflicts() const; + PROTOBUF_DEPRECATED void set_deprecated_legacy_json_field_conflicts(bool value); + private: + bool _internal_deprecated_legacy_json_field_conflicts() const; + void _internal_set_deprecated_legacy_json_field_conflicts(bool value); + public: + template uninterpreted_option_; bool allow_alias_; bool deprecated_; + bool deprecated_legacy_json_field_conflicts_; }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; @@ -5956,7 +5998,7 @@ class PROTOBUF_EXPORT EnumValueOptions final : } void UnsafeArenaSwap(EnumValueOptions* other) { if (other == this) return; - GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); } @@ -5984,7 +6026,7 @@ class PROTOBUF_EXPORT EnumValueOptions final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(EnumValueOptions* other); @@ -5995,7 +6037,8 @@ class PROTOBUF_EXPORT EnumValueOptions final : return "google.protobuf.EnumValueOptions"; } protected: - explicit EnumValueOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit EnumValueOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); public: static const ClassData _class_data_; @@ -6323,7 +6366,7 @@ class PROTOBUF_EXPORT ServiceOptions final : } void UnsafeArenaSwap(ServiceOptions* other) { if (other == this) return; - GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); } @@ -6351,7 +6394,7 @@ class PROTOBUF_EXPORT ServiceOptions final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(ServiceOptions* other); @@ -6362,7 +6405,8 @@ class PROTOBUF_EXPORT ServiceOptions final : return "google.protobuf.ServiceOptions"; } protected: - explicit ServiceOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit ServiceOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); public: static const ClassData _class_data_; @@ -6690,7 +6734,7 @@ class PROTOBUF_EXPORT MethodOptions final : } void UnsafeArenaSwap(MethodOptions* other) { if (other == this) return; - GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); } @@ -6718,7 +6762,7 @@ class PROTOBUF_EXPORT MethodOptions final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(MethodOptions* other); @@ -6729,7 +6773,8 @@ class PROTOBUF_EXPORT MethodOptions final : return "google.protobuf.MethodOptions"; } protected: - explicit MethodOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit MethodOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); public: static const ClassData _class_data_; @@ -7090,7 +7135,7 @@ class PROTOBUF_EXPORT UninterpretedOption_NamePart final : } void UnsafeArenaSwap(UninterpretedOption_NamePart* other) { if (other == this) return; - GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); } @@ -7118,7 +7163,7 @@ class PROTOBUF_EXPORT UninterpretedOption_NamePart final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(UninterpretedOption_NamePart* other); @@ -7129,7 +7174,8 @@ class PROTOBUF_EXPORT UninterpretedOption_NamePart final : return "google.protobuf.UninterpretedOption.NamePart"; } protected: - explicit UninterpretedOption_NamePart(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit UninterpretedOption_NamePart(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); public: static const ClassData _class_data_; @@ -7265,7 +7311,7 @@ class PROTOBUF_EXPORT UninterpretedOption final : } void UnsafeArenaSwap(UninterpretedOption* other) { if (other == this) return; - GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); } @@ -7293,7 +7339,7 @@ class PROTOBUF_EXPORT UninterpretedOption final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(UninterpretedOption* other); @@ -7304,7 +7350,8 @@ class PROTOBUF_EXPORT UninterpretedOption final : return "google.protobuf.UninterpretedOption"; } protected: - explicit UninterpretedOption(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit UninterpretedOption(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); public: static const ClassData _class_data_; @@ -7517,7 +7564,7 @@ class PROTOBUF_EXPORT SourceCodeInfo_Location final : } void UnsafeArenaSwap(SourceCodeInfo_Location* other) { if (other == this) return; - GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); } @@ -7545,7 +7592,7 @@ class PROTOBUF_EXPORT SourceCodeInfo_Location final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(SourceCodeInfo_Location* other); @@ -7556,7 +7603,8 @@ class PROTOBUF_EXPORT SourceCodeInfo_Location final : return "google.protobuf.SourceCodeInfo.Location"; } protected: - explicit SourceCodeInfo_Location(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit SourceCodeInfo_Location(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); public: static const ClassData _class_data_; @@ -7770,7 +7818,7 @@ class PROTOBUF_EXPORT SourceCodeInfo final : } void UnsafeArenaSwap(SourceCodeInfo* other) { if (other == this) return; - GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); } @@ -7798,7 +7846,7 @@ class PROTOBUF_EXPORT SourceCodeInfo final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(SourceCodeInfo* other); @@ -7809,7 +7857,8 @@ class PROTOBUF_EXPORT SourceCodeInfo final : return "google.protobuf.SourceCodeInfo"; } protected: - explicit SourceCodeInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit SourceCodeInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); public: static const ClassData _class_data_; @@ -7934,7 +7983,7 @@ class PROTOBUF_EXPORT GeneratedCodeInfo_Annotation final : } void UnsafeArenaSwap(GeneratedCodeInfo_Annotation* other) { if (other == this) return; - GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); } @@ -7962,7 +8011,7 @@ class PROTOBUF_EXPORT GeneratedCodeInfo_Annotation final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(GeneratedCodeInfo_Annotation* other); @@ -7973,7 +8022,8 @@ class PROTOBUF_EXPORT GeneratedCodeInfo_Annotation final : return "google.protobuf.GeneratedCodeInfo.Annotation"; } protected: - explicit GeneratedCodeInfo_Annotation(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit GeneratedCodeInfo_Annotation(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); public: static const ClassData _class_data_; @@ -8176,7 +8226,7 @@ class PROTOBUF_EXPORT GeneratedCodeInfo final : } void UnsafeArenaSwap(GeneratedCodeInfo* other) { if (other == this) return; - GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); } @@ -8204,7 +8254,7 @@ class PROTOBUF_EXPORT GeneratedCodeInfo final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(GeneratedCodeInfo* other); @@ -8215,7 +8265,8 @@ class PROTOBUF_EXPORT GeneratedCodeInfo final : return "google.protobuf.GeneratedCodeInfo"; } protected: - explicit GeneratedCodeInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit GeneratedCodeInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); public: static const ClassData _class_data_; @@ -8264,7 +8315,6 @@ class PROTOBUF_EXPORT GeneratedCodeInfo final : union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; }; - // =================================================================== @@ -8486,7 +8536,7 @@ inline void FileDescriptorProto::set_dependency(int index, std::string&& value) // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.dependency) } inline void FileDescriptorProto::set_dependency(int index, const char* value) { - GOOGLE_ABSL_DCHECK(value != nullptr); _impl_.dependency_.Mutable(index)->assign(value); + GOOGLE_DCHECK(value != nullptr); _impl_.dependency_.Mutable(index)->assign(value); // @@protoc_insertion_point(field_set_char:google.protobuf.FileDescriptorProto.dependency) } inline void FileDescriptorProto::set_dependency(int index, const char* value, ::size_t size) { @@ -8506,7 +8556,7 @@ inline void FileDescriptorProto::add_dependency(std::string&& value) { // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.dependency) } inline void FileDescriptorProto::add_dependency(const char* value) { - GOOGLE_ABSL_DCHECK(value != nullptr); _impl_.dependency_.Add()->assign(value); + GOOGLE_DCHECK(value != nullptr); _impl_.dependency_.Add()->assign(value); // @@protoc_insertion_point(field_add_char:google.protobuf.FileDescriptorProto.dependency) } inline void FileDescriptorProto::add_dependency(const char* value, ::size_t size) { @@ -9742,7 +9792,7 @@ inline void DescriptorProto::set_reserved_name(int index, std::string&& value) { // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.reserved_name) } inline void DescriptorProto::set_reserved_name(int index, const char* value) { - GOOGLE_ABSL_DCHECK(value != nullptr); _impl_.reserved_name_.Mutable(index)->assign(value); + GOOGLE_DCHECK(value != nullptr); _impl_.reserved_name_.Mutable(index)->assign(value); // @@protoc_insertion_point(field_set_char:google.protobuf.DescriptorProto.reserved_name) } inline void DescriptorProto::set_reserved_name(int index, const char* value, ::size_t size) { @@ -9762,7 +9812,7 @@ inline void DescriptorProto::add_reserved_name(std::string&& value) { // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.reserved_name) } inline void DescriptorProto::add_reserved_name(const char* value) { - GOOGLE_ABSL_DCHECK(value != nullptr); _impl_.reserved_name_.Add()->assign(value); + GOOGLE_DCHECK(value != nullptr); _impl_.reserved_name_.Add()->assign(value); // @@protoc_insertion_point(field_add_char:google.protobuf.DescriptorProto.reserved_name) } inline void DescriptorProto::add_reserved_name(const char* value, ::size_t size) { @@ -10834,7 +10884,7 @@ inline void EnumDescriptorProto::set_reserved_name(int index, std::string&& valu // @@protoc_insertion_point(field_set:google.protobuf.EnumDescriptorProto.reserved_name) } inline void EnumDescriptorProto::set_reserved_name(int index, const char* value) { - GOOGLE_ABSL_DCHECK(value != nullptr); _impl_.reserved_name_.Mutable(index)->assign(value); + GOOGLE_DCHECK(value != nullptr); _impl_.reserved_name_.Mutable(index)->assign(value); // @@protoc_insertion_point(field_set_char:google.protobuf.EnumDescriptorProto.reserved_name) } inline void EnumDescriptorProto::set_reserved_name(int index, const char* value, ::size_t size) { @@ -10854,7 +10904,7 @@ inline void EnumDescriptorProto::add_reserved_name(std::string&& value) { // @@protoc_insertion_point(field_add:google.protobuf.EnumDescriptorProto.reserved_name) } inline void EnumDescriptorProto::add_reserved_name(const char* value) { - GOOGLE_ABSL_DCHECK(value != nullptr); _impl_.reserved_name_.Add()->assign(value); + GOOGLE_DCHECK(value != nullptr); _impl_.reserved_name_.Add()->assign(value); // @@protoc_insertion_point(field_add_char:google.protobuf.EnumDescriptorProto.reserved_name) } inline void EnumDescriptorProto::add_reserved_name(const char* value, ::size_t size) { @@ -12604,6 +12654,31 @@ inline void MessageOptions::set_map_entry(bool value) { // @@protoc_insertion_point(field_set:google.protobuf.MessageOptions.map_entry) } +// optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true]; +inline bool MessageOptions::has_deprecated_legacy_json_field_conflicts() const { + bool value = (_impl_._has_bits_[0] & 0x00000010u) != 0; + return value; +} +inline void MessageOptions::clear_deprecated_legacy_json_field_conflicts() { + _impl_.deprecated_legacy_json_field_conflicts_ = false; + _impl_._has_bits_[0] &= ~0x00000010u; +} +inline bool MessageOptions::_internal_deprecated_legacy_json_field_conflicts() const { + return _impl_.deprecated_legacy_json_field_conflicts_; +} +inline bool MessageOptions::deprecated_legacy_json_field_conflicts() const { + // @@protoc_insertion_point(field_get:google.protobuf.MessageOptions.deprecated_legacy_json_field_conflicts) + return _internal_deprecated_legacy_json_field_conflicts(); +} +inline void MessageOptions::_internal_set_deprecated_legacy_json_field_conflicts(bool value) { + _impl_._has_bits_[0] |= 0x00000010u; + _impl_.deprecated_legacy_json_field_conflicts_ = value; +} +inline void MessageOptions::set_deprecated_legacy_json_field_conflicts(bool value) { + _internal_set_deprecated_legacy_json_field_conflicts(value); + // @@protoc_insertion_point(field_set:google.protobuf.MessageOptions.deprecated_legacy_json_field_conflicts) +} + // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; inline int MessageOptions::_internal_uninterpreted_option_size() const { return _impl_.uninterpreted_option_.size(); @@ -12963,6 +13038,31 @@ inline void EnumOptions::set_deprecated(bool value) { // @@protoc_insertion_point(field_set:google.protobuf.EnumOptions.deprecated) } +// optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true]; +inline bool EnumOptions::has_deprecated_legacy_json_field_conflicts() const { + bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline void EnumOptions::clear_deprecated_legacy_json_field_conflicts() { + _impl_.deprecated_legacy_json_field_conflicts_ = false; + _impl_._has_bits_[0] &= ~0x00000004u; +} +inline bool EnumOptions::_internal_deprecated_legacy_json_field_conflicts() const { + return _impl_.deprecated_legacy_json_field_conflicts_; +} +inline bool EnumOptions::deprecated_legacy_json_field_conflicts() const { + // @@protoc_insertion_point(field_get:google.protobuf.EnumOptions.deprecated_legacy_json_field_conflicts) + return _internal_deprecated_legacy_json_field_conflicts(); +} +inline void EnumOptions::_internal_set_deprecated_legacy_json_field_conflicts(bool value) { + _impl_._has_bits_[0] |= 0x00000004u; + _impl_.deprecated_legacy_json_field_conflicts_ = value; +} +inline void EnumOptions::set_deprecated_legacy_json_field_conflicts(bool value) { + _internal_set_deprecated_legacy_json_field_conflicts(value); + // @@protoc_insertion_point(field_set:google.protobuf.EnumOptions.deprecated_legacy_json_field_conflicts) +} + // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; inline int EnumOptions::_internal_uninterpreted_option_size() const { return _impl_.uninterpreted_option_.size(); @@ -13895,7 +13995,7 @@ inline void SourceCodeInfo_Location::set_leading_detached_comments(int index, st // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) } inline void SourceCodeInfo_Location::set_leading_detached_comments(int index, const char* value) { - GOOGLE_ABSL_DCHECK(value != nullptr); _impl_.leading_detached_comments_.Mutable(index)->assign(value); + GOOGLE_DCHECK(value != nullptr); _impl_.leading_detached_comments_.Mutable(index)->assign(value); // @@protoc_insertion_point(field_set_char:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) } inline void SourceCodeInfo_Location::set_leading_detached_comments(int index, const char* value, ::size_t size) { @@ -13915,7 +14015,7 @@ inline void SourceCodeInfo_Location::add_leading_detached_comments(std::string&& // @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) } inline void SourceCodeInfo_Location::add_leading_detached_comments(const char* value) { - GOOGLE_ABSL_DCHECK(value != nullptr); _impl_.leading_detached_comments_.Add()->assign(value); + GOOGLE_DCHECK(value != nullptr); _impl_.leading_detached_comments_.Add()->assign(value); // @@protoc_insertion_point(field_add_char:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) } inline void SourceCodeInfo_Location::add_leading_detached_comments(const char* value, ::size_t size) { diff --git a/src/google/protobuf/descriptor.proto b/src/google/protobuf/descriptor.proto index 0636a87ab172e..004ce78293191 100644 --- a/src/google/protobuf/descriptor.proto +++ b/src/google/protobuf/descriptor.proto @@ -518,6 +518,18 @@ message MessageOptions { reserved 8; // javalite_serializable reserved 9; // javanano_as_lite + // Enable the legacy handling of JSON field name conflicts. This lowercases + // and strips underscored from the fields before comparison in proto3 only. + // The new behavior takes `json_name` into account and applies to proto2 as + // well. + // + // This should only be used as a temporary measure against broken builds due + // to the change in behavior for JSON field name conflicts. + // + // TODO(b/261750190) This is legacy behavior we plan to remove once downstream + // teams have had time to migrate. + optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true]; + // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; @@ -646,6 +658,14 @@ message EnumOptions { reserved 5; // javanano_as_lite + // Enable the legacy handling of JSON field name conflicts. This lowercases + // and strips underscored from the fields before comparison in proto3 only. + // The new behavior takes `json_name` into account and applies to proto2 as + // well. + // TODO(b/261750190) Remove this legacy behavior once downstream teams have + // had time to migrate. + optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true]; + // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; diff --git a/src/google/protobuf/descriptor_database.cc b/src/google/protobuf/descriptor_database.cc index 5e0d6c33b4351..ae37a83af0c4d 100644 --- a/src/google/protobuf/descriptor_database.cc +++ b/src/google/protobuf/descriptor_database.cc @@ -51,7 +51,7 @@ namespace { void RecordMessageNames(const DescriptorProto& desc_proto, const std::string& prefix, std::set* output) { - GOOGLE_CHECK(desc_proto.has_name()); + GOOGLE_ABSL_CHECK(desc_proto.has_name()); std::string full_name = prefix.empty() ? desc_proto.name() : absl::StrCat(prefix, ".", desc_proto.name()); @@ -81,7 +81,7 @@ bool ForAllFileProtos(DescriptorDatabase* db, Fn callback, for (const auto& f : file_names) { file_proto.Clear(); if (!db->FindFileByName(f, &file_proto)) { - GOOGLE_LOG(ERROR) << "File not found in database (unexpected): " << f; + GOOGLE_ABSL_LOG(ERROR) << "File not found in database (unexpected): " << f; return false; } callback(file_proto, &set); @@ -120,7 +120,7 @@ template bool SimpleDescriptorDatabase::DescriptorIndex::AddFile( const FileDescriptorProto& file, Value value) { if (!by_name_.insert({file.name(), value}).second) { - GOOGLE_LOG(ERROR) << "File already exists in database: " << file.name(); + GOOGLE_ABSL_LOG(ERROR) << "File already exists in database: " << file.name(); return false; } @@ -204,7 +204,7 @@ bool SimpleDescriptorDatabase::DescriptorIndex::AddSymbol( // relies on the fact that '.' sorts before all other characters that are // valid in symbol names). if (!ValidateSymbolName(name)) { - GOOGLE_LOG(ERROR) << "Invalid symbol name: " << name; + GOOGLE_ABSL_LOG(ERROR) << "Invalid symbol name: " << name; return false; } @@ -220,10 +220,10 @@ bool SimpleDescriptorDatabase::DescriptorIndex::AddSymbol( } if (IsSubSymbol(iter->first, name)) { - GOOGLE_LOG(ERROR) << "Symbol name \"" << name - << "\" conflicts with the existing " - "symbol \"" - << iter->first << "\"."; + GOOGLE_ABSL_LOG(ERROR) << "Symbol name \"" << name + << "\" conflicts with the existing " + "symbol \"" + << iter->first << "\"."; return false; } @@ -235,10 +235,10 @@ bool SimpleDescriptorDatabase::DescriptorIndex::AddSymbol( ++iter; if (iter != by_symbol_.end() && IsSubSymbol(name, iter->first)) { - GOOGLE_LOG(ERROR) << "Symbol name \"" << name - << "\" conflicts with the existing " - "symbol \"" - << iter->first << "\"."; + GOOGLE_ABSL_LOG(ERROR) << "Symbol name \"" << name + << "\" conflicts with the existing " + "symbol \"" + << iter->first << "\"."; return false; } @@ -278,10 +278,11 @@ bool SimpleDescriptorDatabase::DescriptorIndex::AddExtension( {std::make_pair(field.extendee().substr(1), field.number()), value}) .second) { - GOOGLE_LOG(ERROR) << "Extension conflicts with extension already in database: " - "extend " - << field.extendee() << " { " << field.name() << " = " - << field.number() << " } from:" << filename; + GOOGLE_ABSL_LOG(ERROR) + << "Extension conflicts with extension already in database: " + "extend " + << field.extendee() << " { " << field.name() << " = " + << field.number() << " } from:" << filename; return false; } } else { @@ -567,8 +568,8 @@ bool EncodedDescriptorDatabase::Add(const void* encoded_file_descriptor, if (file.ParseFromArray(encoded_file_descriptor, size)) { return index_->AddFile(file, std::make_pair(encoded_file_descriptor, size)); } else { - GOOGLE_LOG(ERROR) << "Invalid file descriptor data passed to " - "EncodedDescriptorDatabase::Add()."; + GOOGLE_ABSL_LOG(ERROR) << "Invalid file descriptor data passed to " + "EncodedDescriptorDatabase::Add()."; return false; } } @@ -639,7 +640,7 @@ bool EncodedDescriptorDatabase::DescriptorIndex::AddFile(const FileProto& file, all_values_.push_back({value.first, value.second, {}}); if (!ValidateSymbolName(file.package())) { - GOOGLE_LOG(ERROR) << "Invalid package name: " << file.package(); + GOOGLE_ABSL_LOG(ERROR) << "Invalid package name: " << file.package(); return false; } all_values_.back().encoded_package = EncodeString(file.package()); @@ -650,7 +651,7 @@ bool EncodedDescriptorDatabase::DescriptorIndex::AddFile(const FileProto& file, .second || std::binary_search(by_name_flat_.begin(), by_name_flat_.end(), file.name(), by_name_.key_comp())) { - GOOGLE_LOG(ERROR) << "File already exists in database: " << file.name(); + GOOGLE_ABSL_LOG(ERROR) << "File already exists in database: " << file.name(); return false; } @@ -677,9 +678,9 @@ static bool CheckForMutualSubsymbols(absl::string_view symbol_name, Iter* iter, Iter2 end, const Index& index) { if (*iter != end) { if (IsSubSymbol((*iter)->AsString(index), symbol_name)) { - GOOGLE_LOG(ERROR) << "Symbol name \"" << symbol_name - << "\" conflicts with the existing symbol \"" - << (*iter)->AsString(index) << "\"."; + GOOGLE_ABSL_LOG(ERROR) << "Symbol name \"" << symbol_name + << "\" conflicts with the existing symbol \"" + << (*iter)->AsString(index) << "\"."; return false; } @@ -691,9 +692,9 @@ static bool CheckForMutualSubsymbols(absl::string_view symbol_name, Iter* iter, ++*iter; if (*iter != end && IsSubSymbol(symbol_name, (*iter)->AsString(index))) { - GOOGLE_LOG(ERROR) << "Symbol name \"" << symbol_name - << "\" conflicts with the existing symbol \"" - << (*iter)->AsString(index) << "\"."; + GOOGLE_ABSL_LOG(ERROR) << "Symbol name \"" << symbol_name + << "\" conflicts with the existing symbol \"" + << (*iter)->AsString(index) << "\"."; return false; } } @@ -712,7 +713,7 @@ bool EncodedDescriptorDatabase::DescriptorIndex::AddSymbol( // relies on the fact that '.' sorts before all other characters that are // valid in symbol names). if (!ValidateSymbolName(symbol)) { - GOOGLE_LOG(ERROR) << "Invalid symbol name: " << entry_as_string; + GOOGLE_ABSL_LOG(ERROR) << "Invalid symbol name: " << entry_as_string; return false; } @@ -765,10 +766,11 @@ bool EncodedDescriptorDatabase::DescriptorIndex::AddExtension( by_extension_flat_.begin(), by_extension_flat_.end(), std::make_pair(field.extendee().substr(1), field.number()), by_extension_.key_comp())) { - GOOGLE_LOG(ERROR) << "Extension conflicts with extension already in database: " - "extend " - << field.extendee() << " { " << field.name() << " = " - << field.number() << " } from:" << filename; + GOOGLE_ABSL_LOG(ERROR) + << "Extension conflicts with extension already in database: " + "extend " + << field.extendee() << " { " << field.name() << " = " + << field.number() << " } from:" << filename; return false; } } else { diff --git a/src/google/protobuf/descriptor_database.h b/src/google/protobuf/descriptor_database.h index 942f975ae39c5..591a5b77256fe 100644 --- a/src/google/protobuf/descriptor_database.h +++ b/src/google/protobuf/descriptor_database.h @@ -171,7 +171,7 @@ class PROTOBUF_EXPORT SimpleDescriptorDatabase : public DescriptorDatabase { // Adds the FileDescriptorProto to the database, making a copy. The object // can be deleted after Add() returns. Returns false if the file conflicted // with a file already in the database, in which case an error will have - // been written to GOOGLE_LOG(ERROR). + // been written to GOOGLE_ABSL_LOG(ERROR). bool Add(const FileDescriptorProto& file); // Adds the FileDescriptorProto to the database and takes ownership of it. diff --git a/src/google/protobuf/descriptor_database_unittest.cc b/src/google/protobuf/descriptor_database_unittest.cc index 2abc6de846e85..7c14974dcbd95 100644 --- a/src/google/protobuf/descriptor_database_unittest.cc +++ b/src/google/protobuf/descriptor_database_unittest.cc @@ -39,7 +39,6 @@ #include #include -#include "google/protobuf/stubs/logging.h" #include "google/protobuf/descriptor.pb.h" #include "google/protobuf/descriptor.h" #include "google/protobuf/text_format.h" diff --git a/src/google/protobuf/descriptor_unittest.cc b/src/google/protobuf/descriptor_unittest.cc index 33f7ec0218c22..3a0975bd4d252 100644 --- a/src/google/protobuf/descriptor_unittest.cc +++ b/src/google/protobuf/descriptor_unittest.cc @@ -46,7 +46,6 @@ #include "google/protobuf/unittest.pb.h" #include "google/protobuf/unittest_custom_options.pb.h" #include "google/protobuf/stubs/common.h" -#include "google/protobuf/stubs/logging.h" #include "google/protobuf/descriptor.pb.h" #include "google/protobuf/descriptor.h" #include "google/protobuf/descriptor_database.h" @@ -55,6 +54,8 @@ #include #include "google/protobuf/testing/googletest.h" #include +#include "google/protobuf/stubs/logging.h" +#include "google/protobuf/stubs/logging.h" #include "google/protobuf/unittest_lazy_dependencies.pb.h" #include "google/protobuf/unittest_lazy_dependencies_custom_option.pb.h" #include "google/protobuf/unittest_lazy_dependencies_enum.pb.h" @@ -2990,7 +2991,7 @@ class AllowUnknownDependenciesTest return pool_->FindFileByName(proto.name()); } } - GOOGLE_LOG(FATAL) << "Can't get here."; + GOOGLE_ABSL_LOG(FATAL) << "Can't get here."; return nullptr; } @@ -3215,7 +3216,7 @@ TEST_P(AllowUnknownDependenciesTest, const FileDescriptor* file = BuildFile(test_proto); ASSERT_TRUE(file != nullptr); - GOOGLE_LOG(INFO) << file->DebugString(); + GOOGLE_ABSL_LOG(INFO) << file->DebugString(); EXPECT_EQ(0, file->dependency_count()); ASSERT_EQ(1, file->message_type_count()); @@ -6067,7 +6068,7 @@ TEST_F(ValidationErrorTest, RollbackAfterError) { } TEST_F(ValidationErrorTest, ErrorsReportedToLogError) { - // Test that errors are reported to GOOGLE_LOG(ERROR) if no error collector is + // Test that errors are reported to GOOGLE_ABSL_LOG(ERROR) if no error collector is // provided. FileDescriptorProto file_proto; @@ -7402,11 +7403,11 @@ class ExponentialErrorDatabase : public DescriptorDatabase { absl::string_view end_with, int32_t* file_num) { if (!absl::ConsumePrefix(&name, begin_with)) return; if (!absl::ConsumeSuffix(&name, end_with)) return; - GOOGLE_CHECK(absl::SimpleAtoi(name, file_num)); + GOOGLE_ABSL_CHECK(absl::SimpleAtoi(name, file_num)); } bool PopulateFile(int file_num, FileDescriptorProto* output) { - GOOGLE_CHECK_GE(file_num, 0); + GOOGLE_ABSL_CHECK_GE(file_num, 0); output->Clear(); output->set_name(absl::Substitute("file$0.proto", file_num)); // file0.proto doesn't define Message0 @@ -7431,7 +7432,7 @@ TEST_F(DatabaseBackedPoolTest, DoesntReloadKnownBadFiles) { ExponentialErrorDatabase error_database; DescriptorPool pool(&error_database); - GOOGLE_LOG(INFO) << "A timeout in this test probably indicates a real bug."; + GOOGLE_ABSL_LOG(INFO) << "A timeout in this test probably indicates a real bug."; EXPECT_TRUE(pool.FindFileByName("file40.proto") == nullptr); EXPECT_TRUE(pool.FindMessageTypeByName("Message40") == nullptr); @@ -7476,8 +7477,8 @@ class AbortingErrorCollector : public DescriptorPool::ErrorCollector { void AddError(const std::string& filename, const std::string& element_name, const Message* message, ErrorLocation location, const std::string& error_message) override { - GOOGLE_LOG(FATAL) << "AddError() called unexpectedly: " << filename << " [" - << element_name << "]: " << error_message; + GOOGLE_ABSL_LOG(FATAL) << "AddError() called unexpectedly: " << filename << " [" + << element_name << "]: " << error_message; } }; diff --git a/src/google/protobuf/dynamic_message.cc b/src/google/protobuf/dynamic_message.cc index 777ec176029b4..b9f61d4e722ff 100644 --- a/src/google/protobuf/dynamic_message.cc +++ b/src/google/protobuf/dynamic_message.cc @@ -178,7 +178,7 @@ int FieldSpaceUsed(const FieldDescriptor* field) { } } - GOOGLE_LOG(DFATAL) << "Can't get here."; + GOOGLE_ABSL_LOG(DFATAL) << "Can't get here."; return 0; } @@ -587,7 +587,7 @@ DynamicMessage::~DynamicMessage() { void DynamicMessage::CrossLinkPrototypes() { // This should only be called on the prototype message. - GOOGLE_CHECK(is_prototype()); + GOOGLE_ABSL_CHECK(is_prototype()); DynamicMessageFactory* factory = type_info_->factory; const Descriptor* descriptor = type_info_->type; diff --git a/src/google/protobuf/dynamic_message.h b/src/google/protobuf/dynamic_message.h index eb4a4b52112f7..fc677b52be45c 100644 --- a/src/google/protobuf/dynamic_message.h +++ b/src/google/protobuf/dynamic_message.h @@ -163,9 +163,9 @@ class PROTOBUF_EXPORT DynamicMapSorter { #ifndef NDEBUG for (size_t j = 1; j < static_cast(map_size); j++) { if (!comparator(result[j - 1], result[j])) { - GOOGLE_LOG(ERROR) << (comparator(result[j], result[j - 1]) - ? "internal error in map key sorting" - : "map keys are not unique"); + GOOGLE_ABSL_LOG(ERROR) << (comparator(result[j], result[j - 1]) + ? "internal error in map key sorting" + : "map keys are not unique"); } } #endif @@ -212,7 +212,7 @@ class PROTOBUF_EXPORT DynamicMapSorter { return first < second; } default: - GOOGLE_LOG(DFATAL) << "Invalid key for map field."; + GOOGLE_ABSL_LOG(DFATAL) << "Invalid key for map field."; return true; } } diff --git a/src/google/protobuf/dynamic_message_unittest.cc b/src/google/protobuf/dynamic_message_unittest.cc index b06e3add6a3cc..7270425f6f912 100644 --- a/src/google/protobuf/dynamic_message_unittest.cc +++ b/src/google/protobuf/dynamic_message_unittest.cc @@ -44,7 +44,6 @@ #include -#include "google/protobuf/stubs/logging.h" #include "google/protobuf/descriptor.pb.h" #include "google/protobuf/descriptor.h" #include "google/protobuf/testing/googletest.h" diff --git a/src/google/protobuf/explicitly_constructed.h b/src/google/protobuf/explicitly_constructed.h index eb02652646658..2c8968598273c 100644 --- a/src/google/protobuf/explicitly_constructed.h +++ b/src/google/protobuf/explicitly_constructed.h @@ -33,10 +33,9 @@ #include +#include #include -#include "google/protobuf/stubs/logging.h" - // clang-format off #include "google/protobuf/port_def.inc" // clang-format on diff --git a/src/google/protobuf/extension_set.cc b/src/google/protobuf/extension_set.cc index 6cd1248ddd683..42d0428f095d3 100644 --- a/src/google/protobuf/extension_set.cc +++ b/src/google/protobuf/extension_set.cc @@ -59,7 +59,7 @@ namespace internal { namespace { inline WireFormatLite::FieldType real_type(FieldType type) { - GOOGLE_DCHECK(type > 0 && type <= WireFormatLite::MAX_FIELD_TYPE); + GOOGLE_ABSL_DCHECK(type > 0 && type <= WireFormatLite::MAX_FIELD_TYPE); return static_cast(type); } @@ -92,9 +92,9 @@ void Register(const ExtensionInfo& info) { static auto local_static_registry = OnShutdownDelete(new ExtensionRegistry); global_registry = local_static_registry; if (!local_static_registry->insert(info).second) { - GOOGLE_LOG(FATAL) << "Multiple extension registrations for type \"" - << info.message->GetTypeName() << "\", field number " - << info.number << "."; + GOOGLE_ABSL_LOG(FATAL) << "Multiple extension registrations for type \"" + << info.message->GetTypeName() << "\", field number " + << info.number << "."; } } @@ -130,9 +130,9 @@ void ExtensionSet::RegisterExtension(const MessageLite* extendee, int number, FieldType type, bool is_repeated, bool is_packed, LazyEagerVerifyFnType verify_func) { - GOOGLE_CHECK_NE(type, WireFormatLite::TYPE_ENUM); - GOOGLE_CHECK_NE(type, WireFormatLite::TYPE_MESSAGE); - GOOGLE_CHECK_NE(type, WireFormatLite::TYPE_GROUP); + GOOGLE_ABSL_CHECK_NE(type, WireFormatLite::TYPE_ENUM); + GOOGLE_ABSL_CHECK_NE(type, WireFormatLite::TYPE_MESSAGE); + GOOGLE_ABSL_CHECK_NE(type, WireFormatLite::TYPE_GROUP); ExtensionInfo info(extendee, number, type, is_repeated, is_packed, verify_func); Register(info); @@ -155,7 +155,7 @@ void ExtensionSet::RegisterEnumExtension(const MessageLite* extendee, int number, FieldType type, bool is_repeated, bool is_packed, EnumValidityFunc* is_valid) { - GOOGLE_CHECK_EQ(type, WireFormatLite::TYPE_ENUM); + GOOGLE_ABSL_CHECK_EQ(type, WireFormatLite::TYPE_ENUM); ExtensionInfo info(extendee, number, type, is_repeated, is_packed, nullptr); info.enum_validity_check.func = CallNoArgValidityFunc; // See comment in CallNoArgValidityFunc() about why we use a c-style cast. @@ -168,8 +168,8 @@ void ExtensionSet::RegisterMessageExtension(const MessageLite* extendee, bool is_repeated, bool is_packed, const MessageLite* prototype, LazyEagerVerifyFnType verify_func) { - GOOGLE_CHECK(type == WireFormatLite::TYPE_MESSAGE || - type == WireFormatLite::TYPE_GROUP); + GOOGLE_ABSL_CHECK(type == WireFormatLite::TYPE_MESSAGE || + type == WireFormatLite::TYPE_GROUP); ExtensionInfo info(extendee, number, type, is_repeated, is_packed, verify_func); info.message_info = {prototype}; @@ -219,7 +219,7 @@ void ExtensionSet::DeleteFlatMap(const ExtensionSet::KeyValue* flat, bool ExtensionSet::Has(int number) const { const Extension* ext = FindOrNull(number); if (ext == nullptr) return false; - GOOGLE_DCHECK(!ext->is_repeated); + GOOGLE_ABSL_DCHECK(!ext->is_repeated); return !ext->is_cleared; } @@ -245,11 +245,13 @@ int ExtensionSet::ExtensionSize(int number) const { FieldType ExtensionSet::ExtensionType(int number) const { const Extension* ext = FindOrNull(number); if (ext == nullptr) { - GOOGLE_LOG(DFATAL) << "Don't lookup extension types if they aren't present (1). "; + GOOGLE_ABSL_LOG(DFATAL) + << "Don't lookup extension types if they aren't present (1). "; return 0; } if (ext->is_cleared) { - GOOGLE_LOG(DFATAL) << "Don't lookup extension types if they aren't present (2). "; + GOOGLE_ABSL_LOG(DFATAL) + << "Don't lookup extension types if they aren't present (2). "; } return ext->type; } @@ -269,9 +271,10 @@ enum { REPEATED_FIELD, OPTIONAL_FIELD }; } // namespace -#define GOOGLE_DCHECK_TYPE(EXTENSION, LABEL, CPPTYPE) \ - GOOGLE_DCHECK_EQ((EXTENSION).is_repeated ? REPEATED_FIELD : OPTIONAL_FIELD, LABEL); \ - GOOGLE_DCHECK_EQ(cpp_type((EXTENSION).type), WireFormatLite::CPPTYPE_##CPPTYPE) +#define GOOGLE_ABSL_DCHECK_TYPE(EXTENSION, LABEL, CPPTYPE) \ + GOOGLE_ABSL_DCHECK_EQ((EXTENSION).is_repeated ? REPEATED_FIELD : OPTIONAL_FIELD, \ + LABEL); \ + GOOGLE_ABSL_DCHECK_EQ(cpp_type((EXTENSION).type), WireFormatLite::CPPTYPE_##CPPTYPE) // ------------------------------------------------------------------- // Primitives @@ -284,7 +287,7 @@ enum { REPEATED_FIELD, OPTIONAL_FIELD }; if (extension == nullptr || extension->is_cleared) { \ return default_value; \ } else { \ - GOOGLE_DCHECK_TYPE(*extension, OPTIONAL_FIELD, UPPERCASE); \ + GOOGLE_ABSL_DCHECK_TYPE(*extension, OPTIONAL_FIELD, UPPERCASE); \ return extension->LOWERCASE##_value; \ } \ } \ @@ -295,7 +298,7 @@ enum { REPEATED_FIELD, OPTIONAL_FIELD }; if (extension == nullptr || extension->is_cleared) { \ return default_value; \ } else { \ - GOOGLE_DCHECK_TYPE(*extension, OPTIONAL_FIELD, UPPERCASE); \ + GOOGLE_ABSL_DCHECK_TYPE(*extension, OPTIONAL_FIELD, UPPERCASE); \ return extension->LOWERCASE##_value; \ } \ } \ @@ -306,11 +309,11 @@ enum { REPEATED_FIELD, OPTIONAL_FIELD }; Extension* extension; \ if (MaybeNewExtension(number, descriptor, &extension)) { \ extension->type = type; \ - GOOGLE_DCHECK_EQ(cpp_type(extension->type), \ - WireFormatLite::CPPTYPE_##UPPERCASE); \ + GOOGLE_ABSL_DCHECK_EQ(cpp_type(extension->type), \ + WireFormatLite::CPPTYPE_##UPPERCASE); \ extension->is_repeated = false; \ } else { \ - GOOGLE_DCHECK_TYPE(*extension, OPTIONAL_FIELD, UPPERCASE); \ + GOOGLE_ABSL_DCHECK_TYPE(*extension, OPTIONAL_FIELD, UPPERCASE); \ } \ extension->is_cleared = false; \ extension->LOWERCASE##_value = value; \ @@ -319,24 +322,27 @@ enum { REPEATED_FIELD, OPTIONAL_FIELD }; LOWERCASE ExtensionSet::GetRepeated##CAMELCASE(int number, int index) \ const { \ const Extension* extension = FindOrNull(number); \ - GOOGLE_CHECK(extension != nullptr) << "Index out-of-bounds (field is empty)."; \ - GOOGLE_DCHECK_TYPE(*extension, REPEATED_FIELD, UPPERCASE); \ + GOOGLE_ABSL_CHECK(extension != nullptr) \ + << "Index out-of-bounds (field is empty)."; \ + GOOGLE_ABSL_DCHECK_TYPE(*extension, REPEATED_FIELD, UPPERCASE); \ return extension->repeated_##LOWERCASE##_value->Get(index); \ } \ \ const LOWERCASE& ExtensionSet::GetRefRepeated##CAMELCASE(int number, \ int index) const { \ const Extension* extension = FindOrNull(number); \ - GOOGLE_CHECK(extension != nullptr) << "Index out-of-bounds (field is empty)."; \ - GOOGLE_DCHECK_TYPE(*extension, REPEATED_FIELD, UPPERCASE); \ + GOOGLE_ABSL_CHECK(extension != nullptr) \ + << "Index out-of-bounds (field is empty)."; \ + GOOGLE_ABSL_DCHECK_TYPE(*extension, REPEATED_FIELD, UPPERCASE); \ return extension->repeated_##LOWERCASE##_value->Get(index); \ } \ \ void ExtensionSet::SetRepeated##CAMELCASE(int number, int index, \ LOWERCASE value) { \ Extension* extension = FindOrNull(number); \ - GOOGLE_CHECK(extension != nullptr) << "Index out-of-bounds (field is empty)."; \ - GOOGLE_DCHECK_TYPE(*extension, REPEATED_FIELD, UPPERCASE); \ + GOOGLE_ABSL_CHECK(extension != nullptr) \ + << "Index out-of-bounds (field is empty)."; \ + GOOGLE_ABSL_DCHECK_TYPE(*extension, REPEATED_FIELD, UPPERCASE); \ extension->repeated_##LOWERCASE##_value->Set(index, value); \ } \ \ @@ -346,15 +352,15 @@ enum { REPEATED_FIELD, OPTIONAL_FIELD }; Extension* extension; \ if (MaybeNewExtension(number, descriptor, &extension)) { \ extension->type = type; \ - GOOGLE_DCHECK_EQ(cpp_type(extension->type), \ - WireFormatLite::CPPTYPE_##UPPERCASE); \ + GOOGLE_ABSL_DCHECK_EQ(cpp_type(extension->type), \ + WireFormatLite::CPPTYPE_##UPPERCASE); \ extension->is_repeated = true; \ extension->is_packed = packed; \ extension->repeated_##LOWERCASE##_value = \ Arena::CreateMessage>(arena_); \ } else { \ - GOOGLE_DCHECK_TYPE(*extension, REPEATED_FIELD, UPPERCASE); \ - GOOGLE_DCHECK_EQ(extension->is_packed, packed); \ + GOOGLE_ABSL_DCHECK_TYPE(*extension, REPEATED_FIELD, UPPERCASE); \ + GOOGLE_ABSL_DCHECK_EQ(extension->is_packed, packed); \ } \ extension->repeated_##LOWERCASE##_value->Add(value); \ } @@ -443,10 +449,10 @@ void* ExtensionSet::MutableRawRepeatedField(int number, FieldType field_type, } // Compatible version using old call signature. Does not create extensions when -// the don't already exist; instead, just GOOGLE_CHECK-fails. +// the don't already exist; instead, just GOOGLE_ABSL_CHECK-fails. void* ExtensionSet::MutableRawRepeatedField(int number) { Extension* extension = FindOrNull(number); - GOOGLE_CHECK(extension != nullptr) << "Extension not found."; + GOOGLE_ABSL_CHECK(extension != nullptr) << "Extension not found."; // We assume that all the RepeatedField<>* pointers have the same // size and alignment within the anonymous union in Extension. return extension->repeated_int32_t_value; @@ -461,7 +467,7 @@ int ExtensionSet::GetEnum(int number, int default_value) const { // Not present. Return the default value. return default_value; } else { - GOOGLE_DCHECK_TYPE(*extension, OPTIONAL_FIELD, ENUM); + GOOGLE_ABSL_DCHECK_TYPE(*extension, OPTIONAL_FIELD, ENUM); return extension->enum_value; } } @@ -473,7 +479,7 @@ const int& ExtensionSet::GetRefEnum(int number, // Not present. Return the default value. return default_value; } else { - GOOGLE_DCHECK_TYPE(*extension, OPTIONAL_FIELD, ENUM); + GOOGLE_ABSL_DCHECK_TYPE(*extension, OPTIONAL_FIELD, ENUM); return extension->enum_value; } } @@ -483,10 +489,10 @@ void ExtensionSet::SetEnum(int number, FieldType type, int value, Extension* extension; if (MaybeNewExtension(number, descriptor, &extension)) { extension->type = type; - GOOGLE_DCHECK_EQ(cpp_type(extension->type), WireFormatLite::CPPTYPE_ENUM); + GOOGLE_ABSL_DCHECK_EQ(cpp_type(extension->type), WireFormatLite::CPPTYPE_ENUM); extension->is_repeated = false; } else { - GOOGLE_DCHECK_TYPE(*extension, OPTIONAL_FIELD, ENUM); + GOOGLE_ABSL_DCHECK_TYPE(*extension, OPTIONAL_FIELD, ENUM); } extension->is_cleared = false; extension->enum_value = value; @@ -494,22 +500,22 @@ void ExtensionSet::SetEnum(int number, FieldType type, int value, int ExtensionSet::GetRepeatedEnum(int number, int index) const { const Extension* extension = FindOrNull(number); - GOOGLE_CHECK(extension != nullptr) << "Index out-of-bounds (field is empty)."; - GOOGLE_DCHECK_TYPE(*extension, REPEATED_FIELD, ENUM); + GOOGLE_ABSL_CHECK(extension != nullptr) << "Index out-of-bounds (field is empty)."; + GOOGLE_ABSL_DCHECK_TYPE(*extension, REPEATED_FIELD, ENUM); return extension->repeated_enum_value->Get(index); } const int& ExtensionSet::GetRefRepeatedEnum(int number, int index) const { const Extension* extension = FindOrNull(number); - GOOGLE_CHECK(extension != nullptr) << "Index out-of-bounds (field is empty)."; - GOOGLE_DCHECK_TYPE(*extension, REPEATED_FIELD, ENUM); + GOOGLE_ABSL_CHECK(extension != nullptr) << "Index out-of-bounds (field is empty)."; + GOOGLE_ABSL_DCHECK_TYPE(*extension, REPEATED_FIELD, ENUM); return extension->repeated_enum_value->Get(index); } void ExtensionSet::SetRepeatedEnum(int number, int index, int value) { Extension* extension = FindOrNull(number); - GOOGLE_CHECK(extension != nullptr) << "Index out-of-bounds (field is empty)."; - GOOGLE_DCHECK_TYPE(*extension, REPEATED_FIELD, ENUM); + GOOGLE_ABSL_CHECK(extension != nullptr) << "Index out-of-bounds (field is empty)."; + GOOGLE_ABSL_DCHECK_TYPE(*extension, REPEATED_FIELD, ENUM); extension->repeated_enum_value->Set(index, value); } @@ -518,14 +524,14 @@ void ExtensionSet::AddEnum(int number, FieldType type, bool packed, int value, Extension* extension; if (MaybeNewExtension(number, descriptor, &extension)) { extension->type = type; - GOOGLE_DCHECK_EQ(cpp_type(extension->type), WireFormatLite::CPPTYPE_ENUM); + GOOGLE_ABSL_DCHECK_EQ(cpp_type(extension->type), WireFormatLite::CPPTYPE_ENUM); extension->is_repeated = true; extension->is_packed = packed; extension->repeated_enum_value = Arena::CreateMessage>(arena_); } else { - GOOGLE_DCHECK_TYPE(*extension, REPEATED_FIELD, ENUM); - GOOGLE_DCHECK_EQ(extension->is_packed, packed); + GOOGLE_ABSL_DCHECK_TYPE(*extension, REPEATED_FIELD, ENUM); + GOOGLE_ABSL_DCHECK_EQ(extension->is_packed, packed); } extension->repeated_enum_value->Add(value); } @@ -540,7 +546,7 @@ const std::string& ExtensionSet::GetString( // Not present. Return the default value. return default_value; } else { - GOOGLE_DCHECK_TYPE(*extension, OPTIONAL_FIELD, STRING); + GOOGLE_ABSL_DCHECK_TYPE(*extension, OPTIONAL_FIELD, STRING); return *extension->string_value; } } @@ -550,11 +556,11 @@ std::string* ExtensionSet::MutableString(int number, FieldType type, Extension* extension; if (MaybeNewExtension(number, descriptor, &extension)) { extension->type = type; - GOOGLE_DCHECK_EQ(cpp_type(extension->type), WireFormatLite::CPPTYPE_STRING); + GOOGLE_ABSL_DCHECK_EQ(cpp_type(extension->type), WireFormatLite::CPPTYPE_STRING); extension->is_repeated = false; extension->string_value = Arena::Create(arena_); } else { - GOOGLE_DCHECK_TYPE(*extension, OPTIONAL_FIELD, STRING); + GOOGLE_ABSL_DCHECK_TYPE(*extension, OPTIONAL_FIELD, STRING); } extension->is_cleared = false; return extension->string_value; @@ -563,15 +569,15 @@ std::string* ExtensionSet::MutableString(int number, FieldType type, const std::string& ExtensionSet::GetRepeatedString(int number, int index) const { const Extension* extension = FindOrNull(number); - GOOGLE_CHECK(extension != nullptr) << "Index out-of-bounds (field is empty)."; - GOOGLE_DCHECK_TYPE(*extension, REPEATED_FIELD, STRING); + GOOGLE_ABSL_CHECK(extension != nullptr) << "Index out-of-bounds (field is empty)."; + GOOGLE_ABSL_DCHECK_TYPE(*extension, REPEATED_FIELD, STRING); return extension->repeated_string_value->Get(index); } std::string* ExtensionSet::MutableRepeatedString(int number, int index) { Extension* extension = FindOrNull(number); - GOOGLE_CHECK(extension != nullptr) << "Index out-of-bounds (field is empty)."; - GOOGLE_DCHECK_TYPE(*extension, REPEATED_FIELD, STRING); + GOOGLE_ABSL_CHECK(extension != nullptr) << "Index out-of-bounds (field is empty)."; + GOOGLE_ABSL_DCHECK_TYPE(*extension, REPEATED_FIELD, STRING); return extension->repeated_string_value->Mutable(index); } @@ -580,13 +586,13 @@ std::string* ExtensionSet::AddString(int number, FieldType type, Extension* extension; if (MaybeNewExtension(number, descriptor, &extension)) { extension->type = type; - GOOGLE_DCHECK_EQ(cpp_type(extension->type), WireFormatLite::CPPTYPE_STRING); + GOOGLE_ABSL_DCHECK_EQ(cpp_type(extension->type), WireFormatLite::CPPTYPE_STRING); extension->is_repeated = true; extension->is_packed = false; extension->repeated_string_value = Arena::CreateMessage>(arena_); } else { - GOOGLE_DCHECK_TYPE(*extension, REPEATED_FIELD, STRING); + GOOGLE_ABSL_DCHECK_TYPE(*extension, REPEATED_FIELD, STRING); } return extension->repeated_string_value->Add(); } @@ -601,7 +607,7 @@ const MessageLite& ExtensionSet::GetMessage( // Not present. Return the default value. return default_value; } else { - GOOGLE_DCHECK_TYPE(*extension, OPTIONAL_FIELD, MESSAGE); + GOOGLE_ABSL_DCHECK_TYPE(*extension, OPTIONAL_FIELD, MESSAGE); if (extension->is_lazy) { return extension->lazymessage_value->GetMessage(default_value, arena_); } else { @@ -621,14 +627,14 @@ MessageLite* ExtensionSet::MutableMessage(int number, FieldType type, Extension* extension; if (MaybeNewExtension(number, descriptor, &extension)) { extension->type = type; - GOOGLE_DCHECK_EQ(cpp_type(extension->type), WireFormatLite::CPPTYPE_MESSAGE); + GOOGLE_ABSL_DCHECK_EQ(cpp_type(extension->type), WireFormatLite::CPPTYPE_MESSAGE); extension->is_repeated = false; extension->is_lazy = false; extension->message_value = prototype.New(arena_); extension->is_cleared = false; return extension->message_value; } else { - GOOGLE_DCHECK_TYPE(*extension, OPTIONAL_FIELD, MESSAGE); + GOOGLE_ABSL_DCHECK_TYPE(*extension, OPTIONAL_FIELD, MESSAGE); extension->is_cleared = false; if (extension->is_lazy) { return extension->lazymessage_value->MutableMessage(prototype, arena_); @@ -650,13 +656,13 @@ void ExtensionSet::SetAllocatedMessage(int number, FieldType type, ClearExtension(number); return; } - GOOGLE_DCHECK(message->GetOwningArena() == nullptr || - message->GetOwningArena() == arena_); + GOOGLE_ABSL_DCHECK(message->GetOwningArena() == nullptr || + message->GetOwningArena() == arena_); Arena* message_arena = message->GetOwningArena(); Extension* extension; if (MaybeNewExtension(number, descriptor, &extension)) { extension->type = type; - GOOGLE_DCHECK_EQ(cpp_type(extension->type), WireFormatLite::CPPTYPE_MESSAGE); + GOOGLE_ABSL_DCHECK_EQ(cpp_type(extension->type), WireFormatLite::CPPTYPE_MESSAGE); extension->is_repeated = false; extension->is_lazy = false; if (message_arena == arena_) { @@ -669,7 +675,7 @@ void ExtensionSet::SetAllocatedMessage(int number, FieldType type, extension->message_value->CheckTypeAndMergeFrom(*message); } } else { - GOOGLE_DCHECK_TYPE(*extension, OPTIONAL_FIELD, MESSAGE); + GOOGLE_ABSL_DCHECK_TYPE(*extension, OPTIONAL_FIELD, MESSAGE); if (extension->is_lazy) { extension->lazymessage_value->SetAllocatedMessage(message, arena_); } else { @@ -700,12 +706,12 @@ void ExtensionSet::UnsafeArenaSetAllocatedMessage( Extension* extension; if (MaybeNewExtension(number, descriptor, &extension)) { extension->type = type; - GOOGLE_DCHECK_EQ(cpp_type(extension->type), WireFormatLite::CPPTYPE_MESSAGE); + GOOGLE_ABSL_DCHECK_EQ(cpp_type(extension->type), WireFormatLite::CPPTYPE_MESSAGE); extension->is_repeated = false; extension->is_lazy = false; extension->message_value = message; } else { - GOOGLE_DCHECK_TYPE(*extension, OPTIONAL_FIELD, MESSAGE); + GOOGLE_ABSL_DCHECK_TYPE(*extension, OPTIONAL_FIELD, MESSAGE); if (extension->is_lazy) { extension->lazymessage_value->UnsafeArenaSetAllocatedMessage(message, arena_); @@ -726,7 +732,7 @@ MessageLite* ExtensionSet::ReleaseMessage(int number, // Not present. Return nullptr. return nullptr; } else { - GOOGLE_DCHECK_TYPE(*extension, OPTIONAL_FIELD, MESSAGE); + GOOGLE_ABSL_DCHECK_TYPE(*extension, OPTIONAL_FIELD, MESSAGE); MessageLite* ret = nullptr; if (extension->is_lazy) { ret = extension->lazymessage_value->ReleaseMessage(prototype, arena_); @@ -755,7 +761,7 @@ MessageLite* ExtensionSet::UnsafeArenaReleaseMessage( // Not present. Return nullptr. return nullptr; } else { - GOOGLE_DCHECK_TYPE(*extension, OPTIONAL_FIELD, MESSAGE); + GOOGLE_ABSL_DCHECK_TYPE(*extension, OPTIONAL_FIELD, MESSAGE); MessageLite* ret = nullptr; if (extension->is_lazy) { ret = extension->lazymessage_value->UnsafeArenaReleaseMessage(prototype, @@ -778,15 +784,15 @@ MessageLite* ExtensionSet::UnsafeArenaReleaseMessage( const MessageLite& ExtensionSet::GetRepeatedMessage(int number, int index) const { const Extension* extension = FindOrNull(number); - GOOGLE_CHECK(extension != nullptr) << "Index out-of-bounds (field is empty)."; - GOOGLE_DCHECK_TYPE(*extension, REPEATED_FIELD, MESSAGE); + GOOGLE_ABSL_CHECK(extension != nullptr) << "Index out-of-bounds (field is empty)."; + GOOGLE_ABSL_DCHECK_TYPE(*extension, REPEATED_FIELD, MESSAGE); return extension->repeated_message_value->Get(index); } MessageLite* ExtensionSet::MutableRepeatedMessage(int number, int index) { Extension* extension = FindOrNull(number); - GOOGLE_CHECK(extension != nullptr) << "Index out-of-bounds (field is empty)."; - GOOGLE_DCHECK_TYPE(*extension, REPEATED_FIELD, MESSAGE); + GOOGLE_ABSL_CHECK(extension != nullptr) << "Index out-of-bounds (field is empty)."; + GOOGLE_ABSL_DCHECK_TYPE(*extension, REPEATED_FIELD, MESSAGE); return extension->repeated_message_value->Mutable(index); } @@ -796,12 +802,12 @@ MessageLite* ExtensionSet::AddMessage(int number, FieldType type, Extension* extension; if (MaybeNewExtension(number, descriptor, &extension)) { extension->type = type; - GOOGLE_DCHECK_EQ(cpp_type(extension->type), WireFormatLite::CPPTYPE_MESSAGE); + GOOGLE_ABSL_DCHECK_EQ(cpp_type(extension->type), WireFormatLite::CPPTYPE_MESSAGE); extension->is_repeated = true; extension->repeated_message_value = Arena::CreateMessage>(arena_); } else { - GOOGLE_DCHECK_TYPE(*extension, REPEATED_FIELD, MESSAGE); + GOOGLE_ABSL_DCHECK_TYPE(*extension, REPEATED_FIELD, MESSAGE); } // RepeatedPtrField does not know how to Add() since it cannot @@ -821,12 +827,12 @@ MessageLite* ExtensionSet::AddMessage(int number, FieldType type, // const Descriptor* message_type, // MessageFactory* factory) -#undef GOOGLE_DCHECK_TYPE +#undef GOOGLE_ABSL_DCHECK_TYPE void ExtensionSet::RemoveLast(int number) { Extension* extension = FindOrNull(number); - GOOGLE_CHECK(extension != nullptr) << "Index out-of-bounds (field is empty)."; - GOOGLE_DCHECK(extension->is_repeated); + GOOGLE_ABSL_CHECK(extension != nullptr) << "Index out-of-bounds (field is empty)."; + GOOGLE_ABSL_DCHECK(extension->is_repeated); switch (cpp_type(extension->type)) { case WireFormatLite::CPPTYPE_INT32: @@ -864,24 +870,24 @@ void ExtensionSet::RemoveLast(int number) { MessageLite* ExtensionSet::ReleaseLast(int number) { Extension* extension = FindOrNull(number); - GOOGLE_CHECK(extension != nullptr) << "Index out-of-bounds (field is empty)."; - GOOGLE_DCHECK(extension->is_repeated); - GOOGLE_DCHECK(cpp_type(extension->type) == WireFormatLite::CPPTYPE_MESSAGE); + GOOGLE_ABSL_CHECK(extension != nullptr) << "Index out-of-bounds (field is empty)."; + GOOGLE_ABSL_DCHECK(extension->is_repeated); + GOOGLE_ABSL_DCHECK(cpp_type(extension->type) == WireFormatLite::CPPTYPE_MESSAGE); return extension->repeated_message_value->ReleaseLast(); } MessageLite* ExtensionSet::UnsafeArenaReleaseLast(int number) { Extension* extension = FindOrNull(number); - GOOGLE_CHECK(extension != nullptr) << "Index out-of-bounds (field is empty)."; - GOOGLE_DCHECK(extension->is_repeated); - GOOGLE_DCHECK(cpp_type(extension->type) == WireFormatLite::CPPTYPE_MESSAGE); + GOOGLE_ABSL_CHECK(extension != nullptr) << "Index out-of-bounds (field is empty)."; + GOOGLE_ABSL_DCHECK(extension->is_repeated); + GOOGLE_ABSL_DCHECK(cpp_type(extension->type) == WireFormatLite::CPPTYPE_MESSAGE); return extension->repeated_message_value->UnsafeArenaReleaseLast(); } void ExtensionSet::SwapElements(int number, int index1, int index2) { Extension* extension = FindOrNull(number); - GOOGLE_CHECK(extension != nullptr) << "Index out-of-bounds (field is empty)."; - GOOGLE_DCHECK(extension->is_repeated); + GOOGLE_ABSL_CHECK(extension != nullptr) << "Index out-of-bounds (field is empty)."; + GOOGLE_ABSL_DCHECK(extension->is_repeated); switch (cpp_type(extension->type)) { case WireFormatLite::CPPTYPE_INT32: @@ -988,9 +994,9 @@ void ExtensionSet::InternalExtensionMergeFrom(const MessageLite* extendee, extension->is_packed = other_extension.is_packed; extension->is_repeated = true; } else { - GOOGLE_DCHECK_EQ(extension->type, other_extension.type); - GOOGLE_DCHECK_EQ(extension->is_packed, other_extension.is_packed); - GOOGLE_DCHECK(extension->is_repeated); + GOOGLE_ABSL_DCHECK_EQ(extension->type, other_extension.type); + GOOGLE_ABSL_DCHECK_EQ(extension->is_packed, other_extension.is_packed); + GOOGLE_ABSL_DCHECK(extension->is_repeated); } switch (cpp_type(other_extension.type)) { @@ -1084,9 +1090,9 @@ void ExtensionSet::InternalExtensionMergeFrom(const MessageLite* extendee, *other_extension.message_value); } } else { - GOOGLE_DCHECK_EQ(extension->type, other_extension.type); - GOOGLE_DCHECK_EQ(extension->is_packed, other_extension.is_packed); - GOOGLE_DCHECK(!extension->is_repeated); + GOOGLE_ABSL_DCHECK_EQ(extension->type, other_extension.type); + GOOGLE_ABSL_DCHECK_EQ(extension->is_packed, other_extension.is_packed); + GOOGLE_ABSL_DCHECK(!extension->is_repeated); if (other_extension.is_lazy) { if (extension->is_lazy) { extension->lazymessage_value->MergeFrom( @@ -1194,7 +1200,7 @@ void ExtensionSet::UnsafeShallowSwapExtension(ExtensionSet* other, int number) { if (this_ext == other_ext) return; - GOOGLE_DCHECK_EQ(GetArena(), other->GetArena()); + GOOGLE_ABSL_DCHECK_EQ(GetArena(), other->GetArena()); if (this_ext != nullptr && other_ext != nullptr) { std::swap(*this_ext, *other_ext); @@ -1390,7 +1396,7 @@ size_t ExtensionSet::Extension::ByteSize(int number) const { case WireFormatLite::TYPE_BYTES: case WireFormatLite::TYPE_GROUP: case WireFormatLite::TYPE_MESSAGE: - GOOGLE_LOG(FATAL) << "Non-primitive types can't be packed."; + GOOGLE_ABSL_LOG(FATAL) << "Non-primitive types can't be packed."; break; } @@ -1491,7 +1497,7 @@ size_t ExtensionSet::Extension::ByteSize(int number) const { } int ExtensionSet::Extension::GetSize() const { - GOOGLE_DCHECK(is_repeated); + GOOGLE_ABSL_DCHECK(is_repeated); switch (cpp_type(type)) { #define HANDLE_TYPE(UPPERCASE, LOWERCASE) \ case WireFormatLite::CPPTYPE_##UPPERCASE: \ @@ -1510,7 +1516,7 @@ int ExtensionSet::Extension::GetSize() const { #undef HANDLE_TYPE } - GOOGLE_LOG(FATAL) << "Can't get here."; + GOOGLE_ABSL_LOG(FATAL) << "Can't get here."; return 0; } @@ -1659,7 +1665,7 @@ void ExtensionSet::GrowCapacity(size_t minimum_new_capacity) { hint = new_map.large->insert(hint, {it->first, it->second}); } flat_size_ = static_cast(-1); - GOOGLE_DCHECK(is_large()); + GOOGLE_ABSL_DCHECK(is_large()); } else { new_map.flat = Arena::CreateArray(arena_, new_flat_capacity); std::copy(begin, end, new_map.flat); @@ -1749,7 +1755,7 @@ uint8_t* ExtensionSet::Extension::InternalSerializeFieldWithCachedSizesToArray( case WireFormatLite::TYPE_BYTES: case WireFormatLite::TYPE_GROUP: case WireFormatLite::TYPE_MESSAGE: - GOOGLE_LOG(FATAL) << "Non-primitive types can't be packed."; + GOOGLE_ABSL_LOG(FATAL) << "Non-primitive types can't be packed."; break; } } else { @@ -1877,7 +1883,7 @@ ExtensionSet::Extension::InternalSerializeMessageSetItemWithCachedSizesToArray( uint8_t* target, io::EpsCopyOutputStream* stream) const { if (type != WireFormatLite::TYPE_MESSAGE || is_repeated) { // Not a valid MessageSet extension, but serialize it the normal way. - GOOGLE_LOG(WARNING) << "Invalid message set extension."; + GOOGLE_ABSL_LOG(WARNING) << "Invalid message set extension."; return InternalSerializeFieldWithCachedSizesToArray(extendee, extension_set, number, target, stream); } diff --git a/src/google/protobuf/extension_set.h b/src/google/protobuf/extension_set.h index c0dcb8c16110e..f5057bda9cca5 100644 --- a/src/google/protobuf/extension_set.h +++ b/src/google/protobuf/extension_set.h @@ -321,7 +321,7 @@ class PROTOBUF_EXPORT ExtensionSet { // This is an overload of MutableRawRepeatedField to maintain compatibility // with old code using a previous API. This version of - // MutableRawRepeatedField() will GOOGLE_CHECK-fail on a missing extension. + // MutableRawRepeatedField() will GOOGLE_ABSL_CHECK-fail on a missing extension. // (E.g.: borg/clients/internal/proto1/proto2_reflection.cc.) void* MutableRawRepeatedField(int number); @@ -790,8 +790,8 @@ class PROTOBUF_EXPORT ExtensionSet { return false; } - GOOGLE_DCHECK(extension->type > 0 && - extension->type <= WireFormatLite::MAX_FIELD_TYPE); + GOOGLE_ABSL_DCHECK(extension->type > 0 && + extension->type <= WireFormatLite::MAX_FIELD_TYPE); auto real_type = static_cast(extension->type); WireFormatLite::WireType expected_wire_type = @@ -1257,7 +1257,7 @@ class EnumTypeTraits { } static inline void Set(int number, FieldType field_type, ConstType value, ExtensionSet* set) { - GOOGLE_DCHECK(IsValid(value)); + GOOGLE_ABSL_DCHECK(IsValid(value)); set->SetEnum(number, field_type, value, nullptr); } template @@ -1289,12 +1289,12 @@ class RepeatedEnumTypeTraits { } static inline void Set(int number, int index, ConstType value, ExtensionSet* set) { - GOOGLE_DCHECK(IsValid(value)); + GOOGLE_ABSL_DCHECK(IsValid(value)); set->SetRepeatedEnum(number, index, value); } static inline void Add(int number, FieldType field_type, bool is_packed, ConstType value, ExtensionSet* set) { - GOOGLE_DCHECK(IsValid(value)); + GOOGLE_ABSL_DCHECK(IsValid(value)); set->AddEnum(number, field_type, is_packed, value, nullptr); } static inline const RepeatedField& GetRepeated( diff --git a/src/google/protobuf/extension_set_heavy.cc b/src/google/protobuf/extension_set_heavy.cc index abf9e5fe763dc..7503d7d20156c 100644 --- a/src/google/protobuf/extension_set_heavy.cc +++ b/src/google/protobuf/extension_set_heavy.cc @@ -104,7 +104,7 @@ void ExtensionSet::AppendToList( } inline FieldDescriptor::Type real_type(FieldType type) { - GOOGLE_DCHECK(type > 0 && type <= FieldDescriptor::MAX_TYPE); + GOOGLE_ABSL_DCHECK(type > 0 && type <= FieldDescriptor::MAX_TYPE); return static_cast(type); } @@ -114,15 +114,15 @@ inline FieldDescriptor::CppType cpp_type(FieldType type) { } inline WireFormatLite::FieldType field_type(FieldType type) { - GOOGLE_DCHECK(type > 0 && type <= WireFormatLite::MAX_FIELD_TYPE); + GOOGLE_ABSL_DCHECK(type > 0 && type <= WireFormatLite::MAX_FIELD_TYPE); return static_cast(type); } -#define GOOGLE_DCHECK_TYPE(EXTENSION, LABEL, CPPTYPE) \ - GOOGLE_DCHECK_EQ((EXTENSION).is_repeated ? FieldDescriptor::LABEL_REPEATED \ - : FieldDescriptor::LABEL_OPTIONAL, \ - FieldDescriptor::LABEL_##LABEL); \ - GOOGLE_DCHECK_EQ(cpp_type((EXTENSION).type), FieldDescriptor::CPPTYPE_##CPPTYPE) +#define GOOGLE_ABSL_DCHECK_TYPE(EXTENSION, LABEL, CPPTYPE) \ + GOOGLE_ABSL_DCHECK_EQ((EXTENSION).is_repeated ? FieldDescriptor::LABEL_REPEATED \ + : FieldDescriptor::LABEL_OPTIONAL, \ + FieldDescriptor::LABEL_##LABEL); \ + GOOGLE_ABSL_DCHECK_EQ(cpp_type((EXTENSION).type), FieldDescriptor::CPPTYPE_##CPPTYPE) const MessageLite& ExtensionSet::GetMessage(int number, const Descriptor* message_type, @@ -132,7 +132,7 @@ const MessageLite& ExtensionSet::GetMessage(int number, // Not present. Return the default value. return *factory->GetPrototype(message_type); } else { - GOOGLE_DCHECK_TYPE(*extension, OPTIONAL, MESSAGE); + GOOGLE_ABSL_DCHECK_TYPE(*extension, OPTIONAL, MESSAGE); if (extension->is_lazy) { return extension->lazymessage_value->GetMessage( *factory->GetPrototype(message_type), arena_); @@ -147,7 +147,7 @@ MessageLite* ExtensionSet::MutableMessage(const FieldDescriptor* descriptor, Extension* extension; if (MaybeNewExtension(descriptor->number(), descriptor, &extension)) { extension->type = descriptor->type(); - GOOGLE_DCHECK_EQ(cpp_type(extension->type), FieldDescriptor::CPPTYPE_MESSAGE); + GOOGLE_ABSL_DCHECK_EQ(cpp_type(extension->type), FieldDescriptor::CPPTYPE_MESSAGE); extension->is_repeated = false; extension->is_packed = false; const MessageLite* prototype = @@ -157,7 +157,7 @@ MessageLite* ExtensionSet::MutableMessage(const FieldDescriptor* descriptor, extension->is_cleared = false; return extension->message_value; } else { - GOOGLE_DCHECK_TYPE(*extension, OPTIONAL, MESSAGE); + GOOGLE_ABSL_DCHECK_TYPE(*extension, OPTIONAL, MESSAGE); extension->is_cleared = false; if (extension->is_lazy) { return extension->lazymessage_value->MutableMessage( @@ -175,7 +175,7 @@ MessageLite* ExtensionSet::ReleaseMessage(const FieldDescriptor* descriptor, // Not present. Return nullptr. return nullptr; } else { - GOOGLE_DCHECK_TYPE(*extension, OPTIONAL, MESSAGE); + GOOGLE_ABSL_DCHECK_TYPE(*extension, OPTIONAL, MESSAGE); MessageLite* ret = nullptr; if (extension->is_lazy) { ret = extension->lazymessage_value->ReleaseMessage( @@ -203,7 +203,7 @@ MessageLite* ExtensionSet::UnsafeArenaReleaseMessage( // Not present. Return nullptr. return nullptr; } else { - GOOGLE_DCHECK_TYPE(*extension, OPTIONAL, MESSAGE); + GOOGLE_ABSL_DCHECK_TYPE(*extension, OPTIONAL, MESSAGE); MessageLite* ret = nullptr; if (extension->is_lazy) { ret = extension->lazymessage_value->UnsafeArenaReleaseMessage( @@ -224,12 +224,12 @@ ExtensionSet::Extension* ExtensionSet::MaybeNewRepeatedExtension( Extension* extension; if (MaybeNewExtension(descriptor->number(), descriptor, &extension)) { extension->type = descriptor->type(); - GOOGLE_DCHECK_EQ(cpp_type(extension->type), FieldDescriptor::CPPTYPE_MESSAGE); + GOOGLE_ABSL_DCHECK_EQ(cpp_type(extension->type), FieldDescriptor::CPPTYPE_MESSAGE); extension->is_repeated = true; extension->repeated_message_value = Arena::CreateMessage >(arena_); } else { - GOOGLE_DCHECK_TYPE(*extension, REPEATED, MESSAGE); + GOOGLE_ABSL_DCHECK_TYPE(*extension, REPEATED, MESSAGE); } return extension; } @@ -248,7 +248,7 @@ MessageLite* ExtensionSet::AddMessage(const FieldDescriptor* descriptor, const MessageLite* prototype; if (extension->repeated_message_value->empty()) { prototype = factory->GetPrototype(descriptor->message_type()); - GOOGLE_CHECK(prototype != nullptr); + GOOGLE_ABSL_CHECK(prototype != nullptr); } else { prototype = &extension->repeated_message_value->Get(0); } @@ -290,7 +290,7 @@ bool DescriptorPoolExtensionFinder::Find(int number, ExtensionInfo* output) { if (extension->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) { output->message_info.prototype = factory_->GetPrototype(extension->message_type()); - GOOGLE_CHECK(output->message_info.prototype != nullptr) + GOOGLE_ABSL_CHECK(output->message_info.prototype != nullptr) << "Extension factory's GetPrototype() returned nullptr; extension: " << extension->full_name(); } else if (extension->cpp_type() == FieldDescriptor::CPPTYPE_ENUM) { diff --git a/src/google/protobuf/extension_set_inl.h b/src/google/protobuf/extension_set_inl.h index 8256455407d9c..29a944f529765 100644 --- a/src/google/protobuf/extension_set_inl.h +++ b/src/google/protobuf/extension_set_inl.h @@ -76,7 +76,7 @@ const char* ExtensionSet::ParseFieldWithExtensionInfo( case WireFormatLite::TYPE_BYTES: case WireFormatLite::TYPE_GROUP: case WireFormatLite::TYPE_MESSAGE: - GOOGLE_LOG(FATAL) << "Non-primitive types can't be packed."; + GOOGLE_ABSL_LOG(FATAL) << "Non-primitive types can't be packed."; break; } } else { diff --git a/src/google/protobuf/extension_set_unittest.cc b/src/google/protobuf/extension_set_unittest.cc index 98f9ba80dc3f9..94e4bbbc4b76b 100644 --- a/src/google/protobuf/extension_set_unittest.cc +++ b/src/google/protobuf/extension_set_unittest.cc @@ -34,7 +34,6 @@ #include "google/protobuf/extension_set.h" -#include "google/protobuf/stubs/logging.h" #include "google/protobuf/descriptor.pb.h" #include "google/protobuf/arena.h" #include "google/protobuf/descriptor.h" @@ -830,8 +829,7 @@ TEST(ExtensionSetTest, SpaceUsedExcludingSelf) { // Repeated primitive extensions will increase space used by at least a // RepeatedField, and will cause additional allocations when the array - // gets too big for the initial space. Note, we explicitly allocate on the - // heap to avoid message-owned arenas. + // gets too big for the initial space. // This macro: // - Adds a value to the repeated extension, then clears it, establishing // the base size. diff --git a/src/google/protobuf/generated_message_bases.cc b/src/google/protobuf/generated_message_bases.cc index 2ccca160d1730..c79c44553cf1f 100644 --- a/src/google/protobuf/generated_message_bases.cc +++ b/src/google/protobuf/generated_message_bases.cc @@ -101,7 +101,7 @@ ::uint8_t* ZeroFieldsBase::_InternalSerialize( void ZeroFieldsBase::MergeImpl(Message& to_param, const Message& from_param) { auto* to = static_cast(&to_param); const auto* from = static_cast(&from_param); - GOOGLE_DCHECK_NE(from, to); + GOOGLE_ABSL_DCHECK_NE(from, to); to->_internal_metadata_.MergeFrom(from->_internal_metadata_); } diff --git a/src/google/protobuf/generated_message_reflection.cc b/src/google/protobuf/generated_message_reflection.cc index 392fe9f8b1453..506815e23ba50 100644 --- a/src/google/protobuf/generated_message_reflection.cc +++ b/src/google/protobuf/generated_message_reflection.cc @@ -41,9 +41,10 @@ #include #include -#include "google/protobuf/stubs/logging.h" #include "absl/base/casts.h" #include "absl/container/flat_hash_map.h" +#include "google/protobuf/stubs/logging.h" +#include "google/protobuf/stubs/logging.h" #include "absl/strings/match.h" #include "absl/strings/string_view.h" #include "absl/synchronization/mutex.h" @@ -177,18 +178,18 @@ using internal::GetPointerAtOffset; void ReportReflectionUsageError(const Descriptor* descriptor, const FieldDescriptor* field, const char* method, const char* description) { - GOOGLE_LOG(FATAL) << "Protocol Buffer reflection usage error:\n" - " Method : google::protobuf::Reflection::" - << method - << "\n" - " Message type: " - << descriptor->full_name() - << "\n" - " Field : " - << field->full_name() - << "\n" - " Problem : " - << description; + GOOGLE_ABSL_LOG(FATAL) << "Protocol Buffer reflection usage error:\n" + " Method : google::protobuf::Reflection::" + << method + << "\n" + " Message type: " + << descriptor->full_name() + << "\n" + " Field : " + << field->full_name() + << "\n" + " Problem : " + << description; } const char* cpptype_names_[FieldDescriptor::MAX_CPPTYPE + 1] = { @@ -199,7 +200,7 @@ const char* cpptype_names_[FieldDescriptor::MAX_CPPTYPE + 1] = { static void ReportReflectionUsageTypeError( const Descriptor* descriptor, const FieldDescriptor* field, const char* method, FieldDescriptor::CppType expected_type) { - GOOGLE_LOG(FATAL) + GOOGLE_ABSL_LOG(FATAL) << "Protocol Buffer reflection usage error:\n" " Method : google::protobuf::Reflection::" << method @@ -221,27 +222,27 @@ static void ReportReflectionUsageTypeError( static void ReportReflectionUsageEnumTypeError( const Descriptor* descriptor, const FieldDescriptor* field, const char* method, const EnumValueDescriptor* value) { - GOOGLE_LOG(FATAL) << "Protocol Buffer reflection usage error:\n" - " Method : google::protobuf::Reflection::" - << method - << "\n" - " Message type: " - << descriptor->full_name() - << "\n" - " Field : " - << field->full_name() - << "\n" - " Problem : Enum value did not match field type:\n" - " Expected : " - << field->enum_type()->full_name() - << "\n" - " Actual : " - << value->full_name(); + GOOGLE_ABSL_LOG(FATAL) << "Protocol Buffer reflection usage error:\n" + " Method : google::protobuf::Reflection::" + << method + << "\n" + " Message type: " + << descriptor->full_name() + << "\n" + " Field : " + << field->full_name() + << "\n" + " Problem : Enum value did not match field type:\n" + " Expected : " + << field->enum_type()->full_name() + << "\n" + " Actual : " + << value->full_name(); } inline void CheckInvalidAccess(const internal::ReflectionSchema& schema, const FieldDescriptor* field) { - GOOGLE_CHECK(!schema.IsFieldStripped(field)) + GOOGLE_ABSL_CHECK(!schema.IsFieldStripped(field)) << "invalid access to a stripped field " << field->full_name(); } @@ -514,7 +515,7 @@ struct OneofFieldMover { } break; default: - GOOGLE_LOG(FATAL) << "unimplemented type: " << field->cpp_type(); + GOOGLE_ABSL_LOG(FATAL) << "unimplemented type: " << field->cpp_type(); } if (unsafe_shallow_swap) { // Not clearing oneof case after move may cause unwanted "ClearOneof" @@ -598,7 +599,7 @@ void SwapFieldHelper::SwapInlinedStrings(const Reflection* r, Message* lhs, auto* lhs_string = r->MutableRaw(lhs, field); auto* rhs_string = r->MutableRaw(rhs, field); uint32_t index = r->schema_.InlinedStringIndex(field); - GOOGLE_DCHECK_GT(index, 0); + GOOGLE_ABSL_DCHECK_GT(index, 0); uint32_t* lhs_array = r->MutableInlinedStringDonatedArray(lhs); uint32_t* rhs_array = r->MutableInlinedStringDonatedArray(rhs); uint32_t* lhs_state = &lhs_array[index / 32]; @@ -769,7 +770,7 @@ void SwapFieldHelper::SwapNonMessageNonStringField( SWAP_VALUES(ENUM, int); #undef SWAP_VALUES default: - GOOGLE_LOG(FATAL) << "Unimplemented type: " << field->cpp_type(); + GOOGLE_ABSL_LOG(FATAL) << "Unimplemented type: " << field->cpp_type(); } } @@ -805,7 +806,7 @@ void Reflection::SwapField(Message* message1, Message* message2, break; default: - GOOGLE_LOG(FATAL) << "Unimplemented type: " << field->cpp_type(); + GOOGLE_ABSL_LOG(FATAL) << "Unimplemented type: " << field->cpp_type(); } } else { switch (field->cpp_type()) { @@ -868,7 +869,7 @@ void Reflection::UnsafeShallowSwapField(Message* message1, Message* message2, break; default: - GOOGLE_LOG(FATAL) << "Unimplemented type: " << field->cpp_type(); + GOOGLE_ABSL_LOG(FATAL) << "Unimplemented type: " << field->cpp_type(); } } @@ -962,7 +963,7 @@ void Reflection::SwapOneofField(Message* lhs, Message* rhs, const FieldDescriptor* field; }; - GOOGLE_DCHECK(!oneof_descriptor->is_synthetic()); + GOOGLE_ABSL_DCHECK(!oneof_descriptor->is_synthetic()); uint32_t oneof_case_lhs = GetOneofCase(*lhs, oneof_descriptor); uint32_t oneof_case_rhs = GetOneofCase(*rhs, oneof_descriptor); @@ -1003,7 +1004,7 @@ void Reflection::Swap(Message* message1, Message* message2) const { if (message1 == message2) return; // TODO(kenton): Other Reflection methods should probably check this too. - GOOGLE_CHECK_EQ(message1->GetReflection(), this) + GOOGLE_ABSL_CHECK_EQ(message1->GetReflection(), this) << "First argument to Swap() (of type \"" << message1->GetDescriptor()->full_name() << "\") is not compatible with this reflection object (which is for type " @@ -1011,7 +1012,7 @@ void Reflection::Swap(Message* message1, Message* message2) const { << descriptor_->full_name() << "\"). Note that the exact same class is required; not just the same " "descriptor."; - GOOGLE_CHECK_EQ(message2->GetReflection(), this) + GOOGLE_ABSL_CHECK_EQ(message2->GetReflection(), this) << "Second argument to Swap() (of type \"" << message2->GetDescriptor()->full_name() << "\") is not compatible with this reflection object (which is for type " @@ -1058,7 +1059,7 @@ void Reflection::SwapFieldsImpl( if (message1 == message2) return; // TODO(kenton): Other Reflection methods should probably check this too. - GOOGLE_CHECK_EQ(message1->GetReflection(), this) + GOOGLE_ABSL_CHECK_EQ(message1->GetReflection(), this) << "First argument to SwapFields() (of type \"" << message1->GetDescriptor()->full_name() << "\") is not compatible with this reflection object (which is for type " @@ -1066,7 +1067,7 @@ void Reflection::SwapFieldsImpl( << descriptor_->full_name() << "\"). Note that the exact same class is required; not just the same " "descriptor."; - GOOGLE_CHECK_EQ(message2->GetReflection(), this) + GOOGLE_ABSL_CHECK_EQ(message2->GetReflection(), this) << "Second argument to SwapFields() (of type \"" << message2->GetDescriptor()->full_name() << "\") is not compatible with this reflection object (which is for type " @@ -1113,9 +1114,9 @@ void Reflection::SwapFieldsImpl( SwapBit(message1, message2, field); if (field->options().ctype() == FieldOptions::STRING && IsInlined(field)) { - GOOGLE_DCHECK(!unsafe_shallow_swap || - message1->GetArenaForAllocation() == - message2->GetArenaForAllocation()); + GOOGLE_ABSL_DCHECK(!unsafe_shallow_swap || + message1->GetArenaForAllocation() == + message2->GetArenaForAllocation()); SwapInlinedStringDonated(message1, message2, field); } } @@ -1133,8 +1134,8 @@ void Reflection::SwapFields( void Reflection::UnsafeShallowSwapFields( Message* message1, Message* message2, const std::vector& fields) const { - GOOGLE_DCHECK_EQ(message1->GetArenaForAllocation(), - message2->GetArenaForAllocation()); + GOOGLE_ABSL_DCHECK_EQ(message1->GetArenaForAllocation(), + message2->GetArenaForAllocation()); SwapFieldsImpl(message1, message2, fields); } @@ -1142,7 +1143,7 @@ void Reflection::UnsafeShallowSwapFields( void Reflection::UnsafeArenaSwapFields( Message* lhs, Message* rhs, const std::vector& fields) const { - GOOGLE_DCHECK_EQ(lhs->GetArenaForAllocation(), rhs->GetArenaForAllocation()); + GOOGLE_ABSL_DCHECK_EQ(lhs->GetArenaForAllocation(), rhs->GetArenaForAllocation()); UnsafeShallowSwapFields(lhs, rhs, fields); } @@ -1166,7 +1167,7 @@ bool Reflection::HasField(const Message& message, } void Reflection::UnsafeArenaSwap(Message* lhs, Message* rhs) const { - GOOGLE_DCHECK_EQ(lhs->GetOwningArena(), rhs->GetOwningArena()); + GOOGLE_ABSL_DCHECK_EQ(lhs->GetOwningArena(), rhs->GetOwningArena()); InternalSwap(lhs, rhs); } @@ -1236,8 +1237,8 @@ void Reflection::InternalSwap(Message* lhs, Message* rhs) const { ? 0 // One extra bit for the arena dtor tracking. : (inlined_string_count + 1 + 31) / 32; - GOOGLE_CHECK_EQ((lhs_donated_array[0] & 0x1u) == 0, - (rhs_donated_array[0] & 0x1u) == 0); + GOOGLE_ABSL_CHECK_EQ((lhs_donated_array[0] & 0x1u) == 0, + (rhs_donated_array[0] & 0x1u) == 0); for (int i = 0; i < donated_array_size; i++) { std::swap(lhs_donated_array[i], rhs_donated_array[i]); } @@ -1289,7 +1290,7 @@ int Reflection::FieldSize(const Message& message, } } - GOOGLE_LOG(FATAL) << "Can't get here."; + GOOGLE_ABSL_LOG(FATAL) << "Can't get here."; return 0; } } @@ -1550,7 +1551,7 @@ struct FieldNumberSorter { }; bool IsIndexInHasBitSet(const uint32_t* has_bit_set, uint32_t has_bit_index) { - GOOGLE_DCHECK_NE(has_bit_index, ~0u); + GOOGLE_ABSL_DCHECK_NE(has_bit_index, ~0u); return ((has_bit_set[has_bit_index / 32] >> (has_bit_index % 32)) & static_cast(1)) != 0; } @@ -1771,7 +1772,7 @@ void Reflection::SetString(Message* message, const FieldDescriptor* field, case FieldOptions::STRING: { if (IsInlined(field)) { const uint32_t index = schema_.InlinedStringIndex(field); - GOOGLE_DCHECK_GT(index, 0); + GOOGLE_ABSL_DCHECK_GT(index, 0); uint32_t* states = &MutableInlinedStringDonatedArray(message)[index / 32]; uint32_t mask = ~(static_cast(1) << (index % 32)); @@ -2150,8 +2151,9 @@ void Reflection::UnsafeArenaSetAllocatedMessage( void Reflection::SetAllocatedMessage(Message* message, Message* sub_message, const FieldDescriptor* field) const { - GOOGLE_DCHECK(sub_message == nullptr || sub_message->GetOwningArena() == nullptr || - sub_message->GetOwningArena() == message->GetArenaForAllocation()); + GOOGLE_ABSL_DCHECK( + sub_message == nullptr || sub_message->GetOwningArena() == nullptr || + sub_message->GetOwningArena() == message->GetArenaForAllocation()); CheckInvalidAccess(schema_, field); // If message and sub-message are in different memory ownership domains @@ -2367,7 +2369,7 @@ void* Reflection::MutableRawRepeatedField(Message* message, ReportReflectionUsageTypeError(descriptor_, field, "MutableRawRepeatedField", cpptype); if (desc != nullptr) - GOOGLE_CHECK_EQ(field->message_type(), desc) << "wrong submessage type"; + GOOGLE_ABSL_CHECK_EQ(field->message_type(), desc) << "wrong submessage type"; if (field->is_extension()) { return MutableExtensionSet(message)->MutableRawRepeatedField( field->number(), field->type(), field->is_packed(), field); @@ -2391,9 +2393,9 @@ const void* Reflection::GetRawRepeatedField(const Message& message, ReportReflectionUsageTypeError(descriptor_, field, "GetRawRepeatedField", cpptype); if (ctype >= 0) - GOOGLE_CHECK_EQ(field->options().ctype(), ctype) << "subtype mismatch"; + GOOGLE_ABSL_CHECK_EQ(field->options().ctype(), ctype) << "subtype mismatch"; if (desc != nullptr) - GOOGLE_CHECK_EQ(field->message_type(), desc) << "wrong submessage type"; + GOOGLE_ABSL_CHECK_EQ(field->message_type(), desc) << "wrong submessage type"; if (field->is_extension()) { // Should use extension_set::GetRawRepeatedField. However, the required // parameter "default repeated value" is not very easy to get here. @@ -2517,7 +2519,7 @@ const Type& Reflection::GetRawNonOneof(const Message& message, } void Reflection::PrepareSplitMessageForWrite(Message* message) const { - GOOGLE_DCHECK_NE(message, schema_.default_instance_); + GOOGLE_ABSL_DCHECK_NE(message, schema_.default_instance_); void** split = MutableSplitField(message); const void* default_split = GetSplitField(schema_.default_instance_); if (*split == default_split) { @@ -2553,18 +2555,18 @@ Type* Reflection::MutableRaw(Message* message, } const uint32_t* Reflection::GetHasBits(const Message& message) const { - GOOGLE_DCHECK(schema_.HasHasbits()); + GOOGLE_ABSL_DCHECK(schema_.HasHasbits()); return &GetConstRefAtOffset(message, schema_.HasBitsOffset()); } uint32_t* Reflection::MutableHasBits(Message* message) const { - GOOGLE_DCHECK(schema_.HasHasbits()); + GOOGLE_ABSL_DCHECK(schema_.HasHasbits()); return GetPointerAtOffset(message, schema_.HasBitsOffset()); } uint32_t* Reflection::MutableOneofCase( Message* message, const OneofDescriptor* oneof_descriptor) const { - GOOGLE_DCHECK(!oneof_descriptor->is_synthetic()); + GOOGLE_ABSL_DCHECK(!oneof_descriptor->is_synthetic()); return GetPointerAtOffset( message, schema_.GetOneofCaseOffset(oneof_descriptor)); } @@ -2592,13 +2594,13 @@ InternalMetadata* Reflection::MutableInternalMetadata(Message* message) const { const uint32_t* Reflection::GetInlinedStringDonatedArray( const Message& message) const { - GOOGLE_DCHECK(schema_.HasInlinedString()); + GOOGLE_ABSL_DCHECK(schema_.HasInlinedString()); return &GetConstRefAtOffset(message, schema_.InlinedStringDonatedOffset()); } uint32_t* Reflection::MutableInlinedStringDonatedArray(Message* message) const { - GOOGLE_DCHECK(schema_.HasInlinedString()); + GOOGLE_ABSL_DCHECK(schema_.HasInlinedString()); return GetPointerAtOffset(message, schema_.InlinedStringDonatedOffset()); } @@ -2607,7 +2609,7 @@ uint32_t* Reflection::MutableInlinedStringDonatedArray(Message* message) const { bool Reflection::IsInlinedStringDonated(const Message& message, const FieldDescriptor* field) const { uint32_t index = schema_.InlinedStringIndex(field); - GOOGLE_DCHECK_GT(index, 0); + GOOGLE_ABSL_DCHECK_GT(index, 0); return IsIndexInHasBitSet(GetInlinedStringDonatedArray(message), index); } @@ -2636,11 +2638,11 @@ void Reflection::SwapInlinedStringDonated(Message* lhs, Message* rhs, // If one is undonated, both must have already registered ArenaDtor. uint32_t* lhs_array = MutableInlinedStringDonatedArray(lhs); uint32_t* rhs_array = MutableInlinedStringDonatedArray(rhs); - GOOGLE_CHECK_EQ(lhs_array[0] & 0x1u, 0u); - GOOGLE_CHECK_EQ(rhs_array[0] & 0x1u, 0u); + GOOGLE_ABSL_CHECK_EQ(lhs_array[0] & 0x1u, 0u); + GOOGLE_ABSL_CHECK_EQ(rhs_array[0] & 0x1u, 0u); // Swap donation status bit. uint32_t index = schema_.InlinedStringIndex(field); - GOOGLE_DCHECK_GT(index, 0); + GOOGLE_ABSL_DCHECK_GT(index, 0); if (rhs_donated) { SetInlinedStringDonated(index, lhs_array); ClearInlinedStringDonated(index, rhs_array); @@ -2653,7 +2655,7 @@ void Reflection::SwapInlinedStringDonated(Message* lhs, Message* rhs, // Simple accessors for manipulating has_bits_. bool Reflection::HasBit(const Message& message, const FieldDescriptor* field) const { - GOOGLE_DCHECK(!field->options().weak()); + GOOGLE_ABSL_DCHECK(!field->options().weak()); if (schema_.HasBitIndex(field) != static_cast(-1)) { return IsIndexInHasBitSet(GetHasBits(message), schema_.HasBitIndex(field)); } @@ -2715,13 +2717,13 @@ bool Reflection::HasBit(const Message& message, // handled above; avoid warning break; } - GOOGLE_LOG(FATAL) << "Reached impossible case in HasBit()."; + GOOGLE_ABSL_LOG(FATAL) << "Reached impossible case in HasBit()."; return false; } } void Reflection::SetBit(Message* message, const FieldDescriptor* field) const { - GOOGLE_DCHECK(!field->options().weak()); + GOOGLE_ABSL_DCHECK(!field->options().weak()); const uint32_t index = schema_.HasBitIndex(field); if (index == static_cast(-1)) return; MutableHasBits(message)[index / 32] |= @@ -2730,7 +2732,7 @@ void Reflection::SetBit(Message* message, const FieldDescriptor* field) const { void Reflection::ClearBit(Message* message, const FieldDescriptor* field) const { - GOOGLE_DCHECK(!field->options().weak()); + GOOGLE_ABSL_DCHECK(!field->options().weak()); const uint32_t index = schema_.HasBitIndex(field); if (index == static_cast(-1)) return; MutableHasBits(message)[index / 32] &= @@ -2739,7 +2741,7 @@ void Reflection::ClearBit(Message* message, void Reflection::SwapBit(Message* message1, Message* message2, const FieldDescriptor* field) const { - GOOGLE_DCHECK(!field->options().weak()); + GOOGLE_ABSL_DCHECK(!field->options().weak()); if (!schema_.HasHasbits()) { return; } @@ -2933,15 +2935,15 @@ void* Reflection::RepeatedFieldData(Message* message, const FieldDescriptor* field, FieldDescriptor::CppType cpp_type, const Descriptor* message_type) const { - GOOGLE_CHECK(field->is_repeated()); - GOOGLE_CHECK(field->cpp_type() == cpp_type || - (field->cpp_type() == FieldDescriptor::CPPTYPE_ENUM && - cpp_type == FieldDescriptor::CPPTYPE_INT32)) + GOOGLE_ABSL_CHECK(field->is_repeated()); + GOOGLE_ABSL_CHECK(field->cpp_type() == cpp_type || + (field->cpp_type() == FieldDescriptor::CPPTYPE_ENUM && + cpp_type == FieldDescriptor::CPPTYPE_INT32)) << "The type parameter T in RepeatedFieldRef API doesn't match " << "the actual field type (for enums T should be the generated enum " << "type or int32_t)."; if (message_type != nullptr) { - GOOGLE_CHECK_EQ(message_type, field->message_type()); + GOOGLE_ABSL_CHECK_EQ(message_type, field->message_type()); } if (field->is_extension()) { return MutableExtensionSet(message)->MutableRawRepeatedField( @@ -3088,7 +3090,7 @@ static internal::TailCallParseFunc GetFastParseFunction( }; auto it = map->find(name); if (it == map->end()) { - GOOGLE_LOG(DFATAL) << "Failed to find function: " << name; + GOOGLE_ABSL_LOG(DFATAL) << "Failed to find function: " << name; // Let's not crash in opt, just in case. // MiniParse is always a valid parser. return &internal::TcParser::MiniParse; @@ -3109,8 +3111,8 @@ const internal::TcParseTableBase* Reflection::CreateTcParseTableForMessageSet() auto* full_table = ::new (p) Table{ {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, schema_.default_instance_, nullptr}, {{{&internal::TcParser::ReflectionParseLoop, {}}}}}; - GOOGLE_DCHECK_EQ(static_cast(&full_table->header), - static_cast(full_table)); + GOOGLE_ABSL_DCHECK_EQ(static_cast(&full_table->header), + static_cast(full_table)); return &full_table->header; } @@ -3221,7 +3223,7 @@ void Reflection::PopulateTcParseFieldAux( case internal::TailCallTableInfo::kSubTable: case internal::TailCallTableInfo::kSubMessageWeak: case internal::TailCallTableInfo::kMessageVerifyFunc: - GOOGLE_LOG(FATAL) << "Not supported"; + GOOGLE_ABSL_LOG(FATAL) << "Not supported"; break; case internal::TailCallTableInfo::kSubMessage: field_aux++->message_default_p = @@ -3232,7 +3234,7 @@ void Reflection::PopulateTcParseFieldAux( aux_entry.enum_range.size}; break; case internal::TailCallTableInfo::kEnumValidator: - GOOGLE_LOG(FATAL) << "Not supported."; + GOOGLE_ABSL_LOG(FATAL) << "Not supported."; break; case internal::TailCallTableInfo::kNumericOffset: field_aux++->offset = aux_entry.offset; @@ -3306,7 +3308,7 @@ const internal::TcParseTableBase* Reflection::CreateTcParseTable() const { inlined_string_indices); const size_t fast_entries_count = table_info.fast_path_fields.size(); - GOOGLE_CHECK_EQ(fast_entries_count, 1 << table_info.table_size_log2); + GOOGLE_ABSL_CHECK_EQ(fast_entries_count, 1 << table_info.table_size_log2); const uint16_t lookup_table_offset = AlignTo( sizeof(TcParseTableBase) + fast_entries_count * sizeof(TcParseTableBase::FastFieldEntry)); @@ -3349,9 +3351,9 @@ const internal::TcParseTableBase* Reflection::CreateTcParseTable() const { table_info.field_name_data.size()); } // Validation to make sure we used all the bytes correctly. - GOOGLE_CHECK_EQ(res->name_data() + table_info.field_name_data.size() - - reinterpret_cast(res), - byte_size); + GOOGLE_ABSL_CHECK_EQ(res->name_data() + table_info.field_name_data.size() - + reinterpret_cast(res), + byte_size); return res; } @@ -3505,7 +3507,7 @@ void AssignDescriptorsImpl(const DescriptorTable* table, bool eager) { const FileDescriptor* file = DescriptorPool::internal_generated_pool()->FindFileByName( table->filename); - GOOGLE_CHECK(file != nullptr); + GOOGLE_ABSL_CHECK(file != nullptr); MessageFactory* factory = MessageFactory::generated_factory(); diff --git a/src/google/protobuf/generated_message_reflection.h b/src/google/protobuf/generated_message_reflection.h index 70a75aa20db28..1b5485b09380d 100644 --- a/src/google/protobuf/generated_message_reflection.h +++ b/src/google/protobuf/generated_message_reflection.h @@ -140,7 +140,7 @@ struct ReflectionSchema { // Offset of a non-oneof field. Getting a field offset is slightly more // efficient when we know statically that it is not a oneof field. uint32_t GetFieldOffsetNonOneof(const FieldDescriptor* field) const { - GOOGLE_DCHECK(!InRealOneof(field)); + GOOGLE_ABSL_DCHECK(!InRealOneof(field)); return OffsetValue(offsets_[field->index()], field->type()); } @@ -172,13 +172,13 @@ struct ReflectionSchema { // Bit index within the bit array of hasbits. Bit order is low-to-high. uint32_t HasBitIndex(const FieldDescriptor* field) const { if (has_bits_offset_ == -1) return static_cast(-1); - GOOGLE_DCHECK(HasHasbits()); + GOOGLE_ABSL_DCHECK(HasHasbits()); return has_bit_indices_[field->index()]; } // Byte offset of the hasbits array. uint32_t HasBitsOffset() const { - GOOGLE_DCHECK(HasHasbits()); + GOOGLE_ABSL_DCHECK(HasHasbits()); return static_cast(has_bits_offset_); } @@ -187,13 +187,13 @@ struct ReflectionSchema { // Bit index within the bit array of _inlined_string_donated_. Bit order is // low-to-high. uint32_t InlinedStringIndex(const FieldDescriptor* field) const { - GOOGLE_DCHECK(HasInlinedString()); + GOOGLE_ABSL_DCHECK(HasInlinedString()); return inlined_string_indices_[field->index()]; } // Byte offset of the _inlined_string_donated_ array. uint32_t InlinedStringDonatedOffset() const { - GOOGLE_DCHECK(HasInlinedString()); + GOOGLE_ABSL_DCHECK(HasInlinedString()); return static_cast(inlined_string_donated_offset_); } @@ -210,7 +210,7 @@ struct ReflectionSchema { // The offset of the ExtensionSet in this message. uint32_t GetExtensionSetOffset() const { - GOOGLE_DCHECK(HasExtensionSet()); + GOOGLE_ABSL_DCHECK(HasExtensionSet()); return static_cast(extensions_offset_); } @@ -231,7 +231,7 @@ struct ReflectionSchema { // Returns true if the field is implicitly backed by LazyField. bool IsEagerlyVerifiedLazyField(const FieldDescriptor* field) const { - GOOGLE_DCHECK_EQ(field->type(), FieldDescriptor::TYPE_MESSAGE); + GOOGLE_ABSL_DCHECK_EQ(field->type(), FieldDescriptor::TYPE_MESSAGE); (void)field; return false; } @@ -255,12 +255,12 @@ struct ReflectionSchema { // Byte offset of _split_. uint32_t SplitOffset() const { - GOOGLE_DCHECK(IsSplit()); + GOOGLE_ABSL_DCHECK(IsSplit()); return static_cast(split_offset_); } uint32_t SizeofSplit() const { - GOOGLE_DCHECK(IsSplit()); + GOOGLE_ABSL_DCHECK(IsSplit()); return static_cast(sizeof_split_); } diff --git a/src/google/protobuf/generated_message_reflection_unittest.cc b/src/google/protobuf/generated_message_reflection_unittest.cc index d127ecd410c9c..d4a1e1337dc08 100644 --- a/src/google/protobuf/generated_message_reflection_unittest.cc +++ b/src/google/protobuf/generated_message_reflection_unittest.cc @@ -46,11 +46,11 @@ #include -#include "google/protobuf/stubs/logging.h" #include "google/protobuf/arena.h" #include "google/protobuf/descriptor.h" #include "google/protobuf/testing/googletest.h" #include +#include "google/protobuf/stubs/logging.h" #include "absl/strings/cord.h" #include "google/protobuf/map_test_util.h" #include "google/protobuf/map_unittest.pb.h" @@ -95,7 +95,7 @@ namespace { const FieldDescriptor* F(const std::string& name) { const FieldDescriptor* result = unittest::TestAllTypes::descriptor()->FindFieldByName(name); - GOOGLE_CHECK(result != nullptr); + GOOGLE_ABSL_CHECK(result != nullptr); return result; } @@ -614,10 +614,16 @@ TEST(GeneratedMessageReflectionTest, ReleaseLast) { (void)expected; // unused in somce configurations std::unique_ptr released(message.GetReflection()->ReleaseLast( &message, descriptor->FindFieldByName("repeated_foreign_message"))); +#ifndef PROTOBUF_FORCE_COPY_IN_RELEASE EXPECT_EQ(expected, released.get()); +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE } TEST(GeneratedMessageReflectionTest, ReleaseLastExtensions) { +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + GTEST_SKIP() << "Won't work with FORCE_COPY_IN_RELEASE."; +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + unittest::TestAllExtensions message; const Descriptor* descriptor = message.GetDescriptor(); TestUtil::ReflectionTester reflection_tester(descriptor); @@ -1041,7 +1047,9 @@ TEST(GeneratedMessageReflectionTest, SetAllocatedOneofMessageTest) { released = reflection->ReleaseMessage( &to_message, descriptor->FindFieldByName("foo_lazy_message")); EXPECT_TRUE(released != nullptr); +#ifndef PROTOBUF_FORCE_COPY_IN_RELEASE EXPECT_EQ(&sub_message, released); +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE delete released; TestUtil::ReflectionTester::SetOneofViaReflection(&from_message2); @@ -1059,7 +1067,9 @@ TEST(GeneratedMessageReflectionTest, SetAllocatedOneofMessageTest) { released = reflection->ReleaseMessage( &to_message, descriptor->FindFieldByName("foo_message")); EXPECT_TRUE(released != nullptr); +#ifndef PROTOBUF_FORCE_COPY_IN_RELEASE EXPECT_EQ(&sub_message2, released); +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE delete released; } @@ -1180,7 +1190,9 @@ TEST(GeneratedMessageReflectionTest, ReleaseOneofMessageTest) { &message, descriptor->FindFieldByName("foo_lazy_message")); EXPECT_TRUE(released != nullptr); +#ifndef PROTOBUF_FORCE_COPY_IN_RELEASE EXPECT_EQ(&sub_message, released); +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE delete released; released = reflection->ReleaseMessage( diff --git a/src/google/protobuf/generated_message_tctable_gen.cc b/src/google/protobuf/generated_message_tctable_gen.cc index 1c5e22803cbf6..fd39199f1f87e 100644 --- a/src/google/protobuf/generated_message_tctable_gen.cc +++ b/src/google/protobuf/generated_message_tctable_gen.cc @@ -53,7 +53,7 @@ namespace { bool GetEnumValidationRange(const EnumDescriptor* enum_type, int16_t& start, uint16_t& size) { - GOOGLE_CHECK_GT(enum_type->value_count(), 0) << enum_type->DebugString(); + GOOGLE_ABSL_CHECK_GT(enum_type->value_count(), 0) << enum_type->DebugString(); // Check if the enum values are a single, contiguous range. std::vector enum_values; @@ -149,7 +149,7 @@ void PopulateFastFieldEntry(const TailCallTableInfo::FieldEntryInfo& entry, name.append("c"); } else if (options.is_string_inlined) { name.append("i"); - GOOGLE_CHECK(!field->is_repeated()); + GOOGLE_ABSL_CHECK(!field->is_repeated()); aux_idx = static_cast(entry.inlined_string_idx); } } @@ -205,7 +205,7 @@ bool IsFieldEligibleForFastParsing( return false; } if (options.is_string_inlined) { - GOOGLE_CHECK(!field->is_repeated()); + GOOGLE_ABSL_CHECK(!field->is_repeated()); // For inlined strings, the donation state index is stored in the // `aux_idx` field of the fast parsing info. We need to check the range // of that value instead of the auxiliary index. @@ -220,7 +220,7 @@ bool IsFieldEligibleForFastParsing( if (cpp::HasHasbit(field)) { // The tailcall parser can only update the first 32 hasbits. Fields with // has-bits beyond the first 32 are handled by mini parsing/fallback. - GOOGLE_CHECK_GE(entry.hasbit_idx, 0) << field->DebugString(); + GOOGLE_ABSL_CHECK_GE(entry.hasbit_idx, 0) << field->DebugString(); if (entry.hasbit_idx >= 32) return false; } @@ -255,7 +255,7 @@ absl::optional GetEndGroupTag(const Descriptor* descriptor) { } uint32_t RecodeTagForFastParsing(uint32_t tag) { - GOOGLE_DCHECK_LE(tag, 0x3FFF); + GOOGLE_ABSL_DCHECK_LE(tag, 0x3FFF); // Construct the varint-coded tag. If it is more than 7 bits, we need to // shift the high bits and add a continue bit. if (uint32_t hibits = tag & 0xFFFFFF80) { @@ -318,7 +318,7 @@ std::vector SplitFastFieldsForSize( } // Fill in this field's entry: - GOOGLE_CHECK(info.func_name.empty()) << info.func_name; + GOOGLE_ABSL_CHECK(info.func_name.empty()) << info.func_name; PopulateFastFieldEntry(entry, options, info); info.field = field; info.coded_tag = tag; @@ -486,7 +486,7 @@ TailCallTableInfo::NumToEntryTable MakeNumToEntryTable( for (; field_entry_index != N; ++field_entry_index) { auto* field_descriptor = field_descriptors[field_entry_index]; uint32_t fnum = static_cast(field_descriptor->number()); - GOOGLE_CHECK_GT(fnum, last_skip_entry_start); + GOOGLE_ABSL_CHECK_GT(fnum, last_skip_entry_start); if (start_new_block == false) { // If the next field number is within 15 of the last_skip_entry_start, we // continue writing just to that entry. If it's between 16 and 31 more, @@ -653,8 +653,8 @@ uint16_t MakeTypeCardForField( } else { type_card |= fl::kMessage; if (options.lazy_opt != 0) { - GOOGLE_CHECK(options.lazy_opt == field_layout::kTvEager || - options.lazy_opt == field_layout::kTvLazy); + GOOGLE_ABSL_CHECK(options.lazy_opt == field_layout::kTvEager || + options.lazy_opt == field_layout::kTvLazy); type_card |= +fl::kRepLazy | options.lazy_opt; } else { if (options.is_implicitly_weak) { @@ -774,7 +774,7 @@ TailCallTableInfo::TailCallTableInfo( } else if ((field->type() == FieldDescriptor::TYPE_STRING || field->type() == FieldDescriptor::TYPE_BYTES) && options.is_string_inlined) { - GOOGLE_CHECK(!field->is_repeated()); + GOOGLE_ABSL_CHECK(!field->is_repeated()); // Inlined strings have an extra marker to represent their donation state. int idx = inlined_string_indices[static_cast(field->index())]; // For mini parsing, the donation state index is stored as an `offset` @@ -795,7 +795,7 @@ TailCallTableInfo::TailCallTableInfo( size_t try_size = 1 << try_size_log2; auto split_fields = SplitFastFieldsForSize(end_group_tag, field_entries, try_size_log2, option_provider); - GOOGLE_CHECK_EQ(split_fields.size(), try_size); + GOOGLE_ABSL_CHECK_EQ(split_fields.size(), try_size); int try_num_fast_fields = 0; for (const auto& info : split_fields) { if (info.field != nullptr) ++try_num_fast_fields; @@ -831,7 +831,7 @@ TailCallTableInfo::TailCallTableInfo( fallback_fields = FilterMiniParsedFields(ordered_fields, option_provider); num_to_entry_table = MakeNumToEntryTable(ordered_fields); - GOOGLE_CHECK_EQ(field_entries.size(), ordered_fields.size()); + GOOGLE_ABSL_CHECK_EQ(field_entries.size(), ordered_fields.size()); field_name_data = GenerateFieldNames(descriptor, field_entries); // If there are no fallback fields, and at most one extension range, the diff --git a/src/google/protobuf/generated_message_tctable_impl.h b/src/google/protobuf/generated_message_tctable_impl.h index 67d9bb2687293..fe7bdb096e3b1 100644 --- a/src/google/protobuf/generated_message_tctable_impl.h +++ b/src/google/protobuf/generated_message_tctable_impl.h @@ -265,7 +265,7 @@ enum FieldType : uint16_t { #ifndef NDEBUG template void AlignFail(uintptr_t address) { - GOOGLE_LOG(FATAL) << "Unaligned (" << align << ") access at " << address; + GOOGLE_ABSL_LOG(FATAL) << "Unaligned (" << align << ") access at " << address; // Explicit abort to let compilers know this function does not return abort(); diff --git a/src/google/protobuf/generated_message_tctable_lite.cc b/src/google/protobuf/generated_message_tctable_lite.cc index d2c89e826665e..b672c304ed990 100644 --- a/src/google/protobuf/generated_message_tctable_lite.cc +++ b/src/google/protobuf/generated_message_tctable_lite.cc @@ -467,7 +467,7 @@ PROTOBUF_NOINLINE const char* TcParser::FastGtS2(PROTOBUF_TC_PARAM_DECL) { template const char* TcParser::LazyMessage(PROTOBUF_TC_PARAM_DECL) { - GOOGLE_LOG(FATAL) << "Unimplemented"; + GOOGLE_ABSL_LOG(FATAL) << "Unimplemented"; return nullptr; } @@ -741,7 +741,7 @@ Parse64FallbackPair(const char* p, int64_t res1) { // On x86-64, a shld from a single register filled with enough 1s in the high // bits can accomplish all this in one instruction. It so happens that res1 // has 57 high bits of ones, which is enough for the largest shift done. - GOOGLE_DCHECK_EQ(res1 >> 7, -1); + GOOGLE_ABSL_DCHECK_EQ(res1 >> 7, -1); uint64_t ones = res1; // save the high 1 bits from res1 (input to SHLD) int64_t res2, res3; // accumulated result chunks @@ -1783,8 +1783,8 @@ bool TcParser::ChangeOneof(const TcParseTableBase* table, case field_layout::kRepSString: case field_layout::kRepIString: default: - GOOGLE_LOG(DFATAL) << "string rep not handled: " - << (current_rep >> field_layout::kRepShift); + GOOGLE_ABSL_LOG(DFATAL) << "string rep not handled: " + << (current_rep >> field_layout::kRepShift); return true; } } else if (current_kind == field_layout::kFkMessage) { @@ -1798,8 +1798,8 @@ bool TcParser::ChangeOneof(const TcParseTableBase* table, break; } default: - GOOGLE_LOG(DFATAL) << "message rep not handled: " - << (current_rep >> field_layout::kRepShift); + GOOGLE_ABSL_LOG(DFATAL) << "message rep not handled: " + << (current_rep >> field_layout::kRepShift); break; } } @@ -1855,7 +1855,7 @@ PROTOBUF_NOINLINE const char* TcParser::MpFixed(PROTOBUF_TC_PARAM_DECL) { PROTOBUF_MUSTTAIL return table->fallback(PROTOBUF_TC_PARAM_PASS); } } else { - GOOGLE_DCHECK_EQ(rep, static_cast(field_layout::kRep32Bits)); + GOOGLE_ABSL_DCHECK_EQ(rep, static_cast(field_layout::kRep32Bits)); if (decoded_wiretype != WireFormatLite::WIRETYPE_FIXED32) { PROTOBUF_MUSTTAIL return table->fallback(PROTOBUF_TC_PARAM_PASS); } @@ -1907,7 +1907,7 @@ PROTOBUF_NOINLINE const char* TcParser::MpRepeatedFixed( ptr2 = ReadTag(ptr, &next_tag); } while (next_tag == decoded_tag); } else { - GOOGLE_DCHECK_EQ(rep, static_cast(field_layout::kRep32Bits)); + GOOGLE_ABSL_DCHECK_EQ(rep, static_cast(field_layout::kRep32Bits)); if (decoded_wiretype != WireFormatLite::WIRETYPE_FIXED32) { PROTOBUF_MUSTTAIL return table->fallback(PROTOBUF_TC_PARAM_PASS); } @@ -1947,7 +1947,7 @@ PROTOBUF_NOINLINE const char* TcParser::MpPackedFixed(PROTOBUF_TC_PARAM_DECL) { auto& field = RefAt>(msg, entry.offset); ptr = ctx->ReadPackedFixed(ptr, size, &field); } else { - GOOGLE_DCHECK_EQ(rep, static_cast(field_layout::kRep32Bits)); + GOOGLE_ABSL_DCHECK_EQ(rep, static_cast(field_layout::kRep32Bits)); auto& field = RefAt>(msg, entry.offset); ptr = ctx->ReadPackedFixed(ptr, size, &field); } @@ -2013,7 +2013,7 @@ PROTOBUF_NOINLINE const char* TcParser::MpVarint(PROTOBUF_TC_PARAM_DECL) { } else if (rep == field_layout::kRep32Bits) { RefAt(base, entry.offset) = static_cast(tmp); } else { - GOOGLE_DCHECK_EQ(rep, static_cast(field_layout::kRep8Bits)); + GOOGLE_ABSL_DCHECK_EQ(rep, static_cast(field_layout::kRep8Bits)); RefAt(base, entry.offset) = static_cast(tmp); } @@ -2075,7 +2075,7 @@ PROTOBUF_NOINLINE const char* TcParser::MpRepeatedVarint( if (ptr2 == nullptr) return Error(PROTOBUF_TC_PARAM_PASS); } while (next_tag == decoded_tag); } else { - GOOGLE_DCHECK_EQ(rep, static_cast(field_layout::kRep8Bits)); + GOOGLE_ABSL_DCHECK_EQ(rep, static_cast(field_layout::kRep8Bits)); auto& field = RefAt>(msg, entry.offset); const char* ptr2 = ptr; uint32_t next_tag; @@ -2135,7 +2135,7 @@ PROTOBUF_NOINLINE const char* TcParser::MpPackedVarint(PROTOBUF_TC_PARAM_DECL) { }); } } else { - GOOGLE_DCHECK_EQ(rep, static_cast(field_layout::kRep8Bits)); + GOOGLE_ABSL_DCHECK_EQ(rep, static_cast(field_layout::kRep8Bits)); auto* field = &RefAt>(msg, entry.offset); return ctx->ReadPackedVarint( ptr, [field](uint64_t value) { field->Add(value); }); @@ -2293,7 +2293,7 @@ PROTOBUF_NOINLINE const char* TcParser::MpRepeatedString( #ifndef NDEBUG default: - GOOGLE_LOG(FATAL) << "Unsupported repeated string rep: " << rep; + GOOGLE_ABSL_LOG(FATAL) << "Unsupported repeated string rep: " << rep; break; #endif } @@ -2302,7 +2302,7 @@ PROTOBUF_NOINLINE const char* TcParser::MpRepeatedString( } const char* TcParser::MpLazyMessage(PROTOBUF_TC_PARAM_DECL) { - GOOGLE_LOG(FATAL) << "Unimplemented"; + GOOGLE_ABSL_LOG(FATAL) << "Unimplemented"; return nullptr; } @@ -2369,7 +2369,8 @@ PROTOBUF_NOINLINE const char* TcParser::MpMessage(PROTOBUF_TC_PARAM_DECL) { if ((type_card & field_layout::kTvMask) == field_layout::kTvDefault) { def = table->field_aux(&entry)->message_default(); } else { - GOOGLE_DCHECK_EQ(type_card & field_layout::kTvMask, +field_layout::kTvWeakPtr); + GOOGLE_ABSL_DCHECK_EQ(type_card & field_layout::kTvMask, + +field_layout::kTvWeakPtr); def = table->field_aux(&entry)->message_default_weak(); } field = def->New(msg->GetArenaForAllocation()); @@ -2384,8 +2385,8 @@ PROTOBUF_NOINLINE const char* TcParser::MpMessage(PROTOBUF_TC_PARAM_DECL) { const char* TcParser::MpRepeatedMessage(PROTOBUF_TC_PARAM_DECL) { const auto& entry = RefAt(table, data.entry_offset()); const uint16_t type_card = entry.type_card; - GOOGLE_DCHECK_EQ(type_card & field_layout::kFcMask, - static_cast(field_layout::kFcRepeated)); + GOOGLE_ABSL_DCHECK_EQ(type_card & field_layout::kFcMask, + static_cast(field_layout::kFcRepeated)); const uint32_t decoded_tag = data.tag(); const uint32_t decoded_wiretype = decoded_tag & 7; const uint16_t rep = type_card & field_layout::kRepMask; @@ -2427,7 +2428,8 @@ const char* TcParser::MpRepeatedMessage(PROTOBUF_TC_PARAM_DECL) { if ((type_card & field_layout::kTvMask) == field_layout::kTvDefault) { def = aux.message_default(); } else { - GOOGLE_DCHECK_EQ(type_card & field_layout::kTvMask, +field_layout::kTvWeakPtr); + GOOGLE_ABSL_DCHECK_EQ(type_card & field_layout::kTvMask, + +field_layout::kTvWeakPtr); def = aux.message_default_weak(); } MessageLite* value = field.Add>(def); diff --git a/src/google/protobuf/generated_message_tctable_lite_test.cc b/src/google/protobuf/generated_message_tctable_lite_test.cc index 56b0cea5cdef3..3a33084fc3d3d 100644 --- a/src/google/protobuf/generated_message_tctable_lite_test.cc +++ b/src/google/protobuf/generated_message_tctable_lite_test.cc @@ -163,7 +163,7 @@ TEST_F(FindFieldEntryTest, SequentialFieldRange) { IsEntryForFieldNum(&table, i, table_field_numbers)); } for (int i : {0, 1, 6, 7, 110, 112, 500000000}) { - GOOGLE_LOG(WARNING) << "Field " << i; + GOOGLE_ABSL_LOG(WARNING) << "Field " << i; EXPECT_THAT(FindFieldEntry(table, i), Eq(nullptr)); } } diff --git a/src/google/protobuf/generated_message_util.cc b/src/google/protobuf/generated_message_util.cc index 4dd5ccbdb01a0..0884b8e19a447 100644 --- a/src/google/protobuf/generated_message_util.cc +++ b/src/google/protobuf/generated_message_util.cc @@ -317,7 +317,7 @@ class AccessorHelper { }; void SerializeNotImplemented(int field) { - GOOGLE_LOG(FATAL) << "Not implemented field number " << field; + GOOGLE_ABSL_LOG(FATAL) << "Not implemented field number " << field; } // When switching to c++11 we should make these constexpr functions @@ -389,9 +389,9 @@ void GenericSwap(MessageLite* m1, MessageLite* m2) { MessageLite* GetOwnedMessageInternal(Arena* message_arena, MessageLite* submessage, Arena* submessage_arena) { - GOOGLE_DCHECK(Arena::InternalGetOwningArena(submessage) == submessage_arena); - GOOGLE_DCHECK(message_arena != submessage_arena); - GOOGLE_DCHECK_EQ(submessage_arena, nullptr); + GOOGLE_ABSL_DCHECK(Arena::InternalGetOwningArena(submessage) == submessage_arena); + GOOGLE_ABSL_DCHECK(message_arena != submessage_arena); + GOOGLE_ABSL_DCHECK_EQ(submessage_arena, nullptr); if (message_arena != nullptr && submessage_arena == nullptr) { message_arena->Own(submessage); return submessage; diff --git a/src/google/protobuf/inlined_string_field.h b/src/google/protobuf/inlined_string_field.h index a6d904ac22110..ba7b9386bd714 100644 --- a/src/google/protobuf/inlined_string_field.h +++ b/src/google/protobuf/inlined_string_field.h @@ -34,8 +34,8 @@ #include #include -#include "google/protobuf/stubs/logging.h" #include "google/protobuf/port.h" +#include "google/protobuf/stubs/logging.h" #include "absl/strings/string_view.h" #include "google/protobuf/arenastring.h" #include "google/protobuf/message_lite.h" diff --git a/src/google/protobuf/inlined_string_field_unittest.cc b/src/google/protobuf/inlined_string_field_unittest.cc index dbcb9d3b40104..1a7fcdeabe598 100644 --- a/src/google/protobuf/inlined_string_field_unittest.cc +++ b/src/google/protobuf/inlined_string_field_unittest.cc @@ -38,9 +38,9 @@ #include #include -#include "google/protobuf/stubs/logging.h" #include "google/protobuf/arenastring.h" #include +#include "google/protobuf/stubs/logging.h" #include "absl/strings/string_view.h" #include "google/protobuf/io/coded_stream.h" #include "google/protobuf/io/zero_copy_stream_impl.h" diff --git a/src/google/protobuf/lazy_field_lite.cc b/src/google/protobuf/lazy_field_lite.cc index 18305233afcf0..3293b21f1125b 100644 --- a/src/google/protobuf/lazy_field_lite.cc +++ b/src/google/protobuf/lazy_field_lite.cc @@ -59,7 +59,7 @@ inline int GetInitDepth(LazyVerifyOption option) { template inline bool ParseWithOuterContextImpl(const T& input, LazyVerifyOption option, ParseContext* ctx, MessageLite* message) { - GOOGLE_DCHECK(ctx == nullptr || !ctx->AliasingEnabled()); + GOOGLE_ABSL_DCHECK(ctx == nullptr || !ctx->AliasingEnabled()); // Create local context with depth. const char* ptr; @@ -137,9 +137,10 @@ bool LazyField::ParseWithOuterContext(MessageLite* message, } void LazyField::LogParseError(const MessageLite* message) { - GOOGLE_LOG_EVERY_N(INFO, 100) << "Lazy parsing failed for " << message->GetTypeName() - << " error=" << message->InitializationErrorString() - << " (N = " << COUNTER << ")"; + GOOGLE_ABSL_LOG_EVERY_N(INFO, 100) + << "Lazy parsing failed for " << message->GetTypeName() + << " error=" << message->InitializationErrorString() + << " (N = " << COUNTER << ")"; } } // namespace internal diff --git a/src/google/protobuf/lite_unittest.cc b/src/google/protobuf/lite_unittest.cc index ac6c893beec65..75f5446bccd09 100644 --- a/src/google/protobuf/lite_unittest.cc +++ b/src/google/protobuf/lite_unittest.cc @@ -35,8 +35,8 @@ #include #include -#include "google/protobuf/stubs/logging.h" #include +#include "google/protobuf/stubs/logging.h" #include "absl/strings/match.h" #include "absl/strings/string_view.h" #include "google/protobuf/arena_test_util.h" diff --git a/src/google/protobuf/map.h b/src/google/protobuf/map.h index 43cb58037bdfd..aedd116953602 100644 --- a/src/google/protobuf/map.h +++ b/src/google/protobuf/map.h @@ -292,7 +292,7 @@ inline bool TableEntryIsTooLong(NodeBase* node) { node = node->next; } while (node != nullptr); // Invariant: no linked list ever is more than kMaxLength in length. - GOOGLE_DCHECK_LE(count, kMaxLength); + GOOGLE_ABSL_DCHECK_LE(count, kMaxLength); return count >= kMaxLength; } @@ -331,21 +331,21 @@ inline bool TableEntryIsNonEmptyList(TableEntryPtr entry) { return !TableEntryIsEmpty(entry) && TableEntryIsList(entry); } inline NodeBase* TableEntryToNode(TableEntryPtr entry) { - GOOGLE_DCHECK(TableEntryIsList(entry)); + GOOGLE_ABSL_DCHECK(TableEntryIsList(entry)); return reinterpret_cast(static_cast(entry)); } inline TableEntryPtr NodeToTableEntry(NodeBase* node) { - GOOGLE_DCHECK((reinterpret_cast(node) & 1) == 0); + GOOGLE_ABSL_DCHECK((reinterpret_cast(node) & 1) == 0); return static_cast(reinterpret_cast(node)); } template Tree* TableEntryToTree(TableEntryPtr entry) { - GOOGLE_DCHECK(TableEntryIsTree(entry)); + GOOGLE_ABSL_DCHECK(TableEntryIsTree(entry)); return reinterpret_cast(static_cast(entry) - 1); } template TableEntryPtr TreeToTableEntry(Tree* node) { - GOOGLE_DCHECK((reinterpret_cast(node) & 1) == 0); + GOOGLE_ABSL_DCHECK((reinterpret_cast(node) & 1) == 0); return static_cast(reinterpret_cast(node) | 1); } @@ -482,8 +482,8 @@ class KeyMapBase { // Advance through buckets, looking for the first that isn't empty. // If nothing non-empty is found then leave node_ == nullptr. void SearchFrom(size_type start_bucket) { - GOOGLE_DCHECK(m_->index_of_first_non_null_ == m_->num_buckets_ || - !m_->TableEntryIsEmpty(m_->index_of_first_non_null_)); + GOOGLE_ABSL_DCHECK(m_->index_of_first_non_null_ == m_->num_buckets_ || + !m_->TableEntryIsEmpty(m_->index_of_first_non_null_)); for (size_type i = start_bucket; i < m_->num_buckets_; ++i) { TableEntryPtr entry = m_->table_[i]; if (entry == TableEntryPtr{}) continue; @@ -492,7 +492,7 @@ class KeyMapBase { node_ = static_cast(TableEntryToNode(entry)); } else { Tree* tree = TableEntryToTree(entry); - GOOGLE_DCHECK(!tree->empty()); + GOOGLE_ABSL_DCHECK(!tree->empty()); node_ = static_cast(tree->begin()->second); } return; @@ -547,12 +547,12 @@ class KeyMapBase { TreeIterator tree_it; const bool is_list = revalidate_if_necessary(b, node, &tree_it); if (is_list) { - GOOGLE_DCHECK(TableEntryIsNonEmptyList(b)); + GOOGLE_ABSL_DCHECK(TableEntryIsNonEmptyList(b)); auto* head = TableEntryToNode(table_[b]); head = EraseFromLinkedList(node, head); table_[b] = NodeToTableEntry(head); } else { - GOOGLE_DCHECK(this->TableEntryIsTree(b)); + GOOGLE_ABSL_DCHECK(this->TableEntryIsTree(b)); Tree* tree = internal::TableEntryToTree(this->table_[b]); if (tree_it != tree->begin()) { auto* prev = std::prev(tree_it)->second; @@ -609,13 +609,13 @@ class KeyMapBase { // Requires count(*KeyPtrFromNodePtr(node)) == 0 and that b is the correct // bucket. num_elements_ is not modified. void InsertUnique(size_type b, KeyNode* node) { - GOOGLE_DCHECK(index_of_first_non_null_ == num_buckets_ || - !TableEntryIsEmpty(index_of_first_non_null_)); + GOOGLE_ABSL_DCHECK(index_of_first_non_null_ == num_buckets_ || + !TableEntryIsEmpty(index_of_first_non_null_)); // In practice, the code that led to this point may have already // determined whether we are inserting into an empty list, a short list, // or whatever. But it's probably cheap enough to recompute that here; // it's likely that we're inserting into an empty or short list. - GOOGLE_DCHECK(FindHelper(node->key()).node == nullptr); + GOOGLE_ABSL_DCHECK(FindHelper(node->key()).node == nullptr); if (TableEntryIsEmpty(b)) { InsertUniqueInList(b, node); index_of_first_non_null_ = (std::min)(index_of_first_non_null_, b); @@ -625,7 +625,7 @@ class KeyMapBase { if (TableEntryIsNonEmptyList(b)) { TreeConvert(b); } - GOOGLE_DCHECK(TableEntryIsTree(b)) + GOOGLE_ABSL_DCHECK(TableEntryIsTree(b)) << (void*)table_[b] << " " << (uintptr_t)table_[b]; InsertUniqueInTree(b, node); index_of_first_non_null_ = (std::min)(index_of_first_non_null_, b); @@ -725,7 +725,7 @@ class KeyMapBase { return; } - GOOGLE_DCHECK_GE(new_num_buckets, kMinTableSize); + GOOGLE_ABSL_DCHECK_GE(new_num_buckets, kMinTableSize); const auto old_table = table_; const size_type old_table_size = num_buckets_; num_buckets_ = new_num_buckets; @@ -772,12 +772,12 @@ class KeyMapBase { } void TreeConvert(size_type b) { - GOOGLE_DCHECK(!TableEntryIsTree(b)); + GOOGLE_ABSL_DCHECK(!TableEntryIsTree(b)); Tree* tree = Arena::Create(alloc_.arena(), typename Tree::key_compare(), typename Tree::allocator_type(alloc_)); size_type count = CopyListToTree(b, tree); - GOOGLE_DCHECK_EQ(count, tree->size()); + GOOGLE_ABSL_DCHECK_EQ(count, tree->size()); table_[b] = TreeToTableEntry(tree); // Relink the nodes. NodeBase* next = nullptr; @@ -852,8 +852,8 @@ class KeyMapBase { } TableEntryPtr* CreateEmptyTable(size_type n) { - GOOGLE_DCHECK(n >= kMinTableSize); - GOOGLE_DCHECK_EQ(n & (n - 1), 0u); + GOOGLE_ABSL_DCHECK(n >= kMinTableSize); + GOOGLE_ABSL_DCHECK_EQ(n & (n - 1), 0u); TableEntryPtr* result = Alloc(n); memset(result, 0, n * sizeof(result[0])); return result; @@ -1197,7 +1197,7 @@ class Map { } void erase(iterator it) { - GOOGLE_DCHECK_EQ(it.m_, this); + GOOGLE_ABSL_DCHECK_EQ(it.m_, this); auto* node = static_cast(it.node_); this->erase_no_destroy(it.bucket_index_, node); DestroyNode(node); @@ -1407,14 +1407,14 @@ class Map { template const T& at(const key_arg& key) const { const_iterator it = find(key); - GOOGLE_CHECK(it != end()) << "key not found: " << static_cast(key); + GOOGLE_ABSL_CHECK(it != end()) << "key not found: " << static_cast(key); return it->second; } template T& at(const key_arg& key) { iterator it = find(key); - GOOGLE_CHECK(it != end()) << "key not found: " << static_cast(key); + GOOGLE_ABSL_CHECK(it != end()) << "key not found: " << static_cast(key); return it->second; } diff --git a/src/google/protobuf/map_field.cc b/src/google/protobuf/map_field.cc index b34010491bef9..c15222f525893 100644 --- a/src/google/protobuf/map_field.cc +++ b/src/google/protobuf/map_field.cc @@ -74,8 +74,8 @@ void MapFieldBase::SwapState(MapFieldBase* other) { void SwapRepeatedPtrToNull(RepeatedPtrField** from, RepeatedPtrField** to, Arena* from_arena, Arena* to_arena) { - GOOGLE_DCHECK(*from != nullptr); - GOOGLE_DCHECK(*to == nullptr); + GOOGLE_ABSL_DCHECK(*from != nullptr); + GOOGLE_ABSL_DCHECK(*to == nullptr); *to = Arena::CreateMessage >(to_arena); **to = std::move(**from); if (from_arena == nullptr) { @@ -104,7 +104,7 @@ void MapFieldBase::Swap(MapFieldBase* other) { } void MapFieldBase::UnsafeShallowSwap(MapFieldBase* other) { - GOOGLE_DCHECK_EQ(arena_, other->arena_); + GOOGLE_ABSL_DCHECK_EQ(arena_, other->arena_); InternalSwap(other); } @@ -363,7 +363,7 @@ void DynamicMapField::SetMapIteratorValue(MapIterator* map_iter) const { } void DynamicMapField::MergeFrom(const MapFieldBase& other) { - GOOGLE_DCHECK(IsMapValid() && other.IsMapValid()); + GOOGLE_ABSL_DCHECK(IsMapValid() && other.IsMapValid()); Map* map = MutableMap(); const DynamicMapField& other_field = reinterpret_cast(other); @@ -478,7 +478,7 @@ void DynamicMapField::SyncRepeatedFieldWithMapNoLock() const { case FieldDescriptor::CPPTYPE_FLOAT: case FieldDescriptor::CPPTYPE_ENUM: case FieldDescriptor::CPPTYPE_MESSAGE: - GOOGLE_LOG(FATAL) << "Can't get here."; + GOOGLE_ABSL_LOG(FATAL) << "Can't get here."; break; } const MapValueRef& map_val = it->second; @@ -561,7 +561,7 @@ void DynamicMapField::SyncMapWithRepeatedFieldNoLock() const { case FieldDescriptor::CPPTYPE_FLOAT: case FieldDescriptor::CPPTYPE_ENUM: case FieldDescriptor::CPPTYPE_MESSAGE: - GOOGLE_LOG(FATAL) << "Can't get here."; + GOOGLE_ABSL_LOG(FATAL) << "Can't get here."; break; } diff --git a/src/google/protobuf/map_field.h b/src/google/protobuf/map_field.h index 0f1a607f3f1af..7aa8194cbaa70 100644 --- a/src/google/protobuf/map_field.h +++ b/src/google/protobuf/map_field.h @@ -67,13 +67,14 @@ class MapIterator; #pragma warning(disable : 4265) #endif // _MSC_VER -#define TYPE_CHECK(EXPECTEDTYPE, METHOD) \ - if (type() != EXPECTEDTYPE) { \ - GOOGLE_LOG(FATAL) << "Protocol Buffer map usage error:\n" \ - << METHOD << " type does not match\n" \ - << " Expected : " \ - << FieldDescriptor::CppTypeName(EXPECTEDTYPE) << "\n" \ - << " Actual : " << FieldDescriptor::CppTypeName(type()); \ +#define TYPE_CHECK(EXPECTEDTYPE, METHOD) \ + if (type() != EXPECTEDTYPE) { \ + GOOGLE_ABSL_LOG(FATAL) << "Protocol Buffer map usage error:\n" \ + << METHOD << " type does not match\n" \ + << " Expected : " \ + << FieldDescriptor::CppTypeName(EXPECTEDTYPE) << "\n" \ + << " Actual : " \ + << FieldDescriptor::CppTypeName(type()); \ } // MapKey is an union type for representing any possible @@ -96,9 +97,9 @@ class PROTOBUF_EXPORT MapKey { FieldDescriptor::CppType type() const { if (type_ == FieldDescriptor::CppType()) { - GOOGLE_LOG(FATAL) << "Protocol Buffer map usage error:\n" - << "MapKey::type MapKey is not initialized. " - << "Call set methods to initialize MapKey."; + GOOGLE_ABSL_LOG(FATAL) << "Protocol Buffer map usage error:\n" + << "MapKey::type MapKey is not initialized. " + << "Call set methods to initialize MapKey."; } return type_; } @@ -157,14 +158,14 @@ class PROTOBUF_EXPORT MapKey { if (type_ != other.type_) { // We could define a total order that handles this case, but // there currently no need. So, for now, fail. - GOOGLE_LOG(FATAL) << "Unsupported: type mismatch"; + GOOGLE_ABSL_LOG(FATAL) << "Unsupported: type mismatch"; } switch (type()) { case FieldDescriptor::CPPTYPE_DOUBLE: case FieldDescriptor::CPPTYPE_FLOAT: case FieldDescriptor::CPPTYPE_ENUM: case FieldDescriptor::CPPTYPE_MESSAGE: - GOOGLE_LOG(FATAL) << "Unsupported"; + GOOGLE_ABSL_LOG(FATAL) << "Unsupported"; return false; case FieldDescriptor::CPPTYPE_STRING: return val_.string_value_.get() < other.val_.string_value_.get(); @@ -185,14 +186,14 @@ class PROTOBUF_EXPORT MapKey { bool operator==(const MapKey& other) const { if (type_ != other.type_) { // To be consistent with operator<, we don't allow this either. - GOOGLE_LOG(FATAL) << "Unsupported: type mismatch"; + GOOGLE_ABSL_LOG(FATAL) << "Unsupported: type mismatch"; } switch (type()) { case FieldDescriptor::CPPTYPE_DOUBLE: case FieldDescriptor::CPPTYPE_FLOAT: case FieldDescriptor::CPPTYPE_ENUM: case FieldDescriptor::CPPTYPE_MESSAGE: - GOOGLE_LOG(FATAL) << "Unsupported"; + GOOGLE_ABSL_LOG(FATAL) << "Unsupported"; break; case FieldDescriptor::CPPTYPE_STRING: return val_.string_value_.get() == other.val_.string_value_.get(); @@ -207,7 +208,7 @@ class PROTOBUF_EXPORT MapKey { case FieldDescriptor::CPPTYPE_BOOL: return val_.bool_value_ == other.val_.bool_value_; } - GOOGLE_LOG(FATAL) << "Can't get here."; + GOOGLE_ABSL_LOG(FATAL) << "Can't get here."; return false; } @@ -218,7 +219,7 @@ class PROTOBUF_EXPORT MapKey { case FieldDescriptor::CPPTYPE_FLOAT: case FieldDescriptor::CPPTYPE_ENUM: case FieldDescriptor::CPPTYPE_MESSAGE: - GOOGLE_LOG(FATAL) << "Unsupported"; + GOOGLE_ABSL_LOG(FATAL) << "Unsupported"; break; case FieldDescriptor::CPPTYPE_STRING: *val_.string_value_.get_mutable() = other.val_.string_value_.get(); @@ -284,7 +285,7 @@ struct hash<::PROTOBUF_NAMESPACE_ID::MapKey> { case ::PROTOBUF_NAMESPACE_ID::FieldDescriptor::CPPTYPE_FLOAT: case ::PROTOBUF_NAMESPACE_ID::FieldDescriptor::CPPTYPE_ENUM: case ::PROTOBUF_NAMESPACE_ID::FieldDescriptor::CPPTYPE_MESSAGE: - GOOGLE_LOG(FATAL) << "Unsupported"; + GOOGLE_ABSL_LOG(FATAL) << "Unsupported"; break; case ::PROTOBUF_NAMESPACE_ID::FieldDescriptor::CPPTYPE_STRING: return hash()(map_key.GetStringValue()); @@ -308,7 +309,7 @@ struct hash<::PROTOBUF_NAMESPACE_ID::MapKey> { return hash()(map_key.GetBoolValue()); } } - GOOGLE_LOG(FATAL) << "Can't get here."; + GOOGLE_ABSL_LOG(FATAL) << "Can't get here."; return 0; } bool operator()(const ::PROTOBUF_NAMESPACE_ID::MapKey& map_key1, @@ -351,7 +352,7 @@ class PROTOBUF_EXPORT MapFieldBase { protected: ~MapFieldBase() { // "protected" stops users from deleting a `MapFieldBase *` - GOOGLE_DCHECK(repeated_field_ == nullptr); + GOOGLE_ABSL_DCHECK(repeated_field_ == nullptr); } void Destruct(); @@ -427,7 +428,7 @@ class PROTOBUF_EXPORT MapFieldBase { // MapFieldBase-derived object, and there is no synchronization going // on between them, tsan will alert. #if defined(__SANITIZE_THREAD__) || defined(THREAD_SANITIZER) - void ConstAccess() const { GOOGLE_CHECK_EQ(seq1_, seq2_); } + void ConstAccess() const { GOOGLE_ABSL_CHECK_EQ(seq1_, seq2_); } void MutableAccess() { if (seq1_ & 1) { seq2_ = ++seq1_; @@ -767,7 +768,7 @@ class PROTOBUF_EXPORT MapValueConstRef { FieldDescriptor::CppType type() const { if (type_ == FieldDescriptor::CppType() || data_ == nullptr) { - GOOGLE_LOG(FATAL) + GOOGLE_ABSL_LOG(FATAL) << "Protocol Buffer map usage error:\n" << "MapValueConstRef::type MapValueConstRef is not initialized."; } diff --git a/src/google/protobuf/map_field_inl.h b/src/google/protobuf/map_field_inl.h index 9311abdd81a8d..17f728c242b8d 100644 --- a/src/google/protobuf/map_field_inl.h +++ b/src/google/protobuf/map_field_inl.h @@ -142,7 +142,7 @@ template void TypeDefinedMapFieldBase::InitializeIterator( MapIterator* map_iter) const { map_iter->iter_ = new typename Map::const_iterator; - GOOGLE_CHECK(map_iter->iter_ != nullptr); + GOOGLE_ABSL_CHECK(map_iter->iter_ != nullptr); } template @@ -345,7 +345,7 @@ void MapField* repeated_field = reinterpret_cast*>( this->MapFieldBase::repeated_field_); - GOOGLE_CHECK(this->MapFieldBase::repeated_field_ != nullptr); + GOOGLE_ABSL_CHECK(this->MapFieldBase::repeated_field_ != nullptr); map->clear(); for (typename RepeatedPtrField::iterator it = repeated_field->begin(); diff --git a/src/google/protobuf/map_field_lite.h b/src/google/protobuf/map_field_lite.h index fe2f2b26fccff..799b621cf9661 100644 --- a/src/google/protobuf/map_field_lite.h +++ b/src/google/protobuf/map_field_lite.h @@ -193,7 +193,7 @@ struct MapEntryToMapField< #ifndef NDEBUG inline PROTOBUF_NOINLINE void MapFieldLiteNotDestructed(void* map_field_lite) { bool proper_destruct = false; - GOOGLE_CHECK(proper_destruct) << map_field_lite; + GOOGLE_ABSL_CHECK(proper_destruct) << map_field_lite; } #endif diff --git a/src/google/protobuf/map_field_test.cc b/src/google/protobuf/map_field_test.cc index 193edbee1ef1e..1ec6c9bd3a9a4 100644 --- a/src/google/protobuf/map_field_test.cc +++ b/src/google/protobuf/map_field_test.cc @@ -31,7 +31,6 @@ #include #include -#include "google/protobuf/stubs/logging.h" #include "google/protobuf/arena.h" #include "google/protobuf/map.h" #include "google/protobuf/map_field_inl.h" @@ -39,6 +38,7 @@ #include "google/protobuf/repeated_field.h" #include #include "absl/container/flat_hash_map.h" +#include "google/protobuf/stubs/logging.h" #include "absl/strings/str_format.h" #include "google/protobuf/arena_test_util.h" #include "google/protobuf/map_test_util.h" diff --git a/src/google/protobuf/map_test.inc b/src/google/protobuf/map_test.inc index d452476874318..78a4808296ed3 100644 --- a/src/google/protobuf/map_test.inc +++ b/src/google/protobuf/map_test.inc @@ -44,6 +44,7 @@ #include #include +#include "google/protobuf/stubs/logging.h" #include "google/protobuf/stubs/logging.h" #include "google/protobuf/testing/file.h" #include "google/protobuf/descriptor.pb.h" @@ -399,7 +400,7 @@ TEST_F(MapImplTest, BeginIsFast) { frog += counter++; last_key = static_cast(frog) >= 0 ? static_cast(frog) : last_key ^ 1; - GOOGLE_DCHECK_GE(last_key, 0); + GOOGLE_ABSL_DCHECK_GE(last_key, 0); map[last_key] = last_key ^ 1; } std::vector times; @@ -407,7 +408,7 @@ TEST_F(MapImplTest, BeginIsFast) { // just in case one iteration is fast compared to the granularity of // our time keeping, we measure kChunkSize iterations per outer-loop iter. const int kChunkSize = 1000; - GOOGLE_CHECK_EQ(kTestSize % kChunkSize, 0); + GOOGLE_ABSL_CHECK_EQ(kTestSize % kChunkSize, 0); do { const int64_t start = Now(); for (int i = 0; i < kChunkSize; i++) { @@ -419,12 +420,12 @@ TEST_F(MapImplTest, BeginIsFast) { } } while (!map.empty()); if (times.size() < .99 * kTestSize / kChunkSize) { - GOOGLE_LOG(WARNING) << "Now() isn't helping us measure time"; + GOOGLE_ABSL_LOG(WARNING) << "Now() isn't helping us measure time"; return; } int64_t x0 = median(times.begin(), times.begin() + 9); int64_t x1 = median(times.begin() + times.size() - 9, times.end()); - GOOGLE_LOG(INFO) << "x0=" << x0 << ", x1=" << x1; + GOOGLE_ABSL_LOG(INFO) << "x0=" << x0 << ", x1=" << x1; // x1 will greatly exceed x0 if the code we just executed took O(n^2) time. // And we'll probably time out and never get here. So, this test is // intentionally loose: we check that x0 and x1 are within a factor of 8. @@ -516,7 +517,7 @@ static void TestOldVersusNewIterator(int skip, Map* m) { } if (it == m->end()) return; const IteratorType old = it; - GOOGLE_LOG(INFO) << "skip=" << skip << ", old->first=" << old->first; + GOOGLE_ABSL_LOG(INFO) << "skip=" << skip << ", old->first=" << old->first; const int target_size = initial_size < 100 ? initial_size * 5 : initial_size * 5 / 4; for (int i = 0; m->size() <= target_size; i++) { @@ -544,8 +545,8 @@ static void TestOldVersusNewIterator(int skip, Map* m) { // Create and test an n-element Map, with emphasis on iterator correctness. static void StressTestIterators(int n) { - GOOGLE_LOG(INFO) << "StressTestIterators " << n; - GOOGLE_CHECK_GT(n, 0); + GOOGLE_ABSL_LOG(INFO) << "StressTestIterators " << n; + GOOGLE_ABSL_CHECK_GT(n, 0); // Create a random-looking map of size n. Use non-negative integer keys. Map m; uint32_t frog = 123987 + n; @@ -557,7 +558,7 @@ static void StressTestIterators(int n) { frog += counter++; last_key = static_cast(frog) >= 0 ? static_cast(frog) : last_key ^ 1; - GOOGLE_DCHECK_GE(last_key, 0); + GOOGLE_ABSL_DCHECK_GE(last_key, 0); m[last_key] = last_key ^ 1; } // Test it. @@ -3169,7 +3170,9 @@ TEST(GeneratedMapFieldReflectionTest, ReleaseLast) { std::vector release_last = MapTestUtil::GetMapEntriesFromRelease(&message); MapTestUtil::ExpectMapsSize(message, 1); +#ifndef PROTOBUF_FORCE_COPY_IN_RELEASE EXPECT_TRUE(expect_last == release_last); +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE for (std::vector::iterator it = release_last.begin(); it != release_last.end(); ++it) { delete *it; @@ -3833,7 +3836,7 @@ TEST(MapSerializationTest, DeterministicSubmessage) { UNITTEST::TestMaps t; const std::string filename = "golden_message_maps"; std::string golden; - GOOGLE_CHECK_OK(File::GetContents( + GOOGLE_ABSL_CHECK_OK(File::GetContents( TestUtil::GetTestDataPath("third_party/protobuf/testdata/" + filename), &golden, true)); t.ParseFromString(golden); @@ -3875,7 +3878,7 @@ TEST(TextFormatMapTest, DynamicMessage) { tester.SetMapFieldsViaReflection(message.get()); std::string expected_text; - GOOGLE_CHECK_OK( + GOOGLE_ABSL_CHECK_OK( File::GetContents(TestUtil::GetTestDataPath("third_party/protobuf/" "testdata/map_test_data.txt"), &expected_text, true)); @@ -3891,7 +3894,7 @@ TEST(TextFormatMapTest, Sorted) { tester.SetMapFieldsViaReflection(&message); std::string expected_text; - GOOGLE_CHECK_OK( + GOOGLE_ABSL_CHECK_OK( File::GetContents(TestUtil::GetTestDataPath("third_party/protobuf/" "testdata/map_test_data.txt"), &expected_text, true)); @@ -3911,12 +3914,12 @@ TEST(TextFormatMapTest, Sorted) { TEST(TextFormatMapTest, ParseCorruptedString) { std::string serialized_message; - GOOGLE_CHECK_OK(File::GetContents( + GOOGLE_ABSL_CHECK_OK(File::GetContents( TestUtil::GetTestDataPath( "third_party/protobuf/testdata/golden_message_maps"), &serialized_message, true)); UNITTEST::TestMaps message; - GOOGLE_CHECK(message.ParseFromString(serialized_message)); + GOOGLE_ABSL_CHECK(message.ParseFromString(serialized_message)); TestParseCorruptedString(message); TestParseCorruptedString(message); } @@ -3978,7 +3981,7 @@ TEST(TextFormatMapTest, NoDisableReflectionIterator) { const Reflection* map_entry_reflection = iter->GetReflection(); const FieldDescriptor* value_field_desc = iter->GetDescriptor()->map_value(); map_entry_reflection->SetInt32(&(*iter), value_field_desc, 2); - GOOGLE_LOG(INFO) << iter->DebugString(); + GOOGLE_ABSL_LOG(INFO) << iter->DebugString(); // In previous implementation, the new change won't be reflected in text // format, because the previous iterator has been invalidated. diff --git a/src/google/protobuf/map_test_util_impl.h b/src/google/protobuf/map_test_util_impl.h index ff025b6eee5eb..9f12f53a478d3 100644 --- a/src/google/protobuf/map_test_util_impl.h +++ b/src/google/protobuf/map_test_util_impl.h @@ -31,7 +31,6 @@ #ifndef GOOGLE_PROTOBUF_MAP_TEST_UTIL_IMPL_H__ #define GOOGLE_PROTOBUF_MAP_TEST_UTIL_IMPL_H__ -#include "google/protobuf/stubs/logging.h" #include diff --git a/src/google/protobuf/message.cc b/src/google/protobuf/message.cc index ddb542111b2d9..7191ba5fd688a 100644 --- a/src/google/protobuf/message.cc +++ b/src/google/protobuf/message.cc @@ -37,10 +37,11 @@ #include #include -#include "google/protobuf/stubs/logging.h" #include "absl/base/casts.h" #include "absl/container/flat_hash_map.h" #include "absl/container/flat_hash_set.h" +#include "google/protobuf/stubs/logging.h" +#include "google/protobuf/stubs/logging.h" #include "absl/strings/str_join.h" #include "absl/strings/string_view.h" #include "absl/synchronization/mutex.h" @@ -105,7 +106,7 @@ void Message::CopyFrom(const Message& from) { if (class_to == nullptr || class_to != class_from) { const Descriptor* descriptor = GetDescriptor(); - GOOGLE_CHECK_EQ(from.GetDescriptor(), descriptor) + GOOGLE_ABSL_CHECK_EQ(from.GetDescriptor(), descriptor) << ": Tried to copy from a message with a different type. " "to: " << descriptor->full_name() @@ -120,22 +121,14 @@ void Message::CopyFrom(const Message& from) { } void Message::CopyWithSourceCheck(Message& to, const Message& from) { -#ifndef NDEBUG - FailIfCopyFromDescendant(to, from); -#endif + // Fail if "from" is a descendant of "to" as such copy is not allowed. + GOOGLE_ABSL_DCHECK(!internal::IsDescendant(to, from)) + << "Source of CopyFrom cannot be a descendant of the target."; + to.Clear(); to.GetClassData()->merge_to_from(to, from); } -void Message::FailIfCopyFromDescendant(Message& to, const Message& from) { - auto* arena = to.GetArenaForAllocation(); - bool same_message_owned_arena = to.GetOwningArena() == nullptr && - arena != nullptr && - arena == from.GetOwningArena(); - GOOGLE_CHECK(!same_message_owned_arena && !internal::IsDescendant(to, from)) - << "Source of CopyFrom cannot be a descendant of the target."; -} - std::string Message::GetTypeName() const { return GetDescriptor()->full_name(); } @@ -157,9 +150,9 @@ std::string Message::InitializationErrorString() const { } void Message::CheckInitialized() const { - GOOGLE_CHECK(IsInitialized()) << "Message of type \"" << GetDescriptor()->full_name() - << "\" is missing required fields: " - << InitializationErrorString(); + GOOGLE_ABSL_CHECK(IsInitialized()) + << "Message of type \"" << GetDescriptor()->full_name() + << "\" is missing required fields: " << InitializationErrorString(); } void Message::DiscardUnknownFields() { @@ -191,9 +184,9 @@ size_t Message::ByteSizeLong() const { } void Message::SetCachedSize(int /* size */) const { - GOOGLE_LOG(FATAL) << "Message class \"" << GetDescriptor()->full_name() - << "\" implements neither SetCachedSize() nor ByteSize(). " - "Must implement one or the other."; + GOOGLE_ABSL_LOG(FATAL) << "Message class \"" << GetDescriptor()->full_name() + << "\" implements neither SetCachedSize() nor ByteSize(). " + "Must implement one or the other."; } size_t Message::ComputeUnknownFieldsSize( @@ -226,7 +219,7 @@ namespace internal { void* CreateSplitMessageGeneric(Arena* arena, const void* default_split, size_t size, const void* message, const void* default_message) { - GOOGLE_DCHECK_NE(message, default_message); + GOOGLE_ABSL_DCHECK_NE(message, default_message); void* split = (arena == nullptr) ? ::operator new(size) : arena->AllocateAligned(size); memcpy(split, default_split, size); @@ -315,13 +308,13 @@ GeneratedMessageFactory* GeneratedMessageFactory::singleton() { void GeneratedMessageFactory::RegisterFile( const google::protobuf::internal::DescriptorTable* table) { if (!files_.insert(table).second) { - GOOGLE_LOG(FATAL) << "File is already registered: " << table->filename; + GOOGLE_ABSL_LOG(FATAL) << "File is already registered: " << table->filename; } } void GeneratedMessageFactory::RegisterType(const Descriptor* descriptor, const Message* prototype) { - GOOGLE_DCHECK_EQ(descriptor->file()->pool(), DescriptorPool::generated_pool()) + GOOGLE_ABSL_DCHECK_EQ(descriptor->file()->pool(), DescriptorPool::generated_pool()) << "Tried to register a non-generated type with the generated " "type registry."; @@ -330,7 +323,8 @@ void GeneratedMessageFactory::RegisterType(const Descriptor* descriptor, // the mutex. mutex_.AssertHeld(); if (!type_map_.try_emplace(descriptor, prototype).second) { - GOOGLE_LOG(DFATAL) << "Type is already registered: " << descriptor->full_name(); + GOOGLE_ABSL_LOG(DFATAL) << "Type is already registered: " + << descriptor->full_name(); } } @@ -350,9 +344,9 @@ const Message* GeneratedMessageFactory::GetPrototype(const Descriptor* type) { const internal::DescriptorTable* registration_data = FindInFileMap(type->file()->name()); if (registration_data == nullptr) { - GOOGLE_LOG(DFATAL) << "File appears to be in generated pool but wasn't " - "registered: " - << type->file()->name(); + GOOGLE_ABSL_LOG(DFATAL) << "File appears to be in generated pool but wasn't " + "registered: " + << type->file()->name(); return nullptr; } @@ -368,8 +362,8 @@ const Message* GeneratedMessageFactory::GetPrototype(const Descriptor* type) { } if (result == nullptr) { - GOOGLE_LOG(DFATAL) << "Type appears to be in generated pool but wasn't " - << "registered: " << type->full_name(); + GOOGLE_ABSL_LOG(DFATAL) << "Type appears to be in generated pool but wasn't " + << "registered: " << type->full_name(); } return result; @@ -402,7 +396,7 @@ T* GetSingleton() { const internal::RepeatedFieldAccessor* Reflection::RepeatedFieldAccessor( const FieldDescriptor* field) const { - GOOGLE_CHECK(field->is_repeated()); + GOOGLE_ABSL_CHECK(field->is_repeated()); switch (field->cpp_type()) { #define HANDLE_PRIMITIVE_TYPE(TYPE, type) \ case FieldDescriptor::CPPTYPE_##TYPE: \ @@ -430,7 +424,7 @@ const internal::RepeatedFieldAccessor* Reflection::RepeatedFieldAccessor( return GetSingleton(); } } - GOOGLE_LOG(FATAL) << "Should not reach here."; + GOOGLE_ABSL_LOG(FATAL) << "Should not reach here."; return nullptr; } diff --git a/src/google/protobuf/message.h b/src/google/protobuf/message.h index 2813c270095fe..28b9fc70f8246 100644 --- a/src/google/protobuf/message.h +++ b/src/google/protobuf/message.h @@ -276,8 +276,8 @@ class PROTOBUF_EXPORT Message : public MessageLite { // exact same class). virtual void MergeFrom(const Message& from); - // Verifies that IsInitialized() returns true. GOOGLE_CHECK-fails otherwise, with - // a nice error message. + // Verifies that IsInitialized() returns true. GOOGLE_ABSL_CHECK-fails otherwise, + // with a nice error message. void CheckInitialized() const; // Slowly build a list of all required fields that are not set. @@ -412,9 +412,6 @@ class PROTOBUF_EXPORT Message : public MessageLite { // type, and thus uses GetClassData(). static void CopyWithSourceCheck(Message& to, const Message& from); - // Fail if "from" is a descendant of "to" as such copy is not allowed. - static void FailIfCopyFromDescendant(Message& to, const Message& from); - inline explicit Message(Arena* arena) : MessageLite(arena) {} size_t ComputeUnknownFieldsSize(size_t total_size, internal::CachedSize* cached_size) const; @@ -941,7 +938,7 @@ class PROTOBUF_EXPORT Reflection final { // take arbitrary integer values, and the legacy GetEnum() getter will // dynamically create an EnumValueDescriptor for any integer value without // one. If |false|, setting an unknown enum value via the integer-based - // setters results in undefined behavior (in practice, GOOGLE_DCHECK-fails). + // setters results in undefined behavior (in practice, GOOGLE_ABSL_DCHECK-fails). // // Generic code that uses reflection to handle messages with enum fields // should check this flag before using the integer-based setter, and either @@ -1546,7 +1543,7 @@ const Type& Reflection::DefaultRaw(const FieldDescriptor* field) const { uint32_t Reflection::GetOneofCase( const Message& message, const OneofDescriptor* oneof_descriptor) const { - GOOGLE_DCHECK(!oneof_descriptor->is_synthetic()); + GOOGLE_ABSL_DCHECK(!oneof_descriptor->is_synthetic()); return internal::GetConstRefAtOffset( message, schema_.GetOneofCaseOffset(oneof_descriptor)); } @@ -1558,20 +1555,20 @@ bool Reflection::HasOneofField(const Message& message, } const void* Reflection::GetSplitField(const Message* message) const { - GOOGLE_DCHECK(schema_.IsSplit()); + GOOGLE_ABSL_DCHECK(schema_.IsSplit()); return *internal::GetConstPointerAtOffset(message, schema_.SplitOffset()); } void** Reflection::MutableSplitField(Message* message) const { - GOOGLE_DCHECK(schema_.IsSplit()); + GOOGLE_ABSL_DCHECK(schema_.IsSplit()); return internal::GetPointerAtOffset(message, schema_.SplitOffset()); } template const Type& Reflection::GetRaw(const Message& message, const FieldDescriptor* field) const { - GOOGLE_DCHECK(!schema_.InRealOneof(field) || HasOneofField(message, field)) + GOOGLE_ABSL_DCHECK(!schema_.InRealOneof(field) || HasOneofField(message, field)) << "Field = " << field->full_name(); if (schema_.IsSplit(field)) { return *internal::GetConstPointerAtOffset( diff --git a/src/google/protobuf/message_lite.cc b/src/google/protobuf/message_lite.cc index 624ab851058d0..5e0ab8a3832a7 100644 --- a/src/google/protobuf/message_lite.cc +++ b/src/google/protobuf/message_lite.cc @@ -42,9 +42,10 @@ #include #include -#include "google/protobuf/stubs/logging.h" #include "google/protobuf/arena.h" #include "absl/base/dynamic_annotations.h" +#include "google/protobuf/stubs/logging.h" +#include "google/protobuf/stubs/logging.h" #include "absl/strings/cord.h" #include "absl/strings/internal/resize_uninitialized.h" #include "absl/strings/str_cat.h" @@ -83,15 +84,15 @@ void ByteSizeConsistencyError(size_t byte_size_before_serialization, size_t byte_size_after_serialization, size_t bytes_produced_by_serialization, const MessageLite& message) { - GOOGLE_CHECK_EQ(byte_size_before_serialization, byte_size_after_serialization) + GOOGLE_ABSL_CHECK_EQ(byte_size_before_serialization, byte_size_after_serialization) << message.GetTypeName() << " was modified concurrently during serialization."; - GOOGLE_CHECK_EQ(bytes_produced_by_serialization, byte_size_before_serialization) + GOOGLE_ABSL_CHECK_EQ(bytes_produced_by_serialization, byte_size_before_serialization) << "Byte size calculation and serialization were inconsistent. This " "may indicate a bug in protocol buffers or it may be caused by " "concurrent modification of " << message.GetTypeName() << "."; - GOOGLE_LOG(FATAL) << "This shouldn't be called if all the sizes are equal."; + GOOGLE_ABSL_LOG(FATAL) << "This shouldn't be called if all the sizes are equal."; } std::string InitializationErrorMessage(absl::string_view action, @@ -120,7 +121,7 @@ inline bool CheckFieldPresence(const internal::ParseContext& ctx, } // namespace void MessageLite::LogInitializationErrorMessage() const { - GOOGLE_LOG(ERROR) << InitializationErrorMessage("parse", *this); + GOOGLE_ABSL_LOG(ERROR) << InitializationErrorMessage("parse", *this); } namespace internal { @@ -219,7 +220,7 @@ bool MessageLite::MergeFromImpl(io::CodedInputStream* input, if (PROTOBUF_PREDICT_FALSE(!ptr)) return false; ctx.BackUp(ptr); if (!ctx.EndedAtEndOfStream()) { - GOOGLE_DCHECK_NE(ctx.LastTag(), 1); // We can't end on a pushed limit. + GOOGLE_ABSL_DCHECK_NE(ctx.LastTag(), 1); // We can't end on a pushed limit. if (ctx.IsExceedingLimit(ptr)) return false; input->SetLastTag(ctx.LastTag()); } else { @@ -332,14 +333,14 @@ inline uint8_t* SerializeToArrayImpl(const MessageLite& msg, uint8_t* target, &ptr); ptr = msg._InternalSerialize(ptr, &out); out.Trim(ptr); - GOOGLE_DCHECK(!out.HadError() && stream.ByteCount() == size); + GOOGLE_ABSL_DCHECK(!out.HadError() && stream.ByteCount() == size); return target + size; } else { io::EpsCopyOutputStream out( target, size, io::CodedOutputStream::IsDefaultSerializationDeterministic()); uint8_t* res = msg._InternalSerialize(target, &out); - GOOGLE_DCHECK(target + size == res); + GOOGLE_ABSL_DCHECK(target + size == res); return res; } } @@ -351,7 +352,8 @@ uint8_t* MessageLite::SerializeWithCachedSizesToArray(uint8_t* target) const { } bool MessageLite::SerializeToCodedStream(io::CodedOutputStream* output) const { - GOOGLE_DCHECK(IsInitialized()) << InitializationErrorMessage("serialize", *this); + GOOGLE_ABSL_DCHECK(IsInitialized()) + << InitializationErrorMessage("serialize", *this); return SerializePartialToCodedStream(output); } @@ -359,8 +361,8 @@ bool MessageLite::SerializePartialToCodedStream( io::CodedOutputStream* output) const { const size_t size = ByteSizeLong(); // Force size to be cached. if (size > INT_MAX) { - GOOGLE_LOG(ERROR) << GetTypeName() - << " exceeded maximum protobuf size of 2GB: " << size; + GOOGLE_ABSL_LOG(ERROR) << GetTypeName() + << " exceeded maximum protobuf size of 2GB: " << size; return false; } @@ -381,7 +383,8 @@ bool MessageLite::SerializePartialToCodedStream( bool MessageLite::SerializeToZeroCopyStream( io::ZeroCopyOutputStream* output) const { - GOOGLE_DCHECK(IsInitialized()) << InitializationErrorMessage("serialize", *this); + GOOGLE_ABSL_DCHECK(IsInitialized()) + << InitializationErrorMessage("serialize", *this); return SerializePartialToZeroCopyStream(output); } @@ -389,8 +392,8 @@ bool MessageLite::SerializePartialToZeroCopyStream( io::ZeroCopyOutputStream* output) const { const size_t size = ByteSizeLong(); // Force size to be cached. if (size > INT_MAX) { - GOOGLE_LOG(ERROR) << GetTypeName() - << " exceeded maximum protobuf size of 2GB: " << size; + GOOGLE_ABSL_LOG(ERROR) << GetTypeName() + << " exceeded maximum protobuf size of 2GB: " << size; return false; } @@ -428,7 +431,8 @@ bool MessageLite::SerializePartialToOstream(std::ostream* output) const { } bool MessageLite::AppendToString(std::string* output) const { - GOOGLE_DCHECK(IsInitialized()) << InitializationErrorMessage("serialize", *this); + GOOGLE_ABSL_DCHECK(IsInitialized()) + << InitializationErrorMessage("serialize", *this); return AppendPartialToString(output); } @@ -436,8 +440,8 @@ bool MessageLite::AppendPartialToString(std::string* output) const { size_t old_size = output->size(); size_t byte_size = ByteSizeLong(); if (byte_size > INT_MAX) { - GOOGLE_LOG(ERROR) << GetTypeName() - << " exceeded maximum protobuf size of 2GB: " << byte_size; + GOOGLE_ABSL_LOG(ERROR) << GetTypeName() + << " exceeded maximum protobuf size of 2GB: " << byte_size; return false; } @@ -460,15 +464,16 @@ bool MessageLite::SerializePartialToString(std::string* output) const { } bool MessageLite::SerializeToArray(void* data, int size) const { - GOOGLE_DCHECK(IsInitialized()) << InitializationErrorMessage("serialize", *this); + GOOGLE_ABSL_DCHECK(IsInitialized()) + << InitializationErrorMessage("serialize", *this); return SerializePartialToArray(data, size); } bool MessageLite::SerializePartialToArray(void* data, int size) const { const size_t byte_size = ByteSizeLong(); if (byte_size > INT_MAX) { - GOOGLE_LOG(ERROR) << GetTypeName() - << " exceeded maximum protobuf size of 2GB: " << byte_size; + GOOGLE_ABSL_LOG(ERROR) << GetTypeName() + << " exceeded maximum protobuf size of 2GB: " << byte_size; return false; } if (size < static_cast(byte_size)) return false; diff --git a/src/google/protobuf/message_lite.h b/src/google/protobuf/message_lite.h index 35db842b1140b..7f266b3d649c2 100644 --- a/src/google/protobuf/message_lite.h +++ b/src/google/protobuf/message_lite.h @@ -45,10 +45,10 @@ #include #include "google/protobuf/stubs/common.h" -#include "google/protobuf/stubs/logging.h" #include "google/protobuf/arena.h" #include "google/protobuf/port.h" #include "absl/base/call_once.h" +#include "google/protobuf/stubs/logging.h" #include "absl/strings/string_view.h" #include "google/protobuf/explicitly_constructed.h" #include "google/protobuf/io/coded_stream.h" @@ -103,7 +103,7 @@ class GenericTypeHandler; // defined in repeated_field.h // computed size to a cached size. Since we don't proceed with serialization // if the total size was > INT_MAX, it is not important what this function // returns for inputs > INT_MAX. However this case should not error or -// GOOGLE_CHECK-fail, because the full size_t resolution is still returned from +// GOOGLE_ABSL_CHECK-fail, because the full size_t resolution is still returned from // ByteSizeLong() and checked against INT_MAX; we can catch the overflow // there. inline int ToCachedSize(size_t size) { return static_cast(size); } @@ -118,11 +118,11 @@ inline size_t FromIntSize(int size) { return static_cast(size); } -// For cases where a legacy function returns an integer size. We GOOGLE_DCHECK() +// For cases where a legacy function returns an integer size. We GOOGLE_ABSL_DCHECK() // that the conversion will fit within an integer; if this is false then we // are losing information. inline int ToIntSize(size_t size) { - GOOGLE_DCHECK_LE(size, static_cast(INT_MAX)); + GOOGLE_ABSL_DCHECK_LE(size, static_cast(INT_MAX)); return static_cast(size); } @@ -187,8 +187,7 @@ class PROTOBUF_EXPORT MessageLite { // if arena is a nullptr. virtual MessageLite* New(Arena* arena) const = 0; - // Returns user-owned arena; nullptr if it's message owned. - Arena* GetArena() const { return _internal_metadata_.user_arena(); } + Arena* GetArena() const { return _internal_metadata_.arena(); } // Clear all fields of the message and set them to their default values. // Clear() assumes that any memory allocated to hold parts of the message @@ -325,7 +324,7 @@ class PROTOBUF_EXPORT MessageLite { // Write a protocol buffer of this message to the given output. Returns // false on a write error. If the message is missing required fields, - // this may GOOGLE_CHECK-fail. + // this may GOOGLE_ABSL_CHECK-fail. bool SerializeToCodedStream(io::CodedOutputStream* output) const; // Like SerializeToCodedStream(), but allows missing required fields. bool SerializePartialToCodedStream(io::CodedOutputStream* output) const; @@ -436,7 +435,7 @@ class PROTOBUF_EXPORT MessageLite { // internal memory). This method is used in proto's implementation for // swapping, moving and setting allocated, for deciding whether the ownership // of this message or its internal memory could be changed. - Arena* GetOwningArena() const { return _internal_metadata_.owning_arena(); } + Arena* GetOwningArena() const { return _internal_metadata_.arena(); } // Returns the arena, used for allocating internal objects(e.g., child // messages, etc), or owning incoming objects (e.g., set allocated). diff --git a/src/google/protobuf/message_unittest.inc b/src/google/protobuf/message_unittest.inc index 6ee6b8b6ebd53..c3a7eeaecdf57 100644 --- a/src/google/protobuf/message_unittest.inc +++ b/src/google/protobuf/message_unittest.inc @@ -1270,7 +1270,7 @@ TEST(MESSAGE_TEST_NAME, TestEnumParsers) { continue; } SCOPED_TRACE(value_desc->number()); - GOOGLE_CHECK_NE(value_desc->number(), kInvalidValue) + GOOGLE_ABSL_CHECK_NE(value_desc->number(), kInvalidValue) << "Invalid value is a real label."; auto encoded = EncodeEnumValue(field->number(), value_desc->number(), @@ -1416,13 +1416,13 @@ class TestInputStream final : public io::ZeroCopyInputStream { return true; } - void BackUp(int) override { GOOGLE_CHECK(false); } + void BackUp(int) override { GOOGLE_ABSL_CHECK(false); } bool Skip(int) override { - GOOGLE_CHECK(false); + GOOGLE_ABSL_CHECK(false); return false; } int64_t ByteCount() const override { - GOOGLE_CHECK(false); + GOOGLE_ABSL_CHECK(false); return 0; } diff --git a/src/google/protobuf/metadata_lite.h b/src/google/protobuf/metadata_lite.h index cb75e57e07b04..66c944086124e 100644 --- a/src/google/protobuf/metadata_lite.h +++ b/src/google/protobuf/metadata_lite.h @@ -95,10 +95,6 @@ class PROTOBUF_EXPORT InternalMetadata { } } - PROTOBUF_NDEBUG_INLINE Arena* owning_arena() const { return arena(); } - - PROTOBUF_NDEBUG_INLINE Arena* user_arena() const { return arena(); } - PROTOBUF_NDEBUG_INLINE Arena* arena() const { if (PROTOBUF_PREDICT_FALSE(have_unknown_fields())) { return PtrValue()->arena; diff --git a/src/google/protobuf/no_field_presence_test.cc b/src/google/protobuf/no_field_presence_test.cc index a02cd926018d9..067f4082db84b 100644 --- a/src/google/protobuf/no_field_presence_test.cc +++ b/src/google/protobuf/no_field_presence_test.cc @@ -392,9 +392,9 @@ TEST(NoFieldPresenceTest, HasFieldOneofsTest) { desc->FindFieldByName("oneof_nested_message"); const FieldDescriptor* desc_oneof_string = desc->FindFieldByName("oneof_string"); - GOOGLE_CHECK(desc_oneof_uint32 != nullptr); - GOOGLE_CHECK(desc_oneof_nested_message != nullptr); - GOOGLE_CHECK(desc_oneof_string != nullptr); + GOOGLE_ABSL_CHECK(desc_oneof_uint32 != nullptr); + GOOGLE_ABSL_CHECK(desc_oneof_nested_message != nullptr); + GOOGLE_ABSL_CHECK(desc_oneof_string != nullptr); EXPECT_EQ(false, r->HasField(message, desc_oneof_uint32)); EXPECT_EQ(false, r->HasField(message, desc_oneof_nested_message)); @@ -500,7 +500,7 @@ TEST(NoFieldPresenceTest, LazyMessageFieldHasBit) { const Reflection* r = message.GetReflection(); const Descriptor* desc = message.GetDescriptor(); const FieldDescriptor* field = desc->FindFieldByName("optional_lazy_message"); - GOOGLE_CHECK(field != nullptr); + GOOGLE_ABSL_CHECK(field != nullptr); EXPECT_EQ(false, message.has_optional_lazy_message()); EXPECT_EQ(false, r->HasField(message, field)); diff --git a/src/google/protobuf/parse_context.cc b/src/google/protobuf/parse_context.cc index 9e591ad91da65..393d0884d7b0e 100644 --- a/src/google/protobuf/parse_context.cc +++ b/src/google/protobuf/parse_context.cc @@ -49,8 +49,8 @@ namespace { // Only call if at start of tag. bool ParseEndsInSlopRegion(const char* begin, int overrun, int depth) { constexpr int kSlopBytes = EpsCopyInputStream::kSlopBytes; - GOOGLE_DCHECK_GE(overrun, 0); - GOOGLE_DCHECK_LE(overrun, kSlopBytes); + GOOGLE_ABSL_DCHECK_GE(overrun, 0); + GOOGLE_ABSL_DCHECK_LE(overrun, kSlopBytes); auto ptr = begin + overrun; auto end = begin + kSlopBytes; while (ptr < end) { @@ -101,7 +101,7 @@ bool ParseEndsInSlopRegion(const char* begin, int overrun, int depth) { const char* EpsCopyInputStream::NextBuffer(int overrun, int depth) { if (next_chunk_ == nullptr) return nullptr; // We've reached end of stream. if (next_chunk_ != buffer_) { - GOOGLE_DCHECK(size_ > kSlopBytes); + GOOGLE_ABSL_DCHECK(size_ > kSlopBytes); // The chunk is large enough to be used directly buffer_end_ = next_chunk_ + size_ - kSlopBytes; auto res = next_chunk_; @@ -133,7 +133,7 @@ const char* EpsCopyInputStream::NextBuffer(int overrun, int depth) { if (aliasing_ >= kNoDelta) aliasing_ = kOnPatch; return buffer_; } - GOOGLE_DCHECK(size_ == 0) << size_; + GOOGLE_ABSL_DCHECK(size_ == 0) << size_; } overall_limit_ = 0; // Next failed, no more needs for next } @@ -154,7 +154,7 @@ const char* EpsCopyInputStream::NextBuffer(int overrun, int depth) { } const char* EpsCopyInputStream::Next() { - GOOGLE_DCHECK(limit_ > kSlopBytes); + GOOGLE_ABSL_DCHECK(limit_ > kSlopBytes); auto p = NextBuffer(0 /* immaterial */, -1); if (p == nullptr) { limit_end_ = buffer_end_; @@ -171,25 +171,25 @@ std::pair EpsCopyInputStream::DoneFallback(int overrun, int depth) { // Did we exceeded the limit (parse error). if (PROTOBUF_PREDICT_FALSE(overrun > limit_)) return {nullptr, true}; - GOOGLE_DCHECK(overrun != limit_); // Guaranteed by caller. - GOOGLE_DCHECK(overrun < limit_); // Follows from above + GOOGLE_ABSL_DCHECK(overrun != limit_); // Guaranteed by caller. + GOOGLE_ABSL_DCHECK(overrun < limit_); // Follows from above // TODO(gerbens) Instead of this dcheck we could just assign, and remove // updating the limit_end from PopLimit, ie. // limit_end_ = buffer_end_ + (std::min)(0, limit_); // if (ptr < limit_end_) return {ptr, false}; - GOOGLE_DCHECK(limit_end_ == buffer_end_ + (std::min)(0, limit_)); + GOOGLE_ABSL_DCHECK(limit_end_ == buffer_end_ + (std::min)(0, limit_)); // At this point we know the following assertion holds. - GOOGLE_DCHECK_GT(limit_, 0); - GOOGLE_DCHECK(limit_end_ == buffer_end_); // because limit_ > 0 + GOOGLE_ABSL_DCHECK_GT(limit_, 0); + GOOGLE_ABSL_DCHECK(limit_end_ == buffer_end_); // because limit_ > 0 const char* p; do { // We are past the end of buffer_end_, in the slop region. - GOOGLE_DCHECK_GE(overrun, 0); + GOOGLE_ABSL_DCHECK_GE(overrun, 0); p = NextBuffer(overrun, depth); if (p == nullptr) { // We are at the end of the stream if (PROTOBUF_PREDICT_FALSE(overrun != 0)) return {nullptr, true}; - GOOGLE_DCHECK_GT(limit_, 0); + GOOGLE_ABSL_DCHECK_GT(limit_, 0); limit_end_ = buffer_end_; // Distinguish ending on a pushed limit or ending on end-of-stream. SetEndOfStream(); @@ -280,7 +280,7 @@ const char* ParseContext::ParseMessage(MessageLite* msg, const char* ptr) { if (ptr == nullptr) return ptr; auto old_depth = depth_; ptr = msg->_InternalParse(ptr, this); - if (ptr != nullptr) GOOGLE_DCHECK_EQ(old_depth, depth_); + if (ptr != nullptr) GOOGLE_ABSL_DCHECK_EQ(old_depth, depth_); depth_++; if (!PopLimit(old)) return nullptr; return ptr; @@ -618,7 +618,7 @@ const char* UnknownFieldParse(uint32_t tag, std::string* unknown, // result = // num_bits = ValueBarrier(num_bits, result); // if (num_bits == 63) { -// GOOGLE_LOG(FATAL) << "Invalid num_bits value"; +// GOOGLE_ABSL_LOG(FATAL) << "Invalid num_bits value"; // } // ``` template @@ -638,7 +638,7 @@ PROTOBUF_ALWAYS_INLINE inline V1Type ValueBarrier(V1Type value1) { PROTOBUF_ALWAYS_INLINE inline uint64_t ExtractAndMergeTwoChunks( uint64_t data, uint64_t first_byte) { - GOOGLE_DCHECK_LE(first_byte, 6); + GOOGLE_ABSL_DCHECK_LE(first_byte, 6); uint64_t first = Ubfx7(data, first_byte * 8); uint64_t second = Ubfx7(data, (first_byte + 1) * 8); return ForceToRegister(first | (second << 7)); diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc index eb7e2a5fbdb27..1a05c4fd1bf7c 100644 --- a/src/google/protobuf/port_def.inc +++ b/src/google/protobuf/port_def.inc @@ -578,7 +578,7 @@ #endif // PROTOBUF_ASSUME(pred) tells the compiler that it can assume pred is true. To -// be safe, we also validate the assumption with a GOOGLE_DCHECK in unoptimized +// be safe, we also validate the assumption with a GOOGLE_ABSL_DCHECK in unoptimized // builds. The macro does not do anything useful if the compiler does not // support __builtin_assume. #ifdef PROTOBUF_ASSUME @@ -586,10 +586,10 @@ #endif #if __has_builtin(__builtin_assume) #define PROTOBUF_ASSUME(pred) \ - GOOGLE_DCHECK(pred); \ + GOOGLE_ABSL_DCHECK(pred); \ __builtin_assume(pred) #else -#define PROTOBUF_ASSUME(pred) GOOGLE_DCHECK(pred) +#define PROTOBUF_ASSUME(pred) GOOGLE_ABSL_DCHECK(pred) #endif // Specify memory alignment for structs, classes, etc. @@ -655,18 +655,6 @@ #error "endian detection failed for current compiler" #endif -// For enabling message owned arena, one major blocker is semantic change from -// moving to copying when there is ownership transfer (e.g., move ctor, swap, -// set allocated, release). This change not only causes performance regression -// but also breaks users code (e.g., dangling reference). For top-level -// messages, since it owns the arena, we can mitigate the issue by transferring -// ownership of arena. However, we cannot do that for nested messages. In order -// to tell how many usages of nested messages affected by message owned arena, -// we need to simulate the arena ownership. -// This experiment is purely for the purpose of gathering data. All code guarded -// by this flag is supposed to be removed after this experiment. -#define PROTOBUF_MESSAGE_OWNED_ARENA_EXPERIMENT - #ifdef PROTOBUF_CONSTINIT #error PROTOBUF_CONSTINIT was previously defined #endif @@ -1020,14 +1008,14 @@ static_assert(PROTOBUF_CLANG_MIN(5, 0), "Protobuf only supports Clang 6.0 and ne #define PROTOBUF_DEBUG false #endif -// This `for` allows us to condition the `GOOGLE_LOG` on the define above, so that +// This `for` allows us to condition the `GOOGLE_ABSL_LOG` on the define above, so that // code can write `PROTOBUF_DLOG(INFO) << ...;` and have it turned off when // debug logging is off. // // This is a `for`, not and `if`, to avoid it accidentally chaining with an // `else` below it. #define PROTOBUF_DLOG(x) \ - for (bool b = PROTOBUF_DEBUG; b; b = false) GOOGLE_LOG(x) + for (bool b = PROTOBUF_DEBUG; b; b = false) GOOGLE_ABSL_LOG(x) #define PROTO2_IS_OSS true diff --git a/src/google/protobuf/port_undef.inc b/src/google/protobuf/port_undef.inc index 217b49b642fa2..c52eb30a4ec0b 100644 --- a/src/google/protobuf/port_undef.inc +++ b/src/google/protobuf/port_undef.inc @@ -90,7 +90,6 @@ #undef PROTOBUF_THREAD_LOCAL #undef PROTOBUF_LITTLE_ENDIAN #undef PROTOBUF_BIG_ENDIAN -#undef PROTOBUF_MESSAGE_OWNED_ARENA_EXPERIMENT #undef PROTOBUF_CONSTINIT #undef PROTOBUF_CONSTEXPR #undef PROTOBUF_ATTRIBUTE_WEAK diff --git a/src/google/protobuf/proto3_arena_unittest.cc b/src/google/protobuf/proto3_arena_unittest.cc index 1d7273406c928..a79dfb6867361 100644 --- a/src/google/protobuf/proto3_arena_unittest.cc +++ b/src/google/protobuf/proto3_arena_unittest.cc @@ -314,8 +314,8 @@ TEST(Proto3OptionalTest, Extensions) { "protobuf_unittest.Proto3OptionalExtensions.ext_no_optional"); const FieldDescriptor* with_optional = p->FindExtensionByName( "protobuf_unittest.Proto3OptionalExtensions.ext_with_optional"); - GOOGLE_CHECK(no_optional); - GOOGLE_CHECK(with_optional); + GOOGLE_ABSL_CHECK(no_optional); + GOOGLE_ABSL_CHECK(with_optional); EXPECT_FALSE(no_optional->has_optional_keyword()); EXPECT_TRUE(with_optional->has_optional_keyword()); @@ -363,8 +363,8 @@ TEST(Proto3OptionalTest, OptionalFieldReflection) { const google::protobuf::Reflection* r = msg.GetReflection(); const google::protobuf::FieldDescriptor* f = d->FindFieldByName("optional_int32"); const google::protobuf::OneofDescriptor* o = d->FindOneofByName("_optional_int32"); - GOOGLE_CHECK(f); - GOOGLE_CHECK(o); + GOOGLE_ABSL_CHECK(f); + GOOGLE_ABSL_CHECK(o); EXPECT_TRUE(o->is_synthetic()); EXPECT_FALSE(r->HasField(msg, f)); diff --git a/src/google/protobuf/reflection_internal.h b/src/google/protobuf/reflection_internal.h index 5e2cfa07eb931..99e9c30633aa2 100644 --- a/src/google/protobuf/reflection_internal.h +++ b/src/google/protobuf/reflection_internal.h @@ -234,7 +234,7 @@ class MapFieldAccessor final : public RandomAccessRepeatedFieldAccessor { } void Swap(Field* data, const internal::RepeatedFieldAccessor* other_mutator, Field* other_data) const override { - GOOGLE_CHECK(this == other_mutator); + GOOGLE_ABSL_CHECK(this == other_mutator); MutableRepeatedField(data)->Swap(MutableRepeatedField(other_data)); } @@ -278,7 +278,7 @@ class RepeatedFieldPrimitiveAccessor final : public RepeatedFieldWrapper { // Currently RepeatedFieldPrimitiveAccessor is the only implementation of // RepeatedFieldAccessor for primitive types. As we are using singletons // for these accessors, here "other_mutator" must be "this". - GOOGLE_CHECK(this == other_mutator); + GOOGLE_ABSL_CHECK(this == other_mutator); MutableRepeatedField(data)->Swap(MutableRepeatedField(other_data)); } @@ -342,7 +342,7 @@ class RepeatedPtrFieldMessageAccessor final RepeatedPtrFieldMessageAccessor() {} void Swap(Field* data, const internal::RepeatedFieldAccessor* other_mutator, Field* other_data) const override { - GOOGLE_CHECK(this == other_mutator); + GOOGLE_ABSL_CHECK(this == other_mutator); MutableRepeatedField(data)->Swap(MutableRepeatedField(other_data)); } diff --git a/src/google/protobuf/reflection_ops.cc b/src/google/protobuf/reflection_ops.cc index 56c2d40d40b22..67b12f6ba5d59 100644 --- a/src/google/protobuf/reflection_ops.cc +++ b/src/google/protobuf/reflection_ops.cc @@ -36,6 +36,7 @@ #include #include +#include "google/protobuf/stubs/logging.h" #include "google/protobuf/stubs/logging.h" #include "absl/strings/str_cat.h" #include "google/protobuf/descriptor.h" @@ -57,7 +58,8 @@ static const Reflection* GetReflectionOrDie(const Message& m) { const Descriptor* d = m.GetDescriptor(); const std::string& mtype = d ? d->name() : "unknown"; // RawMessage is one known type for which GetReflection() returns nullptr. - GOOGLE_LOG(FATAL) << "Message does not support reflection (type " << mtype << ")."; + GOOGLE_ABSL_LOG(FATAL) << "Message does not support reflection (type " << mtype + << ")."; } return r; } @@ -69,10 +71,10 @@ void ReflectionOps::Copy(const Message& from, Message* to) { } void ReflectionOps::Merge(const Message& from, Message* to) { - GOOGLE_CHECK_NE(&from, to); + GOOGLE_ABSL_CHECK_NE(&from, to); const Descriptor* descriptor = from.GetDescriptor(); - GOOGLE_CHECK_EQ(to->GetDescriptor(), descriptor) + GOOGLE_ABSL_CHECK_EQ(to->GetDescriptor(), descriptor) << "Tried to merge messages of different types " << "(merge " << descriptor->full_name() << " to " << to->GetDescriptor()->full_name() << ")"; @@ -197,7 +199,7 @@ bool ReflectionOps::IsInitialized(const Message& message, bool check_fields, if (const int field_count = descriptor->field_count()) { const FieldDescriptor* begin = descriptor->field(0); const FieldDescriptor* end = begin + field_count; - GOOGLE_DCHECK_EQ(descriptor->field(field_count - 1), end - 1); + GOOGLE_ABSL_DCHECK_EQ(descriptor->field(field_count - 1), end - 1); if (check_fields) { // Check required fields of this message. @@ -425,10 +427,10 @@ void ReflectionOps::FindInitializationErrors(const Message& message, void GenericSwap(Message* lhs, Message* rhs) { #ifndef PROTOBUF_FORCE_COPY_IN_SWAP - GOOGLE_DCHECK(Arena::InternalGetOwningArena(lhs) != - Arena::InternalGetOwningArena(rhs)); - GOOGLE_DCHECK(Arena::InternalGetOwningArena(lhs) != nullptr || - Arena::InternalGetOwningArena(rhs) != nullptr); + GOOGLE_ABSL_DCHECK(Arena::InternalGetOwningArena(lhs) != + Arena::InternalGetOwningArena(rhs)); + GOOGLE_ABSL_DCHECK(Arena::InternalGetOwningArena(lhs) != nullptr || + Arena::InternalGetOwningArena(rhs) != nullptr); #endif // !PROTOBUF_FORCE_COPY_IN_SWAP // At least one of these must have an arena, so make `rhs` point to it. Arena* arena = Arena::InternalGetOwningArena(rhs); diff --git a/src/google/protobuf/reflection_ops_unittest.cc b/src/google/protobuf/reflection_ops_unittest.cc index 57ca1da29eb71..5500a01cd1dac 100644 --- a/src/google/protobuf/reflection_ops_unittest.cc +++ b/src/google/protobuf/reflection_ops_unittest.cc @@ -34,7 +34,6 @@ #include "google/protobuf/reflection_ops.h" -#include "google/protobuf/stubs/logging.h" #include "google/protobuf/descriptor.h" #include #include "absl/strings/str_join.h" diff --git a/src/google/protobuf/reflection_tester.cc b/src/google/protobuf/reflection_tester.cc index 23084dc275bea..ca80445014237 100644 --- a/src/google/protobuf/reflection_tester.cc +++ b/src/google/protobuf/reflection_tester.cc @@ -193,7 +193,7 @@ MapReflectionTester::MapReflectionTester(const Descriptor* base_descriptor) map_int32_foreign_message_key_, map_int32_foreign_message_val_}; for (const FieldDescriptor* fdesc : all_map_descriptors) { - GOOGLE_CHECK(fdesc->containing_type() != nullptr) << fdesc->name(); + GOOGLE_ABSL_CHECK(fdesc->containing_type() != nullptr) << fdesc->name(); if (fdesc->name() == "key") { EXPECT_EQ(fdesc->containing_type()->map_key(), fdesc); } else { @@ -207,7 +207,7 @@ MapReflectionTester::MapReflectionTester(const Descriptor* base_descriptor) const FieldDescriptor* MapReflectionTester::F(const std::string& name) { const FieldDescriptor* result = nullptr; result = base_descriptor_->FindFieldByName(name); - GOOGLE_CHECK(result != nullptr); + GOOGLE_ABSL_CHECK(result != nullptr); return result; } diff --git a/src/google/protobuf/repeated_field.cc b/src/google/protobuf/repeated_field.cc index 6c22620cb402f..44513c7fe9c32 100644 --- a/src/google/protobuf/repeated_field.cc +++ b/src/google/protobuf/repeated_field.cc @@ -37,6 +37,7 @@ #include #include +#include "google/protobuf/stubs/logging.h" #include "google/protobuf/stubs/logging.h" #include "absl/strings/cord.h" diff --git a/src/google/protobuf/repeated_field.h b/src/google/protobuf/repeated_field.h index d08628a7b83cb..2f46f2b46e6a7 100644 --- a/src/google/protobuf/repeated_field.h +++ b/src/google/protobuf/repeated_field.h @@ -52,9 +52,9 @@ #include #include -#include "google/protobuf/stubs/logging.h" #include "google/protobuf/arena.h" #include "google/protobuf/port.h" +#include "google/protobuf/stubs/logging.h" #include "google/protobuf/message_lite.h" #include "google/protobuf/port.h" #include "google/protobuf/repeated_ptr_field.h" @@ -308,7 +308,7 @@ class RepeatedField final { // Swaps entire contents with "other". Should be called only if the caller can // guarantee that both repeated fields are on the same arena or are on the // heap. Swapping between different arenas is disallowed and caught by a - // GOOGLE_DCHECK (see API docs for details). + // GOOGLE_ABSL_DCHECK (see API docs for details). void UnsafeArenaSwap(RepeatedField* other); static constexpr int kInitialSize = 0; @@ -355,7 +355,7 @@ class RepeatedField final { // Returns a pointer to elements array. // pre-condition: the array must have been allocated. Element* elements() const { - GOOGLE_DCHECK_GT(total_size_, 0); + GOOGLE_ABSL_DCHECK_GT(total_size_, 0); // Because of above pre-condition this cast is safe. return unsafe_elements(); } @@ -614,19 +614,19 @@ inline int RepeatedField::Capacity() const { template inline void RepeatedField::AddAlreadyReserved(const Element& value) { - GOOGLE_DCHECK_LT(current_size_, total_size_); + GOOGLE_ABSL_DCHECK_LT(current_size_, total_size_); elements()[ExchangeCurrentSize(current_size_ + 1)] = value; } template inline Element* RepeatedField::AddAlreadyReserved() { - GOOGLE_DCHECK_LT(current_size_, total_size_); + GOOGLE_ABSL_DCHECK_LT(current_size_, total_size_); return &elements()[ExchangeCurrentSize(current_size_ + 1)]; } template inline Element* RepeatedField::AddNAlreadyReserved(int elements) { - GOOGLE_DCHECK_GE(total_size_ - current_size_, elements) + GOOGLE_ABSL_DCHECK_GE(total_size_ - current_size_, elements) << total_size_ << ", " << current_size_; // Warning: sometimes people call this when elements == 0 and // total_size_ == 0. In this case the return pointer points to a zero size @@ -637,7 +637,7 @@ inline Element* RepeatedField::AddNAlreadyReserved(int elements) { template inline void RepeatedField::Resize(int new_size, const Element& value) { - GOOGLE_DCHECK_GE(new_size, 0); + GOOGLE_ABSL_DCHECK_GE(new_size, 0); if (new_size > current_size_) { Reserve(new_size); std::fill(&elements()[ExchangeCurrentSize(new_size)], &elements()[new_size], @@ -649,36 +649,36 @@ inline void RepeatedField::Resize(int new_size, const Element& value) { template inline const Element& RepeatedField::Get(int index) const { - GOOGLE_DCHECK_GE(index, 0); - GOOGLE_DCHECK_LT(index, current_size_); + GOOGLE_ABSL_DCHECK_GE(index, 0); + GOOGLE_ABSL_DCHECK_LT(index, current_size_); return elements()[index]; } template inline const Element& RepeatedField::at(int index) const { - GOOGLE_CHECK_GE(index, 0); - GOOGLE_CHECK_LT(index, current_size_); + GOOGLE_ABSL_CHECK_GE(index, 0); + GOOGLE_ABSL_CHECK_LT(index, current_size_); return elements()[index]; } template inline Element& RepeatedField::at(int index) { - GOOGLE_CHECK_GE(index, 0); - GOOGLE_CHECK_LT(index, current_size_); + GOOGLE_ABSL_CHECK_GE(index, 0); + GOOGLE_ABSL_CHECK_LT(index, current_size_); return elements()[index]; } template inline Element* RepeatedField::Mutable(int index) { - GOOGLE_DCHECK_GE(index, 0); - GOOGLE_DCHECK_LT(index, current_size_); + GOOGLE_ABSL_DCHECK_GE(index, 0); + GOOGLE_ABSL_DCHECK_LT(index, current_size_); return &elements()[index]; } template inline void RepeatedField::Set(int index, const Element& value) { - GOOGLE_DCHECK_GE(index, 0); - GOOGLE_DCHECK_LT(index, current_size_); + GOOGLE_ABSL_DCHECK_GE(index, 0); + GOOGLE_ABSL_DCHECK_LT(index, current_size_); elements()[index] = value; } @@ -727,16 +727,16 @@ inline void RepeatedField::Add(Iter begin, Iter end) { template inline void RepeatedField::RemoveLast() { - GOOGLE_DCHECK_GT(current_size_, 0); + GOOGLE_ABSL_DCHECK_GT(current_size_, 0); ExchangeCurrentSize(current_size_ - 1); } template void RepeatedField::ExtractSubrange(int start, int num, Element* elements) { - GOOGLE_DCHECK_GE(start, 0); - GOOGLE_DCHECK_GE(num, 0); - GOOGLE_DCHECK_LE(start + num, this->current_size_); + GOOGLE_ABSL_DCHECK_GE(start, 0); + GOOGLE_ABSL_DCHECK_GE(num, 0); + GOOGLE_ABSL_DCHECK_LE(start + num, this->current_size_); // Save the values of the removed elements if requested. if (elements != nullptr) { @@ -758,7 +758,7 @@ inline void RepeatedField::Clear() { template inline void RepeatedField::MergeFrom(const RepeatedField& other) { - GOOGLE_DCHECK_NE(&other, this); + GOOGLE_ABSL_DCHECK_NE(&other, this); if (other.current_size_ != 0) { int existing_size = size(); Reserve(existing_size + other.size()); @@ -809,7 +809,7 @@ inline const Element* RepeatedField::data() const { template inline void RepeatedField::InternalSwap(RepeatedField* other) { - GOOGLE_DCHECK(this != other); + GOOGLE_ABSL_DCHECK(this != other); // Swap all fields at once. static_assert(std::is_standard_layout>::value, @@ -842,7 +842,7 @@ void RepeatedField::Swap(RepeatedField* other) { template void RepeatedField::UnsafeArenaSwap(RepeatedField* other) { if (this == other) return; - GOOGLE_DCHECK_EQ(GetOwningArena(), other->GetOwningArena()); + GOOGLE_ABSL_DCHECK_EQ(GetOwningArena(), other->GetOwningArena()); InternalSwap(other); } @@ -928,7 +928,7 @@ void RepeatedField::Reserve(int new_size) { new_size = internal::CalculateReserveSize( total_size_, new_size); - GOOGLE_DCHECK_LE( + GOOGLE_ABSL_DCHECK_LE( static_cast(new_size), (std::numeric_limits::max() - kRepHeaderSize) / sizeof(Element)) << "Requested size is too large to fit into size_t."; @@ -972,7 +972,7 @@ void RepeatedField::Reserve(int new_size) { template inline void RepeatedField::Truncate(int new_size) { - GOOGLE_DCHECK_LE(new_size, current_size_); + GOOGLE_ABSL_DCHECK_LE(new_size, current_size_); if (current_size_ > 0) { ExchangeCurrentSize(new_size); } diff --git a/src/google/protobuf/repeated_field_reflection_unittest.cc b/src/google/protobuf/repeated_field_reflection_unittest.cc index f86ac0b144444..19970d69e99a7 100644 --- a/src/google/protobuf/repeated_field_reflection_unittest.cc +++ b/src/google/protobuf/repeated_field_reflection_unittest.cc @@ -166,7 +166,7 @@ TEST(RepeatedFieldReflectionTest, ExtensionFields) { const FieldDescriptor* fd_repeated_int64_extension = desc->file()->FindExtensionByName("repeated_int64_extension"); - GOOGLE_CHECK(fd_repeated_int64_extension != nullptr); + GOOGLE_ABSL_CHECK(fd_repeated_int64_extension != nullptr); const RepeatedField& rf_int64_extension = refl->GetRepeatedField(extended_message, @@ -539,7 +539,7 @@ TEST(RepeatedFieldReflectionTest, RepeatedFieldRefForExtensionFields) { const FieldDescriptor* fd_repeated_int64_extension = desc->file()->FindExtensionByName("repeated_int64_extension"); - GOOGLE_CHECK(fd_repeated_int64_extension != nullptr); + GOOGLE_ABSL_CHECK(fd_repeated_int64_extension != nullptr); const RepeatedFieldRef rf_int64_extension = refl->GetRepeatedFieldRef(extended_message, diff --git a/src/google/protobuf/repeated_field_unittest.cc b/src/google/protobuf/repeated_field_unittest.cc index 50429c2d3ef13..dd80e071afcd7 100644 --- a/src/google/protobuf/repeated_field_unittest.cc +++ b/src/google/protobuf/repeated_field_unittest.cc @@ -47,9 +47,9 @@ #include #include -#include "google/protobuf/stubs/logging.h" #include #include +#include "google/protobuf/stubs/logging.h" #include "absl/numeric/bits.h" #include "absl/strings/cord.h" #include "absl/strings/str_cat.h" @@ -195,7 +195,7 @@ TEST(RepeatedField, ArenaAllocationSizesMatchExpectedValues) { // This is important to avoid a branch in the reallocation path. // This is also important because allocating anything less would be wasting // memory. - // If the allocation size is wrong, ReturnArrayMemory will GOOGLE_DCHECK. + // If the allocation size is wrong, ReturnArrayMemory will GOOGLE_ABSL_DCHECK. CheckAllocationSizes>(false); CheckAllocationSizes>(false); CheckAllocationSizes>(false); @@ -2143,7 +2143,7 @@ TEST_F(RepeatedPtrFieldPtrsIteratorTest, PtrSTLAlgorithms_lower_bound) { std::lower_bound(proto_array_.pointer_begin(), proto_array_.pointer_end(), &v, StringLessThan()); - GOOGLE_CHECK(*it != nullptr); + GOOGLE_ABSL_CHECK(*it != nullptr); EXPECT_EQ(**it, "n"); EXPECT_TRUE(it == proto_array_.pointer_begin() + 3); @@ -2154,7 +2154,7 @@ TEST_F(RepeatedPtrFieldPtrsIteratorTest, PtrSTLAlgorithms_lower_bound) { const_proto_array_->pointer_begin(), const_proto_array_->pointer_end(), &v, StringLessThan()); - GOOGLE_CHECK(*it != nullptr); + GOOGLE_ABSL_CHECK(*it != nullptr); EXPECT_EQ(**it, "n"); EXPECT_TRUE(it == const_proto_array_->pointer_begin() + 3); diff --git a/src/google/protobuf/repeated_ptr_field.cc b/src/google/protobuf/repeated_ptr_field.cc index f4d8a137cd703..025b0875773b2 100644 --- a/src/google/protobuf/repeated_ptr_field.cc +++ b/src/google/protobuf/repeated_ptr_field.cc @@ -36,8 +36,8 @@ #include "google/protobuf/stubs/logging.h" #include "google/protobuf/implicit_weak_message.h" -#include "google/protobuf/repeated_field.h" #include "google/protobuf/port.h" +#include "google/protobuf/repeated_field.h" // Must be included last. #include "google/protobuf/port_def.inc" @@ -58,10 +58,10 @@ void** RepeatedPtrFieldBase::InternalExtend(int extend_amount) { Arena* arena = GetOwningArena(); new_size = internal::CalculateReserveSize(total_size_, new_size); - GOOGLE_CHECK_LE(static_cast(new_size), - static_cast( - (std::numeric_limits::max() - kRepHeaderSize) / - sizeof(old_rep->elements[0]))) + GOOGLE_ABSL_CHECK_LE(static_cast(new_size), + static_cast( + (std::numeric_limits::max() - kRepHeaderSize) / + sizeof(old_rep->elements[0]))) << "Requested size is too large to fit into size_t."; size_t bytes = kRepHeaderSize + sizeof(old_rep->elements[0]) * new_size; if (arena == nullptr) { @@ -98,8 +98,8 @@ void RepeatedPtrFieldBase::Reserve(int new_size) { } void RepeatedPtrFieldBase::DestroyProtos() { - GOOGLE_DCHECK(rep_); - GOOGLE_DCHECK(arena_ == nullptr); + GOOGLE_ABSL_DCHECK(rep_); + GOOGLE_ABSL_DCHECK(arena_ == nullptr); int n = rep_->allocated_size; void* const* elements = rep_->elements; for (int i = 0; i < n; i++) { diff --git a/src/google/protobuf/repeated_ptr_field.h b/src/google/protobuf/repeated_ptr_field.h index 886cf40b05d15..0d82a8e516e21 100644 --- a/src/google/protobuf/repeated_ptr_field.h +++ b/src/google/protobuf/repeated_ptr_field.h @@ -58,9 +58,9 @@ #include #include -#include "google/protobuf/stubs/logging.h" #include "google/protobuf/arena.h" #include "google/protobuf/port.h" +#include "google/protobuf/stubs/logging.h" #include "google/protobuf/message_lite.h" #include "google/protobuf/port.h" @@ -187,22 +187,22 @@ class PROTOBUF_EXPORT RepeatedPtrFieldBase { template const typename TypeHandler::Type& at(int index) const { - GOOGLE_CHECK_GE(index, 0); - GOOGLE_CHECK_LT(index, current_size_); + GOOGLE_ABSL_CHECK_GE(index, 0); + GOOGLE_ABSL_CHECK_LT(index, current_size_); return *cast(rep_->elements[index]); } template typename TypeHandler::Type& at(int index) { - GOOGLE_CHECK_GE(index, 0); - GOOGLE_CHECK_LT(index, current_size_); + GOOGLE_ABSL_CHECK_GE(index, 0); + GOOGLE_ABSL_CHECK_LT(index, current_size_); return *cast(rep_->elements[index]); } template typename TypeHandler::Type* Mutable(int index) { - GOOGLE_DCHECK_GE(index, 0); - GOOGLE_DCHECK_LT(index, current_size_); + GOOGLE_ABSL_DCHECK_GE(index, 0); + GOOGLE_ABSL_DCHECK_LT(index, current_size_); return cast(rep_->elements[index]); } @@ -240,8 +240,8 @@ class PROTOBUF_EXPORT RepeatedPtrFieldBase { template void Delete(int index) { - GOOGLE_DCHECK_GE(index, 0); - GOOGLE_DCHECK_LT(index, current_size_); + GOOGLE_ABSL_DCHECK_GE(index, 0); + GOOGLE_ABSL_DCHECK_LT(index, current_size_); TypeHandler::Delete(cast(rep_->elements[index]), arena_); } @@ -270,8 +270,8 @@ class PROTOBUF_EXPORT RepeatedPtrFieldBase { template const typename TypeHandler::Type& Get(int index) const { - GOOGLE_DCHECK_GE(index, 0); - GOOGLE_DCHECK_LT(index, current_size_); + GOOGLE_ABSL_DCHECK_GE(index, 0); + GOOGLE_ABSL_DCHECK_LT(index, current_size_); return *cast(rep_->elements[index]); } @@ -284,7 +284,7 @@ class PROTOBUF_EXPORT RepeatedPtrFieldBase { template void Clear() { const int n = current_size_; - GOOGLE_DCHECK_GE(n, 0); + GOOGLE_ABSL_DCHECK_GE(n, 0); if (n > 0) { ClearNonEmpty(); } @@ -298,14 +298,14 @@ class PROTOBUF_EXPORT RepeatedPtrFieldBase { // binary. This calls a shared implementation with most of the logic, // passing a function pointer to another type-specific piece of code that // calls the object-allocate and merge handlers. - GOOGLE_DCHECK_NE(&other, this); + GOOGLE_ABSL_DCHECK_NE(&other, this); if (other.current_size_ == 0) return; MergeFromInternal(other, &RepeatedPtrFieldBase::MergeFromInnerLoop); } inline void InternalSwap(RepeatedPtrFieldBase* rhs) { - GOOGLE_DCHECK(this != rhs); + GOOGLE_ABSL_DCHECK(this != rhs); // Swap all fields at once. auto temp = std::make_tuple(rhs->arena_, rhs->current_size_, @@ -346,7 +346,7 @@ class PROTOBUF_EXPORT RepeatedPtrFieldBase { protected: template void RemoveLast() { - GOOGLE_DCHECK_GT(current_size_, 0); + GOOGLE_ABSL_DCHECK_GT(current_size_, 0); ExchangeCurrentSize(current_size_ - 1); TypeHandler::Clear(cast(rep_->elements[current_size_])); } @@ -481,7 +481,7 @@ class PROTOBUF_EXPORT RepeatedPtrFieldBase { // arena. template typename TypeHandler::Type* UnsafeArenaReleaseLast() { - GOOGLE_DCHECK_GT(current_size_, 0); + GOOGLE_ABSL_DCHECK_GT(current_size_, 0); ExchangeCurrentSize(current_size_ - 1); typename TypeHandler::Type* result = cast(rep_->elements[current_size_]); @@ -500,9 +500,10 @@ class PROTOBUF_EXPORT RepeatedPtrFieldBase { template void AddCleared(typename TypeHandler::Type* value) { - GOOGLE_DCHECK(GetOwningArena() == nullptr) << "AddCleared() can only be used on a " - "RepeatedPtrField not on an arena."; - GOOGLE_DCHECK(TypeHandler::GetOwningArena(value) == nullptr) + GOOGLE_ABSL_DCHECK(GetOwningArena() == nullptr) + << "AddCleared() can only be used on a " + "RepeatedPtrField not on an arena."; + GOOGLE_ABSL_DCHECK(TypeHandler::GetOwningArena(value) == nullptr) << "AddCleared() can only accept values not on an arena."; if (!rep_ || rep_->allocated_size == total_size_) { Reserve(total_size_ + 1); @@ -512,12 +513,11 @@ class PROTOBUF_EXPORT RepeatedPtrFieldBase { template PROTOBUF_NODISCARD typename TypeHandler::Type* ReleaseCleared() { - GOOGLE_DCHECK(GetOwningArena() == nullptr) + GOOGLE_ABSL_DCHECK(GetOwningArena() == nullptr) << "ReleaseCleared() can only be used on a RepeatedPtrField not on " << "an arena."; - GOOGLE_DCHECK(GetOwningArena() == nullptr); - GOOGLE_DCHECK(rep_ != nullptr); - GOOGLE_DCHECK_GT(rep_->allocated_size, current_size_); + GOOGLE_ABSL_DCHECK(rep_ != nullptr); + GOOGLE_ABSL_DCHECK_GT(rep_->allocated_size, current_size_); return cast(rep_->elements[--rep_->allocated_size]); } @@ -609,10 +609,10 @@ class PROTOBUF_EXPORT RepeatedPtrFieldBase { template typename TypeHandler::Type* ReleaseLastInternal(std::false_type) { // ReleaseLast() for types that *do not* implement merge/copy behavior -- - // this is the same as UnsafeArenaReleaseLast(). Note that we GOOGLE_DCHECK-fail if - // we're on an arena, since the user really should implement the copy - // operation in this case. - GOOGLE_DCHECK(GetOwningArena() == nullptr) + // this is the same as UnsafeArenaReleaseLast(). Note that we + // GOOGLE_ABSL_DCHECK-fail if we're on an arena, since the user really should + // implement the copy operation in this case. + GOOGLE_ABSL_DCHECK(GetOwningArena() == nullptr) << "ReleaseLast() called on a RepeatedPtrField that is on an arena, " << "with a type that does not implement MergeFrom. This is unsafe; " << "please implement MergeFrom for your type."; @@ -622,10 +622,10 @@ class PROTOBUF_EXPORT RepeatedPtrFieldBase { template PROTOBUF_NOINLINE void SwapFallback(RepeatedPtrFieldBase* other) { #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - GOOGLE_DCHECK(GetOwningArena() == nullptr || - other->GetOwningArena() != GetOwningArena()); + GOOGLE_ABSL_DCHECK(GetOwningArena() == nullptr || + other->GetOwningArena() != GetOwningArena()); #else // PROTOBUF_FORCE_COPY_IN_SWAP - GOOGLE_DCHECK(other->GetOwningArena() != GetOwningArena()); + GOOGLE_ABSL_DCHECK(other->GetOwningArena() != GetOwningArena()); #endif // !PROTOBUF_FORCE_COPY_IN_SWAP // Copy semantics in this case. We try to improve efficiency by placing the @@ -699,8 +699,9 @@ class PROTOBUF_EXPORT RepeatedPtrFieldBase { const int n = current_size_; void* const* elements = rep_->elements; int i = 0; - GOOGLE_DCHECK_GT(n, - 0); // do/while loop to avoid initial test because we know n > 0 + GOOGLE_ABSL_DCHECK_GT( + n, + 0); // do/while loop to avoid initial test because we know n > 0 do { TypeHandler::Clear(cast(elements[i++])); } while (i < n); @@ -996,7 +997,7 @@ class RepeatedPtrField final : private internal::RepeatedPtrFieldBase { // Swaps entire contents with "other". Caller should guarantee that either // both fields are on the same arena or both are on the heap. Swapping between // different arenas with this function is disallowed and is caught via - // GOOGLE_DCHECK. + // GOOGLE_ABSL_DCHECK. void UnsafeArenaSwap(RepeatedPtrField* other); // Swaps two elements. @@ -1137,14 +1138,14 @@ class RepeatedPtrField final : private internal::RepeatedPtrFieldBase { // this method. // // This method cannot be called when either the repeated field or |value| is - // on an arena; both cases will trigger a GOOGLE_DCHECK-failure. + // on an arena; both cases will trigger a GOOGLE_ABSL_DCHECK-failure. void AddCleared(Element* value); // Removes and returns a single element from the cleared pool, passing // ownership to the caller. The element is guaranteed to be cleared. // Requires: ClearedCount() > 0 // // This method cannot be called when the repeated field is on an arena; doing - // so will trigger a GOOGLE_DCHECK-failure. + // so will trigger a GOOGLE_ABSL_DCHECK-failure. PROTOBUF_NODISCARD Element* ReleaseCleared(); #endif // !PROTOBUF_FUTURE_REMOVE_CLEARED_API @@ -1353,9 +1354,9 @@ inline void RepeatedPtrField::RemoveLast() { template inline void RepeatedPtrField::DeleteSubrange(int start, int num) { - GOOGLE_DCHECK_GE(start, 0); - GOOGLE_DCHECK_GE(num, 0); - GOOGLE_DCHECK_LE(start + num, size()); + GOOGLE_ABSL_DCHECK_GE(start, 0); + GOOGLE_ABSL_DCHECK_GE(num, 0); + GOOGLE_ABSL_DCHECK_LE(start + num, size()); for (int i = 0; i < num; ++i) { RepeatedPtrFieldBase::Delete(start + i); } @@ -1375,13 +1376,13 @@ inline void RepeatedPtrField::ExtractSubrange(int start, int num, template inline void RepeatedPtrField::ExtractSubrangeInternal( int start, int num, Element** elements, std::true_type) { - GOOGLE_DCHECK_GE(start, 0); - GOOGLE_DCHECK_GE(num, 0); - GOOGLE_DCHECK_LE(start + num, size()); + GOOGLE_ABSL_DCHECK_GE(start, 0); + GOOGLE_ABSL_DCHECK_GE(num, 0); + GOOGLE_ABSL_DCHECK_LE(start + num, size()); if (num == 0) return; - GOOGLE_DCHECK_NE(elements, nullptr) + GOOGLE_ABSL_DCHECK_NE(elements, nullptr) << "Releasing elements without transferring ownership is an unsafe " "operation. Use UnsafeArenaExtractSubrange."; if (elements == nullptr) { @@ -1425,9 +1426,9 @@ inline void RepeatedPtrField::ExtractSubrangeInternal( int start, int num, Element** elements, std::false_type) { // This case is identical to UnsafeArenaExtractSubrange(). However, since // ExtractSubrange() must return heap-allocated objects by contract, and we - // cannot fulfill this contract if we are an on arena, we must GOOGLE_DCHECK() that - // we are not on an arena. - GOOGLE_DCHECK(GetOwningArena() == nullptr) + // cannot fulfill this contract if we are an on arena, we must GOOGLE_ABSL_DCHECK() + // that we are not on an arena. + GOOGLE_ABSL_DCHECK(GetOwningArena() == nullptr) << "ExtractSubrange() when arena is non-nullptr is only supported when " << "the Element type supplies a MergeFrom() operation to make copies."; UnsafeArenaExtractSubrange(start, num, elements); @@ -1436,9 +1437,9 @@ inline void RepeatedPtrField::ExtractSubrangeInternal( template inline void RepeatedPtrField::UnsafeArenaExtractSubrange( int start, int num, Element** elements) { - GOOGLE_DCHECK_GE(start, 0); - GOOGLE_DCHECK_GE(num, 0); - GOOGLE_DCHECK_LE(start + num, size()); + GOOGLE_ABSL_DCHECK_GE(start, 0); + GOOGLE_ABSL_DCHECK_GE(num, 0); + GOOGLE_ABSL_DCHECK_LE(start + num, size()); if (num > 0) { // Save the values of the removed elements if requested. @@ -1509,7 +1510,7 @@ template inline void RepeatedPtrField::UnsafeArenaSwap( RepeatedPtrField* other) { if (this == other) return; - GOOGLE_DCHECK_EQ(GetOwningArena(), other->GetOwningArena()); + GOOGLE_ABSL_DCHECK_EQ(GetOwningArena(), other->GetOwningArena()); RepeatedPtrFieldBase::InternalSwap(other); } diff --git a/src/google/protobuf/test_util.h b/src/google/protobuf/test_util.h index 5449ed67ef7dc..466d03b12a00a 100644 --- a/src/google/protobuf/test_util.h +++ b/src/google/protobuf/test_util.h @@ -185,7 +185,7 @@ inline const FieldDescriptor* TestUtil::ReflectionTester::F( } else { result = base_descriptor_->FindFieldByName(name); } - GOOGLE_CHECK(result != nullptr); + GOOGLE_ABSL_CHECK(result != nullptr); return result; } diff --git a/src/google/protobuf/test_util.inc b/src/google/protobuf/test_util.inc index 2b1dfe001f36a..df62d415c61c0 100644 --- a/src/google/protobuf/test_util.inc +++ b/src/google/protobuf/test_util.inc @@ -37,8 +37,8 @@ // within an enclosing namespace and requires header files to be included // out of this file. -#include "google/protobuf/stubs/logging.h" #include +#include "google/protobuf/stubs/logging.h" #include "google/protobuf/descriptor.h" #include "google/protobuf/message.h" @@ -1113,7 +1113,7 @@ inline void TestUtil::SetOneofFields(UNITTEST::TestAllExtensions* message) { inline void TestUtil::SetAllFieldsAndExtensions( UNITTEST::TestFieldOrderings* message) { - GOOGLE_CHECK(message); + GOOGLE_ABSL_CHECK(message); message->set_my_int(1); message->set_my_string("foo"); message->set_my_float(1.0); diff --git a/src/google/protobuf/test_util2.h b/src/google/protobuf/test_util2.h index 07a712c2f6234..8777286bf1d46 100644 --- a/src/google/protobuf/test_util2.h +++ b/src/google/protobuf/test_util2.h @@ -50,7 +50,7 @@ inline std::string TranslatePathToOpensource(absl::string_view google3_path) { constexpr absl::string_view net_proto2 = "net/proto2/"; constexpr absl::string_view third_party_protobuf = "third_party/protobuf/"; if (!absl::ConsumePrefix(&google3_path, net_proto2)) { - GOOGLE_CHECK(absl::ConsumePrefix(&google3_path, third_party_protobuf)) + GOOGLE_ABSL_CHECK(absl::ConsumePrefix(&google3_path, third_party_protobuf)) << google3_path; } @@ -93,7 +93,7 @@ class BoundedArrayInputStream : public io::ZeroCopyInputStream { ~BoundedArrayInputStream() override {} bool Next(const void** data, int* size) override { - GOOGLE_CHECK_LT(stream_.ByteCount(), bound_); + GOOGLE_ABSL_CHECK_LT(stream_.ByteCount(), bound_); return stream_.Next(data, size); } void BackUp(int count) override { stream_.BackUp(count); } diff --git a/src/google/protobuf/test_util_lite.cc b/src/google/protobuf/test_util_lite.cc index 9fb1886407c6b..a9eafdcaaa90f 100644 --- a/src/google/protobuf/test_util_lite.cc +++ b/src/google/protobuf/test_util_lite.cc @@ -34,7 +34,6 @@ #include "google/protobuf/test_util_lite.h" -#include "google/protobuf/stubs/logging.h" #include #include "absl/strings/string_view.h" diff --git a/src/google/protobuf/text_format.cc b/src/google/protobuf/text_format.cc index d6298c8c42486..16ac146aab79e 100644 --- a/src/google/protobuf/text_format.cc +++ b/src/google/protobuf/text_format.cc @@ -206,11 +206,11 @@ void CheckFieldIndex(const FieldDescriptor* field, int index) { } if (field->is_repeated() && index == -1) { - GOOGLE_LOG(DFATAL) << "Index must be in range of repeated field values. " - << "Field: " << field->name(); + GOOGLE_ABSL_LOG(DFATAL) << "Index must be in range of repeated field values. " + << "Field: " << field->name(); } else if (!field->is_repeated() && index != -1) { - GOOGLE_LOG(DFATAL) << "Index must be -1 for singular fields." - << "Field: " << field->name(); + GOOGLE_ABSL_LOG(DFATAL) << "Index must be -1 for singular fields." + << "Field: " << field->name(); } } @@ -346,7 +346,7 @@ class TextFormat::Parser::ParserImpl { // Parses the ASCII representation specified in input and saves the // information into the output pointer (a Message). Returns // false if an error occurs (an error will also be logged to - // GOOGLE_LOG(ERROR)). + // GOOGLE_ABSL_LOG(ERROR)). bool Parse(Message* output) { // Consume fields until we cannot do so anymore. while (true) { @@ -354,7 +354,7 @@ class TextFormat::Parser::ParserImpl { // Ensures recursion limit properly unwinded, but only for success // cases. This implicitly avoids the check when `Parse` returns false // via `DO(...)`. - GOOGLE_DCHECK(had_errors_ || recursion_limit_ == initial_recursion_limit_) + GOOGLE_ABSL_DCHECK(had_errors_ || recursion_limit_ == initial_recursion_limit_) << "Recursion limit at end of parse should be " << initial_recursion_limit_ << ", but was " << recursion_limit_ << ". Difference of " << initial_recursion_limit_ - recursion_limit_ @@ -381,12 +381,12 @@ class TextFormat::Parser::ParserImpl { had_errors_ = true; if (error_collector_ == nullptr) { if (line >= 0) { - GOOGLE_LOG(ERROR) << "Error parsing text-format " - << root_message_type_->full_name() << ": " << (line + 1) - << ":" << (col + 1) << ": " << message; + GOOGLE_ABSL_LOG(ERROR) << "Error parsing text-format " + << root_message_type_->full_name() << ": " << (line + 1) + << ":" << (col + 1) << ": " << message; } else { - GOOGLE_LOG(ERROR) << "Error parsing text-format " - << root_message_type_->full_name() << ": " << message; + GOOGLE_ABSL_LOG(ERROR) << "Error parsing text-format " + << root_message_type_->full_name() << ": " << message; } } else { error_collector_->AddError(line, col, message); @@ -396,12 +396,12 @@ class TextFormat::Parser::ParserImpl { void ReportWarning(int line, int col, const std::string& message) { if (error_collector_ == nullptr) { if (line >= 0) { - GOOGLE_LOG(WARNING) << "Warning parsing text-format " - << root_message_type_->full_name() << ": " << (line + 1) - << ":" << (col + 1) << ": " << message; + GOOGLE_ABSL_LOG(WARNING) << "Warning parsing text-format " + << root_message_type_->full_name() << ": " + << (line + 1) << ":" << (col + 1) << ": " << message; } else { - GOOGLE_LOG(WARNING) << "Warning parsing text-format " - << root_message_type_->full_name() << ": " << message; + GOOGLE_ABSL_LOG(WARNING) << "Warning parsing text-format " + << root_message_type_->full_name() << ": " << message; } } else { error_collector_->AddWarning(line, col, message); @@ -591,7 +591,8 @@ class TextFormat::Parser::ParserImpl { // Skips unknown or reserved fields. if (field == nullptr) { - GOOGLE_CHECK(allow_unknown_field_ || allow_unknown_extension_ || reserved_field); + GOOGLE_ABSL_CHECK(allow_unknown_field_ || allow_unknown_extension_ || + reserved_field); // Try to guess the type of this field. // If this field is not a message, there should be a ":" between the @@ -925,7 +926,7 @@ class TextFormat::Parser::ParserImpl { case FieldDescriptor::CPPTYPE_MESSAGE: { // We should never get here. Put here instead of a default // so that if new types are added, we get a nice compiler warning. - GOOGLE_LOG(FATAL) << "Reached an unintended state: CPPTYPE_MESSAGE"; + GOOGLE_ABSL_LOG(FATAL) << "Reached an unintended state: CPPTYPE_MESSAGE"; break; } } @@ -1429,7 +1430,7 @@ class TextFormat::Printer::TextGenerator // level is zero. void Outdent() override { if (indent_level_ == 0 || indent_level_ < initial_indent_level_) { - GOOGLE_LOG(DFATAL) << " Outdent() without matching Indent()."; + GOOGLE_ABSL_LOG(DFATAL) << " Outdent() without matching Indent()."; return; } @@ -1523,7 +1524,7 @@ class TextFormat::Printer::TextGenerator if (indent_level_ == 0) { return; } - GOOGLE_DCHECK(!failed_); + GOOGLE_ABSL_DCHECK(!failed_); int size = GetCurrentIndentationSize(); while (size > buffer_size_) { @@ -2102,7 +2103,7 @@ bool TextFormat::Printer::RegisterMessagePrinter( bool TextFormat::Printer::PrintToString(const Message& message, std::string* output) const { - GOOGLE_DCHECK(output) << "output specified is nullptr"; + GOOGLE_ABSL_DCHECK(output) << "output specified is nullptr"; output->clear(); io::StringOutputStream output_stream(output); @@ -2112,7 +2113,7 @@ bool TextFormat::Printer::PrintToString(const Message& message, bool TextFormat::Printer::PrintUnknownFieldsToString( const UnknownFieldSet& unknown_fields, std::string* output) const { - GOOGLE_DCHECK(output) << "output specified is nullptr"; + GOOGLE_ABSL_DCHECK(output) << "output specified is nullptr"; output->clear(); io::StringOutputStream output_stream(output); @@ -2195,8 +2196,8 @@ bool TextFormat::Printer::PrintAny(const Message& message, finder_ ? finder_->FindAnyType(message, url_prefix, full_type_name) : DefaultFinderFindAnyType(message, url_prefix, full_type_name); if (value_descriptor == nullptr) { - GOOGLE_LOG(WARNING) << "Can't print proto content: proto type " << type_url - << " not found"; + GOOGLE_ABSL_LOG(WARNING) << "Can't print proto content: proto type " << type_url + << " not found"; return false; } DynamicMessageFactory factory; @@ -2204,7 +2205,7 @@ bool TextFormat::Printer::PrintAny(const Message& message, factory.GetPrototype(value_descriptor)->New()); std::string serialized_value = reflection->GetString(message, value_field); if (!value_message->ParseFromString(serialized_value)) { - GOOGLE_LOG(WARNING) << type_url << ": failed to parse contents"; + GOOGLE_ABSL_LOG(WARNING) << type_url << ": failed to parse contents"; return false; } generator->PrintLiteral("["); @@ -2281,7 +2282,7 @@ void TextFormat::Printer::PrintFieldValueToString(const Message& message, const FieldDescriptor* field, int index, std::string* output) const { - GOOGLE_DCHECK(output) << "output specified is nullptr"; + GOOGLE_ABSL_DCHECK(output) << "output specified is nullptr"; output->clear(); io::StringOutputStream output_stream(output); @@ -2329,7 +2330,7 @@ class MapEntryMessageComparator { return first < second; } default: - GOOGLE_LOG(DFATAL) << "Invalid key for map field."; + GOOGLE_ABSL_LOG(DFATAL) << "Invalid key for map field."; return true; } } @@ -2400,7 +2401,7 @@ void MapFieldPrinterHelper::CopyKey(const MapKey& key, Message* message, case FieldDescriptor::CPPTYPE_FLOAT: case FieldDescriptor::CPPTYPE_ENUM: case FieldDescriptor::CPPTYPE_MESSAGE: - GOOGLE_LOG(ERROR) << "Not supported."; + GOOGLE_ABSL_LOG(ERROR) << "Not supported."; break; case FieldDescriptor::CPPTYPE_STRING: reflection->SetString(message, field_desc, key.GetStringValue()); @@ -2575,7 +2576,7 @@ void TextFormat::Printer::PrintFieldValue(const Message& message, const FieldDescriptor* field, int index, BaseTextGenerator* generator) const { - GOOGLE_DCHECK(field->is_repeated() || (index == -1)) + GOOGLE_ABSL_DCHECK(field->is_repeated() || (index == -1)) << "Index must be -1 for non-repeated fields"; const FastFieldValuePrinter* printer = GetFieldPrinter(field); @@ -2627,7 +2628,7 @@ void TextFormat::Printer::PrintFieldValue(const Message& message, if (field->type() == FieldDescriptor::TYPE_STRING) { printer->PrintString(*value_to_print, generator); } else { - GOOGLE_DCHECK_EQ(field->type(), FieldDescriptor::TYPE_BYTES); + GOOGLE_ABSL_DCHECK_EQ(field->type(), FieldDescriptor::TYPE_BYTES); printer->PrintBytes(*value_to_print, generator); } break; diff --git a/src/google/protobuf/text_format_unittest.cc b/src/google/protobuf/text_format_unittest.cc index 71dd756136a32..d85be9c4859f7 100644 --- a/src/google/protobuf/text_format_unittest.cc +++ b/src/google/protobuf/text_format_unittest.cc @@ -42,13 +42,13 @@ #include #include -#include "google/protobuf/stubs/logging.h" #include "google/protobuf/testing/file.h" #include "google/protobuf/testing/file.h" #include "google/protobuf/any.pb.h" #include #include "google/protobuf/testing/googletest.h" #include +#include "google/protobuf/stubs/logging.h" #include "absl/strings/escaping.h" #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" @@ -91,7 +91,7 @@ const std::string kEscapeTestStringEscaped = class TextFormatTest : public testing::Test { public: static void SetUpTestSuite() { - GOOGLE_CHECK_OK(File::GetContents( + GOOGLE_ABSL_CHECK_OK(File::GetContents( TestUtil::GetTestDataPath( "third_party/protobuf/" "testdata/text_format_unittest_data_oneof_implemented.txt"), @@ -113,7 +113,7 @@ std::string TextFormatTest::static_proto_text_format_; class TextFormatExtensionsTest : public testing::Test { public: static void SetUpTestSuite() { - GOOGLE_CHECK_OK(File::GetContents( + GOOGLE_ABSL_CHECK_OK(File::GetContents( TestUtil::GetTestDataPath("third_party/protobuf/testdata/" "text_format_unittest_extensions_data.txt"), &static_proto_text_format_, true)); diff --git a/src/google/protobuf/unknown_field_set.cc b/src/google/protobuf/unknown_field_set.cc index d9337bb1ad042..c155bca6210fc 100644 --- a/src/google/protobuf/unknown_field_set.cc +++ b/src/google/protobuf/unknown_field_set.cc @@ -61,7 +61,7 @@ const UnknownFieldSet& UnknownFieldSet::default_instance() { } void UnknownFieldSet::ClearFallback() { - GOOGLE_DCHECK(!fields_.empty()); + GOOGLE_ABSL_DCHECK(!fields_.empty()); int n = fields_.size(); do { (fields_)[--n].Delete(); @@ -289,7 +289,7 @@ void UnknownField::DeepCopy(const UnknownField& other) { uint8_t* UnknownField::InternalSerializeLengthDelimitedNoTag( uint8_t* target, io::EpsCopyOutputStream* stream) const { - GOOGLE_DCHECK_EQ(TYPE_LENGTH_DELIMITED, type()); + GOOGLE_ABSL_DCHECK_EQ(TYPE_LENGTH_DELIMITED, type()); const std::string& data = *data_.length_delimited_.string_value; target = io::CodedOutputStream::WriteVarint32ToArray(data.size(), target); target = stream->WriteRaw(data.data(), data.size(), target); diff --git a/src/google/protobuf/unknown_field_set.h b/src/google/protobuf/unknown_field_set.h index 85e51a577f110..e914e78b889e1 100644 --- a/src/google/protobuf/unknown_field_set.h +++ b/src/google/protobuf/unknown_field_set.h @@ -45,8 +45,8 @@ #include #include "google/protobuf/stubs/common.h" -#include "google/protobuf/stubs/logging.h" #include "google/protobuf/port.h" +#include "google/protobuf/stubs/logging.h" #include "google/protobuf/io/coded_stream.h" #include "google/protobuf/io/zero_copy_stream_impl_lite.h" #include "google/protobuf/message_lite.h" @@ -393,7 +393,7 @@ bool UnknownFieldSet::MergeFromMessage(const MessageType& message) { inline size_t UnknownField::GetLengthDelimitedSize() const { - GOOGLE_DCHECK_EQ(TYPE_LENGTH_DELIMITED, type()); + GOOGLE_ABSL_DCHECK_EQ(TYPE_LENGTH_DELIMITED, type()); return data_.length_delimited_.string_value->size(); } diff --git a/src/google/protobuf/unknown_field_set_unittest.cc b/src/google/protobuf/unknown_field_set_unittest.cc index 9401e568a8ff2..3a04b6b31e034 100644 --- a/src/google/protobuf/unknown_field_set_unittest.cc +++ b/src/google/protobuf/unknown_field_set_unittest.cc @@ -42,7 +42,6 @@ #include "google/protobuf/stubs/callback.h" #include "google/protobuf/stubs/common.h" -#include "google/protobuf/stubs/logging.h" #include #include "google/protobuf/testing/googletest.h" #include diff --git a/src/google/protobuf/wire_format.cc b/src/google/protobuf/wire_format.cc index 7dbbb99fef705..2a66968d4def8 100644 --- a/src/google/protobuf/wire_format.cc +++ b/src/google/protobuf/wire_format.cc @@ -38,6 +38,7 @@ #include #include +#include "google/protobuf/stubs/logging.h" #include "google/protobuf/stubs/logging.h" #include "absl/strings/cord.h" #include "google/protobuf/descriptor.h" @@ -401,7 +402,7 @@ bool WireFormat::ParseAndMergeMessageSetField(uint32_t field_number, field->type() != FieldDescriptor::TYPE_MESSAGE) { // This shouldn't happen as we only allow optional message extensions to // MessageSet. - GOOGLE_LOG(ERROR) << "Extensions of MessageSets must be optional messages."; + GOOGLE_ABSL_LOG(ERROR) << "Extensions of MessageSets must be optional messages."; return false; } else { Message* sub_message = message_reflection->MutableMessage( @@ -789,8 +790,8 @@ const char* WireFormat::_InternalParse(Message* msg, const char* ptr, internal::ParseContext* ctx) { const Descriptor* descriptor = msg->GetDescriptor(); const Reflection* reflection = msg->GetReflection(); - GOOGLE_DCHECK(descriptor); - GOOGLE_DCHECK(reflection); + GOOGLE_ABSL_DCHECK(descriptor); + GOOGLE_ABSL_DCHECK(reflection); if (descriptor->options().message_set_wire_format()) { MessageSetParser message_set{msg, descriptor, reflection}; return message_set.ParseMessageSet(ptr, ctx); @@ -889,7 +890,7 @@ const char* WireFormat::_InternalParseAndMergeField( case FieldDescriptor::TYPE_GROUP: case FieldDescriptor::TYPE_MESSAGE: case FieldDescriptor::TYPE_BYTES: - GOOGLE_LOG(FATAL) << "Can't reach"; + GOOGLE_ABSL_LOG(FATAL) << "Can't reach"; return nullptr; } } else { @@ -1080,7 +1081,7 @@ uint8_t* SerializeMapKeyWithCachedSizes(const FieldDescriptor* field, case FieldDescriptor::TYPE_MESSAGE: case FieldDescriptor::TYPE_BYTES: case FieldDescriptor::TYPE_ENUM: - GOOGLE_LOG(FATAL) << "Unsupported"; + GOOGLE_ABSL_LOG(FATAL) << "Unsupported"; break; #define CASE_TYPE(FieldType, CamelFieldType, CamelCppType) \ case FieldDescriptor::TYPE_##FieldType: \ @@ -1169,7 +1170,7 @@ class MapKeySorter { class MapKeyComparator { public: bool operator()(const MapKey& a, const MapKey& b) const { - GOOGLE_DCHECK(a.type() == b.type()); + GOOGLE_ABSL_DCHECK(a.type() == b.type()); switch (a.type()) { #define CASE_TYPE(CppType, CamelCppType) \ case FieldDescriptor::CPPTYPE_##CppType: { \ @@ -1184,7 +1185,7 @@ class MapKeySorter { #undef CASE_TYPE default: - GOOGLE_LOG(DFATAL) << "Invalid key for map field."; + GOOGLE_ABSL_LOG(DFATAL) << "Invalid key for map field."; return true; } } @@ -1326,7 +1327,7 @@ uint8_t* WireFormat::InternalSerializeField(const FieldDescriptor* field, HANDLE_PRIMITIVE_TYPE(BOOL, bool, Bool, Bool) #undef HANDLE_PRIMITIVE_TYPE default: - GOOGLE_LOG(FATAL) << "Invalid descriptor"; + GOOGLE_ABSL_LOG(FATAL) << "Invalid descriptor"; } return target; } @@ -1542,7 +1543,7 @@ size_t WireFormat::FieldByteSize(const FieldDescriptor* field, size_t MapKeyDataOnlyByteSize(const FieldDescriptor* field, const MapKey& value) { - GOOGLE_DCHECK_EQ(FieldDescriptor::TypeToCppType(field->type()), value.type()); + GOOGLE_ABSL_DCHECK_EQ(FieldDescriptor::TypeToCppType(field->type()), value.type()); switch (field->type()) { case FieldDescriptor::TYPE_DOUBLE: case FieldDescriptor::TYPE_FLOAT: @@ -1550,7 +1551,7 @@ size_t MapKeyDataOnlyByteSize(const FieldDescriptor* field, case FieldDescriptor::TYPE_MESSAGE: case FieldDescriptor::TYPE_BYTES: case FieldDescriptor::TYPE_ENUM: - GOOGLE_LOG(FATAL) << "Unsupported"; + GOOGLE_ABSL_LOG(FATAL) << "Unsupported"; return 0; #define CASE_TYPE(FieldType, CamelFieldType, CamelCppType) \ case FieldDescriptor::TYPE_##FieldType: \ @@ -1577,7 +1578,7 @@ size_t MapKeyDataOnlyByteSize(const FieldDescriptor* field, #undef CASE_TYPE #undef FIXED_CASE_TYPE } - GOOGLE_LOG(FATAL) << "Cannot get here"; + GOOGLE_ABSL_LOG(FATAL) << "Cannot get here"; return 0; } @@ -1585,7 +1586,7 @@ static size_t MapValueRefDataOnlyByteSize(const FieldDescriptor* field, const MapValueConstRef& value) { switch (field->type()) { case FieldDescriptor::TYPE_GROUP: - GOOGLE_LOG(FATAL) << "Unsupported"; + GOOGLE_ABSL_LOG(FATAL) << "Unsupported"; return 0; #define CASE_TYPE(FieldType, CamelFieldType, CamelCppType) \ case FieldDescriptor::TYPE_##FieldType: \ @@ -1617,7 +1618,7 @@ static size_t MapValueRefDataOnlyByteSize(const FieldDescriptor* field, #undef CASE_TYPE #undef FIXED_CASE_TYPE } - GOOGLE_LOG(FATAL) << "Cannot get here"; + GOOGLE_ABSL_LOG(FATAL) << "Cannot get here"; return 0; } diff --git a/src/google/protobuf/wire_format.h b/src/google/protobuf/wire_format.h index 64313c2f57786..5abd8138f4093 100644 --- a/src/google/protobuf/wire_format.h +++ b/src/google/protobuf/wire_format.h @@ -130,7 +130,7 @@ class PROTOBUF_EXPORT WireFormat { int expected_endpoint = output->ByteCount() + size; output->SetCur( _InternalSerialize(message, output->Cur(), output->EpsCopy())); - GOOGLE_CHECK_EQ(output->ByteCount(), expected_endpoint) + GOOGLE_ABSL_CHECK_EQ(output->ByteCount(), expected_endpoint) << ": Protocol message serialized to a size different from what was " "originally expected. Perhaps it was modified by another thread " "during serialization?"; diff --git a/src/google/protobuf/wire_format_lite.cc b/src/google/protobuf/wire_format_lite.cc index b2b9e7c7ecdcc..2ed92101e0864 100644 --- a/src/google/protobuf/wire_format_lite.cc +++ b/src/google/protobuf/wire_format_lite.cc @@ -39,6 +39,7 @@ #include #include +#include "google/protobuf/stubs/logging.h" #include "google/protobuf/stubs/logging.h" #include "absl/strings/cord.h" #include "absl/strings/str_cat.h" @@ -482,7 +483,7 @@ void WireFormatLite::WriteString(int field_number, const std::string& value, io::CodedOutputStream* output) { // String is for UTF-8 text only WriteTag(field_number, WIRETYPE_LENGTH_DELIMITED, output); - GOOGLE_CHECK_LE(value.size(), kInt32MaxSize); + GOOGLE_ABSL_CHECK_LE(value.size(), kInt32MaxSize); output->WriteVarint32(value.size()); output->WriteString(value); } @@ -491,14 +492,14 @@ void WireFormatLite::WriteStringMaybeAliased(int field_number, io::CodedOutputStream* output) { // String is for UTF-8 text only WriteTag(field_number, WIRETYPE_LENGTH_DELIMITED, output); - GOOGLE_CHECK_LE(value.size(), kInt32MaxSize); + GOOGLE_ABSL_CHECK_LE(value.size(), kInt32MaxSize); output->WriteVarint32(value.size()); output->WriteRawMaybeAliased(value.data(), value.size()); } void WireFormatLite::WriteBytes(int field_number, const std::string& value, io::CodedOutputStream* output) { WriteTag(field_number, WIRETYPE_LENGTH_DELIMITED, output); - GOOGLE_CHECK_LE(value.size(), kInt32MaxSize); + GOOGLE_ABSL_CHECK_LE(value.size(), kInt32MaxSize); output->WriteVarint32(value.size()); output->WriteString(value); } @@ -506,7 +507,7 @@ void WireFormatLite::WriteBytesMaybeAliased(int field_number, const std::string& value, io::CodedOutputStream* output) { WriteTag(field_number, WIRETYPE_LENGTH_DELIMITED, output); - GOOGLE_CHECK_LE(value.size(), kInt32MaxSize); + GOOGLE_ABSL_CHECK_LE(value.size(), kInt32MaxSize); output->WriteVarint32(value.size()); output->WriteRawMaybeAliased(value.data(), value.size()); } @@ -614,7 +615,7 @@ void PrintUTF8ErrorLog(absl::string_view message_name, " a protocol buffer. Use the 'bytes' type if you intend to " "send raw bytes. ", stacktrace); - GOOGLE_LOG(ERROR) << error_message; + GOOGLE_ABSL_LOG(ERROR) << error_message; } bool WireFormatLite::VerifyUtf8String(const char* data, int size, Operation op, diff --git a/src/google/protobuf/wire_format_lite.h b/src/google/protobuf/wire_format_lite.h index 59fb09dbacddc..b95098e94b017 100644 --- a/src/google/protobuf/wire_format_lite.h +++ b/src/google/protobuf/wire_format_lite.h @@ -45,9 +45,9 @@ #include #include "google/protobuf/stubs/common.h" -#include "google/protobuf/stubs/logging.h" #include "google/protobuf/port.h" #include "absl/base/casts.h" +#include "google/protobuf/stubs/logging.h" #include "google/protobuf/arenastring.h" #include "google/protobuf/io/coded_stream.h" #include "google/protobuf/message_lite.h" @@ -1085,7 +1085,7 @@ template inline bool WireFormatLite::ReadRepeatedFixedSizePrimitive( int tag_size, uint32_t tag, io::CodedInputStream* input, RepeatedField* values) { - GOOGLE_DCHECK_EQ(UInt32Size(tag), static_cast(tag_size)); + GOOGLE_ABSL_DCHECK_EQ(UInt32Size(tag), static_cast(tag_size)); CType value; if (!ReadPrimitive(input, &value)) return false; values->Add(value); @@ -1446,7 +1446,7 @@ inline uint8_t* WireFormatLite::WritePrimitiveNoTagToArray( const RepeatedField& value, uint8_t* (*Writer)(T, uint8_t*), uint8_t* target) { const int n = value.size(); - GOOGLE_DCHECK_GT(n, 0); + GOOGLE_ABSL_DCHECK_GT(n, 0); const T* ii = value.data(); int i = 0; @@ -1465,7 +1465,7 @@ inline uint8_t* WireFormatLite::WriteFixedNoTagToArray( (void)Writer; const int n = value.size(); - GOOGLE_DCHECK_GT(n, 0); + GOOGLE_ABSL_DCHECK_GT(n, 0); const T* ii = value.data(); const int bytes = n * static_cast(sizeof(ii[0])); diff --git a/src/google/protobuf/wire_format_unittest.inc b/src/google/protobuf/wire_format_unittest.inc index e803aa35cee3b..95cfe2564c547 100644 --- a/src/google/protobuf/wire_format_unittest.inc +++ b/src/google/protobuf/wire_format_unittest.inc @@ -1230,7 +1230,7 @@ class WireFormatInvalidInputTest : public testing::Test { const FieldDescriptor* field = UNITTEST::TestAllTypes::descriptor()->FindFieldByName( "optional_nested_message"); - GOOGLE_CHECK(field != nullptr); + GOOGLE_ABSL_CHECK(field != nullptr); std::string result; @@ -1252,7 +1252,7 @@ class WireFormatInvalidInputTest : public testing::Test { bool include_end_tag) { const FieldDescriptor* field = UNITTEST::TestAllTypes::descriptor()->FindFieldByName("optionalgroup"); - GOOGLE_CHECK(field != nullptr); + GOOGLE_ABSL_CHECK(field != nullptr); std::string result;