3030#define DO_FLAG (type, name,...) DO_HASH(FLAG_MEMBER_ENUM(name), XSTR(name))
3131
3232#define DO_HASH (flag_enum, flag_name ) { \
33- u2 hash = hash_code (flag_name); \
33+ unsigned int hash = hash_code (flag_name); \
3434 int bucket_index = (int )(hash % NUM_BUCKETS); \
35- _hashes[flag_enum] = hash; \
35+ _hashes[flag_enum] = (u2)( hash); \
3636 _table[flag_enum] = _buckets[bucket_index]; \
3737 _buckets[bucket_index] = (short )flag_enum; \
3838}
@@ -54,10 +54,10 @@ constexpr JVMFlagLookup::JVMFlagLookup() : _buckets(), _table(), _hashes() {
5454constexpr JVMFlagLookup _flag_lookup_table;
5555
5656JVMFlag* 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);
5858 int bucket_index = (int )(hash % NUM_BUCKETS);
5959 for (int flag_enum = _buckets[bucket_index]; flag_enum >= 0 ; ) {
60- if (_hashes[flag_enum] == hash) {
60+ if (_hashes[flag_enum] == (u2) hash) {
6161 JVMFlag* flag = JVMFlag::flags + flag_enum;
6262 if (strncmp (name, flag->name (), length) == 0 ) {
6363 // We know flag->name() has at least <length> bytes.
0 commit comments