--- a/hotspot/src/share/vm/utilities/hashtable.inline.hpp Mon Jun 11 13:10:14 2012 -0400
+++ b/hotspot/src/share/vm/utilities/hashtable.inline.hpp Wed Jun 13 19:52:59 2012 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2012, 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
@@ -30,27 +30,6 @@
// Inline function definitions for hashtable.hpp.
-
-// --------------------------------------------------------------------------
-// Hash function
-
-// We originally used hashpjw, but hash P(31) gives just as good results
-// and is slighly faster. We would like a hash function that looks at every
-// character, since package names have large common prefixes, and also because
-// hash_or_fail does error checking while iterating.
-
-// hash P(31) from Kernighan & Ritchie
-
-inline unsigned int BasicHashtable::hash_symbol(const char* s, int len) {
- unsigned int h = 0;
- while (len-- > 0) {
- h = 31*h + (unsigned) *s;
- s++;
- }
- return h;
-}
-
-
// --------------------------------------------------------------------------
// Initialize a table.