< prev index next >
src/hotspot/share/utilities/resourceHash.hpp
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
@@ -30,19 +30,10 @@
template<typename K> struct ResourceHashtableFns {
typedef unsigned (*hash_fn)(K const&);
typedef bool (*equals_fn)(K const&, K const&);
};
-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;
-}
-
template<
typename K, typename V,
// xlC does not compile this:
// http://stackoverflow.com/questions/8532961/template-argument-of-type-that-is-defined-by-inner-typedef-from-other-template-c
//typename ResourceHashtableFns<K>::hash_fn HASH = primitive_hash<K>,
< prev index next >