+2003-09-17 Ranjit Mathew <rmathew@hotmail.com>
+
+ Fixes PR java/9577
+ * mangle.c (find_compression_record_match): Skip
+ over a "6JArray" (the array template mangled string)
+ IDENTIFIER_NODE.
+ (mangle_array_type): Correct minor typo.
+ (atms): Move definition to the beginning.
+
2003-09-16 Bryce McKinlay <bryce@mckinlay.net.nz>
* class.c (add_miranda_methods): Ensure super-interfaces are laid
#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. */
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. */
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)
/* 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)
{
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);