public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [vta/trunk] don't use pointers for hashing in Java
@ 2007-11-12 19:43 Alexandre Oliva
  2007-11-12 19:57 ` Andrew Haley
  0 siblings, 1 reply; 2+ messages in thread
From: Alexandre Oliva @ 2007-11-12 19:43 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 146 bytes --]

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?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: gcc-stabilize-java-treetreehash.patch --]
[-- Type: text/x-patch, Size: 637 bytes --]

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)

[-- Attachment #3: Type: text/plain, Size: 249 bytes --]


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [vta/trunk] don't use pointers for hashing in Java
  2007-11-12 19:43 [vta/trunk] don't use pointers for hashing in Java Alexandre Oliva
@ 2007-11-12 19:57 ` Andrew Haley
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Haley @ 2007-11-12 19:57 UTC (permalink / raw)
  To: Alexandre Oliva; +Cc: gcc-patches

Alexandre Oliva writes:
 > 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.
 > 

OK.

Andrew.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-11-12 18:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-12 19:43 [vta/trunk] don't use pointers for hashing in Java Alexandre Oliva
2007-11-12 19:57 ` Andrew Haley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).