comparison src/share/vm/utilities/hashtable.cpp @ 17709:f9e35a9dc8c7

8033792: AltHashing used jint for imprecise bit shifting Summary: AltHashing used jint the way of juint in bit shifting which could lead loss of precision. Fix by change _seed defined as juint. Reviewed-by: coleenp, ccheung Contributed-by: yumin.qi@oracle.com
author minqi
date Mon, 10 Feb 2014 21:29:14 -0800
parents 190899198332
children 524b54a7f1b5 152cf4afc11f
comparison
equal deleted inserted replaced
17707:7d28f4e15b61 17709:f9e35a9dc8c7
1 /* 1 /*
2 * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
91 return true; 91 return true;
92 } 92 }
93 return false; 93 return false;
94 } 94 }
95 95
96 template <class T, MEMFLAGS F> jint Hashtable<T, F>::_seed = 0; 96 template <class T, MEMFLAGS F> juint Hashtable<T, F>::_seed = 0;
97 97
98 // Create a new table and using alternate hash code, populate the new table 98 // Create a new table and using alternate hash code, populate the new table
99 // with the existing elements. This can be used to change the hash code 99 // with the existing elements. This can be used to change the hash code
100 // and could in the future change the size of the table. 100 // and could in the future change the size of the table.
101 101