comparison src/share/vm/utilities/hashtable.hpp @ 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 55fb97c4c58d
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.
278 } 278 }
279 279
280 // Function to move these elements into the new table. 280 // Function to move these elements into the new table.
281 void move_to(Hashtable<T, F>* new_table); 281 void move_to(Hashtable<T, F>* new_table);
282 static bool use_alternate_hashcode() { return _seed != 0; } 282 static bool use_alternate_hashcode() { return _seed != 0; }
283 static jint seed() { return _seed; } 283 static juint seed() { return _seed; }
284 284
285 static int literal_size(Symbol *symbol); 285 static int literal_size(Symbol *symbol);
286 static int literal_size(oop oop); 286 static int literal_size(oop oop);
287 287
288 // The following two are currently not used, but are needed anyway because some 288 // The following two are currently not used, but are needed anyway because some
294 294
295 public: 295 public:
296 void dump_table(outputStream* st, const char *table_name); 296 void dump_table(outputStream* st, const char *table_name);
297 297
298 private: 298 private:
299 static jint _seed; 299 static juint _seed;
300 }; 300 };
301 301
302 302
303 // Verions of hashtable where two handles are used to compute the index. 303 // Verions of hashtable where two handles are used to compute the index.
304 304