From: Andrew Haley Date: Wed, 16 Aug 2000 15:30:02 +0000 (+0000) Subject: jvm.h (_Jv_HashCode): New hash code. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3a593d5fb0b5f52ab171bebfa7e69bf292e35c58;p=platform%2Fupstream%2Fgcc.git jvm.h (_Jv_HashCode): New hash code. 2000-08-15 Andrew Haley * include/jvm.h (_Jv_HashCode): New hash code. From-SVN: r35744 --- diff --git a/libjava/ChangeLog b/libjava/ChangeLog index a6dbef1..6388995 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,7 @@ +2000-08-15 Andrew Haley + + * include/jvm.h (_Jv_HashCode): New hash code. + 2000-08-15 Tom Tromey * java/io/ByteArrayOutputStream.java: Merged with Classpath. diff --git a/libjava/include/jvm.h b/libjava/include/jvm.h index ad187c0..5d5e0b9 100644 --- a/libjava/include/jvm.h +++ b/libjava/include/jvm.h @@ -163,7 +163,9 @@ void _Jv_RunMain (const char* name, int argc, const char **argv); inline jint _Jv_HashCode (jobject obj) { - return (jint) obj; + // This was chosen to yield relatively well distributed results on + // both 32- and 64-bit architectures. + return (jint) ((unsigned long long) obj % 0x7fffffff); } // Return a raw pointer to the elements of an array given the array