aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/mangle.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/java/mangle.c')
-rw-r--r--gcc/java/mangle.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/gcc/java/mangle.c b/gcc/java/mangle.c
index ca5997c..e545cbc 100644
--- a/gcc/java/mangle.c
+++ b/gcc/java/mangle.c
@@ -67,6 +67,9 @@ struct obstack *mangle_obstack;
#define MANGLE_RAW_STRING(S) \
obstack_grow (mangle_obstack, (S), sizeof (S)-1)
+/* atms: array template mangled string. */
+static GTY(()) tree atms;
+
/* This is the mangling interface: a decl, a class field (.class) and
the vtable. */
@@ -233,7 +236,7 @@ mangle_type (tree type)
already seen, so they can be reused. For example, java.lang.Object
would generate three entries: two package names and a type. If
java.lang.String is presented next, the java.lang will be matched
- against the first two entries (and kept for compression as S_0), and
+ against the first two entries (and kept for compression as S0_), and
type String would be added to the table. See mangle_record_type.
COMPRESSION_NEXT is the index to the location of the next insertion
of an element. */
@@ -301,12 +304,16 @@ find_compression_record_match (tree type, tree *next_current)
i++;
break;
}
+ else if (atms && TREE_VEC_ELT (compression_table, j) == atms)
+ {
+ /* Skip over a "6JArray". */
+ }
else
{
/* We don't want to match an element that appears in the middle
of a package name, so skip forward to the next complete type name.
- IDENTIFIER_NODEs are partial package names while RECORD_TYPEs
- represent complete type names. */
+ IDENTIFIER_NODEs (except for a "6JArray") are partial package
+ names while RECORD_TYPEs represent complete type names. */
while (j < compression_next
&& TREE_CODE (TREE_VEC_ELT (compression_table, j)) ==
IDENTIFIER_NODE)
@@ -413,11 +420,9 @@ mangle_pointer_type (tree type)
/* Mangle an array type. Search for an easy solution first, then go
through the process of finding out whether the bare array type or even
- the template indicator where already used an compress appropriately.
+ the template indicator were already used and compressed appropriately.
It handles pointers. */
-/* atms: array template mangled string. */
-static GTY(()) tree atms;
static void
mangle_array_type (tree p_type)
{
@@ -436,7 +441,7 @@ mangle_array_type (tree p_type)
atms = get_identifier ("6JArray");
}
- /* Maybe we have what we're looking in the compression table. */
+ /* Maybe we have what we're looking for in the compression table. */
if ((match = find_compression_array_match (p_type)) >= 0)
{
emit_compression_string (match);