|
|
|
@ -518,16 +518,13 @@ const char* Type::_InternalParse(const char* begin, const char* end, void* objec |
|
|
|
|
ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
|
|
|
|
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
|
|
|
|
ctx->extra_parse_data().SetFieldName("google.protobuf.Type.name"); |
|
|
|
|
auto str = msg->mutable_name(); |
|
|
|
|
object = msg->mutable_name(); |
|
|
|
|
if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
|
|
|
|
object = str; |
|
|
|
|
str->clear(); |
|
|
|
|
str->reserve(size); |
|
|
|
|
parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
|
|
|
|
goto len_delim_till_end; |
|
|
|
|
goto string_till_end; |
|
|
|
|
} |
|
|
|
|
GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
|
|
|
|
::google::protobuf::internal::InlineGreedyStringParser(str, ptr, size, ctx); |
|
|
|
|
::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
|
|
|
|
ptr += size; |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
@ -540,11 +537,9 @@ const char* Type::_InternalParse(const char* begin, const char* end, void* objec |
|
|
|
|
parser_till_end = ::google::protobuf::Field::_InternalParse; |
|
|
|
|
object = msg->add_fields(); |
|
|
|
|
if (size > end - ptr) goto len_delim_till_end; |
|
|
|
|
auto newend = ptr + size; |
|
|
|
|
bool ok = ctx->ParseExactRange({parser_till_end, object}, |
|
|
|
|
ptr, newend); |
|
|
|
|
GOOGLE_PROTOBUF_PARSER_ASSERT(ok); |
|
|
|
|
ptr = newend; |
|
|
|
|
ptr += size; |
|
|
|
|
GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
|
|
|
|
{parser_till_end, object}, ptr - size, ptr)); |
|
|
|
|
if (ptr >= end) break; |
|
|
|
|
} while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 18 && (ptr += 1)); |
|
|
|
|
break; |
|
|
|
@ -556,16 +551,13 @@ const char* Type::_InternalParse(const char* begin, const char* end, void* objec |
|
|
|
|
ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
|
|
|
|
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
|
|
|
|
ctx->extra_parse_data().SetFieldName("google.protobuf.Type.oneofs"); |
|
|
|
|
auto str = msg->add_oneofs(); |
|
|
|
|
object = msg->add_oneofs(); |
|
|
|
|
if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
|
|
|
|
object = str; |
|
|
|
|
str->clear(); |
|
|
|
|
str->reserve(size); |
|
|
|
|
parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
|
|
|
|
goto len_delim_till_end; |
|
|
|
|
goto string_till_end; |
|
|
|
|
} |
|
|
|
|
GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
|
|
|
|
::google::protobuf::internal::InlineGreedyStringParser(str, ptr, size, ctx); |
|
|
|
|
::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
|
|
|
|
ptr += size; |
|
|
|
|
if (ptr >= end) break; |
|
|
|
|
} while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 26 && (ptr += 1)); |
|
|
|
@ -580,11 +572,9 @@ const char* Type::_InternalParse(const char* begin, const char* end, void* objec |
|
|
|
|
parser_till_end = ::google::protobuf::Option::_InternalParse; |
|
|
|
|
object = msg->add_options(); |
|
|
|
|
if (size > end - ptr) goto len_delim_till_end; |
|
|
|
|
auto newend = ptr + size; |
|
|
|
|
bool ok = ctx->ParseExactRange({parser_till_end, object}, |
|
|
|
|
ptr, newend); |
|
|
|
|
GOOGLE_PROTOBUF_PARSER_ASSERT(ok); |
|
|
|
|
ptr = newend; |
|
|
|
|
ptr += size; |
|
|
|
|
GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
|
|
|
|
{parser_till_end, object}, ptr - size, ptr)); |
|
|
|
|
if (ptr >= end) break; |
|
|
|
|
} while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 34 && (ptr += 1)); |
|
|
|
|
break; |
|
|
|
@ -597,21 +587,17 @@ const char* Type::_InternalParse(const char* begin, const char* end, void* objec |
|
|
|
|
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; |
|
|
|
|
bool ok = ctx->ParseExactRange({parser_till_end, object}, |
|
|
|
|
ptr, newend); |
|
|
|
|
GOOGLE_PROTOBUF_PARSER_ASSERT(ok); |
|
|
|
|
ptr = newend; |
|
|
|
|
ptr += size; |
|
|
|
|
GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
|
|
|
|
{parser_till_end, object}, ptr - size, ptr)); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
// .google.protobuf.Syntax syntax = 6;
|
|
|
|
|
case 6: { |
|
|
|
|
if (static_cast<::google::protobuf::uint8>(tag) != 48) goto handle_unusual; |
|
|
|
|
::google::protobuf::uint64 val; |
|
|
|
|
ptr = ::google::protobuf::io::Parse64(ptr, &val); |
|
|
|
|
::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); |
|
|
|
|
msg->set_syntax(static_cast<::google::protobuf::Syntax>(val)); |
|
|
|
|
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
|
|
|
|
::google::protobuf::Syntax value = static_cast<::google::protobuf::Syntax>(val); |
|
|
|
|
msg->set_syntax(value); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
default: { |
|
|
|
@ -629,6 +615,10 @@ const char* Type::_InternalParse(const char* begin, const char* end, void* objec |
|
|
|
|
} // switch
|
|
|
|
|
} // while
|
|
|
|
|
return ptr; |
|
|
|
|
string_till_end: |
|
|
|
|
static_cast<::std::string*>(object)->clear(); |
|
|
|
|
static_cast<::std::string*>(object)->reserve(size); |
|
|
|
|
goto len_delim_till_end; |
|
|
|
|
len_delim_till_end: |
|
|
|
|
return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, |
|
|
|
|
{parser_till_end, object}, size); |
|
|
|
@ -1167,31 +1157,24 @@ const char* Field::_InternalParse(const char* begin, const char* end, void* obje |
|
|
|
|
// .google.protobuf.Field.Kind kind = 1;
|
|
|
|
|
case 1: { |
|
|
|
|
if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual; |
|
|
|
|
::google::protobuf::uint64 val; |
|
|
|
|
ptr = ::google::protobuf::io::Parse64(ptr, &val); |
|
|
|
|
::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); |
|
|
|
|
msg->set_kind(static_cast<::google::protobuf::Field_Kind>(val)); |
|
|
|
|
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
|
|
|
|
::google::protobuf::Field_Kind value = static_cast<::google::protobuf::Field_Kind>(val); |
|
|
|
|
msg->set_kind(value); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
// .google.protobuf.Field.Cardinality cardinality = 2;
|
|
|
|
|
case 2: { |
|
|
|
|
if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual; |
|
|
|
|
::google::protobuf::uint64 val; |
|
|
|
|
ptr = ::google::protobuf::io::Parse64(ptr, &val); |
|
|
|
|
::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); |
|
|
|
|
msg->set_cardinality(static_cast<::google::protobuf::Field_Cardinality>(val)); |
|
|
|
|
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
|
|
|
|
::google::protobuf::Field_Cardinality value = static_cast<::google::protobuf::Field_Cardinality>(val); |
|
|
|
|
msg->set_cardinality(value); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
// int32 number = 3;
|
|
|
|
|
case 3: { |
|
|
|
|
if (static_cast<::google::protobuf::uint8>(tag) != 24) goto handle_unusual; |
|
|
|
|
::google::protobuf::uint64 val; |
|
|
|
|
ptr = ::google::protobuf::io::Parse64(ptr, &val); |
|
|
|
|
msg->set_number(::google::protobuf::internal::ReadVarint(&ptr)); |
|
|
|
|
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
|
|
|
|
::google::protobuf::int32 value = val; |
|
|
|
|
msg->set_number(value); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
// string name = 4;
|
|
|
|
@ -1200,16 +1183,13 @@ const char* Field::_InternalParse(const char* begin, const char* end, void* obje |
|
|
|
|
ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
|
|
|
|
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
|
|
|
|
ctx->extra_parse_data().SetFieldName("google.protobuf.Field.name"); |
|
|
|
|
auto str = msg->mutable_name(); |
|
|
|
|
object = msg->mutable_name(); |
|
|
|
|
if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
|
|
|
|
object = str; |
|
|
|
|
str->clear(); |
|
|
|
|
str->reserve(size); |
|
|
|
|
parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
|
|
|
|
goto len_delim_till_end; |
|
|
|
|
goto string_till_end; |
|
|
|
|
} |
|
|
|
|
GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
|
|
|
|
::google::protobuf::internal::InlineGreedyStringParser(str, ptr, size, ctx); |
|
|
|
|
::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
|
|
|
|
ptr += size; |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
@ -1219,37 +1199,28 @@ const char* Field::_InternalParse(const char* begin, const char* end, void* obje |
|
|
|
|
ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
|
|
|
|
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
|
|
|
|
ctx->extra_parse_data().SetFieldName("google.protobuf.Field.type_url"); |
|
|
|
|
auto str = msg->mutable_type_url(); |
|
|
|
|
object = msg->mutable_type_url(); |
|
|
|
|
if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
|
|
|
|
object = str; |
|
|
|
|
str->clear(); |
|
|
|
|
str->reserve(size); |
|
|
|
|
parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
|
|
|
|
goto len_delim_till_end; |
|
|
|
|
goto string_till_end; |
|
|
|
|
} |
|
|
|
|
GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
|
|
|
|
::google::protobuf::internal::InlineGreedyStringParser(str, ptr, size, ctx); |
|
|
|
|
::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
|
|
|
|
ptr += size; |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
// int32 oneof_index = 7;
|
|
|
|
|
case 7: { |
|
|
|
|
if (static_cast<::google::protobuf::uint8>(tag) != 56) goto handle_unusual; |
|
|
|
|
::google::protobuf::uint64 val; |
|
|
|
|
ptr = ::google::protobuf::io::Parse64(ptr, &val); |
|
|
|
|
msg->set_oneof_index(::google::protobuf::internal::ReadVarint(&ptr)); |
|
|
|
|
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
|
|
|
|
::google::protobuf::int32 value = val; |
|
|
|
|
msg->set_oneof_index(value); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
// bool packed = 8;
|
|
|
|
|
case 8: { |
|
|
|
|
if (static_cast<::google::protobuf::uint8>(tag) != 64) goto handle_unusual; |
|
|
|
|
::google::protobuf::uint64 val; |
|
|
|
|
ptr = ::google::protobuf::io::Parse64(ptr, &val); |
|
|
|
|
msg->set_packed(::google::protobuf::internal::ReadVarint(&ptr)); |
|
|
|
|
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
|
|
|
|
bool value = val; |
|
|
|
|
msg->set_packed(value); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
// repeated .google.protobuf.Option options = 9;
|
|
|
|
@ -1261,11 +1232,9 @@ const char* Field::_InternalParse(const char* begin, const char* end, void* obje |
|
|
|
|
parser_till_end = ::google::protobuf::Option::_InternalParse; |
|
|
|
|
object = msg->add_options(); |
|
|
|
|
if (size > end - ptr) goto len_delim_till_end; |
|
|
|
|
auto newend = ptr + size; |
|
|
|
|
bool ok = ctx->ParseExactRange({parser_till_end, object}, |
|
|
|
|
ptr, newend); |
|
|
|
|
GOOGLE_PROTOBUF_PARSER_ASSERT(ok); |
|
|
|
|
ptr = newend; |
|
|
|
|
ptr += size; |
|
|
|
|
GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
|
|
|
|
{parser_till_end, object}, ptr - size, ptr)); |
|
|
|
|
if (ptr >= end) break; |
|
|
|
|
} while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 74 && (ptr += 1)); |
|
|
|
|
break; |
|
|
|
@ -1276,16 +1245,13 @@ const char* Field::_InternalParse(const char* begin, const char* end, void* obje |
|
|
|
|
ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
|
|
|
|
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
|
|
|
|
ctx->extra_parse_data().SetFieldName("google.protobuf.Field.json_name"); |
|
|
|
|
auto str = msg->mutable_json_name(); |
|
|
|
|
object = msg->mutable_json_name(); |
|
|
|
|
if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
|
|
|
|
object = str; |
|
|
|
|
str->clear(); |
|
|
|
|
str->reserve(size); |
|
|
|
|
parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
|
|
|
|
goto len_delim_till_end; |
|
|
|
|
goto string_till_end; |
|
|
|
|
} |
|
|
|
|
GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
|
|
|
|
::google::protobuf::internal::InlineGreedyStringParser(str, ptr, size, ctx); |
|
|
|
|
::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
|
|
|
|
ptr += size; |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
@ -1295,16 +1261,13 @@ const char* Field::_InternalParse(const char* begin, const char* end, void* obje |
|
|
|
|
ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
|
|
|
|
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
|
|
|
|
ctx->extra_parse_data().SetFieldName("google.protobuf.Field.default_value"); |
|
|
|
|
auto str = msg->mutable_default_value(); |
|
|
|
|
object = msg->mutable_default_value(); |
|
|
|
|
if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
|
|
|
|
object = str; |
|
|
|
|
str->clear(); |
|
|
|
|
str->reserve(size); |
|
|
|
|
parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
|
|
|
|
goto len_delim_till_end; |
|
|
|
|
goto string_till_end; |
|
|
|
|
} |
|
|
|
|
GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
|
|
|
|
::google::protobuf::internal::InlineGreedyStringParser(str, ptr, size, ctx); |
|
|
|
|
::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
|
|
|
|
ptr += size; |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
@ -1323,6 +1286,10 @@ const char* Field::_InternalParse(const char* begin, const char* end, void* obje |
|
|
|
|
} // switch
|
|
|
|
|
} // while
|
|
|
|
|
return ptr; |
|
|
|
|
string_till_end: |
|
|
|
|
static_cast<::std::string*>(object)->clear(); |
|
|
|
|
static_cast<::std::string*>(object)->reserve(size); |
|
|
|
|
goto len_delim_till_end; |
|
|
|
|
len_delim_till_end: |
|
|
|
|
return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, |
|
|
|
|
{parser_till_end, object}, size); |
|
|
|
@ -2028,16 +1995,13 @@ const char* Enum::_InternalParse(const char* begin, const char* end, void* objec |
|
|
|
|
ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
|
|
|
|
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
|
|
|
|
ctx->extra_parse_data().SetFieldName("google.protobuf.Enum.name"); |
|
|
|
|
auto str = msg->mutable_name(); |
|
|
|
|
object = msg->mutable_name(); |
|
|
|
|
if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
|
|
|
|
object = str; |
|
|
|
|
str->clear(); |
|
|
|
|
str->reserve(size); |
|
|
|
|
parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
|
|
|
|
goto len_delim_till_end; |
|
|
|
|
goto string_till_end; |
|
|
|
|
} |
|
|
|
|
GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
|
|
|
|
::google::protobuf::internal::InlineGreedyStringParser(str, ptr, size, ctx); |
|
|
|
|
::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
|
|
|
|
ptr += size; |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
@ -2050,11 +2014,9 @@ const char* Enum::_InternalParse(const char* begin, const char* end, void* objec |
|
|
|
|
parser_till_end = ::google::protobuf::EnumValue::_InternalParse; |
|
|
|
|
object = msg->add_enumvalue(); |
|
|
|
|
if (size > end - ptr) goto len_delim_till_end; |
|
|
|
|
auto newend = ptr + size; |
|
|
|
|
bool ok = ctx->ParseExactRange({parser_till_end, object}, |
|
|
|
|
ptr, newend); |
|
|
|
|
GOOGLE_PROTOBUF_PARSER_ASSERT(ok); |
|
|
|
|
ptr = newend; |
|
|
|
|
ptr += size; |
|
|
|
|
GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
|
|
|
|
{parser_till_end, object}, ptr - size, ptr)); |
|
|
|
|
if (ptr >= end) break; |
|
|
|
|
} while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 18 && (ptr += 1)); |
|
|
|
|
break; |
|
|
|
@ -2068,11 +2030,9 @@ const char* Enum::_InternalParse(const char* begin, const char* end, void* objec |
|
|
|
|
parser_till_end = ::google::protobuf::Option::_InternalParse; |
|
|
|
|
object = msg->add_options(); |
|
|
|
|
if (size > end - ptr) goto len_delim_till_end; |
|
|
|
|
auto newend = ptr + size; |
|
|
|
|
bool ok = ctx->ParseExactRange({parser_till_end, object}, |
|
|
|
|
ptr, newend); |
|
|
|
|
GOOGLE_PROTOBUF_PARSER_ASSERT(ok); |
|
|
|
|
ptr = newend; |
|
|
|
|
ptr += size; |
|
|
|
|
GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
|
|
|
|
{parser_till_end, object}, ptr - size, ptr)); |
|
|
|
|
if (ptr >= end) break; |
|
|
|
|
} while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 26 && (ptr += 1)); |
|
|
|
|
break; |
|
|
|
@ -2085,21 +2045,17 @@ const char* Enum::_InternalParse(const char* begin, const char* end, void* objec |
|
|
|
|
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; |
|
|
|
|
bool ok = ctx->ParseExactRange({parser_till_end, object}, |
|
|
|
|
ptr, newend); |
|
|
|
|
GOOGLE_PROTOBUF_PARSER_ASSERT(ok); |
|
|
|
|
ptr = newend; |
|
|
|
|
ptr += size; |
|
|
|
|
GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
|
|
|
|
{parser_till_end, object}, ptr - size, ptr)); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
// .google.protobuf.Syntax syntax = 5;
|
|
|
|
|
case 5: { |
|
|
|
|
if (static_cast<::google::protobuf::uint8>(tag) != 40) goto handle_unusual; |
|
|
|
|
::google::protobuf::uint64 val; |
|
|
|
|
ptr = ::google::protobuf::io::Parse64(ptr, &val); |
|
|
|
|
::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); |
|
|
|
|
msg->set_syntax(static_cast<::google::protobuf::Syntax>(val)); |
|
|
|
|
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
|
|
|
|
::google::protobuf::Syntax value = static_cast<::google::protobuf::Syntax>(val); |
|
|
|
|
msg->set_syntax(value); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
default: { |
|
|
|
@ -2117,6 +2073,10 @@ const char* Enum::_InternalParse(const char* begin, const char* end, void* objec |
|
|
|
|
} // switch
|
|
|
|
|
} // while
|
|
|
|
|
return ptr; |
|
|
|
|
string_till_end: |
|
|
|
|
static_cast<::std::string*>(object)->clear(); |
|
|
|
|
static_cast<::std::string*>(object)->reserve(size); |
|
|
|
|
goto len_delim_till_end; |
|
|
|
|
len_delim_till_end: |
|
|
|
|
return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, |
|
|
|
|
{parser_till_end, object}, size); |
|
|
|
@ -2575,27 +2535,21 @@ const char* EnumValue::_InternalParse(const char* begin, const char* end, void* |
|
|
|
|
ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
|
|
|
|
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
|
|
|
|
ctx->extra_parse_data().SetFieldName("google.protobuf.EnumValue.name"); |
|
|
|
|
auto str = msg->mutable_name(); |
|
|
|
|
object = msg->mutable_name(); |
|
|
|
|
if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
|
|
|
|
object = str; |
|
|
|
|
str->clear(); |
|
|
|
|
str->reserve(size); |
|
|
|
|
parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
|
|
|
|
goto len_delim_till_end; |
|
|
|
|
goto string_till_end; |
|
|
|
|
} |
|
|
|
|
GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
|
|
|
|
::google::protobuf::internal::InlineGreedyStringParser(str, ptr, size, ctx); |
|
|
|
|
::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
|
|
|
|
ptr += size; |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
// int32 number = 2;
|
|
|
|
|
case 2: { |
|
|
|
|
if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual; |
|
|
|
|
::google::protobuf::uint64 val; |
|
|
|
|
ptr = ::google::protobuf::io::Parse64(ptr, &val); |
|
|
|
|
msg->set_number(::google::protobuf::internal::ReadVarint(&ptr)); |
|
|
|
|
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
|
|
|
|
::google::protobuf::int32 value = val; |
|
|
|
|
msg->set_number(value); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
// repeated .google.protobuf.Option options = 3;
|
|
|
|
@ -2607,11 +2561,9 @@ const char* EnumValue::_InternalParse(const char* begin, const char* end, void* |
|
|
|
|
parser_till_end = ::google::protobuf::Option::_InternalParse; |
|
|
|
|
object = msg->add_options(); |
|
|
|
|
if (size > end - ptr) goto len_delim_till_end; |
|
|
|
|
auto newend = ptr + size; |
|
|
|
|
bool ok = ctx->ParseExactRange({parser_till_end, object}, |
|
|
|
|
ptr, newend); |
|
|
|
|
GOOGLE_PROTOBUF_PARSER_ASSERT(ok); |
|
|
|
|
ptr = newend; |
|
|
|
|
ptr += size; |
|
|
|
|
GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
|
|
|
|
{parser_till_end, object}, ptr - size, ptr)); |
|
|
|
|
if (ptr >= end) break; |
|
|
|
|
} while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 26 && (ptr += 1)); |
|
|
|
|
break; |
|
|
|
@ -2631,6 +2583,10 @@ const char* EnumValue::_InternalParse(const char* begin, const char* end, void* |
|
|
|
|
} // switch
|
|
|
|
|
} // while
|
|
|
|
|
return ptr; |
|
|
|
|
string_till_end: |
|
|
|
|
static_cast<::std::string*>(object)->clear(); |
|
|
|
|
static_cast<::std::string*>(object)->reserve(size); |
|
|
|
|
goto len_delim_till_end; |
|
|
|
|
len_delim_till_end: |
|
|
|
|
return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, |
|
|
|
|
{parser_till_end, object}, size); |
|
|
|
@ -3041,16 +2997,13 @@ const char* Option::_InternalParse(const char* begin, const char* end, void* obj |
|
|
|
|
ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
|
|
|
|
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
|
|
|
|
ctx->extra_parse_data().SetFieldName("google.protobuf.Option.name"); |
|
|
|
|
auto str = msg->mutable_name(); |
|
|
|
|
object = msg->mutable_name(); |
|
|
|
|
if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
|
|
|
|
object = str; |
|
|
|
|
str->clear(); |
|
|
|
|
str->reserve(size); |
|
|
|
|
parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
|
|
|
|
goto len_delim_till_end; |
|
|
|
|
goto string_till_end; |
|
|
|
|
} |
|
|
|
|
GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
|
|
|
|
::google::protobuf::internal::InlineGreedyStringParser(str, ptr, size, ctx); |
|
|
|
|
::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
|
|
|
|
ptr += size; |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
@ -3062,11 +3015,9 @@ const char* Option::_InternalParse(const char* begin, const char* end, void* obj |
|
|
|
|
parser_till_end = ::google::protobuf::Any::_InternalParse; |
|
|
|
|
object = msg->mutable_value(); |
|
|
|
|
if (size > end - ptr) goto len_delim_till_end; |
|
|
|
|
auto newend = ptr + size; |
|
|
|
|
bool ok = ctx->ParseExactRange({parser_till_end, object}, |
|
|
|
|
ptr, newend); |
|
|
|
|
GOOGLE_PROTOBUF_PARSER_ASSERT(ok); |
|
|
|
|
ptr = newend; |
|
|
|
|
ptr += size; |
|
|
|
|
GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
|
|
|
|
{parser_till_end, object}, ptr - size, ptr)); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
default: { |
|
|
|
@ -3084,6 +3035,10 @@ const char* Option::_InternalParse(const char* begin, const char* end, void* obj |
|
|
|
|
} // switch
|
|
|
|
|
} // while
|
|
|
|
|
return ptr; |
|
|
|
|
string_till_end: |
|
|
|
|
static_cast<::std::string*>(object)->clear(); |
|
|
|
|
static_cast<::std::string*>(object)->reserve(size); |
|
|
|
|
goto len_delim_till_end; |
|
|
|
|
len_delim_till_end: |
|
|
|
|
return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, |
|
|
|
|
{parser_till_end, object}, size); |
|
|
|
|