diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2015-11-18 21:55:11 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2015-11-18 21:55:11 +0000 |
commit | 642357660ae1f36651519fb41f81a997f5fdae53 (patch) | |
tree | 1b06a2606d86dae56336dcdd2fd3e60bee7c93db /gcc/ada/gcc-interface/gigi.h | |
parent | 5d306e55e09af218e1698a8e427638f717af4f3d (diff) | |
download | gcc-642357660ae1f36651519fb41f81a997f5fdae53.zip gcc-642357660ae1f36651519fb41f81a997f5fdae53.tar.gz gcc-642357660ae1f36651519fb41f81a997f5fdae53.tar.bz2 |
ada-tree.h (DECL_INVARIANT_P): New macro.
* gcc-interface/ada-tree.h (DECL_INVARIANT_P): New macro.
* gcc-interface/gigi.h (enum standard_datatypes): Remove
ADT_longjmp_decl and add ADT_not_handled_by_others_decl.
(longjmp_decl): Delete.
(not_handled_by_others_decl): New macro.
(build_simple_component_ref): Delete.
(build_component_ref): Adjust prototype.
* gcc-interface/decl.c (gnat_to_gnu_entity): Adjust calls to
build_component_ref.
(gnat_to_gnu_field): Set DECL_INVARIANT_P on discriminants
without default value.
* gcc-interface/trans.c (gigi): Reorder initialization sequence
and add not_handled_by_others_decl.
(Attribute_to_gnu): Adjust calls to build_component_ref.
(Subprogram_Body_to_gnu): Likewise.
(Call_to_gnu): Likewise.
(Exception_Handler_to_gnu_sjlj): Likewise.
(gnat_to_gnu): Likewise.
(range_check_info_d): Add inserted_cond field.
(Loop_Statement_to_gnu): Make two passes on the recorded range checks.
(build_noreturn_cond): New static function.
(Raise_Error_to_gnu): Record range checks in loops at -O1 and above.
(make_invariant): New static function.
(Loop_Statement_to_gnu): Use it to compute invariant expressions for
the loop bounds if possible, but do not require it if loop unswitching
is enabled.
* gcc-interface/utils.c (convert_to_fat_pointer): Likewise.
(convert): Likewise.
(maybe_unconstrained_array): Likewise. Call it instead of
build_simple_component_ref and add guard for CONSTRUCTORs.
(unchecked_convert): Likewise.
* gcc-interface/utils2.c (compare_fat_pointers): Likewise.
(build_simple_component_ref): Remove COMPONENT parameter, unify
code dealing with VIEW_CONVERT_EXPR and make it more general,
remove special treatment for CONSTRUCTORs of template types.
(build_component_ref): Remove COMPONENT parameter and adjust call
to build_simple_component_ref.
(maybe_wrap_malloc): Likewise.
(build_allocator): Likewise.
(gnat_invariant_expr): Look through overflow checks, deal with
addition and subtraction of constants and take into account
DECL_INVARIANT_P for the COMPONENT_REF case.
From-SVN: r230575
Diffstat (limited to 'gcc/ada/gcc-interface/gigi.h')
-rw-r--r-- | gcc/ada/gcc-interface/gigi.h | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/gcc/ada/gcc-interface/gigi.h b/gcc/ada/gcc-interface/gigi.h index e6fff1e..46ec42e 100644 --- a/gcc/ada/gcc-interface/gigi.h +++ b/gcc/ada/gcc-interface/gigi.h @@ -408,17 +408,18 @@ enum standard_datatypes /* Identifier for the name of the Exception_Data type. */ ADT_exception_data_name_id, - /* Types and decls used by our temporary exception mechanism. See - init_gigi_decls for details. */ + /* 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_longjmp_decl, ADT_update_setjmp_buf_decl, ADT_raise_nodefer_decl, + + /* Types and decls used by the ZCX exception mechanism. */ ADT_reraise_zcx_decl, ADT_set_exception_parameter_decl, ADT_begin_handler_decl, @@ -427,6 +428,7 @@ enum standard_datatypes ADT_others_decl, ADT_all_others_decl, ADT_unhandled_others_decl, + ADT_LAST}; /* Define kind of exception information associated with raise statements. */ @@ -475,13 +477,14 @@ extern GTY(()) tree gnat_raise_decls_ext[(int) LAST_REASON_CODE + 1]; #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 longjmp_decl gnat_std_decls[(int) ADT_longjmp_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] + gnat_std_decls[(int) ADT_set_exception_parameter_decl] #define begin_handler_decl gnat_std_decls[(int) ADT_begin_handler_decl] #define others_decl gnat_std_decls[(int) ADT_others_decl] #define all_others_decl gnat_std_decls[(int) ADT_all_others_decl] @@ -896,16 +899,10 @@ extern tree build_call_raise_range (int msg, Node_Id gnat_node, same as build_constructor in the language-independent tree.c. */ extern tree gnat_build_constructor (tree type, vec<constructor_elt, va_gc> *v); -/* Return a COMPONENT_REF to access a field that is given by COMPONENT, - an IDENTIFIER_NODE giving the name of the field, FIELD, a FIELD_DECL, - for the field, or both. Don't fold the result if NO_FOLD_P. */ -extern tree build_simple_component_ref (tree record_variable, tree component, - tree field, bool no_fold_p); - -/* Likewise, but generate a Constraint_Error if the reference could not be - found. */ -extern tree build_component_ref (tree record_variable, tree component, - tree field, bool no_fold_p); +/* Return a COMPONENT_REF to access FIELD in RECORD, or NULL_EXPR and generate + a Constraint_Error if the field is not found in the record. Don't fold the + result if NO_FOLD is true. */ +extern tree build_component_ref (tree record, tree field, bool no_fold); /* Build a GCC tree to call an allocation or deallocation function. If GNU_OBJ is nonzero, it is an object to deallocate. Otherwise, |