summaryrefslogtreecommitdiff
path: root/gcc/ggc.h
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2000-04-06 00:51:25 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2000-04-06 00:51:25 +0000
commit769177acfc01f27366faca22e5ac453dc827c7e7 (patch)
treee86a0b0c8611c92ba993e13102ca5e6b62015c94 /gcc/ggc.h
parentace3601384059ef1edc7ad1f31cc176c2ba661fd (diff)
downloadgcc-769177acfc01f27366faca22e5ac453dc827c7e7.tar.gz
* final.c (final): Use xcalloc to allocate line_note_exists.
* function.c (free_after_compilation): Free the temp_slots. (assign_stack_temp_for_type): Use xmalloc to allocate temp_slots. (combine_temp_slot): Free temp_slots when they get combined. (purge_addressof): Fix typo in comment. * stmt.c (mark_goto_fixup): Mark the fixup itself. (expand_fixup): Allocate the fixup with ggc_alloc_obj. * ggc.h: Include varray.h. (ggc_pending_trees): Declare. (ggc_mark_tree_children): Remove declaration. (ggc_mark_tree): Just push unmarked trees on ggc_pending_trees. * ggc-common.c (ggc_pending_trees): New variable. (ggc_mark_roots): Call ggc_mark_trees. (ggc_mark_tree_children): Rename to ggc_mark_trees. Process all the ggc_pending_trees. * Makefile.in (GGC_H): New variable. Use it throughout in place of ggc.h. * Makefile.in (GGC_H): New variable. Use it throughout in place of ggc.h. * call.c: Don't include obstack.h. Include ggc.h. (obstack_chunk_alloc): Don't define. (obstack_chunk_free): Likewise. (add_candidate): Allocate the z_candidate with ggc_alloc_obj. * decl.c (push_switch): Use xmalloc to allocate the cp_switch. (pop_switch): Free it. * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs. * dump.c (dequeue_and_dump): Don't try to print the bit_position if we don't have a DECL_FIELD_OFFSET. * Makefile.in (GGC_H): Add varray.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32956 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ggc.h')
-rw-r--r--gcc/ggc.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/gcc/ggc.h b/gcc/ggc.h
index 1ad8d1a24bb..a79ffd5986e 100644
--- a/gcc/ggc.h
+++ b/gcc/ggc.h
@@ -19,6 +19,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
#include "gansidecl.h"
+#include "varray.h"
/* Symbols are marked with `ggc' for `gcc gc' so as not to interfere with
an external gc library that might be linked in. */
@@ -40,11 +41,13 @@ struct rtvec_def;
struct stmt_status;
union tree_node;
struct varasm_status;
-struct varray_head_tag;
/* Constants for general use. */
extern char *empty_string;
+/* Trees that have been marked, but whose children still need marking. */
+extern varray_type ggc_pending_trees;
+
/* Manipulate global roots that are needed between calls to gc. */
void ggc_add_root PARAMS ((void *base, int nelt, int size, void (*)(void *)));
void ggc_add_rtx_root PARAMS ((struct rtx_def **, int nelt));
@@ -64,7 +67,6 @@ extern void ggc_mark_roots PARAMS ((void));
extern void ggc_mark_rtx_children PARAMS ((struct rtx_def *));
extern void ggc_mark_rtvec_children PARAMS ((struct rtvec_def *));
-extern void ggc_mark_tree_children PARAMS ((union tree_node *));
/* If EXPR is not NULL and previously unmarked, mark it and evaluate
to true. Otherwise evaluate to false. */
@@ -78,11 +80,11 @@ extern void ggc_mark_tree_children PARAMS ((union tree_node *));
ggc_mark_rtx_children (r__); \
} while (0)
-#define ggc_mark_tree(EXPR) \
- do { \
- tree t__ = (EXPR); \
- if (ggc_test_and_set_mark (t__)) \
- ggc_mark_tree_children (t__); \
+#define ggc_mark_tree(EXPR) \
+ do { \
+ tree t__ = (EXPR); \
+ if (ggc_test_and_set_mark (t__)) \
+ VARRAY_PUSH_TREE (ggc_pending_trees, t__); \
} while (0)
#define ggc_mark_rtvec(EXPR) \