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: fix descriptor error in aot code


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


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