aboutsummaryrefslogtreecommitdiff
path: root/gcc/except.h
diff options
context:
space:
mode:
authorMike Stump <mrs@gcc.gnu.org>1997-04-23 20:04:25 +0000
committerMike Stump <mrs@gcc.gnu.org>1997-04-23 20:04:25 +0000
commite976b8b277eb0ae570a2c3317e77713fff846758 (patch)
treeed1bd25525ef36f94c97fb911c74203e02095a25 /gcc/except.h
parent2284f91b110a72392473ec763f64c1e7ea12a1d0 (diff)
downloadgcc-e976b8b277eb0ae570a2c3317e77713fff846758.zip
gcc-e976b8b277eb0ae570a2c3317e77713fff846758.tar.gz
gcc-e976b8b277eb0ae570a2c3317e77713fff846758.tar.bz2
Add setjmp/longjmp exception handling.
From-SVN: r13968
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 7c31e95..e939afa8 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