This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]