This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java 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]

[gcjx] Patch: FYI: constant pool fixlet


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);


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