summaryrefslogtreecommitdiff
path: root/gcc/except.h
diff options
context:
space:
mode:
authormrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4>1997-04-23 20:04:25 +0000
committermrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4>1997-04-23 20:04:25 +0000
commit694ec51983be9bfc22d051e98e22e185c6b00651 (patch)
treeed1bd25525ef36f94c97fb911c74203e02095a25 /gcc/except.h
parentc446d93c756b52b25588a6816d1728f4852d2068 (diff)
downloadgcc-694ec51983be9bfc22d051e98e22e185c6b00651.tar.gz
Add setjmp/longjmp exception handling.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@13968 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/except.h')
-rw-r--r--gcc/except.h64
1 files changed, 54 insertions, 10 deletions
diff --git a/gcc/except.h b/gcc/except.h
index 7c31e950fee..e939afa88c7 100644
--- a/gcc/except.h
+++ b/gcc/except.h
@@ -82,8 +82,35 @@ struct eh_queue {
};
+/* Start an exception handling region. All instructions emitted after
+ this point are considered to be part of the region until
+ expand_eh_region_end () is invoked. */
+
extern void expand_eh_region_start PROTO((void));
+/* Start an exception handling region for the given cleanup action.
+ All instructions emitted after this point are considered to be part
+ of the region until expand_eh_region_end () is invoked. CLEANUP is
+ the cleanup action to perform. The return value is true if the
+ exception region was optimized away. If that case,
+ expand_eh_region_end does not need to be called for this cleanup,
+ nor should it be.
+
+ This routine notices one particular common case in C++ code
+ generation, and optimizes it so as to not need the exception
+ region. */
+
+extern int expand_eh_region_start_tree PROTO((tree));
+
+/* End an exception handling region. The information about the region
+ is found on the top of ehstack.
+
+ HANDLER is either the cleanup for the exception region, or if we're
+ marking the end of a try block, HANDLER is integer_zero_node.
+
+ HANDLER will be transformed to rtl when expand_leftover_cleanups ()
+ is invoked. */
+
extern void expand_eh_region_end PROTO((tree));
/* Push RLABEL or TLABEL onto LABELSTACK. Only one of RLABEL or TLABEL
@@ -101,16 +128,6 @@ extern rtx pop_label_entry PROTO((struct label_node **labelstack));
extern tree top_label_entry PROTO((struct label_node **labelstack));
-/* The stack used to keep track of the exception region corresponding to
- the current instruction. */
-
-extern struct eh_stack ehstack;
-
-/* A queue used to track closed exception regions whose handlers have
- not been emitted yet. */
-
-extern struct eh_queue ehqueue;
-
/* A set of insns for the catch clauses in the current function. They
will be emitted at the end of the current function. */
@@ -233,3 +250,30 @@ extern rtx eh_saved_pc_rtx;
unnecessary exception regions. Invoked from jump_optimize (). */
extern void exception_optimize PROTO((void));
+
+/* Get the dynamic handler chain. */
+extern rtx get_dynamic_handler_chain PROTO((void));
+
+/* Get the dynamic cleanup chain. */
+extern rtx get_dynamic_cleanup_chain PROTO((void));
+
+/* Throw an exception. */
+
+extern void emit_throw PROTO((void));
+
+/* One to use setjmp/longjmp method of generating code. */
+
+extern int exceptions_via_longjmp;
+
+/* One to enable asynchronous exception support. */
+
+extern int asynchronous_exceptions;
+
+/* One to protect cleanup actions with a handler that calls
+ __terminate, zero otherwise. */
+
+extern int protect_cleanup_actions_with_terminate;
+
+#ifdef TREE_CODE
+extern tree protect_with_terminate PROTO((tree));
+#endif