--- a/src/hotspot/share/utilities/globalDefinitions.hpp Tue Nov 20 18:36:57 2018 -0800
+++ b/src/hotspot/share/utilities/globalDefinitions.hpp Tue Nov 20 20:00:15 2018 -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<typename K> 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<typename K> bool primitive_equals(const K& k0, const K& k1) {
+ return k0 == k1;
+}
+
+
#endif // SHARE_VM_UTILITIES_GLOBALDEFINITIONS_HPP