equal
deleted
inserted
replaced
1259 // processing utilities. |
1259 // processing utilities. |
1260 |
1260 |
1261 typedef const char* ccstr; |
1261 typedef const char* ccstr; |
1262 typedef const char* ccstrlist; // represents string arguments which accumulate |
1262 typedef const char* ccstrlist; // represents string arguments which accumulate |
1263 |
1263 |
|
1264 //---------------------------------------------------------------------------------------------------- |
|
1265 // Default hash/equals functions used by ResourceHashtable and KVHashtable |
|
1266 |
|
1267 template<typename K> unsigned primitive_hash(const K& k) { |
|
1268 unsigned hash = (unsigned)((uintptr_t)k); |
|
1269 return hash ^ (hash >> 3); // just in case we're dealing with aligned ptrs |
|
1270 } |
|
1271 |
|
1272 template<typename K> bool primitive_equals(const K& k0, const K& k1) { |
|
1273 return k0 == k1; |
|
1274 } |
|
1275 |
|
1276 |
1264 #endif // SHARE_VM_UTILITIES_GLOBALDEFINITIONS_HPP |
1277 #endif // SHARE_VM_UTILITIES_GLOBALDEFINITIONS_HPP |