This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[vta/trunk] don't use pointers for hashing in Java
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 12 Nov 2007 16:52:55 -0200
- Subject: [vta/trunk] don't use pointers for hashing in Java
Using pointers for hashing causes codegen changes depending on various
factors. TYPE_UID is just as handy, but it's more stable. Ok for
trunk?
for gcc/java/ChangeLog.vta
from Alexandre Oliva <aoliva@redhat.com>
* class.c (JAVA_TREEHASHHASH_H): Use TYPE_UID.
Index: gcc/java/class.c
===================================================================
--- gcc/java/class.c.orig 2007-10-09 03:30:10.000000000 -0300
+++ gcc/java/class.c 2007-11-11 05:32:10.000000000 -0200
@@ -3070,7 +3070,7 @@ static int java_treetreehash_compare (co
/* A hash table mapping trees to trees. Used generally. */
-#define JAVA_TREEHASHHASH_H(t) (htab_hash_pointer (t))
+#define JAVA_TREEHASHHASH_H(t) ((hashval_t)TYPE_UID (t))
static hashval_t
java_treetreehash_hash (const void *k_p)
--
Alexandre Oliva http://www.lsd.ic.unicamp.br/~oliva/
FSF Latin America Board Member http://www.fsfla.org/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}