diff options
author | Mark Mitchell <mark@codesourcery.com> | 1999-09-09 21:41:38 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 1999-09-09 21:41:38 +0000 |
commit | 96603b4c5a3d4d698c5a7f59b67910ed93ced182 (patch) | |
tree | 15ea4dfce4fc305fb556decff352c130246460ee /gcc | |
parent | 31cf01446d16abdebb2b05bb8183ba487648900c (diff) | |
download | gcc-96603b4c5a3d4d698c5a7f59b67910ed93ced182.zip gcc-96603b4c5a3d4d698c5a7f59b67910ed93ced182.tar.gz gcc-96603b4c5a3d4d698c5a7f59b67910ed93ced182.tar.bz2 |
ggc.h (lang_cleanup_tree): Remove.
* ggc.h (lang_cleanup_tree): Remove.
* gcc-simple.c (ggc_free_tree): Don't call lang_cleanup_tree.
* ggc-callbacks.c (lang_cleanup_tree): Remove.
* c-decl.c (finish_struct): Use ggc_alloc to allocate
TYPE_LANG_SPECIFIC when garbage collecting.
(lang_cleanup_tree): Remove.
From-SVN: r29242
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/c-decl.c | 21 | ||||
-rw-r--r-- | gcc/ggc-callbacks.c | 9 | ||||
-rw-r--r-- | gcc/ggc-simple.c | 8 | ||||
-rw-r--r-- | gcc/ggc.h | 3 |
5 files changed, 15 insertions, 36 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 27f5f12..afc3ccb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +Thu Sep 9 14:36:31 1999 Mark Mitchell <mark@codesourcery.com> + + * ggc.h (lang_cleanup_tree): Remove. + * gcc-simple.c (ggc_free_tree): Don't call lang_cleanup_tree. + * ggc-callbacks.c (lang_cleanup_tree): Remove. + + * c-decl.c (finish_struct): Use ggc_alloc to allocate + TYPE_LANG_SPECIFIC when garbage collecting. + (lang_cleanup_tree): Remove. + Thu Sep 9 14:23:02 1999 Jason Merrill <jason@yorick.cygnus.com> * defaults.h (EH_FRAME_SECTION, EH_FRAME_SECTION_ASM_OP): Define here. diff --git a/gcc/c-decl.c b/gcc/c-decl.c index f23cbc2..1acb160 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -5725,7 +5725,9 @@ finish_struct (t, fieldlist, attributes) /* Use the same allocation policy here that make_node uses, to ensure that this lives as long as the rest of the struct decl. All decls in an inline function need to be saved. */ - if (allocation_temporary_p ()) + if (ggc_p) + space = ggc_alloc (sizeof (struct lang_type) + len * sizeof (tree)); + else if (allocation_temporary_p ()) space = savealloc (sizeof (struct lang_type) + len * sizeof (tree)); else space = oballoc (sizeof (struct lang_type) + len * sizeof (tree)); @@ -7142,19 +7144,6 @@ lang_mark_tree (t) ggc_mark_tree (i->error_locus); ggc_mark_tree (i->limbo_value); } -} - -/* Free the language specific bits in T for GC. */ -void -lang_cleanup_tree (t) - tree t; -{ - if (TREE_CODE_CLASS (TREE_CODE (t)) == 't' - && TYPE_LANG_SPECIFIC (t) != NULL) - { -#if 0 - /* This is currently allocated with an obstack. This will change. */ - free (TYPE_LANG_SPECIFIC (t)); -#endif - } + else if (TYPE_P (t) && TYPE_LANG_SPECIFIC (t)) + ggc_mark (TYPE_LANG_SPECIFIC (t)); } diff --git a/gcc/ggc-callbacks.c b/gcc/ggc-callbacks.c index 797c3de..3992368 100644 --- a/gcc/ggc-callbacks.c +++ b/gcc/ggc-callbacks.c @@ -36,15 +36,6 @@ lang_mark_tree (t) } void -lang_cleanup_tree (t) - union tree_node *t ATTRIBUTE_UNUSED; -{ - /* If this function is called, we are doing GC. But, this file is - only included in compilers for languages that don't support GC. */ - abort (); -} - -void lang_mark_false_label_stack (l) struct label_node *l ATTRIBUTE_UNUSED; { diff --git a/gcc/ggc-simple.c b/gcc/ggc-simple.c index df5c0cd..d6e13cb 100644 --- a/gcc/ggc-simple.c +++ b/gcc/ggc-simple.c @@ -385,14 +385,6 @@ static inline void ggc_free_tree (t) struct ggc_tree *t; { - switch (TREE_CODE_CLASS (TREE_CODE (&t->tree))) - { - case 'd': /* A decl node. */ - case 't': /* A type node. */ - lang_cleanup_tree (&t->tree); - break; - } - #ifdef GGC_DUMP fprintf (dump, "collect tree %p\n", &t->tree); #endif @@ -87,9 +87,6 @@ void ggc_mark PROTO ((void *)); the lang_specific hooks in the tree. */ void lang_mark_tree PROTO ((union tree_node *)); -/* And similarly to free that data when the tree node is released. */ -void lang_cleanup_tree PROTO ((union tree_node *)); - /* The FALSE_LABEL_STACK, declared in except.h, has language-dependent semantics. Each front-end should define this function appropriately. */ |