121#define PREFETCH(addr, write_p) __builtin_prefetch(addr, write_p)
122#define EXPECT(expr, val) __builtin_expect(expr, val)
123#define ATTRIBUTE_UNUSED __attribute__((unused))
125#define PREFETCH(addr, write_p)
126#define EXPECT(expr, val) (expr)
127#define ATTRIBUTE_UNUSED
139#define type_numhash st_hashtype_num
155 st_locale_insensitive_strcasecmp_i,
162#define ST_INIT_VAL 0xafafafafafafafaf
163#define ST_INIT_VAL_BYTE 0xafa
170#define malloc ruby_xmalloc
171#define calloc ruby_xcalloc
172#define realloc ruby_xrealloc
173#define free ruby_xfree
176#define EQUAL(tab,x,y) ((x) == (y) || (*(tab)->type->compare)((x),(y)) == 0)
177#define PTR_EQUAL(tab, ptr, hash_val, key_) \
178 ((ptr)->hash == (hash_val) && EQUAL((tab), (key_), (ptr)->key))
182#define DO_PTR_EQUAL_CHECK(tab, ptr, hash_val, key, res, rebuilt_p) \
184 unsigned int _old_rebuilds_num = (tab)->rebuilds_num; \
185 res = PTR_EQUAL(tab, ptr, hash_val, key); \
186 rebuilt_p = _old_rebuilds_num != (tab)->rebuilds_num; \
205#if SIZEOF_ST_INDEX_T == 8
224 {16, 17, 2, 0x10000},
225 {17, 18, 2, 0x20000},
226 {18, 19, 2, 0x40000},
227 {19, 20, 2, 0x80000},
228 {20, 21, 2, 0x100000},
229 {21, 22, 2, 0x200000},
230 {22, 23, 2, 0x400000},
231 {23, 24, 2, 0x800000},
232 {24, 25, 2, 0x1000000},
233 {25, 26, 2, 0x2000000},
234 {26, 27, 2, 0x4000000},
235 {27, 28, 2, 0x8000000},
236 {28, 29, 2, 0x10000000},
237 {29, 30, 2, 0x20000000},
238 {30, 31, 2, 0x40000000},
239 {31, 32, 2, 0x80000000},
240 {32, 33, 3, 0x200000000},
241 {33, 34, 3, 0x400000000},
242 {34, 35, 3, 0x800000000},
243 {35, 36, 3, 0x1000000000},
244 {36, 37, 3, 0x2000000000},
245 {37, 38, 3, 0x4000000000},
246 {38, 39, 3, 0x8000000000},
247 {39, 40, 3, 0x10000000000},
248 {40, 41, 3, 0x20000000000},
249 {41, 42, 3, 0x40000000000},
250 {42, 43, 3, 0x80000000000},
251 {43, 44, 3, 0x100000000000},
252 {44, 45, 3, 0x200000000000},
253 {45, 46, 3, 0x400000000000},
254 {46, 47, 3, 0x800000000000},
255 {47, 48, 3, 0x1000000000000},
256 {48, 49, 3, 0x2000000000000},
257 {49, 50, 3, 0x4000000000000},
258 {50, 51, 3, 0x8000000000000},
259 {51, 52, 3, 0x10000000000000},
260 {52, 53, 3, 0x20000000000000},
261 {53, 54, 3, 0x40000000000000},
262 {54, 55, 3, 0x80000000000000},
263 {55, 56, 3, 0x100000000000000},
264 {56, 57, 3, 0x200000000000000},
265 {57, 58, 3, 0x400000000000000},
266 {58, 59, 3, 0x800000000000000},
267 {59, 60, 3, 0x1000000000000000},
268 {60, 61, 3, 0x2000000000000000},
269 {61, 62, 3, 0x4000000000000000},
270 {62, 63, 3, 0x8000000000000000},
293 {16, 17, 2, 0x20000},
294 {17, 18, 2, 0x40000},
295 {18, 19, 2, 0x80000},
296 {19, 20, 2, 0x100000},
297 {20, 21, 2, 0x200000},
298 {21, 22, 2, 0x400000},
299 {22, 23, 2, 0x800000},
300 {23, 24, 2, 0x1000000},
301 {24, 25, 2, 0x2000000},
302 {25, 26, 2, 0x4000000},
303 {26, 27, 2, 0x8000000},
304 {27, 28, 2, 0x10000000},
305 {28, 29, 2, 0x20000000},
306 {29, 30, 2, 0x40000000},
307 {30, 31, 2, 0x80000000},
313#define RESERVED_HASH_VAL (~(st_hash_t) 0)
314#define RESERVED_HASH_SUBSTITUTION_VAL ((st_hash_t) 0)
328#define MINIMAL_POWER2 2
330#if MINIMAL_POWER2 < 2
331#error "MINIMAL_POWER2 should be >= 2"
336#define MAX_POWER2_FOR_TABLES_WITHOUT_BINS 4
358 return (s == 0 ? ((
unsigned char *) bins)[n]
359 : s == 1 ? ((
unsigned short *) bins)[n]
360 : s == 2 ? ((
unsigned int *) bins)[n]
369 if (s == 0) ((
unsigned char *) bins)[n] = (
unsigned char) v;
370 else if (s == 1) ((
unsigned short *) bins)[n] = (
unsigned short) v;
371 else if (s == 2) ((
unsigned int *) bins)[n] = (
unsigned int) v;
385#define MARK_BIN_EMPTY(tab, i) (set_bin((tab)->bins, get_size_ind(tab), i, EMPTY_BIN))
389#define UNDEFINED_ENTRY_IND (~(st_index_t) 0)
390#define UNDEFINED_BIN_IND (~(st_index_t) 0)
394#define REBUILT_TABLE_ENTRY_IND (~(st_index_t) 1)
395#define REBUILT_TABLE_BIN_IND (~(st_index_t) 1)
400#define MARK_BIN_DELETED(tab, i) \
402 set_bin((tab)->bins, get_size_ind(tab), i, DELETED_BIN); \
407#define EMPTY_BIN_P(b) ((b) == EMPTY_BIN)
408#define DELETED_BIN_P(b) ((b) == DELETED_BIN)
409#define EMPTY_OR_DELETED_BIN_P(b) ((b) <= DELETED_BIN)
413#define IND_EMPTY_BIN_P(tab, i) (EMPTY_BIN_P(get_bin((tab)->bins, get_size_ind(tab), i)))
414#define IND_DELETED_BIN_P(tab, i) (DELETED_BIN_P(get_bin((tab)->bins, get_size_ind(tab), i)))
415#define IND_EMPTY_OR_DELETED_BIN_P(tab, i) (EMPTY_OR_DELETED_BIN_P(get_bin((tab)->bins, get_size_ind(tab), i)))
419#define MARK_ENTRY_DELETED(e_ptr) ((e_ptr)->hash = RESERVED_HASH_VAL)
420#define DELETED_ENTRY_P(e_ptr) ((e_ptr)->hash == RESERVED_HASH_VAL)
423static inline unsigned int
426 return tab->size_ind;
440 return get_bins_num(
tab) - 1;
448 return hash_value & bins_mask(
tab);
469 memset(
tab->bins, 0, bins_size(
tab));
476 tab->num_entries = 0;
477 tab->entries_start =
tab->entries_bound = 0;
479 initialize_bins(
tab);
487 int all, total,
num,
str, strcase;
492static int init_st = 0;
499 char fname[10+
sizeof(
long)*3];
501 if (!collision.total)
return;
502 f = fopen((
snprintf(fname,
sizeof(fname),
"/tmp/col%ld", (
long)getpid()), fname),
"w");
505 fprintf(
f,
"collision: %d / %d (%6.2f)\n", collision.all, collision.total,
506 ((
double)collision.all / (collision.total)) * 100);
507 fprintf(
f,
"num: %d, str: %d, strcase: %d\n", collision.num, collision.str, collision.strcase);
524 const char *e =
getenv(
"ST_HASH_LOG");
525 if (!e || !*e) init_st = 1;
534 n = get_power2(
size);
545 tab->entry_power = n;
568 tab->rebuilds_num = 0;
674 else if (
type == &type_strhash) {
677 else if (
type == &type_strcasehash) {
682#define COLLISION (collision_check ? count_collision(tab->type) : (void)0)
683#define FOUND_BIN (collision_check ? collision.total++ : (void)0)
684#define collision_check 0
693#define REBUILD_THRESHOLD 4
695#if REBUILD_THRESHOLD < 2
696#error "REBUILD_THRESHOLD should be >= 2"
707 unsigned int size_ind;
714 bound =
tab->entries_bound;
715 entries =
tab->entries;
716 if ((2 *
tab->num_entries <= get_allocated_entries(
tab)
720 tab->num_entries = 0;
722 initialize_bins(
tab);
724 new_entries = entries;
728 2 *
tab->num_entries - 1);
729 new_entries = new_tab->
entries;
732 bins = new_tab->
bins;
733 size_ind = get_size_ind(new_tab);
734 for (i =
tab->entries_start; i < bound; i++) {
735 curr_entry_ptr = &entries[i];
739 if (&new_entries[ni] != curr_entry_ptr)
740 new_entries[ni] = *curr_entry_ptr;
742 bin_ind = find_table_bin_ind_direct(new_tab, curr_entry_ptr->
hash,
743 curr_entry_ptr->
key);
744 set_bin(bins, size_ind, bin_ind, ni +
ENTRY_BASE);
749 if (new_tab !=
tab) {
760 tab->entries_start = 0;
761 tab->entries_bound =
tab->num_entries;
782 return hash_bin(
ind,
tab);
796 bound =
tab->entries_bound;
797 entries =
tab->entries;
798 for (i =
tab->entries_start; i < bound; i++) {
821#ifdef QUADRATIC_PROBE
829 ind = hash_bin(hash_value,
tab);
830#ifdef QUADRATIC_PROBE
846#ifdef QUADRATIC_PROBE
866#ifdef QUADRATIC_PROBE
874 ind = hash_bin(hash_value,
tab);
875#ifdef QUADRATIC_PROBE
891#ifdef QUADRATIC_PROBE
909#ifdef QUADRATIC_PROBE
916 ind = hash_bin(hash_value,
tab);
917#ifdef QUADRATIC_PROBE
927#ifdef QUADRATIC_PROBE
953#ifdef QUADRATIC_PROBE
962 ind = hash_bin(curr_hash_value,
tab);
963#ifdef QUADRATIC_PROBE
966 peterb = curr_hash_value;
970 entries =
tab->entries;
972 entry_index = get_bin(
tab->bins, get_size_ind(
tab),
ind);
978 ind = first_deleted_bin_ind;
991 first_deleted_bin_ind =
ind;
992#ifdef QUADRATIC_PROBE
1021 bin = find_table_entry_ind(
tab, hash,
key);
1029 *value =
tab->entries[
bin].record;
1050 bin = find_table_entry_ind(
tab, hash,
key);
1058 *result =
tab->entries[
bin].key;
1068 if (bound == get_allocated_entries(
tab))
1085 hash_value = do_hash(
key,
tab);
1087 rebuild_table_if_necessary(
tab);
1098 bin = find_table_bin_ptr_and_reserve(
tab, &hash_value,
1106 ind =
tab->entries_bound++;
1107 entry = &
tab->entries[
ind];
1108 entry->
hash = hash_value;
1115 tab->entries[
bin].record = value;
1129 rebuild_table_if_necessary(
tab);
1130 ind =
tab->entries_bound++;
1131 entry = &
tab->entries[
ind];
1137 bin_ind = find_table_bin_ind_direct(
tab, hash,
key);
1149 hash_value = do_hash(
key,
tab);
1150 st_add_direct_with_hash(
tab,
key, value, hash_value);
1167 hash_value = do_hash(
key,
tab);
1169 rebuild_table_if_necessary (
tab);
1180 bin = find_table_bin_ptr_and_reserve(
tab, &hash_value,
1189 ind =
tab->entries_bound++;
1190 entry = &
tab->entries[
ind];
1191 entry->
hash = hash_value;
1198 tab->entries[
bin].record = value;
1210 if (new_tab ==
NULL)
1213 *new_tab = *old_tab;
1234 get_allocated_entries(old_tab));
1247 if (
tab->entries_start == n)
1248 tab->entries_start = n + 1;
1263 hash = do_hash(*
key,
tab);
1270 if (value != 0) *value = 0;
1275 bin_ind = find_table_bin_ind(
tab, hash, *
key);
1279 if (value != 0) *value = 0;
1285 entry = &
tab->entries[
bin];
1287 if (value != 0) *value = entry->
record;
1290 update_range_for_deleted(
tab,
bin);
1297 return st_general_delete(
tab,
key, value);
1309 return st_general_delete(
tab,
key, value);
1324 entries =
tab->entries;
1325 bound =
tab->entries_bound;
1326 for (i =
tab->entries_start; i < bound; i++) {
1327 curr_entry_ptr = &entries[i];
1332 if (value != 0) *value = curr_entry_ptr->
record;
1336 bin = find_entry(
tab, entry_hash, entry_key);
1338 entries =
tab->entries;
1341 curr_entry_ptr = &entries[
bin];
1344 bin_ind = find_table_bin_ind(
tab, entry_hash, entry_key);
1346 entries =
tab->entries;
1349 curr_entry_ptr = &entries[get_bin(
tab->bins, get_size_ind(
tab), bin_ind)
1355 update_range_for_deleted(
tab, i);
1359 if (value != 0) *value = 0;
1388 int retval, existing;
1392 entries =
tab->entries;
1398 entry = &entries[
bin];
1402 bin_ind = find_table_bin_ind(
tab, hash,
key);
1408 entry = &entries[
bin];
1416 retval = (*func)(&
key, &value, arg, existing);
1420 st_add_direct_with_hash(
tab,
key, value, hash);
1423 if (old_key !=
key) {
1434 update_range_for_deleted(
tab,
bin);
1460 int error_p, packed_p =
tab->bins ==
NULL;
1462 entries =
tab->entries;
1465 for (i =
tab->entries_start; i < tab->entries_bound; i++) {
1466 curr_entry_ptr = &entries[i];
1469 key = curr_entry_ptr->
key;
1470 rebuilds_num =
tab->rebuilds_num;
1471 hash = curr_entry_ptr->
hash;
1472 retval = (*func)(
key, curr_entry_ptr->
record, arg, 0);
1476 value = curr_entry_ptr->
record;
1477 retval = (*replace)(&
key, &value, arg,
TRUE);
1478 curr_entry_ptr->
key =
key;
1479 curr_entry_ptr->
record = value;
1482 if (rebuilds_num !=
tab->rebuilds_num) {
1484 entries =
tab->entries;
1487 i = find_entry(
tab, hash,
key);
1493 i = find_table_entry_ind(
tab, hash,
key);
1499 if (error_p && check_p) {
1501 retval = (*func)(0, 0, arg, 1);
1504 curr_entry_ptr = &entries[i];
1528 bin_ind = find_table_bin_ind(
tab, hash,
key);
1536 curr_entry_ptr = &entries[
bin];
1539 update_range_for_deleted(
tab,
bin);
1550 return st_general_foreach(
tab, func, replace, arg,
TRUE);
1561 const struct functor *
f = (
void *)d;
1562 return f->func(k, v,
f->arg);
1589 bound =
tab->entries_bound;
1591 keys_end = keys +
size;
1592 for (i =
tab->entries_start; i < bound; i++) {
1593 if (keys == keys_end)
1595 curr_entry_ptr = &entries[i];
1596 key = curr_entry_ptr->
key;
1601 return keys - keys_start;
1607 return st_general_keys(
tab, keys,
size);
1615 return st_general_keys(
tab, keys,
size);
1627 values_start = values;
1628 values_end = values +
size;
1629 bound =
tab->entries_bound;
1630 for (i =
tab->entries_start; i < bound; i++) {
1631 if (values == values_end)
1633 curr_entry_ptr = &entries[i];
1635 *values++ = curr_entry_ptr->
record;
1638 return values - values_start;
1644 return st_general_values(
tab, values,
size);
1652 return st_general_values(
tab, values,
size);
1655#define FNV1_32A_INIT 0x811c9dc5
1660#define FNV_32_PRIME 0x01000193
1662#ifndef UNALIGNED_WORD_ACCESS
1663# if defined(__i386) || defined(__i386__) || defined(_M_IX86) || \
1664 defined(__x86_64) || defined(__x86_64__) || defined(_M_AMD64) || \
1665 defined(__powerpc64__) || defined(__aarch64__) || \
1666 defined(__mc68020__)
1667# define UNALIGNED_WORD_ACCESS 1
1670#ifndef UNALIGNED_WORD_ACCESS
1671# define UNALIGNED_WORD_ACCESS 0
1677#define BIG_CONSTANT(x,y) ((st_index_t)(x)<<32|(st_index_t)(y))
1678#define ROTL(x,n) ((x)<<(n)|(x)>>(SIZEOF_ST_INDEX_T*CHAR_BIT-(n)))
1680#if ST_INDEX_BITS <= 32
1681#define C1 (st_index_t)0xcc9e2d51
1682#define C2 (st_index_t)0x1b873593
1684#define C1 BIG_CONSTANT(0x87c37b91,0x114253d5);
1685#define C2 BIG_CONSTANT(0x4cf5ad43,0x2745937f);
1694#if ST_INDEX_BITS <= 32
1713#if ST_INDEX_BITS <= 32
1727#if ST_INDEX_BITS > 64
1746 const char *data =
ptr;
1750#define data_at(n) (st_index_t)((unsigned char)data[(n)])
1751#define UNALIGNED_ADD_4 UNALIGNED_ADD(2); UNALIGNED_ADD(1); UNALIGNED_ADD(0)
1752#if SIZEOF_ST_INDEX_T > 4
1753#define UNALIGNED_ADD_8 UNALIGNED_ADD(6); UNALIGNED_ADD(5); UNALIGNED_ADD(4); UNALIGNED_ADD(3); UNALIGNED_ADD_4
1754#if SIZEOF_ST_INDEX_T > 8
1755#define UNALIGNED_ADD_16 UNALIGNED_ADD(14); UNALIGNED_ADD(13); UNALIGNED_ADD(12); UNALIGNED_ADD(11); \
1756 UNALIGNED_ADD(10); UNALIGNED_ADD(9); UNALIGNED_ADD(8); UNALIGNED_ADD(7); UNALIGNED_ADD_8
1757#define UNALIGNED_ADD_ALL UNALIGNED_ADD_16
1759#define UNALIGNED_ADD_ALL UNALIGNED_ADD_8
1761#define UNALIGNED_ADD_ALL UNALIGNED_ADD_4
1765#if !UNALIGNED_WORD_ACCESS
1772#ifdef WORDS_BIGENDIAN
1773# define UNALIGNED_ADD(n) case SIZEOF_ST_INDEX_T - (n) - 1: \
1774 t |= data_at(n) << CHAR_BIT*(SIZEOF_ST_INDEX_T - (n) - 2)
1776# define UNALIGNED_ADD(n) case SIZEOF_ST_INDEX_T - (n) - 1: \
1777 t |= data_at(n) << CHAR_BIT*(n)
1783#ifdef WORDS_BIGENDIAN
1797#ifdef WORDS_BIGENDIAN
1798 t = (
t << sr) | (d >> sl);
1800 t = (
t >> sr) | (d << sl);
1802 h = murmur_step(h,
t);
1808 pack =
len < (size_t)align ? (
int)
len : align;
1811#ifdef WORDS_BIGENDIAN
1812# define UNALIGNED_ADD(n) case (n) + 1: \
1813 d |= data_at(n) << CHAR_BIT*(SIZEOF_ST_INDEX_T - (n) - 1)
1815# define UNALIGNED_ADD(n) case (n) + 1: \
1816 d |= data_at(n) << CHAR_BIT*(n)
1821#ifdef WORDS_BIGENDIAN
1822 t = (
t << sr) | (d >> sl);
1824 t = (
t >> sr) | (d << sl);
1827 if (
len < (
size_t)align)
goto skip_tail;
1829 h = murmur_step(h,
t);
1835#ifdef HAVE_BUILTIN___BUILTIN_ASSUME_ALIGNED
1836#define aligned_data __builtin_assume_aligned(data, sizeof(st_index_t))
1838#define aligned_data data
1851#if UNALIGNED_WORD_ACCESS && SIZEOF_ST_INDEX_T <= 8 && CHAR_BIT == 8
1853#if SIZEOF_ST_INDEX_T > 4
1866#ifdef WORDS_BIGENDIAN
1867# define UNALIGNED_ADD(n) case (n) + 1: \
1868 t |= data_at(n) << CHAR_BIT*(SIZEOF_ST_INDEX_T - (n) - 1)
1870# define UNALIGNED_ADD(n) case (n) + 1: \
1871 t |= data_at(n) << CHAR_BIT*(n)
1885 return murmur_finish(h);
1891 return murmur_step(h, i);
1901#if SIZEOF_ST_INDEX_T*CHAR_BIT > 8*8
1902 h = murmur_step(h, i >> 8*8);
1904 h = murmur_step(h, i);
1911 h = murmur_finish(h);
1925 register const char *
string = (
const char *)
arg;
1937 if (c1 ==
'\0' || c2 ==
'\0') {
1938 if (c1 !=
'\0')
return 1;
1939 if (c2 !=
'\0')
return -1;
1942 if ((
'A' <= c1) && (c1 <=
'Z')) c1 +=
'a' -
'A';
1943 if ((
'A' <= c2) && (c2 <=
'Z')) c2 +=
'a' -
'A';
1959 for (i = 0; i < n; i++) {
1962 if (c1 ==
'\0' || c2 ==
'\0') {
1963 if (c1 !=
'\0')
return 1;
1964 if (c2 !=
'\0')
return -1;
1967 if ((
'A' <= c1) && (c1 <=
'Z')) c1 +=
'a' -
'A';
1968 if ((
'A' <= c2) && (c2 <=
'Z')) c2 +=
'a' -
'A';
1982 const char *s1 = (
char *)lhs;
1983 const char *s2 = (
char *)rhs;
1984 return strcmp(s1, s2);
1990 const char *s1 = (
char *)lhs;
1991 const char *s2 = (
char *)rhs;
1999 register const char *
string = (
const char *)
arg;
2006 unsigned int c = (
unsigned char)*
string++;
2007 if ((
unsigned int)(c -
'A') <= (
'Z' -
'A')) c +=
'a' -
'A';
2025 enum {s1 = 11, s2 = 3};
2026 return (
st_index_t)((n>>s1|(n<<s2)) ^ (n>>s2));
2038 if (siz <= get_allocated_entries(
tab))
2042 n = get_allocated_entries(
tab);
2054 tab->rebuilds_num++;
2063 int eq_p, rebuilt_p;
2070 for (i =
tab->entries_start; i < tab->entries_bound; i++) {
2071 p = &
tab->entries[i];
2074 for (j = i + 1; j <
tab->entries_bound; j++) {
2075 q = &
tab->entries[j];
2079 if (
EXPECT(rebuilt_p, 0))
2085 update_range_for_deleted(
tab, j);
2097 int eq_p, rebuilt_p;
2100 unsigned int const size_ind = get_size_ind(
tab);
2103 initialize_bins(
tab);
2104 for (i =
tab->entries_start; i < tab->entries_bound; i++) {
2107#ifdef QUADRATIC_PROBE
2127 if (
EXPECT(rebuilt_p, 0))
2134 update_range_for_deleted(
tab,
bin);
2139#ifdef QUADRATIC_PROBE
2143 ind = secondary_hash(
ind,
tab, &peterb);
2162 rebuilt_p = st_rehash_linear(
tab);
2164 rebuilt_p = st_rehash_indexed(
tab);
2165 }
while (rebuilt_p);
2185 tab->entries[
tab->entries_bound++] = e;
2196 for (i = 0; i <
argc; ) {
2211 for (i = 0; i <
argc; ) {
2214 st_insert_single(
tab, hash,
key, val);
2230 n =
tab->entries_bound +
size;
2231 st_expand_table(
tab, n);
2247 tab->num_entries ==
tab->entries_bound &&
2248 index < tab->num_entries)) {
2249 return tab->entries[index].key;
Internal header for bitwise integer algorithms.
char str[HTML_ESCAPE_MAX_LEN+1]
void rb_raise(VALUE exc, const char *fmt,...)
void rb_bug(const char *fmt,...)
VALUE rb_obj_class(VALUE)
VALUE rb_hash_key_str(VALUE key)
Internal header for Hash.
typedef long(ZCALLBACK *tell_file_func) OF((voidpf opaque
typedef int(ZCALLBACK *close_file_func) OF((voidpf opaque
#define MEMCPY(p1, p2, type, n)
VALUE type(ANYARGS)
ANYARGS-ed function type.
#define RB_OBJ_WRITTEN(a, oldv, b)
WB for new reference from ‘a’ to ‘b’.
Internal header for ASAN / MSAN / etc.
#define NO_SANITIZE(x, y)
#define RESERVED_HASH_SUBSTITUTION_VAL
#define UNDEFINED_BIN_IND
#define MAX_POWER2_FOR_TABLES_WITHOUT_BINS
#define MARK_BIN_DELETED(tab, i)
#define MARK_BIN_EMPTY(tab, i)
#define REBUILT_TABLE_BIN_IND
#define DELETED_ENTRY_P(e_ptr)
st_index_t rb_st_hash_start(st_index_t h)
#define UNALIGNED_ADD_ALL
#define REBUILD_THRESHOLD
st_table * st_init_numtable(void)
st_table * st_init_strtable(void)
#define UNDEFINED_ENTRY_IND
void rb_hash_bulk_insert_into_st_table(long argc, const VALUE *argv, VALUE hash)
#define DO_PTR_EQUAL_CHECK(tab, ptr, hash_val, key, res, rebuilt_p)
#define RESERVED_HASH_VAL
#define EXPECT(expr, val)
st_data_t rb_st_nth_key(st_table *tab, st_index_t index)
#define EMPTY_OR_DELETED_BIN_P(b)
#define REBUILT_TABLE_ENTRY_IND
#define BIG_CONSTANT(x, y)
#define PREFETCH(addr, write_p)
st_table * st_init_strcasetable(void)
#define MARK_ENTRY_DELETED(e_ptr)
#define st_init_strcasetable_with_size
#define st_init_numtable_with_size
int st_foreach_check_callback_func(st_data_t, st_data_t, st_data_t, int)
#define st_locale_insensitive_strncasecmp
#define st_init_strtable_with_size
#define st_locale_insensitive_strcasecmp
#define st_init_table_with_size
#define SIZEOF_ST_INDEX_T
int st_update_callback_func(st_data_t *key, st_data_t *value, st_data_t arg, int existing)
int st_foreach_callback_func(st_data_t, st_data_t, st_data_t)
#define st_foreach_with_replace
size_t strlen(const char *)
st_foreach_callback_func * func
unsigned char entry_power
unsigned char entry_power