diff options
Diffstat (limited to 'gcc/ada/gcc-interface')
-rw-r--r-- | gcc/ada/gcc-interface/gigi.h | 33 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/trans.cc | 68 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/utils.cc | 20 |
3 files changed, 4 insertions, 117 deletions
diff --git a/gcc/ada/gcc-interface/gigi.h b/gcc/ada/gcc-interface/gigi.h index 6d70c30..52d44f0 100644 --- a/gcc/ada/gcc-interface/gigi.h +++ b/gcc/ada/gcc-interface/gigi.h @@ -399,18 +399,7 @@ enum standard_datatypes /* Identifier for the name of the Not_Handled_By_Others field. */ ADT_not_handled_by_others_name_id, - /* Types and decls used by the SJLJ exception mechanism. */ - ADT_jmpbuf_type, - ADT_jmpbuf_ptr_type, - ADT_get_jmpbuf_decl, - ADT_set_jmpbuf_decl, - ADT_get_excptr_decl, - ADT_not_handled_by_others_decl, - ADT_setjmp_decl, - ADT_update_setjmp_buf_decl, - ADT_raise_nodefer_decl, - - /* Types and decls used by the ZCX exception mechanism. */ + /* Types and decls used by the exception mechanism. */ ADT_reraise_zcx_decl, ADT_set_exception_parameter_decl, ADT_begin_handler_decl, @@ -469,25 +458,15 @@ extern GTY(()) tree gnat_raise_decls_ext[(int) LAST_REASON_CODE + 1]; #define parent_name_id gnat_std_decls[(int) ADT_parent_name_id] #define not_handled_by_others_name_id \ gnat_std_decls[(int) ADT_not_handled_by_others_name_id] -#define jmpbuf_type gnat_std_decls[(int) ADT_jmpbuf_type] -#define jmpbuf_ptr_type gnat_std_decls[(int) ADT_jmpbuf_ptr_type] -#define get_jmpbuf_decl gnat_std_decls[(int) ADT_get_jmpbuf_decl] -#define set_jmpbuf_decl gnat_std_decls[(int) ADT_set_jmpbuf_decl] -#define get_excptr_decl gnat_std_decls[(int) ADT_get_excptr_decl] -#define not_handled_by_others_decl \ - gnat_std_decls[(int) ADT_not_handled_by_others_decl] -#define setjmp_decl gnat_std_decls[(int) ADT_setjmp_decl] -#define update_setjmp_buf_decl gnat_std_decls[(int) ADT_update_setjmp_buf_decl] -#define raise_nodefer_decl gnat_std_decls[(int) ADT_raise_nodefer_decl] #define reraise_zcx_decl gnat_std_decls[(int) ADT_reraise_zcx_decl] #define set_exception_parameter_decl \ gnat_std_decls[(int) ADT_set_exception_parameter_decl] #define begin_handler_decl gnat_std_decls[(int) ADT_begin_handler_decl] +#define end_handler_decl gnat_std_decls[(int) ADT_end_handler_decl] +#define unhandled_except_decl gnat_std_decls[(int) ADT_unhandled_except_decl] #define others_decl gnat_std_decls[(int) ADT_others_decl] #define all_others_decl gnat_std_decls[(int) ADT_all_others_decl] #define unhandled_others_decl gnat_std_decls[(int) ADT_unhandled_others_decl] -#define end_handler_decl gnat_std_decls[(int) ADT_end_handler_decl] -#define unhandled_except_decl gnat_std_decls[(int) ADT_unhandled_except_decl] /* Routines expected by the gcc back-end. They must have exactly the same prototype and names as below. */ @@ -504,12 +483,6 @@ extern void gnat_zaplevel (void); and point FNDECL to this BLOCK. */ extern void set_current_block_context (tree fndecl); -/* Set the jmpbuf_decl for the current binding level to DECL. */ -extern void set_block_jmpbuf_decl (tree decl); - -/* Get the setjmp_decl, if any, for the current binding level. */ -extern tree get_block_jmpbuf_decl (void); - /* Record DECL as belonging to the current lexical scope and use GNAT_NODE for location information and flag propagation. */ extern void gnat_pushdecl (tree decl, Node_Id gnat_node); diff --git a/gcc/ada/gcc-interface/trans.cc b/gcc/ada/gcc-interface/trans.cc index 46030d8..f0602b8 100644 --- a/gcc/ada/gcc-interface/trans.cc +++ b/gcc/ada/gcc-interface/trans.cc @@ -467,71 +467,6 @@ gigi (Node_Id gnat_root, /* Make the types and functions used for exception processing. */ except_type_node = gnat_to_gnu_type (Base_Type (standard_exception_type)); - for (t = TYPE_FIELDS (except_type_node); t; t = DECL_CHAIN (t)) - if (DECL_NAME (t) == not_handled_by_others_name_id) - { - not_handled_by_others_decl = t; - break; - } - gcc_assert (DECL_P (not_handled_by_others_decl)); - - jmpbuf_type - = build_array_type (gnat_type_for_mode (Pmode, 0), - build_index_type (size_int (5))); - record_builtin_type ("JMPBUF_T", jmpbuf_type, true); - jmpbuf_ptr_type = build_pointer_type (jmpbuf_type); - - /* Functions to get and set the jumpbuf pointer for the current thread. */ - get_jmpbuf_decl - = create_subprog_decl - (get_identifier ("system__soft_links__get_jmpbuf_address_soft"), - NULL_TREE, build_function_type_list (jmpbuf_ptr_type, NULL_TREE), - NULL_TREE, is_default, true, true, true, false, false, NULL, Empty); - - set_jmpbuf_decl - = create_subprog_decl - (get_identifier ("system__soft_links__set_jmpbuf_address_soft"), - NULL_TREE, build_function_type_list (void_type_node, jmpbuf_ptr_type, - NULL_TREE), - NULL_TREE, is_default, true, true, true, false, false, NULL, Empty); - - get_excptr_decl - = create_subprog_decl - (get_identifier ("system__soft_links__get_gnat_exception"), NULL_TREE, - build_function_type_list (build_pointer_type (except_type_node), - NULL_TREE), - NULL_TREE, is_default, true, true, true, false, false, NULL, Empty); - - /* setjmp returns an integer and has one operand, which is a pointer to - a jmpbuf. */ - setjmp_decl - = create_subprog_decl - (get_identifier ("__builtin_setjmp"), NULL_TREE, - build_function_type_list (integer_type_node, jmpbuf_ptr_type, - NULL_TREE), - NULL_TREE, is_default, true, true, true, false, false, NULL, Empty); - set_decl_built_in_function (setjmp_decl, BUILT_IN_NORMAL, BUILT_IN_SETJMP); - - /* update_setjmp_buf updates a setjmp buffer from the current stack pointer - address. */ - update_setjmp_buf_decl - = create_subprog_decl - (get_identifier ("__builtin_update_setjmp_buf"), NULL_TREE, - build_function_type_list (void_type_node, jmpbuf_ptr_type, NULL_TREE), - NULL_TREE, is_default, true, true, true, false, false, NULL, Empty); - set_decl_built_in_function (update_setjmp_buf_decl, BUILT_IN_NORMAL, - BUILT_IN_UPDATE_SETJMP_BUF); - - /* Indicate that it never returns. */ - ftype = build_function_type_list (void_type_node, - build_pointer_type (except_type_node), - NULL_TREE); - ftype = build_qualified_type (ftype, TYPE_QUAL_VOLATILE); - raise_nodefer_decl - = create_subprog_decl - (get_identifier ("__gnat_raise_nodefer_with_msg"), NULL_TREE, ftype, - NULL_TREE, is_default, true, true, true, false, false, NULL, Empty); - set_exception_parameter_decl = create_subprog_decl (get_identifier ("__gnat_set_exception_parameter"), NULL_TREE, @@ -600,8 +535,7 @@ gigi (Node_Id gnat_root, NULL, Empty); /* If in no exception handlers mode, all raise statements are redirected to - __gnat_last_chance_handler. No need to redefine raise_nodefer_decl since - this procedure will never be called in this mode. */ + __gnat_last_chance_handler. */ if (No_Exception_Handlers_Set ()) { /* Indicate that it never returns. */ diff --git a/gcc/ada/gcc-interface/utils.cc b/gcc/ada/gcc-interface/utils.cc index 3aa810b..b5c2bfb 100644 --- a/gcc/ada/gcc-interface/utils.cc +++ b/gcc/ada/gcc-interface/utils.cc @@ -264,9 +264,6 @@ struct GTY((chain_next ("%h.chain"))) gnat_binding_level { struct gnat_binding_level *chain; /* The BLOCK node for this level. */ tree block; - /* If nonzero, the setjmp buffer that needs to be updated for any - variable-sized definition within this context. */ - tree jmpbuf_decl; }; /* The binding level currently in effect. */ @@ -599,7 +596,6 @@ gnat_pushlevel (void) /* Add this level to the front of the chain (stack) of active levels. */ newlevel->chain = current_binding_level; - newlevel->jmpbuf_decl = NULL_TREE; current_binding_level = newlevel; } @@ -614,22 +610,6 @@ set_current_block_context (tree fndecl) set_block_for_group (current_binding_level->block); } -/* Set the jmpbuf_decl for the current binding level to DECL. */ - -void -set_block_jmpbuf_decl (tree decl) -{ - current_binding_level->jmpbuf_decl = decl; -} - -/* Get the jmpbuf_decl, if any, for the current binding level. */ - -tree -get_block_jmpbuf_decl (void) -{ - return current_binding_level->jmpbuf_decl; -} - /* Exit a binding level. Set any BLOCK into the current code group. */ void |