aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/mangle.c
diff options
context:
space:
mode:
authorGeoffrey Keating <geoffk@redhat.com>2002-06-04 07:11:05 +0000
committerGeoffrey Keating <geoffk@gcc.gnu.org>2002-06-04 07:11:05 +0000
commite2500fedef1a1c5b9e818fd1e2c281adff80df4a (patch)
tree720630adca0f6b357e05c4feb8cbe33d556925ce /gcc/java/mangle.c
parentc2ae66169b8326bbf9b1dfa63083d2560fea7ddf (diff)
downloadgcc-e2500fedef1a1c5b9e818fd1e2c281adff80df4a.zip
gcc-e2500fedef1a1c5b9e818fd1e2c281adff80df4a.tar.gz
gcc-e2500fedef1a1c5b9e818fd1e2c281adff80df4a.tar.bz2
Merge from pch-branch up to tag pch-commit-20020603.
From-SVN: r54232
Diffstat (limited to 'gcc/java/mangle.c')
-rw-r--r--gcc/java/mangle.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/gcc/java/mangle.c b/gcc/java/mangle.c
index 590a9ad..ef70ff9 100644
--- a/gcc/java/mangle.c
+++ b/gcc/java/mangle.c
@@ -245,7 +245,7 @@ mangle_type (type)
COMPRESSION_NEXT is the index to the location of the next insertion
of an element. */
-static tree compression_table;
+static GTY(()) tree compression_table;
static int compression_next;
/* Find a POINTER_TYPE in the compression table. Use a special
@@ -431,12 +431,12 @@ mangle_pointer_type (type)
the template indicator where already used an compress appropriately.
It handles pointers. */
+/* atms: array template mangled string. */
+static GTY(()) tree atms;
static void
mangle_array_type (p_type)
tree p_type;
{
- /* atms: array template mangled string. */
- static tree atms = NULL_TREE;
tree type, elt_type;
int match;
@@ -450,7 +450,6 @@ mangle_array_type (p_type)
if (!atms)
{
atms = get_identifier ("6JArray");
- ggc_add_tree_root (&atms, 1);
}
/* Maybe we have what we're looking in the compression table. */
@@ -602,9 +601,7 @@ compression_table_add (type)
for (i = 0; i < compression_next; i++)
TREE_VEC_ELT (new, i) = TREE_VEC_ELT (compression_table, i);
- ggc_del_root (&compression_table);
compression_table = new;
- ggc_add_tree_root (&compression_table, 1);
}
TREE_VEC_ELT (compression_table, compression_next++) = type;
}
@@ -624,9 +621,6 @@ init_mangling (obstack)
/* Mangled name are to be suffixed */
obstack_grow (mangle_obstack, "_Z", 2);
-
- /* Register the compression table with the GC */
- ggc_add_tree_root (&compression_table, 1);
}
/* Mangling finalization routine. The mangled name is returned as a
@@ -641,7 +635,6 @@ finish_mangling ()
/* Mangling already finished. */
abort ();
- ggc_del_root (&compression_table);
compression_table = NULL_TREE;
compression_next = 0;
obstack_1grow (mangle_obstack, '\0');
@@ -652,3 +645,5 @@ finish_mangling ()
#endif
return result;
}
+
+#include "gt-java-mangle.h"