This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[gcjx] Patch: FYI: fix descriptor error in aot code
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 17 May 2005 18:02:33 -0600
- Subject: [gcjx] Patch: FYI: fix descriptor error in aot code
- Reply-to: tromey at redhat dot com
I'm checking this in on the gcjx branch.
This fixes another '/' -vs- '.' problem with type descriptors.
gcj historically had its own format here...
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* aot/aotclass.cc (get_descriptor): New helper function.
(add): Use it.
Index: aot/aotclass.cc
===================================================================
RCS file: /cvs/gcc/gcc/gcjx/aot/Attic/aotclass.cc,v
retrieving revision 1.1.2.10
diff -u -r1.1.2.10 aotclass.cc
--- aot/aotclass.cc 3 Apr 2005 23:52:14 -0000 1.1.2.10
+++ aot/aotclass.cc 18 May 2005 00:04:03 -0000
@@ -157,12 +157,21 @@
return add_item (e);
}
+// FIXME: this should either be a method on model_type or a generally
+// available helper function -- it is also used in gcc/java.
+static std::string
+get_descriptor (model_type *t)
+{
+ // Why do we do this?
+ return join (split (t->get_descriptor (), '/'), '.');
+}
+
int
aot_class::add (model_class *k)
{
pool_entry e;
e.tag = CONSTANT_Class;
- e.value = k->get_descriptor ();
+ e.value = get_descriptor (k);
return add_item (e);
}