diff options
author | Alex Samuel <samuel@codesourcery.com> | 1999-09-16 12:27:01 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 1999-09-16 12:27:01 -0700 |
commit | 96df4529dc098109a5616d81feedade2f7b3922f (patch) | |
tree | a90b0ac22fb144d290710b57483c4c68cf242b07 /gcc/ggc-simple.c | |
parent | 2a6ec461e1904dc900350bc530768308cd339c8e (diff) | |
download | gcc-96df4529dc098109a5616d81feedade2f7b3922f.zip gcc-96df4529dc098109a5616d81feedade2f7b3922f.tar.gz gcc-96df4529dc098109a5616d81feedade2f7b3922f.tar.bz2 |
ggc.h (ggc_root): Move to ggc-common.c.
Thu Sep 16 11:50:52 1999 Alex Samuel <samuel@codesourcery.com>
* 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.
From-SVN: r29461
Diffstat (limited to 'gcc/ggc-simple.c')
-rw-r--r-- | gcc/ggc-simple.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/gcc/ggc-simple.c b/gcc/ggc-simple.c index 8f375d1..3eeb8c3 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. */ |