diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-09-16 19:27:01 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-09-16 19:27:01 +0000 |
commit | 0046a2c25739a5e30a7440811937686c86c4984d (patch) | |
tree | a90b0ac22fb144d290710b57483c4c68cf242b07 /gcc/ggc-simple.c | |
parent | 306d967ccec8dce3e47040f9a0ed1e9760e3a80f (diff) | |
download | gcc-0046a2c25739a5e30a7440811937686c86c4984d.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29461 138bc75d-0d04-0410-961f-82ee72b054a4
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 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. */ |