/* Simple garbage collection for the GNU compiler.
- Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of GCC.
#include "hashtab.h"
#include "varray.h"
#include "ggc.h"
+#include "langhooks.h"
/* Statistics about the allocation. */
static ggc_statistics *ggc_stats;
-/* The FALSE_LABEL_STACK, declared in except.h, has language-dependent
- semantics. If a front-end needs to mark the false label stack, it
- should set this pointer to a non-NULL value. Otherwise, no marking
- will be done. */
-void (*lang_mark_false_label_stack) PARAMS ((struct label_node *));
-
/* Trees that have been marked, but whose children still need marking. */
varray_type ggc_pending_trees;
x = x->next;
}
- abort();
+ abort ();
}
/* Add a hash table to be scanned when all roots have been processed. We
have any right poking our noses in? */
switch (code)
{
+ case MEM:
+ ggc_mark (MEM_ATTRS (r));
+ break;
case JUMP_INSN:
ggc_mark_rtx (JUMP_LABEL (r));
break;
break;
case IDENTIFIER_NODE:
- lang_mark_tree (t);
+ (*lang_hooks.mark_tree) (t);
continue;
default:
ggc_mark_tree (DECL_INITIAL (t));
ggc_mark_tree (DECL_ABSTRACT_ORIGIN (t));
ggc_mark_tree (DECL_SECTION_NAME (t));
- ggc_mark_tree (DECL_MACHINE_ATTRIBUTES (t));
+ ggc_mark_tree (DECL_ATTRIBUTES (t));
if (DECL_RTL_SET_P (t))
ggc_mark_rtx (DECL_RTL (t));
ggc_mark_rtx (DECL_LIVE_RANGE_RTL (t));
ggc_mark_tree (DECL_VINDEX (t));
if (DECL_ASSEMBLER_NAME_SET_P (t))
ggc_mark_tree (DECL_ASSEMBLER_NAME (t));
- if (TREE_CODE (t) == FUNCTION_DECL && DECL_SAVED_INSNS (t))
- ggc_mark_struct_function (DECL_SAVED_INSNS (t));
- lang_mark_tree (t);
+ if (TREE_CODE (t) == FUNCTION_DECL)
+ {
+ ggc_mark_tree (DECL_SAVED_TREE (t));
+ ggc_mark_tree (DECL_INLINED_FNS (t));
+ if (DECL_SAVED_INSNS (t))
+ ggc_mark_struct_function (DECL_SAVED_INSNS (t));
+ }
+ (*lang_hooks.mark_tree) (t);
break;
case 't': /* A type node. */
ggc_mark_tree (TYPE_MAIN_VARIANT (t));
ggc_mark_tree (TYPE_BINFO (t));
ggc_mark_tree (TYPE_CONTEXT (t));
- lang_mark_tree (t);
+ (*lang_hooks.mark_tree) (t);
break;
case 'b': /* A lexical block. */
}
case 'x':
- lang_mark_tree (t);
+ (*lang_hooks.mark_tree) (t);
break;
}
}