summaryrefslogtreecommitdiff
path: root/gcc/obstack.h
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>1997-10-18 21:10:32 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>1997-10-18 21:10:32 +0000
commit73eac312a5b993d7628da03461c79c4452be729d (patch)
tree3d75f9c5827cef9704b4bbc12cbda4145c21754a /gcc/obstack.h
parent2f373e5d7060522f0a25cfc15632fa9a4303f961 (diff)
downloadgcc-73eac312a5b993d7628da03461c79c4452be729d.tar.gz
* tree.c (restore_tree_status): Also free up temporary storage
when we finish a toplevel function. (dump_tree_statistics): Print stats for backend obstacks. * libgcc2.c (__throw): Don't copy the return address. * dwarf2out.c (expand_builtin_dwarf_reg_size): Ignore return address. * except.c (exceptions_via_longjmp): Initialize to 2 (uninitialized). * toplev.c (main): Initialize exceptions_via_longjmp. * tree.c: Add extra_inline_obstacks. (save_tree_status): Use it. (restore_tree_status): If this is a toplevel inline obstack and we didn't want to save anything on it, recycle it. (print_inline_obstack_statistics): New fn. * function.c (pop_function_context_from): Pass context to restore_tree_status. * obstack.h (obstack_empty_p): New macro. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@16050 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/obstack.h')
-rw-r--r--gcc/obstack.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/obstack.h b/gcc/obstack.h
index dd8e8612bea..1b172acab27 100644
--- a/gcc/obstack.h
+++ b/gcc/obstack.h
@@ -332,6 +332,11 @@ int obstack_chunk_size (struct obstack *obstack);
({ struct obstack *__o = (OBSTACK); \
(unsigned) (__o->chunk_limit - __o->next_free); })
+#define obstack_empty_p(OBSTACK) \
+ __extension__ \
+ ({ struct obstack *__o = (OBSTACK); \
+ (__o->chunk->prev == 0 && __o->next_free - __o->chunk->contents == 0); })
+
#define obstack_grow(OBSTACK,where,length) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
@@ -460,6 +465,9 @@ __extension__ \
#define obstack_room(h) \
(unsigned) ((h)->chunk_limit - (h)->next_free)
+#define obstack_empty_p(h) \
+ ((h)->chunk->prev == 0 && (h)->next_free - (h)->chunk->contents == 0)
+
/* Note that the call to _obstack_newchunk is enclosed in (..., 0)
so that we can avoid having void expressions
in the arms of the conditional expression.