From 0046a2c25739a5e30a7440811937686c86c4984d Mon Sep 17 00:00:00 2001 From: rth Date: Thu, 16 Sep 1999 19:27:01 +0000 Subject: Thu Sep 16 11:50:52 1999 Alex Samuel * ggc.h (ggc_root): Move to ggc-common.c. (roots): Remove. (ggc_mark_rtx, ggc_mark_tree): Change to macro. (ggc_mark_rtvec, ggc_mark_tree_varray): Declare extern. (ggc_mark_tree_hash_table, ggc_mark_string, ggc_mark): Likewise. (ggc_mark_roots, ggc_mark_rtx_children, ggc_mark_tree_children): New. * ggc-common.c (ggc_root): Move from ggc.h. (roots): Declare, static. (ggc_mark_rtx, ggc_mark_tree): Renamed to... (ggc_mark_rtx_children, ggc_mark_tree_children): Don't check for null or check/set mark bit. (ggc_mark_roots): New. * ggc-simple.c (ggc_collect): Call ggc_mark_roots. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29461 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ggc-simple.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'gcc/ggc-simple.c') diff --git a/gcc/ggc-simple.c b/gcc/ggc-simple.c index 8f375d157ac..3eeb8c38378 100644 --- a/gcc/ggc-simple.c +++ b/gcc/ggc-simple.c @@ -490,7 +490,6 @@ ggc_collect () struct ggc_rtvec *v, **vp; struct ggc_tree *t, **tp; struct ggc_string *s, **sp; - struct ggc_root *x; struct ggc_status *gs; struct ggc_any *a, **ap; int time, n_rtxs, n_trees, n_vecs, n_strings, n_anys; @@ -521,17 +520,7 @@ ggc_collect () a->magic_mark = GGC_ANY_MAGIC; } - /* Mark through all the roots. */ - for (x = roots; x != NULL; x = x->next) - { - char *elt = x->base; - int s = x->size, n = x->nelt; - void (*cb) PROTO ((void *)) = x->cb; - int i; - - for (i = 0; i < n; ++i, elt += s) - (*cb)(elt); - } + ggc_mark_roots (); /* Sweep the resulting dead nodes. */ -- cgit v1.2.1