Go to the documentation of this file.
38 #include "upb/port_def.inc"
95 #define TYPE_MSGSET_ITEM 19
96 #define TYPE_MSGSET_TYPE_ID 20
100 #define OP_UNKNOWN -1
101 #define OP_MSGSET_ITEM -2
102 #define OP_MSGSET_TYPEID -3
103 #define OP_SCALAR_LG2(n) (n)
109 #define OP_FIXPCK_LG2(n) (n + 5)
110 #define OP_VARPCK_LG2(n) (n + 9)
111 #define OP_PACKED_ENUM 13
225 for (
i = 1;
i < 10;
i++) {
227 val += (
byte - 1) << (
i * 7);
228 if (!(
byte & 0x80)) {
382 if (val)
byte |= 0x80U;
406 int n = e->value_count;
407 for (
int i = 0;
i <
n;
i++) {
449 int mask = (1 << lg2) - 1;
451 if ((val->
size & mask) != 0) {
492 int scale = 1 << lg2;
625 memset(&ent, 0,
sizeof(ent));
665 if (
field->presence > 0) {
667 }
else if (
field->presence < 0) {
673 *oneof_case =
field->number;
718 assert(
l->required_count);
726 d->missing_required =
true;
736 if (
layout &&
layout->table_mask != (
unsigned char)-1) {
770 int* last_field_index) {
772 if (
l == NULL)
return &none;
774 size_t idx = ((size_t)field_number) - 1;
775 if (idx < l->dense_below) {
780 if (
l->dense_below <
l->field_count) {
783 int last = *last_field_index;
784 for (
idx = last;
idx <
l->field_count;
idx++) {
785 if (
l->fields[
idx].number == field_number) {
790 for (
idx =
l->dense_below;
idx < last;
idx++) {
791 if (
l->fields[
idx].number == field_number) {
802 if (
ext)
return &
ext->field;
812 switch (field_number) {
838 *last_field_index =
idx;
839 return &
l->fields[
idx];
869 int ndx =
field->descriptortype;
932 }
while (
seen != val);
965 assert(
start ==
d->debug_valstart);
968 assert(
start ==
d->debug_tagstart);
972 d->unknown_msg =
msg;
975 d->unknown_msg = NULL;
990 int last_field_index = 0;
1013 d->debug_tagstart =
ptr;
1018 field_number =
tag >> 3;
1019 wire_type =
tag & 7;
1022 d->debug_valstart =
ptr;
1026 d->end_group = field_number;
1095 state.extreg = extreg;
1097 state.unknown_msg = NULL;
1101 state.missing_required =
false;
1104 state.arena.cleanup_metadata =
arena->cleanup_metadata;
1114 arena->cleanup_metadata =
state.arena.cleanup_metadata;
1120 #undef OP_SCALAR_LG2
1121 #undef OP_FIXPCK_LG2
1122 #undef OP_VARPCK_LG2
UPB_INLINE uint64_t upb_MiniTable_requiredmask(const upb_MiniTable *l)
static const UPB_FORCEINLINE char * decode_wireval(upb_Decoder *d, const char *ptr, const upb_MiniTable_Field *field, int wire_type, wireval *val, int *op)
@ kUpb_WireType_Delimited
@ kUpb_DecodeStatus_MissingRequired
@ kUpb_FieldType_SFixed64
static const uint8_t desctype_to_mapsize[]
static const unsigned FIXED64_OK_MASK
return memset(p, 0, total)
const upb_MiniTable_Field * fields
#define kUpb_FieldMode_Mask
UPB_INLINE void decode_poplimit(upb_decstate *d, const char *ptr, int saved_delta)
upb_DecodeStatus upb_Decode(const char *buf, size_t size, void *msg, const upb_MiniTable *l, const upb_ExtensionRegistry *extreg, int options, upb_Arena *arena)
@ kUpb_DecodeStatus_BadUtf8
static void decode_munge_int32(wireval *val)
const struct upb_MiniTable * submsg
static const uint8_t desctype_to_elem_size_lg2[]
const UPB_NOINLINE char * decode_isdonefallback(upb_Decoder *d, const char *ptr, int overrun)
UPB_INLINE upb_Message * _upb_Message_New_inl(const upb_MiniTable *l, upb_Arena *a)
UPB_INLINE void _upb_sethas_field(const upb_msg *msg, const upb_msglayout_field *f)
const char * upb_Message_GetUnknown(const upb_Message *msg, size_t *len)
#define UPB_UNREACHABLE()
static const UPB_NOINLINE char * decode_enum_toarray(upb_Decoder *d, const char *ptr, upb_Message *msg, upb_Array *arr, const upb_MiniTable_Sub *subs, const upb_MiniTable_Field *field, wireval *val)
static const UPB_FORCEINLINE char * decode_varint_packed(upb_Decoder *d, const char *ptr, upb_Array *arr, wireval *val, const upb_MiniTable_Field *field, int lg2)
upb_Message_Extension * _upb_Message_Getorcreateext(upb_Message *msg, const upb_MiniTable_Extension *e, upb_Arena *arena)
@ kUpb_FieldType_SFixed32
static const UPB_FORCEINLINE char * decode_known(upb_Decoder *d, const char *ptr, upb_Message *msg, const upb_MiniTable *layout, const upb_MiniTable_Field *field, int op, wireval *val)
@ kUpb_DecodeStatus_MaxDepthExceeded
@ kUpb_DecodeStatus_Malformed
UPB_INLINE intptr_t decode_totable(const upb_msglayout *tablep)
UPB_INLINE bool _upb_Map_Set(upb_Map *map, const void *key, size_t key_size, void *val, size_t val_size, upb_Arena *a)
const UPB_INLINE upb_msglayout * decode_totablep(intptr_t table)
static UPB_NOINLINE decode_vret decode_longvarint64(const char *ptr, uint64_t val)
#define UPB_PTR_AT(msg, ofs, type)
static upb_Message * decode_newsubmsg(upb_Decoder *d, const upb_MiniTable_Sub *subs, const upb_MiniTable_Field *field)
static const char * decode_toarray(upb_Decoder *d, const char *ptr, upb_Message *msg, const upb_MiniTable_Sub *subs, const upb_MiniTable_Field *field, wireval *val, int op)
grpc_core::ScopedArenaPtr arena
@ kUpb_LabelFlags_IsExtension
static const char * decode_msgset(upb_Decoder *d, const char *ptr, upb_Message *msg, const upb_MiniTable *layout)
union upb_MapEntry::@708 k
static void decode_verifyutf8(upb_Decoder *d, const char *buf, int len)
UPB_INLINE void * _upb_array_ptr(upb_array *arr)
memcpy(mem, inblock.get(), min(CONTAINING_RECORD(inblock.get(), MEMBLOCK, data) ->size, size))
upb_Message * _upb_Message_New(const upb_MiniTable *l, upb_Arena *a)
const upb_MiniTable_Sub * subs
static const char * decode_tomsg(upb_Decoder *d, const char *ptr, upb_Message *msg, const upb_MiniTable_Sub *subs, const upb_MiniTable_Field *field, wireval *val, int op)
static const UPB_FORCEINLINE char * decode_group(upb_Decoder *d, const char *ptr, upb_Message *submsg, const upb_MiniTable *subl, uint32_t number)
static const char * decode_reverse_skip_varint(const char *ptr, uint32_t val)
static void * tag(intptr_t t)
const UPB_NOINLINE char * decode_checkrequired(upb_Decoder *d, const char *ptr, const upb_Message *msg, const upb_MiniTable *l)
static const char * decode_msg(upb_Decoder *d, const char *ptr, upb_Message *msg, const upb_MiniTable *layout)
bool _upb_array_realloc(upb_array *arr, size_t min_size, upb_arena *arena)
UPB_INLINE bool decode_verifyutf8_inl(const char *buf, int len)
#define UPB_SIZE(size32, size64)
UPB_INLINE void * upb_Arena_Malloc(upb_Arena *a, size_t size)
static void decode_munge(int type, wireval *val)
unsigned __int64 uint64_t
union upb_MapEntry::@709 v
UPB_INLINE upb_FieldMode upb_FieldMode_Get(const upb_MiniTable_Field *field)
static const upb_MiniTable_Field * decode_findfield(upb_Decoder *d, const upb_MiniTable *l, uint32_t field_number, int *last_field_index)
@ kUpb_DecodeOption_AliasString
bool _upb_Message_AddUnknown(upb_Message *msg, const char *data, size_t len, upb_Arena *arena)
UPB_INLINE uint32_t fastdecode_loadtag(const char *ptr)
const char * fastdecode_err(upb_Decoder *d, int status)
upb_Map * _upb_Map_New(upb_Arena *a, size_t key_size, size_t value_size)
static const char * decode_unknown(upb_Decoder *d, const char *ptr, upb_Message *msg, int field_number, int wire_type, wireval val)
UPB_INLINE uint64_t _upb_BigEndian_Swap64(uint64_t val)
UPB_INLINE bool _upb_IsLittleEndian(void)
@ kUpb_ExtMode_Extendable
static void upb_Decode_AddUnknownVarints(upb_Decoder *d, upb_Message *msg, uint32_t val1, uint32_t val2)
static UPB_FORCEINLINE bool decode_tryfastdispatch(upb_Decoder *d, const char **ptr, upb_Message *msg, const upb_MiniTable *layout)
static UPB_FORCEINLINE bool decode_checkenum(upb_Decoder *d, const char *ptr, upb_Message *msg, const upb_MiniTable_Enum *e, const upb_MiniTable_Field *field, wireval *val)
const UPB_INLINE char * decode_isdonefallback_inl(upb_decstate *d, const char *ptr, int overrun)
static const UPB_FORCEINLINE char * decode_varint64(upb_Decoder *d, const char *ptr, uint64_t *val)
static const UPB_NOINLINE char * decode_enum_packed(upb_Decoder *d, const char *ptr, upb_Message *msg, upb_Array *arr, const upb_MiniTable_Sub *subs, const upb_MiniTable_Field *field, wireval *val)
#define UPB_MAPTYPE_STRING
const FieldDescriptor * field
@ kUpb_ExtMode_IsMessageSet_ITEM
static char * encode_varint32(uint32_t val, char *ptr)
static const UPB_FORCEINLINE char * decode_tosubmsg(upb_Decoder *d, const char *ptr, upb_Message *submsg, const upb_MiniTable_Sub *subs, const upb_MiniTable_Field *field, int size)
static const char * decode_readstr(upb_Decoder *d, const char *ptr, int size, upb_StringView *str)
UniquePtr< SSL_SESSION > ret
@ kUpb_DecodeOption_CheckRequired
static upb_DecodeStatus decode_top(struct upb_Decoder *d, const char *buf, void *msg, const upb_MiniTable *l)
@ kUpb_ExtMode_IsMessageSet
static const UPB_FORCEINLINE char * decode_tosubmsg2(upb_Decoder *d, const char *ptr, upb_Message *submsg, const upb_MiniTable *subl, int size)
UPB_INLINE upb_Array * _upb_Array_New(upb_Arena *a, size_t init_size, int elem_size_lg2)
const char * fastdecode_generic(struct upb_Decoder *d, const char *ptr, upb_Message *msg, intptr_t table, uint64_t hasbits, uint64_t data)
UPB_INLINE bool decode_isdone(upb_decstate *d, const char **ptr)
@ kUpb_DecodeStatus_OutOfMemory
static const UPB_FORCEINLINE char * decode_tag(upb_Decoder *d, const char *ptr, uint32_t *val)
static const int8_t varint_ops[]
UPB_INLINE uint32_t _upb_BigEndian_Swap32(uint32_t val)
static UPB_NORETURN void * decode_err(upb_Decoder *d, upb_DecodeStatus status)
const upb_msglayout_field * _upb_extreg_get(const upb_extreg *r, const upb_msglayout *l, uint32_t num)
UPB_INLINE int decode_pushlimit(upb_decstate *d, const char *ptr, int size)
#define TYPE_MSGSET_TYPE_ID
static const unsigned FIXED32_OK_MASK
static const char * decode_tomap(upb_Decoder *d, const char *ptr, upb_Message *msg, const upb_MiniTable_Sub *subs, const upb_MiniTable_Field *field, wireval *val)
static const UPB_FORCEINLINE char * decode_togroup(upb_Decoder *d, const char *ptr, upb_Message *submsg, const upb_MiniTable_Sub *subs, const upb_MiniTable_Field *field)
static bool decode_reserve(upb_Decoder *d, upb_Array *arr, size_t elem)
UPB_INLINE uint32_t * _upb_oneofcase_field(upb_msg *msg, const upb_msglayout_field *f)
#define UPB_LONGJMP(buf, val)
static const UPB_FORCEINLINE char * decode_fixed_packed(upb_Decoder *d, const char *ptr, upb_Array *arr, wireval *val, const upb_MiniTable_Field *field, int lg2)
@ kUpb_WireType_StartGroup
static struct rpc_state state
static const int8_t delim_ops[]
static UPB_NOINLINE bool decode_checkenum_slow(upb_Decoder *d, const char *ptr, upb_Message *msg, const upb_MiniTable_Enum *e, const upb_MiniTable_Field *field, uint32_t v)
grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:59:02