This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[gcjx] Patch: FYI: constant pool fixlet
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 08 Mar 2005 18:46:44 -0700
- Subject: [gcjx] Patch: FYI: constant pool fixlet
- Reply-to: tromey at redhat dot com
I'm checking this in on the gcjx branch.
For some reason we don't use index 0 of the constant pool. I don't
recall why; perhaps for compatibility with .class files. Anyway, I
"fixed" this problem earlier but missed a spot.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* aot/aotclass.cc (add_item): Ignore index 0.
Index: aot/aotclass.cc
===================================================================
RCS file: /cvs/gcc/gcc/gcjx/aot/Attic/aotclass.cc,v
retrieving revision 1.1.2.6
diff -u -r1.1.2.6 aotclass.cc
--- aot/aotclass.cc 8 Mar 2005 17:27:36 -0000 1.1.2.6
+++ aot/aotclass.cc 9 Mar 2005 01:48:23 -0000
@@ -128,7 +128,8 @@
{
const pool_entry &it (*i);
if (entry.tag == it.tag && entry.value == it.value)
- return index;
+ // We don't use index 0.
+ return index + 1;
}
pool.push_back (entry);