#include "upb/internal/table.h"
#include <string.h>
#include "upb/port_def.inc"
#define UPB_MAXARRSIZE …
#define ARRAY_SIZE(x) …
static const double MAX_LOAD = …;
static const double MIN_DENSITY = …;
static bool is_pow2(uint64_t v) { … }
static upb_value _upb_value_val(uint64_t val) { … }
static int log2ceil(uint64_t v) { … }
char* upb_strdup2(const char* s, size_t len, upb_Arena* a) { … }
lookupkey_t;
static lookupkey_t strkey2(const char* str, size_t len) { … }
static lookupkey_t intkey(uintptr_t key) { … }
hashfunc_t;
eqlfunc_t;
static uint32_t upb_inthash(uintptr_t key) { … }
static const upb_tabent* upb_getentry(const upb_table* t, uint32_t hash) { … }
static bool upb_arrhas(upb_tabval key) { … }
static bool isfull(upb_table* t) { … }
static bool init(upb_table* t, uint8_t size_lg2, upb_Arena* a) { … }
static upb_tabent* emptyent(upb_table* t, upb_tabent* e) { … }
static upb_tabent* getentry_mutable(upb_table* t, uint32_t hash) { … }
static const upb_tabent* findentry(const upb_table* t, lookupkey_t key,
uint32_t hash, eqlfunc_t* eql) { … }
static upb_tabent* findentry_mutable(upb_table* t, lookupkey_t key,
uint32_t hash, eqlfunc_t* eql) { … }
static bool lookup(const upb_table* t, lookupkey_t key, upb_value* v,
uint32_t hash, eqlfunc_t* eql) { … }
static void insert(upb_table* t, lookupkey_t key, upb_tabkey tabkey,
upb_value val, uint32_t hash, hashfunc_t* hashfunc,
eqlfunc_t* eql) { … }
static bool rm(upb_table* t, lookupkey_t key, upb_value* val,
upb_tabkey* removed, uint32_t hash, eqlfunc_t* eql) { … }
static size_t next(const upb_table* t, size_t i) { … }
static size_t begin(const upb_table* t) { … }
static upb_tabkey strcopy(lookupkey_t k2, upb_Arena* a) { … }
static uint64_t UnalignedLoad64(const void* p) { … }
static uint32_t UnalignedLoad32(const void* p) { … }
#if defined(_MSC_VER) && defined(_M_X64)
#include <intrin.h>
#endif
static uint64_t upb_umul128(uint64_t v0, uint64_t v1, uint64_t* out_high) { … }
static uint64_t WyhashMix(uint64_t v0, uint64_t v1) { … }
static uint64_t Wyhash(const void* data, size_t len, uint64_t seed,
const uint64_t salt[]) { … }
const uint64_t kWyhashSalt[5] = …;
uint32_t _upb_Hash(const void* p, size_t n, uint64_t seed) { … }
static uint32_t _upb_Hash_NoSeed(const char* p, size_t n) { … }
static uint32_t strhash(upb_tabkey key) { … }
static bool streql(upb_tabkey k1, lookupkey_t k2) { … }
bool upb_strtable_init(upb_strtable* t, size_t expected_size, upb_Arena* a) { … }
void upb_strtable_clear(upb_strtable* t) { … }
bool upb_strtable_resize(upb_strtable* t, size_t size_lg2, upb_Arena* a) { … }
bool upb_strtable_insert(upb_strtable* t, const char* k, size_t len,
upb_value v, upb_Arena* a) { … }
bool upb_strtable_lookup2(const upb_strtable* t, const char* key, size_t len,
upb_value* v) { … }
bool upb_strtable_remove2(upb_strtable* t, const char* key, size_t len,
upb_value* val) { … }
void upb_strtable_begin(upb_strtable_iter* i, const upb_strtable* t) { … }
void upb_strtable_next(upb_strtable_iter* i) { … }
bool upb_strtable_done(const upb_strtable_iter* i) { … }
upb_StringView upb_strtable_iter_key(const upb_strtable_iter* i) { … }
upb_value upb_strtable_iter_value(const upb_strtable_iter* i) { … }
void upb_strtable_iter_setdone(upb_strtable_iter* i) { … }
bool upb_strtable_iter_isequal(const upb_strtable_iter* i1,
const upb_strtable_iter* i2) { … }
static uint32_t inthash(upb_tabkey key) { … }
static bool inteql(upb_tabkey k1, lookupkey_t k2) { … }
static upb_tabval* mutable_array(upb_inttable* t) { … }
static upb_tabval* inttable_val(upb_inttable* t, uintptr_t key) { … }
static const upb_tabval* inttable_val_const(const upb_inttable* t,
uintptr_t key) { … }
size_t upb_inttable_count(const upb_inttable* t) { … }
static void check(upb_inttable* t) { … }
bool upb_inttable_sizedinit(upb_inttable* t, size_t asize, int hsize_lg2,
upb_Arena* a) { … }
bool upb_inttable_init(upb_inttable* t, upb_Arena* a) { … }
bool upb_inttable_insert(upb_inttable* t, uintptr_t key, upb_value val,
upb_Arena* a) { … }
bool upb_inttable_lookup(const upb_inttable* t, uintptr_t key, upb_value* v) { … }
bool upb_inttable_replace(upb_inttable* t, uintptr_t key, upb_value val) { … }
bool upb_inttable_remove(upb_inttable* t, uintptr_t key, upb_value* val) { … }
void upb_inttable_compact(upb_inttable* t, upb_Arena* a) { … }
static const upb_tabent* int_tabent(const upb_inttable_iter* i) { … }
static upb_tabval int_arrent(const upb_inttable_iter* i) { … }
void upb_inttable_begin(upb_inttable_iter* i, const upb_inttable* t) { … }
void upb_inttable_next(upb_inttable_iter* iter) { … }
bool upb_inttable_next2(const upb_inttable* t, uintptr_t* key, upb_value* val,
intptr_t* iter) { … }
void upb_inttable_removeiter(upb_inttable* t, intptr_t* iter) { … }
bool upb_strtable_next2(const upb_strtable* t, upb_StringView* key,
upb_value* val, intptr_t* iter) { … }
void upb_strtable_removeiter(upb_strtable* t, intptr_t* iter) { … }
bool upb_inttable_done(const upb_inttable_iter* i) { … }
uintptr_t upb_inttable_iter_key(const upb_inttable_iter* i) { … }
upb_value upb_inttable_iter_value(const upb_inttable_iter* i) { … }
void upb_inttable_iter_setdone(upb_inttable_iter* i) { … }
bool upb_inttable_iter_isequal(const upb_inttable_iter* i1,
const upb_inttable_iter* i2) { … }