OSDN Git Service

[pf3gnuchains/gcc-fork.git] / gcc / except.h
index 6cb6dc8..540044b 100644 (file)
@@ -19,11 +19,15 @@ along with GNU CC; see the file COPYING.  If not, write to
 the Free Software Foundation, 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
-
-#ifndef GET_CODE
-#define rtx int *
+#if !defined(NULL_RTX) && !defined(rtx)
+typedef struct rtx_def *_except_rtx;
+#define rtx _except_rtx
 #endif
 
+/* The label generated by expand_builtin_eh_return.  */
+
+extern rtx eh_return_stub_label;
+
 #ifdef TREE_CODE
 
 /* A stack of labels. CHAIN points to the next entry in the stack.  */
@@ -47,6 +51,10 @@ struct label_node {
    label or not. New ones are needed for additional catch blocks if
    it has.
 
+   FALSE_LABEL is used when either setjmp/longjmp exceptions are in
+   use, or old style table exceptions. It contains the label for 
+   branching to the next runtime type check as handlers are processed.
+
    FINALIZATION is the tree codes for the handler, or is NULL_TREE if
    one hasn't been generated yet, or is integer_zero_node to mark the
    end of a group of try blocks.  */
@@ -56,6 +64,7 @@ struct eh_entry {
   rtx exception_handler_label;
   tree finalization;
   int label_used;
+  rtx false_label;
 };
 
 /* A list of EH_ENTRYs. ENTRY is the entry; CHAIN points to the next
@@ -82,7 +91,6 @@ struct eh_queue {
   struct eh_node *tail;
 };
 
-
 /* 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.  */
@@ -149,12 +157,8 @@ extern int doing_eh                                       PROTO ((int));
 
 /* Toplevel initialization for EH.  */
 
-#ifdef NEW_EH_MODEL
-
-void set_exception_lang_code                    PROTO((short));
-void set_exception_version_code                 PROTO((short));
-
-#endif
+void set_exception_lang_code                    PROTO((int));
+void set_exception_version_code                 PROTO((int));
 
 /* A list of handlers asocciated with an exception region. HANDLER_LABEL
    is the the label that control should be transfered to if the data
@@ -165,8 +169,6 @@ void set_exception_version_code                 PROTO((short));
    exception. NEXT is a pointer to the next handler for this region. 
    NULL means there are no more. */
 
-#define CATCH_ALL_TYPE   (tree *) -1
-
 typedef struct handler_info 
 {
   rtx  handler_label;
@@ -191,6 +193,13 @@ int new_eh_region_entry                         PROTO((int));
 
 void add_new_handler                       PROTO((int, struct handler_info *));
 
+/* Remove a handler label. The handler label is being deleted, so all
+   regions which reference this handler should have it removed from their
+   list of possible handlers. Any region which has the final handler
+   removed can be deleted. */
+
+void remove_handler                        PROTO((rtx));
+
 /* Create a new handler structure initialized with the handler label and
    typeinfo fields passed in. */
 
@@ -206,6 +215,9 @@ int duplicate_handlers                          PROTO((int, int));
 
 struct handler_info *get_first_handler          PROTO((int));
 
+/* Find all the runtime handlers type matches currently referenced */
+
+int find_all_handler_type_matches               PROTO((void ***));
 
 extern void init_eh                            PROTO((void));
 
@@ -225,12 +237,12 @@ extern void add_eh_table_entry                    PROTO((int n));
 /* Start a catch clause, triggered by runtime value paramter. */
 
 #ifdef TREE_CODE
-extern void expand_start_catch                  PROTO((tree));
+extern void start_catch_handler                 PROTO((tree));
 #endif
 
-/* End a catch clause. */
+/* End an individual catch clause. */
 
-extern void expand_end_catch                    PROTO((void));
+extern void end_catch_handler                   PROTO((void));
 
 /* Returns a non-zero value if we need to output an exception table.  */
 
@@ -286,16 +298,6 @@ extern void expand_leftover_cleanups               PROTO((void));
 
 extern void emit_eh_context                    PROTO((void));
 
-/* If necessary, emit insns for the start of per-function unwinder for
-   the current function.  */
-
-extern void emit_unwinder                      PROTO((void));
-
-/* If necessary, emit insns for the end of the per-function unwinder
-   for the current function.  */
-
-extern void end_eh_unwinder                    PROTO((void));
-
 /* Builds a list of handler labels and puts them in the global
    variable exception_handler_labels.  */
 
@@ -364,18 +366,22 @@ extern int protect_cleanup_actions_with_terminate;
 extern tree protect_with_terminate             PROTO((tree));
 #endif
 
+extern void expand_fixup_region_start  PROTO((void));
+#ifdef TREE_CODE
+extern void expand_fixup_region_end    PROTO((tree));
+#endif
+
 /* Various hooks for the DWARF 2 __throw routine.  */
 
 void expand_builtin_unwind_init                PROTO((void));
 rtx expand_builtin_dwarf_fp_regnum     PROTO((void));
-rtx expand_builtin_eh_stub             PROTO((void));
 #ifdef TREE_CODE
 rtx expand_builtin_frob_return_addr    PROTO((tree));
 rtx expand_builtin_extract_return_addr PROTO((tree));
-void expand_builtin_set_return_addr_reg PROTO((tree));
-void expand_builtin_set_eh_regs                PROTO((tree, tree));
 rtx expand_builtin_dwarf_reg_size      PROTO((tree, rtx));
+void expand_builtin_eh_return          PROTO((tree, tree, tree));
 #endif
+void expand_eh_return                  PROTO((void));
 
 
 /* Checking whether 2 instructions are within the same exception region. */
@@ -383,3 +389,7 @@ rtx expand_builtin_dwarf_reg_size   PROTO((tree, rtx));
 int in_same_eh_region                   PROTO((rtx, rtx));
 void free_insn_eh_region                PROTO((void));
 void init_insn_eh_region                PROTO((rtx, int));
+
+#ifdef rtx
+#undef rtx
+#endif