From: Alexandre Oliva <aoliva@redhat.com>
To: gcc-patches@gcc.gnu.org
Subject: stabilize java assertion tables
Date: Thu, 08 Nov 2007 03:49:00 -0000 [thread overview]
Message-ID: <orve8dflc0.fsf@oliva.athome.lsd.ic.unicamp.br> (raw)
[-- Attachment #1: Type: text/plain, Size: 302 bytes --]
Using TYPE_UID rather than pointers to hash type_assertions shaved off
another 70 -fvar-tracking-assignments (and, probably -g vs -g0)
codegen differences. Now I'm down to four differences on
x86_64-linux-gnu libs, yay.
Ok for trunk, after retesting in it (rather than in the vta branch)
completes?
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: gcc-stabilize-java-assertion-tables.patch --]
[-- Type: text/x-patch, Size: 1216 bytes --]
for gcc/ChangeLog.vta => gcc/java/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* java/expr.c (type_assertion_hash): Hash type uids rather
than tree pointers.
Index: gcc/java/expr.c
===================================================================
--- gcc/java/expr.c.orig 2007-09-08 20:11:06.000000000 -0300
+++ gcc/java/expr.c 2007-11-08 00:40:04.000000000 -0200
@@ -433,8 +433,26 @@ type_assertion_hash (const void *p)
const type_assertion *k_p = p;
hashval_t hash = iterative_hash (&k_p->assertion_code, sizeof
k_p->assertion_code, 0);
- hash = iterative_hash (&k_p->op1, sizeof k_p->op1, hash);
- return iterative_hash (&k_p->op2, sizeof k_p->op2, hash);
+
+ switch (k_p->assertion_code) {
+ case JV_ASSERT_TYPES_COMPATIBLE:
+ hash = iterative_hash (&TYPE_UID (k_p->op2), sizeof TYPE_UID (k_p->op2),
+ hash);
+ /* Fall through. */
+
+ case JV_ASSERT_IS_INSTANTIABLE:
+ hash = iterative_hash (&TYPE_UID (k_p->op1), sizeof TYPE_UID (k_p->op1),
+ hash);
+ /* Fall through. */
+
+ case JV_ASSERT_END_OF_TABLE:
+ break;
+
+ default:
+ gcc_unreachable ();
+ }
+
+ return hash;
}
/* Add an entry to the type assertion table for the given class.
[-- 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}
next reply other threads:[~2007-11-08 3:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-08 3:49 Alexandre Oliva [this message]
2007-11-08 5:22 ` Alexandre Oliva
2007-11-08 18:13 ` Alexandre Oliva
2007-11-08 10:45 ` Andrew Haley
2007-11-08 11:00 ` Andrew Haley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=orve8dflc0.fsf@oliva.athome.lsd.ic.unicamp.br \
--to=aoliva@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).