30
30
#define DO_FLAG (type, name,...) DO_HASH(FLAG_MEMBER_ENUM(name), XSTR(name))
31
31
32
32
#define DO_HASH (flag_enum, flag_name ) { \
33
- u2 hash = hash_code (flag_name); \
33
+ unsigned int hash = hash_code (flag_name); \
34
34
int bucket_index = (int )(hash % NUM_BUCKETS); \
35
- _hashes[flag_enum] = hash; \
35
+ _hashes[flag_enum] = (u2)( hash); \
36
36
_table[flag_enum] = _buckets[bucket_index]; \
37
37
_buckets[bucket_index] = (short )flag_enum; \
38
38
}
@@ -54,10 +54,10 @@ constexpr JVMFlagLookup::JVMFlagLookup() : _buckets(), _table(), _hashes() {
54
54
constexpr JVMFlagLookup _flag_lookup_table;
55
55
56
56
JVMFlag* JVMFlagLookup::find_impl (const char * name, size_t length) const {
57
- u2 hash = hash_code (name, length);
57
+ unsigned int hash = hash_code (name, length);
58
58
int bucket_index = (int )(hash % NUM_BUCKETS);
59
59
for (int flag_enum = _buckets[bucket_index]; flag_enum >= 0 ; ) {
60
- if (_hashes[flag_enum] == hash) {
60
+ if (_hashes[flag_enum] == (u2) hash) {
61
61
JVMFlag* flag = JVMFlag::flags + flag_enum;
62
62
if (strncmp (name, flag->name (), length) == 0 ) {
63
63
// We know flag->name() has at least <length> bytes.
0 commit comments