--- old/src/hotspot/share/utilities/globalDefinitions.hpp 2018-11-16 19:18:37.662006188 -0800 +++ new/src/hotspot/share/utilities/globalDefinitions.hpp 2018-11-16 19:18:37.393995988 -0800 @@ -1261,4 +1261,17 @@ typedef const char* ccstr; typedef const char* ccstrlist; // represents string arguments which accumulate +//---------------------------------------------------------------------------------------------------- +// Default hash/equals functions used by ResourceHashtable and KVHashtable + +template unsigned primitive_hash(const K& k) { + unsigned hash = (unsigned)((uintptr_t)k); + return hash ^ (hash >> 3); // just in case we're dealing with aligned ptrs +} + +template bool primitive_equals(const K& k0, const K& k1) { + return k0 == k1; +} + + #endif // SHARE_VM_UTILITIES_GLOBALDEFINITIONS_HPP