This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[gcjx] Patch: FYI: name mangling fixes
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 27 Apr 2005 11:40:55 -0600
- Subject: [gcjx] Patch: FYI: name mangling fixes
- Reply-to: tromey at redhat dot com
I'm checking this in on the gcjx branch.
This fixes a few remaining bugs in name mangling. With this patch, I
can compile all of libgcj with gcjx and link it. The result still
doesn't work, but this is a big step.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* aot/mangle.cc (update): Create separate entry for pointer type.
(update_array): Likewise.
(update): Emit pending characters at end if needed.
Index: aot/mangle.cc
===================================================================
RCS file: /cvs/gcc/gcc/gcjx/aot/Attic/mangle.cc,v
retrieving revision 1.1.2.7
diff -u -r1.1.2.7 mangle.cc
--- aot/mangle.cc 17 Apr 2005 21:26:14 -0000 1.1.2.7
+++ aot/mangle.cc 27 Apr 2005 17:41:02 -0000
@@ -200,6 +200,10 @@
}
}
+ // Emit any characters we recognized.
+ for (int i = 0; i < state; ++i)
+ output << search[i];
+
std::string s = output.str ();
char buf[20];
sprintf (buf, "%d", s.length ());
@@ -246,6 +250,7 @@
result += "6JArrayI";
update (t->element_type (), true);
result += "E";
+ insert (t, false);
insert (t, true);
}
}
@@ -265,6 +270,7 @@
else
{
bool enter = false;
+ bool enter_pointer = false;
if (is_pointer)
{
int n = find_compression (t, true);
@@ -274,7 +280,7 @@
return;
}
result += "P";
- enter = true;
+ enter_pointer = true;
}
int n = find_compression (t, false);
if (n >= 0)
@@ -294,7 +300,9 @@
}
if (enter)
- insert (t, is_pointer);
+ insert (t, false);
+ if (enter_pointer)
+ insert (t, true);
}
}