|
|
|
@ -412,15 +412,20 @@ static bool decode_checkenum_slow(upb_Decoder* d, const char* ptr, |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#include <stdio.h> |
|
|
|
|
UPB_FORCEINLINE |
|
|
|
|
static bool decode_checkenum(upb_Decoder* d, const char* ptr, upb_Message* msg, |
|
|
|
|
const upb_MiniTable_Enum* e, |
|
|
|
|
const upb_MiniTable_Field* field, wireval* val) { |
|
|
|
|
uint32_t v = val->uint32_val; |
|
|
|
|
|
|
|
|
|
printf("@test:we are here\n"); |
|
|
|
|
if (UPB_LIKELY(v < 64) && UPB_LIKELY(((1ULL << v) & e->mask))) return true; |
|
|
|
|
|
|
|
|
|
return decode_checkenum_slow(d, ptr, msg, e, field, v); |
|
|
|
|
printf("@test:we are here 2\n"); |
|
|
|
|
bool ans = decode_checkenum_slow(d, ptr, msg, e, field, v); |
|
|
|
|
printf("@test:%d\n", (int)ans); |
|
|
|
|
return ans; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
UPB_NOINLINE |
|
|
|
@ -628,7 +633,15 @@ static const char* decode_tomap(upb_Decoder* d, const char* ptr, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
ptr = decode_tosubmsg(d, ptr, &ent.k, subs, field, val->size); |
|
|
|
|
_upb_Map_Set(map, &ent.k, map->key_size, &ent.v, map->val_size, &d->arena); |
|
|
|
|
// check if ent had any unknown fields
|
|
|
|
|
size_t size; |
|
|
|
|
const char* unknown = upb_Message_GetUnknown(&ent.k, &size); |
|
|
|
|
printf("@test:size = %d %p\n", (int)size, unknown); |
|
|
|
|
if(size != 0) { |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
_upb_Map_Set(map, &ent.k, map->key_size, &ent.v, map->val_size, &d->arena); |
|
|
|
|
} |
|
|
|
|
return ptr; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|