aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/api.pb.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/api.pb.cc')
-rw-r--r--src/google/protobuf/api.pb.cc183
1 files changed, 92 insertions, 91 deletions
diff --git a/src/google/protobuf/api.pb.cc b/src/google/protobuf/api.pb.cc
index ac2a0e89..1734dfdf 100644
--- a/src/google/protobuf/api.pb.cc
+++ b/src/google/protobuf/api.pb.cc
@@ -13,10 +13,6 @@
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
-// This is a temporary google only hack
-#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
-#include "third_party/protobuf/version.h"
-#endif
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
@@ -51,7 +47,7 @@ static void InitDefaultsApi_google_2fprotobuf_2fapi_2eproto() {
::google::protobuf::Api::InitAsDefaultInstance();
}
-LIBPROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<4> scc_info_Api_google_2fprotobuf_2fapi_2eproto =
+PROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<4> scc_info_Api_google_2fprotobuf_2fapi_2eproto =
{{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 4, InitDefaultsApi_google_2fprotobuf_2fapi_2eproto}, {
&scc_info_Method_google_2fprotobuf_2fapi_2eproto.base,
&scc_info_Option_google_2fprotobuf_2ftype_2eproto.base,
@@ -69,7 +65,7 @@ static void InitDefaultsMethod_google_2fprotobuf_2fapi_2eproto() {
::google::protobuf::Method::InitAsDefaultInstance();
}
-LIBPROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<1> scc_info_Method_google_2fprotobuf_2fapi_2eproto =
+PROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<1> scc_info_Method_google_2fprotobuf_2fapi_2eproto =
{{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsMethod_google_2fprotobuf_2fapi_2eproto}, {
&scc_info_Option_google_2fprotobuf_2ftype_2eproto.base,}};
@@ -84,7 +80,7 @@ static void InitDefaultsMixin_google_2fprotobuf_2fapi_2eproto() {
::google::protobuf::Mixin::InitAsDefaultInstance();
}
-LIBPROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<0> scc_info_Mixin_google_2fprotobuf_2fapi_2eproto =
+PROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<0> scc_info_Mixin_google_2fprotobuf_2fapi_2eproto =
{{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsMixin_google_2fprotobuf_2fapi_2eproto}, {}};
void InitDefaults_google_2fprotobuf_2fapi_2eproto() {
@@ -97,40 +93,40 @@ void InitDefaults_google_2fprotobuf_2fapi_2eproto() {
constexpr ::google::protobuf::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2fapi_2eproto = nullptr;
constexpr ::google::protobuf::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fapi_2eproto = nullptr;
-const ::google::protobuf::uint32 TableStruct_google_2fprotobuf_2fapi_2eproto::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
+const ::google::protobuf::uint32 TableStruct_google_2fprotobuf_2fapi_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
~0u, // no _has_bits_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Api, _internal_metadata_),
+ PROTOBUF_FIELD_OFFSET(::google::protobuf::Api, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Api, name_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Api, methods_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Api, options_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Api, version_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Api, source_context_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Api, mixins_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Api, syntax_),
+ PROTOBUF_FIELD_OFFSET(::google::protobuf::Api, name_),
+ PROTOBUF_FIELD_OFFSET(::google::protobuf::Api, methods_),
+ PROTOBUF_FIELD_OFFSET(::google::protobuf::Api, options_),
+ PROTOBUF_FIELD_OFFSET(::google::protobuf::Api, version_),
+ PROTOBUF_FIELD_OFFSET(::google::protobuf::Api, source_context_),
+ PROTOBUF_FIELD_OFFSET(::google::protobuf::Api, mixins_),
+ PROTOBUF_FIELD_OFFSET(::google::protobuf::Api, syntax_),
~0u, // no _has_bits_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Method, _internal_metadata_),
+ PROTOBUF_FIELD_OFFSET(::google::protobuf::Method, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Method, name_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Method, request_type_url_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Method, request_streaming_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Method, response_type_url_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Method, response_streaming_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Method, options_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Method, syntax_),
+ PROTOBUF_FIELD_OFFSET(::google::protobuf::Method, name_),
+ PROTOBUF_FIELD_OFFSET(::google::protobuf::Method, request_type_url_),
+ PROTOBUF_FIELD_OFFSET(::google::protobuf::Method, request_streaming_),
+ PROTOBUF_FIELD_OFFSET(::google::protobuf::Method, response_type_url_),
+ PROTOBUF_FIELD_OFFSET(::google::protobuf::Method, response_streaming_),
+ PROTOBUF_FIELD_OFFSET(::google::protobuf::Method, options_),
+ PROTOBUF_FIELD_OFFSET(::google::protobuf::Method, syntax_),
~0u, // no _has_bits_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Mixin, _internal_metadata_),
+ PROTOBUF_FIELD_OFFSET(::google::protobuf::Mixin, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Mixin, name_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Mixin, root_),
+ PROTOBUF_FIELD_OFFSET(::google::protobuf::Mixin, name_),
+ PROTOBUF_FIELD_OFFSET(::google::protobuf::Mixin, root_),
};
-static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
+static const ::google::protobuf::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, sizeof(::google::protobuf::Api)},
{ 12, -1, sizeof(::google::protobuf::Method)},
{ 24, -1, sizeof(::google::protobuf::Mixin)},
@@ -310,14 +306,13 @@ const char* Api::_InternalParse(const char* begin, const char* end, void* object
while (ptr < end) {
::google::protobuf::uint32 tag;
ptr = Varint::Parse32Inline(ptr, &tag);
- if (!ptr) goto error;
+ GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
switch (tag >> 3) {
- case 0: goto error;
// string name = 1;
case 1: {
if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual;
ptr = Varint::Parse32Inline(ptr, &size);
- if (!ptr) goto error;
+ GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
ctx->extra_parse_data().SetFieldName("google.protobuf.Api.name");
parser_till_end = ::google::protobuf::internal::StringParserUTF8;
::std::string* str = msg->mutable_name();
@@ -325,8 +320,8 @@ const char* Api::_InternalParse(const char* begin, const char* end, void* object
object = str;
if (size > end - ptr) goto len_delim_till_end;
auto newend = ptr + size;
- if (!ctx->ParseExactRange({parser_till_end, object}, ptr, newend)) goto error;
- ptr = newend;
+ if (size) ptr = parser_till_end(ptr, newend, object, ctx);
+ GOOGLE_PROTOBUF_PARSER_ASSERT(ptr == newend);
break;
}
// repeated .google.protobuf.Method methods = 2;
@@ -334,15 +329,17 @@ const char* Api::_InternalParse(const char* begin, const char* end, void* object
if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual;
do {
ptr = Varint::Parse32Inline(ptr, &size);
- if (!ptr) goto error;
+ GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
parser_till_end = ::google::protobuf::Method::_InternalParse;
object = msg->add_methods();
if (size > end - ptr) goto len_delim_till_end;
auto newend = ptr + size;
- if (!ctx->ParseExactRange({parser_till_end, object}, ptr, newend)) goto error;
+ bool ok = ctx->ParseExactRange({parser_till_end, object},
+ ptr, newend);
+ GOOGLE_PROTOBUF_PARSER_ASSERT(ok);
ptr = newend;
if (ptr >= end) break;
- } while((*reinterpret_cast<const ::google::protobuf::uint64*>(ptr) & 255) == 18 && (ptr += 1));
+ } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 18 && (ptr += 1));
break;
}
// repeated .google.protobuf.Option options = 3;
@@ -350,22 +347,24 @@ const char* Api::_InternalParse(const char* begin, const char* end, void* object
if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual;
do {
ptr = Varint::Parse32Inline(ptr, &size);
- if (!ptr) goto error;
+ GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
parser_till_end = ::google::protobuf::Option::_InternalParse;
object = msg->add_options();
if (size > end - ptr) goto len_delim_till_end;
auto newend = ptr + size;
- if (!ctx->ParseExactRange({parser_till_end, object}, ptr, newend)) goto error;
+ bool ok = ctx->ParseExactRange({parser_till_end, object},
+ ptr, newend);
+ GOOGLE_PROTOBUF_PARSER_ASSERT(ok);
ptr = newend;
if (ptr >= end) break;
- } while((*reinterpret_cast<const ::google::protobuf::uint64*>(ptr) & 255) == 26 && (ptr += 1));
+ } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 26 && (ptr += 1));
break;
}
// string version = 4;
case 4: {
if (static_cast<::google::protobuf::uint8>(tag) != 34) goto handle_unusual;
ptr = Varint::Parse32Inline(ptr, &size);
- if (!ptr) goto error;
+ GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
ctx->extra_parse_data().SetFieldName("google.protobuf.Api.version");
parser_till_end = ::google::protobuf::internal::StringParserUTF8;
::std::string* str = msg->mutable_version();
@@ -373,20 +372,22 @@ const char* Api::_InternalParse(const char* begin, const char* end, void* object
object = str;
if (size > end - ptr) goto len_delim_till_end;
auto newend = ptr + size;
- if (!ctx->ParseExactRange({parser_till_end, object}, ptr, newend)) goto error;
- ptr = newend;
+ if (size) ptr = parser_till_end(ptr, newend, object, ctx);
+ GOOGLE_PROTOBUF_PARSER_ASSERT(ptr == newend);
break;
}
// .google.protobuf.SourceContext source_context = 5;
case 5: {
if (static_cast<::google::protobuf::uint8>(tag) != 42) goto handle_unusual;
ptr = Varint::Parse32Inline(ptr, &size);
- if (!ptr) goto error;
+ GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
parser_till_end = ::google::protobuf::SourceContext::_InternalParse;
object = msg->mutable_source_context();
if (size > end - ptr) goto len_delim_till_end;
auto newend = ptr + size;
- if (!ctx->ParseExactRange({parser_till_end, object}, ptr, newend)) goto error;
+ bool ok = ctx->ParseExactRange({parser_till_end, object},
+ ptr, newend);
+ GOOGLE_PROTOBUF_PARSER_ASSERT(ok);
ptr = newend;
break;
}
@@ -395,15 +396,17 @@ const char* Api::_InternalParse(const char* begin, const char* end, void* object
if (static_cast<::google::protobuf::uint8>(tag) != 50) goto handle_unusual;
do {
ptr = Varint::Parse32Inline(ptr, &size);
- if (!ptr) goto error;
+ GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
parser_till_end = ::google::protobuf::Mixin::_InternalParse;
object = msg->add_mixins();
if (size > end - ptr) goto len_delim_till_end;
auto newend = ptr + size;
- if (!ctx->ParseExactRange({parser_till_end, object}, ptr, newend)) goto error;
+ bool ok = ctx->ParseExactRange({parser_till_end, object},
+ ptr, newend);
+ GOOGLE_PROTOBUF_PARSER_ASSERT(ok);
ptr = newend;
if (ptr >= end) break;
- } while((*reinterpret_cast<const ::google::protobuf::uint64*>(ptr) & 255) == 50 && (ptr += 1));
+ } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 50 && (ptr += 1));
break;
}
// .google.protobuf.Syntax syntax = 7;
@@ -411,15 +414,16 @@ const char* Api::_InternalParse(const char* begin, const char* end, void* object
if (static_cast<::google::protobuf::uint8>(tag) != 56) goto handle_unusual;
::google::protobuf::uint64 val;
ptr = Varint::Parse64(ptr, &val);
- if (!ptr) goto error;
+ GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
::google::protobuf::Syntax value = static_cast<::google::protobuf::Syntax>(val);
msg->set_syntax(value);
break;
}
default: {
handle_unusual: (void)&&handle_unusual;
- if ((tag & 7) == 4) {
- if (!ctx->ValidEndGroup(tag)) goto error;
+ if ((tag & 7) == 4 || tag == 0) {
+ bool ok = ctx->ValidEndGroup(tag);
+ GOOGLE_PROTOBUF_PARSER_ASSERT(ok);
return ptr;
}
auto res = UnknownFieldParse(tag, {_InternalParse, msg},
@@ -430,8 +434,6 @@ const char* Api::_InternalParse(const char* begin, const char* end, void* object
} // switch
} // while
return ptr;
-error:
- return nullptr;
len_delim_till_end: (void)&&len_delim_till_end;
return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg},
{parser_till_end, object}, size);
@@ -443,7 +445,7 @@ group_continues: (void)&&group_continues;
#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool Api::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!GOOGLE_PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
+#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:google.protobuf.Api)
for (;;) {
@@ -974,14 +976,13 @@ const char* Method::_InternalParse(const char* begin, const char* end, void* obj
while (ptr < end) {
::google::protobuf::uint32 tag;
ptr = Varint::Parse32Inline(ptr, &tag);
- if (!ptr) goto error;
+ GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
switch (tag >> 3) {
- case 0: goto error;
// string name = 1;
case 1: {
if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual;
ptr = Varint::Parse32Inline(ptr, &size);
- if (!ptr) goto error;
+ GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
ctx->extra_parse_data().SetFieldName("google.protobuf.Method.name");
parser_till_end = ::google::protobuf::internal::StringParserUTF8;
::std::string* str = msg->mutable_name();
@@ -989,15 +990,15 @@ const char* Method::_InternalParse(const char* begin, const char* end, void* obj
object = str;
if (size > end - ptr) goto len_delim_till_end;
auto newend = ptr + size;
- if (!ctx->ParseExactRange({parser_till_end, object}, ptr, newend)) goto error;
- ptr = newend;
+ if (size) ptr = parser_till_end(ptr, newend, object, ctx);
+ GOOGLE_PROTOBUF_PARSER_ASSERT(ptr == newend);
break;
}
// string request_type_url = 2;
case 2: {
if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual;
ptr = Varint::Parse32Inline(ptr, &size);
- if (!ptr) goto error;
+ GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
ctx->extra_parse_data().SetFieldName("google.protobuf.Method.request_type_url");
parser_till_end = ::google::protobuf::internal::StringParserUTF8;
::std::string* str = msg->mutable_request_type_url();
@@ -1005,8 +1006,8 @@ const char* Method::_InternalParse(const char* begin, const char* end, void* obj
object = str;
if (size > end - ptr) goto len_delim_till_end;
auto newend = ptr + size;
- if (!ctx->ParseExactRange({parser_till_end, object}, ptr, newend)) goto error;
- ptr = newend;
+ if (size) ptr = parser_till_end(ptr, newend, object, ctx);
+ GOOGLE_PROTOBUF_PARSER_ASSERT(ptr == newend);
break;
}
// bool request_streaming = 3;
@@ -1014,7 +1015,7 @@ const char* Method::_InternalParse(const char* begin, const char* end, void* obj
if (static_cast<::google::protobuf::uint8>(tag) != 24) goto handle_unusual;
::google::protobuf::uint64 val;
ptr = Varint::Parse64(ptr, &val);
- if (!ptr) goto error;
+ GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
bool value = val;
msg->set_request_streaming(value);
break;
@@ -1023,7 +1024,7 @@ const char* Method::_InternalParse(const char* begin, const char* end, void* obj
case 4: {
if (static_cast<::google::protobuf::uint8>(tag) != 34) goto handle_unusual;
ptr = Varint::Parse32Inline(ptr, &size);
- if (!ptr) goto error;
+ GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
ctx->extra_parse_data().SetFieldName("google.protobuf.Method.response_type_url");
parser_till_end = ::google::protobuf::internal::StringParserUTF8;
::std::string* str = msg->mutable_response_type_url();
@@ -1031,8 +1032,8 @@ const char* Method::_InternalParse(const char* begin, const char* end, void* obj
object = str;
if (size > end - ptr) goto len_delim_till_end;
auto newend = ptr + size;
- if (!ctx->ParseExactRange({parser_till_end, object}, ptr, newend)) goto error;
- ptr = newend;
+ if (size) ptr = parser_till_end(ptr, newend, object, ctx);
+ GOOGLE_PROTOBUF_PARSER_ASSERT(ptr == newend);
break;
}
// bool response_streaming = 5;
@@ -1040,7 +1041,7 @@ const char* Method::_InternalParse(const char* begin, const char* end, void* obj
if (static_cast<::google::protobuf::uint8>(tag) != 40) goto handle_unusual;
::google::protobuf::uint64 val;
ptr = Varint::Parse64(ptr, &val);
- if (!ptr) goto error;
+ GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
bool value = val;
msg->set_response_streaming(value);
break;
@@ -1050,15 +1051,17 @@ const char* Method::_InternalParse(const char* begin, const char* end, void* obj
if (static_cast<::google::protobuf::uint8>(tag) != 50) goto handle_unusual;
do {
ptr = Varint::Parse32Inline(ptr, &size);
- if (!ptr) goto error;
+ GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
parser_till_end = ::google::protobuf::Option::_InternalParse;
object = msg->add_options();
if (size > end - ptr) goto len_delim_till_end;
auto newend = ptr + size;
- if (!ctx->ParseExactRange({parser_till_end, object}, ptr, newend)) goto error;
+ bool ok = ctx->ParseExactRange({parser_till_end, object},
+ ptr, newend);
+ GOOGLE_PROTOBUF_PARSER_ASSERT(ok);
ptr = newend;
if (ptr >= end) break;
- } while((*reinterpret_cast<const ::google::protobuf::uint64*>(ptr) & 255) == 50 && (ptr += 1));
+ } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 50 && (ptr += 1));
break;
}
// .google.protobuf.Syntax syntax = 7;
@@ -1066,15 +1069,16 @@ const char* Method::_InternalParse(const char* begin, const char* end, void* obj
if (static_cast<::google::protobuf::uint8>(tag) != 56) goto handle_unusual;
::google::protobuf::uint64 val;
ptr = Varint::Parse64(ptr, &val);
- if (!ptr) goto error;
+ GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
::google::protobuf::Syntax value = static_cast<::google::protobuf::Syntax>(val);
msg->set_syntax(value);
break;
}
default: {
handle_unusual: (void)&&handle_unusual;
- if ((tag & 7) == 4) {
- if (!ctx->ValidEndGroup(tag)) goto error;
+ if ((tag & 7) == 4 || tag == 0) {
+ bool ok = ctx->ValidEndGroup(tag);
+ GOOGLE_PROTOBUF_PARSER_ASSERT(ok);
return ptr;
}
auto res = UnknownFieldParse(tag, {_InternalParse, msg},
@@ -1085,8 +1089,6 @@ const char* Method::_InternalParse(const char* begin, const char* end, void* obj
} // switch
} // while
return ptr;
-error:
- return nullptr;
len_delim_till_end: (void)&&len_delim_till_end;
return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg},
{parser_till_end, object}, size);
@@ -1098,7 +1100,7 @@ group_continues: (void)&&group_continues;
#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool Method::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!GOOGLE_PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
+#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:google.protobuf.Method)
for (;;) {
@@ -1599,14 +1601,13 @@ const char* Mixin::_InternalParse(const char* begin, const char* end, void* obje
while (ptr < end) {
::google::protobuf::uint32 tag;
ptr = Varint::Parse32Inline(ptr, &tag);
- if (!ptr) goto error;
+ GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
switch (tag >> 3) {
- case 0: goto error;
// string name = 1;
case 1: {
if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual;
ptr = Varint::Parse32Inline(ptr, &size);
- if (!ptr) goto error;
+ GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
ctx->extra_parse_data().SetFieldName("google.protobuf.Mixin.name");
parser_till_end = ::google::protobuf::internal::StringParserUTF8;
::std::string* str = msg->mutable_name();
@@ -1614,15 +1615,15 @@ const char* Mixin::_InternalParse(const char* begin, const char* end, void* obje
object = str;
if (size > end - ptr) goto len_delim_till_end;
auto newend = ptr + size;
- if (!ctx->ParseExactRange({parser_till_end, object}, ptr, newend)) goto error;
- ptr = newend;
+ if (size) ptr = parser_till_end(ptr, newend, object, ctx);
+ GOOGLE_PROTOBUF_PARSER_ASSERT(ptr == newend);
break;
}
// string root = 2;
case 2: {
if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual;
ptr = Varint::Parse32Inline(ptr, &size);
- if (!ptr) goto error;
+ GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
ctx->extra_parse_data().SetFieldName("google.protobuf.Mixin.root");
parser_till_end = ::google::protobuf::internal::StringParserUTF8;
::std::string* str = msg->mutable_root();
@@ -1630,14 +1631,15 @@ const char* Mixin::_InternalParse(const char* begin, const char* end, void* obje
object = str;
if (size > end - ptr) goto len_delim_till_end;
auto newend = ptr + size;
- if (!ctx->ParseExactRange({parser_till_end, object}, ptr, newend)) goto error;
- ptr = newend;
+ if (size) ptr = parser_till_end(ptr, newend, object, ctx);
+ GOOGLE_PROTOBUF_PARSER_ASSERT(ptr == newend);
break;
}
default: {
handle_unusual: (void)&&handle_unusual;
- if ((tag & 7) == 4) {
- if (!ctx->ValidEndGroup(tag)) goto error;
+ if ((tag & 7) == 4 || tag == 0) {
+ bool ok = ctx->ValidEndGroup(tag);
+ GOOGLE_PROTOBUF_PARSER_ASSERT(ok);
return ptr;
}
auto res = UnknownFieldParse(tag, {_InternalParse, msg},
@@ -1648,8 +1650,6 @@ const char* Mixin::_InternalParse(const char* begin, const char* end, void* obje
} // switch
} // while
return ptr;
-error:
- return nullptr;
len_delim_till_end: (void)&&len_delim_till_end;
return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg},
{parser_till_end, object}, size);
@@ -1661,7 +1661,7 @@ group_continues: (void)&&group_continues;
#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool Mixin::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!GOOGLE_PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
+#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:google.protobuf.Mixin)
for (;;) {
@@ -1896,16 +1896,17 @@ void Mixin::InternalSwap(Mixin* other) {
} // namespace google
namespace google {
namespace protobuf {
-template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::Api* Arena::CreateMaybeMessage< ::google::protobuf::Api >(Arena* arena) {
+template<> PROTOBUF_NOINLINE ::google::protobuf::Api* Arena::CreateMaybeMessage< ::google::protobuf::Api >(Arena* arena) {
return Arena::CreateInternal< ::google::protobuf::Api >(arena);
}
-template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::Method* Arena::CreateMaybeMessage< ::google::protobuf::Method >(Arena* arena) {
+template<> PROTOBUF_NOINLINE ::google::protobuf::Method* Arena::CreateMaybeMessage< ::google::protobuf::Method >(Arena* arena) {
return Arena::CreateInternal< ::google::protobuf::Method >(arena);
}
-template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::Mixin* Arena::CreateMaybeMessage< ::google::protobuf::Mixin >(Arena* arena) {
+template<> PROTOBUF_NOINLINE ::google::protobuf::Mixin* Arena::CreateMaybeMessage< ::google::protobuf::Mixin >(Arena* arena) {
return Arena::CreateInternal< ::google::protobuf::Mixin >(arena);
}
} // namespace protobuf
} // namespace google
// @@protoc_insertion_point(global_scope)
+#include <google/protobuf/port_undef.inc>