summaryrefslogtreecommitdiffstats
path: root/gcc/tree.c
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2000-11-27 07:09:20 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2000-11-27 07:09:20 +0000
commit15155f829e7ddc1a5dd4a45cecdcf9d173c74380 (patch)
tree0f3bff8650362598772997ba22bded572eefeb8e /gcc/tree.c
parent24e1c61a44f1eb03f40d7861010a9af5977b19df (diff)
downloadppe42-gcc-15155f829e7ddc1a5dd4a45cecdcf9d173c74380.tar.gz
ppe42-gcc-15155f829e7ddc1a5dd4a45cecdcf9d173c74380.zip
* tree.h (mark_tree_hashtable): New function.
* tree.c (mark_tree_hashtable_entry): New function. (mark_tree_hashtable): Likewise. * tree.c (struct list_hash): Remove. (list_hash_table): Make it be an htab. (struct list_proxy): New type. (list_hash_eq): New function. (list_hash_pieces): Renamed from ... (list_hash): ... this. (list_hash_lookup): Remove. (list_hash_add): Remove. (hash_tree_cons): Use the generic hashtable. (mark_list_hash): Remove. (init_tree): Create the hashtable. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37783 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index dcacdaf1d39..acc744619b3 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -170,6 +170,7 @@ static unsigned int type_hash_hash PARAMS ((const void*));
static void print_type_hash_statistics PARAMS((void));
static int mark_hash_entry PARAMS((void **, void *));
static void finish_vector_type PARAMS((tree));
+static int mark_tree_hashtable_entry PARAMS((void **, void *));
/* If non-null, these are language-specific helper functions for
unsave_expr_now. If present, LANG_UNSAVE is called before its
@@ -3184,6 +3185,29 @@ mark_type_hash (arg)
htab_traverse (t, mark_hash_entry, 0);
}
+/* Mark the hashtable slot pointed to by ENTRY (which is really a
+ `tree**') for GC. */
+
+static int
+mark_tree_hashtable_entry (entry, data)
+ void **entry;
+ void *data ATTRIBUTE_UNUSED;
+{
+ ggc_mark_tree ((tree) *entry);
+ return 1;
+}
+
+/* Mark ARG (which is really a htab_t whose slots are trees) for
+ GC. */
+
+void
+mark_tree_hashtable (arg)
+ void *arg;
+{
+ htab_t t = *(htab_t *) arg;
+ htab_traverse (t, mark_tree_hashtable_entry, 0);
+}
+
static void
print_type_hash_statistics ()
{
OpenPOWER on IntegriCloud