summaryrefslogtreecommitdiff
path: root/gcc/ada/gigi.h
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-15 15:59:54 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-15 15:59:54 +0000
commit8d8f60b9addfd83e4a016e4bcc397618117ed76e (patch)
tree6de133fd341d163b8dba67b5ce64baf3ae84e2c8 /gcc/ada/gigi.h
parent18563cef8e0580374758cc830b4b4b249176875b (diff)
downloadgcc-8d8f60b9addfd83e4a016e4bcc397618117ed76e.tar.gz
2005-03-08 Eric Botcazou <ebotcazou@adacore.com>
Richard Kenner <kenner@vlsi1.ultra.nyu.edu> Nicolas Setton <setton@adacore.com> Ed Schonberg <schonberg@adacore.com> PR ada/19900 PR ada/19408 PR ada/19140 PR ada/20255 * decl.c (gnat_to_gnu_field): Reject aliased components with a representation clause that prescribes a size not equal to the rounded size of their types. (gnat_to_gnu_entity, case E_Component): Always look at Original_Record_Component if Present and not the entity. (gnat_to_gnu_entity, case E_Record_Subtype): Rework handling of subtypes of tagged extension types by not making field for components that are inside the parent. (gnat_to_gnu_entity) <E_Record_Type>: Fix typo in the alignment formula (gnat_to_gnu_entity) <E_Variable>: Do not convert again the expression to the type of the object when the object is constant. Reverse defer_debug_incomplete_list before traversing it, so that trees are processed in the order at which they were added to the list. This order is important when using the stabs debug format. If we are deferring the output of debug information, also defer this output for a function return type. When adding fields to a record, prevent emitting debug information for incomplete records, emit the information only when the record is complete. (components_to_record): New parameter defer_debug. (gnat_to_gnu_entity, case E_Array_Subtype): Call copy_alias_set. (gnat_to_gnu_field_decl): New function. (substitution_list, annotate_rep): Call it. (gnat_to_gnu_entity, case E_Record_Subtype): Likewise. (gnat_to_gnu_entity, case E_Record_Type): Likewise. No longer update discriminants to not be a COMPONENT_REF. (copy_alias_set): Strip padding from input type; also handle unconstrained arrays properly. * gigi.h (write_record_type_debug_info): New function. Convert to use ANSI-style prototypes. Remove unused declarations for emit_stack_check, elab_all_gnat and set_second_error_entity. (gnat_to_gnu_field_decl): New decl. * utils.c (write_record_type_debug_info): New function. (finish_record_type): Delegate generation of debug information to write_record_type_debug_info. (update_pointer_to): Remove unneeded calls to rest_of_decl_compilation. (update_pointer_to): Fix pasto. (convert) <UNION_TYPE>: Accept slight type variations when converting to an unchecked union type. * exp_ch13.adb (Expand_N_Freeze_Entity): If Freeze_Type returns True, replace the N_Freeze_Entity with a null statement. * freeze.adb (Freeze_Expression): If the freeze nodes are generated within a constrained subcomponent of an enclosing record, place the freeze nodes in the scope stack entry for the enclosing record. (Undelay_Type): New Subprogram. (Set_Small_Size): Pass T, the type to modify; all callers changed. (Freeze_Entity, Freeze_Record_Type): Change the way we handle types within records; allow them to have freeze nodes if their base types aren't frozen yet. * sem_ch3.adb (Derived_Type_Declaration): New predicate Comes_From_Generic, to recognize accurately that the parent type in a derived type declaration can be traced back to a formal type, because it is one or is derived from one, or because its completion is derived from one. (Constrain_Component_Type): If component comes from source and has no explicit constraint, no need to constrain in in a subtype of the enclosing record. (Constrain_Access, Constrain_Array): Allow itypes to be delayed. Minor change to propagate Is_Ada_2005 flag * trans.c (gnat_to_gnu, case N_Aggregate): Verify that Expansion_Delayed is False. (assoc_to_constructor): Ignore fields that have a Corresponding_Discriminant. (gnat_to_gnu) <N_Return_Statement>: Restructure. If the function returns "by target", dereference the target pointer using the type of the actual return value. <all>: Be prepared for a null gnu_result. (processed_inline_subprograms): Check flag_really_no_inline instead of flag_no_inline. (set_second_error_entity): Remove unused function. (gnat_to_gnu, case N_Selected_Component): Call gnat_to_gnu_field_decl. (assoc_to_constructor): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96492 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/gigi.h')
-rw-r--r--gcc/ada/gigi.h277
1 files changed, 159 insertions, 118 deletions
diff --git a/gcc/ada/gigi.h b/gcc/ada/gigi.h
index bb03912a637..cdf2c225bcf 100644
--- a/gcc/ada/gigi.h
+++ b/gcc/ada/gigi.h
@@ -6,7 +6,7 @@
* *
* C Header File *
* *
- * Copyright (C) 1992-2004 Free Software Foundation, Inc. *
+ * Copyright (C) 1992-2005 Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
@@ -30,30 +30,23 @@
* *
****************************************************************************/
+/* Declare all functions and types used by gigi. */
+
/* The largest alignment, in bits, that is needed for using the widest
move instruction. */
extern unsigned int largest_move_alignment;
-/* Declare all functions and types used by gigi. */
-
/* Compute the alignment of the largest mode that can be used for copying
objects. */
extern void gnat_compute_largest_alignment (void);
-/* Routine called by gcc for emitting a stack check. GNU_EXPR is the
- expression that contains the last address on the stack to check. */
-extern tree emit_stack_check (tree);
-
/* GNU_TYPE is a type. Determine if it should be passed by reference by
default. */
-extern bool default_pass_by_ref (tree);
+extern bool default_pass_by_ref (tree gnu_type);
/* GNU_TYPE is the type of a subprogram parameter. Determine from the type
if it should be passed by reference. */
-extern bool must_pass_by_ref (tree);
-
-/* Elaboration routines for the front end. */
-extern void elab_all_gnat (void);
+extern bool must_pass_by_ref (tree gnu_type);
/* Initialize DUMMY_NODE_TABLE. */
extern void init_dummy_type (void);
@@ -73,46 +66,51 @@ extern void init_dummy_type (void);
was not created previously. The value of 1 is normally used for a non-zero
DEFINITION, but a value of 2 is used in special circumstances, defined in
the code. */
-extern tree gnat_to_gnu_entity (Entity_Id, tree, int);
+extern tree gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr,
+ int definition);
+
+/* Similar, but if the returned value is a COMPONENT_REF, return the
+ FIELD_DECL. */
+extern tree gnat_to_gnu_field_decl (Entity_Id gnat_entity);
/* Given GNAT_ENTITY, an entity in the incoming GNAT tree, return a
GCC type corresponding to that entity. GNAT_ENTITY is assumed to
refer to an Ada type. */
-extern tree gnat_to_gnu_type (Entity_Id);
+extern tree gnat_to_gnu_type (Entity_Id gnat_entity);
/* Add GNU_STMT to the current BLOCK_STMT node. */
-extern void add_stmt (tree);
+extern void add_stmt (tree gnu_stmt);
/* Similar, but set the location of GNU_STMT to that of GNAT_NODE. */
-extern void add_stmt_with_node (tree, Node_Id);
+extern void add_stmt_with_node (tree gnu_stmt, Node_Id gnat_node);
/* Set the BLOCK node corresponding to the current code group to GNU_BLOCK. */
extern void set_block_for_group (tree);
/* Add a declaration statement for GNU_DECL to the current BLOCK_STMT node.
- Get SLOC from Entity_Id. */
-extern void add_decl_expr (tree, Entity_Id);
+ Get SLOC from GNAT_ENTITY. */
+extern void add_decl_expr (tree gnu_decl, Entity_Id gnat_entity);
/* Given GNAT_ENTITY, elaborate all expressions that are required to
be elaborated at the point of its definition, but do nothing else. */
-extern void elaborate_entity (Entity_Id);
+extern void elaborate_entity (Entity_Id gnat_entity);
/* Mark GNAT_ENTITY as going out of scope at this point. Recursively mark
any entities on its entity chain similarly. */
-extern void mark_out_of_scope (Entity_Id);
+extern void mark_out_of_scope (Entity_Id gnat_entity);
/* Make a dummy type corresponding to GNAT_TYPE. */
-extern tree make_dummy_type (Entity_Id);
+extern tree make_dummy_type (Entity_Id gnat_type);
/* Get the unpadded version of a GNAT type. */
-extern tree get_unpadded_type (Entity_Id);
+extern tree get_unpadded_type (Entity_Id gnat_entity);
/* Called when we need to protect a variable object using a save_expr. */
-extern tree maybe_variable (tree);
+extern tree maybe_variable (tree gnu_operand);
/* Create a record type that contains a field of TYPE with a starting bit
position so that it is aligned to ALIGN bits and is SIZE bytes long. */
-extern tree make_aligning_type (tree, int, tree);
+extern tree make_aligning_type (tree type, int align, tree size);
/* Ensure that TYPE has SIZE and ALIGN. Make and return a new padded type
if needed. We have already verified that SIZE and TYPE are large enough.
@@ -127,36 +125,38 @@ extern tree make_aligning_type (tree, int, tree);
SAME_RM_SIZE is true if the RM_Size of the resulting type is to be
set to its TYPE_SIZE; otherwise, it's set to the RM_Size of the original
type. */
-extern tree maybe_pad_type (tree, tree, unsigned int, Entity_Id,
- const char *, bool, bool, bool);
+extern tree maybe_pad_type (tree type, tree size, unsigned int align,
+ Entity_Id gnat_entity, const char *name_trailer,
+ bool is_user_type, bool definition,
+ bool same_rm_size);
/* Given a GNU tree and a GNAT list of choices, generate an expression to test
the value passed against the list of choices. */
-extern tree choices_to_gnu (tree, Node_Id);
+extern tree choices_to_gnu (tree operand, Node_Id choices);
/* Given a type T, a FIELD_DECL F, and a replacement value R,
return a new type with all size expressions that contain F
updated by replacing F with R. This is identical to GCC's
substitute_in_type except that it knows about TYPE_INDEX_TYPE. */
-extern tree gnat_substitute_in_type (tree, tree, tree);
+extern tree gnat_substitute_in_type (tree t, tree f, tree r);
/* Return the "RM size" of GNU_TYPE. This is the actual number of bits
needed to represent the object. */
-extern tree rm_size (tree);
+extern tree rm_size (tree gnu_type);
-/* Given GNU_ID, an IDENTIFIER_NODE containing a name and SUFFIX, a
+/* Given GNU_ID, an IDENTIFIER_NODE containing a name, and SUFFIX, a
string, return a new IDENTIFIER_NODE that is the concatenation of
the name in GNU_ID and SUFFIX. */
-extern tree concat_id_with_name (tree, const char *);
+extern tree concat_id_with_name (tree gnu_id, const char *suffix);
/* Return the name to be used for GNAT_ENTITY. If a type, create a
fully-qualified name, possibly with type information encoding.
Otherwise, return the name. */
-extern tree get_entity_name (Entity_Id);
+extern tree get_entity_name (Entity_Id gnat_entity);
/* Return a name for GNAT_ENTITY concatenated with two underscores and
SUFFIX. */
-extern tree create_concat_name (Entity_Id, const char *);
+extern tree create_concat_name (Entity_Id gnat_entity, const char *suffix);
/* If true, then gigi is being called on an analyzed but unexpanded tree, and
the only purpose of the call is to properly annotate types with
@@ -167,36 +167,48 @@ extern bool type_annotate_only;
extern const char *ref_filename;
/* This is the main program of the back-end. It sets up all the table
- structures and then generates code. */
-
-extern void gigi (Node_Id, int, int, struct Node *, Node_Id *, Node_Id *,
- struct Elist_Header *, struct Elmt_Item *,
- struct String_Entry *, Char_Code *, struct List_Header *,
- Int, char *, Entity_Id, Entity_Id, Entity_Id, Int);
+ structures and then generates code.
+
+ ??? Needs parameter descriptions */
+
+extern void gigi (Node_Id gnat_root, int max_gnat_node, int number_name,
+ struct Node *nodes_ptr, Node_Id *next_node_ptr,
+ Node_Id *prev_node_ptr, struct Elist_Header *elists_ptr,
+ struct Elmt_Item *elmts_ptr,
+ struct String_Entry *strings_ptr,
+ Char_Code *strings_chars_ptr,
+ struct List_Header *list_headers_ptr,
+ Int number_units ATTRIBUTE_UNUSED,
+ char *file_info_ptr ATTRIBUTE_UNUSED,
+ Entity_Id standard_integer,
+ Entity_Id standard_long_long_float,
+ Entity_Id standard_exception_type,
+ Int gigi_operating_mode);
/* GNAT_NODE is the root of some GNAT tree. Return the root of the
GCC tree corresponding to that GNAT tree. Normally, no code is generated;
we just return an equivalent tree which is used elsewhere to generate
code. */
-extern tree gnat_to_gnu (Node_Id);
+extern tree gnat_to_gnu (Node_Id gnat_node);
/* GNU_STMT is a statement. We generate code for that statement. */
-extern void gnat_expand_stmt (tree);
+extern void gnat_expand_stmt (tree gnu_stmt);
-extern int gnat_gimplify_expr (tree *, tree *, tree *);
+/* ??? missing documentation */
+extern int gnat_gimplify_expr (tree *expr_p, tree *pre_p,
+ tree *post_p ATTRIBUTE_UNUSED);
/* Do the processing for the declaration of a GNAT_ENTITY, a type. If
a separate Freeze node exists, delay the bulk of the processing. Otherwise
make a GCC type for GNAT_ENTITY and set up the correspondance. */
-
-extern void process_type (Entity_Id);
+extern void process_type (Entity_Id gnat_entity);
/* Convert Sloc into *LOCUS (a location_t). Return true if this Sloc
corresponds to a source code location and false if it doesn't. In the
latter case, we don't update *LOCUS. We also set the Gigi global variable
REF_FILENAME to the reference file name as given by sinput (i.e no
directory). */
-extern bool Sloc_to_locus (Source_Ptr, location_t *);
+extern bool Sloc_to_locus (Source_Ptr Sloc, location_t *locus);
/* Post an error message. MSG is the error message, properly annotated.
NODE is the node at which to post the error and the node to use for the
@@ -205,28 +217,28 @@ extern void post_error (const char *, Node_Id);
/* Similar, but NODE is the node at which to post the error and ENT
is the node to use for the "&" substitution. */
-extern void post_error_ne (const char *, Node_Id, Entity_Id);
+extern void post_error_ne (const char *msg, Node_Id node, Entity_Id ent);
/* Similar, but NODE is the node at which to post the error, ENT is the node
to use for the "&" substitution, and N is the number to use for the ^. */
-extern void post_error_ne_num (const char *, Node_Id, Entity_Id, int);
+extern void post_error_ne_num (const char *msg, Node_Id node, Entity_Id ent,
+ int n);
/* Similar to post_error_ne_num, but T is a GCC tree representing the number
to write. If the tree represents a constant that fits within a
host integer, the text inside curly brackets in MSG will be output
(presumably including a '^'). Otherwise that text will not be output
and the text inside square brackets will be output instead. */
-extern void post_error_ne_tree (const char *, Node_Id, Entity_Id, tree);
+extern void post_error_ne_tree (const char *msg, Node_Id node, Entity_Id ent,
+ tree t);
/* Similar to post_error_ne_tree, except that NUM is a second
integer to write in the message. */
-extern void post_error_ne_tree_2 (const char *, Node_Id, Entity_Id, tree, int);
-
-/* Set the node for a second '&' in the error message. */
-extern void set_second_error_entity (Entity_Id);
+extern void post_error_ne_tree_2 (const char *msg, Node_Id node, Entity_Id ent,
+ tree t, int num);
/* Protect EXP from multiple evaluation. This may make a SAVE_EXPR. */
-extern tree protect_multiple_eval (tree);
+extern tree protect_multiple_eval (tree exp);
/* Initialize the table that maps GNAT codes to GCC codes for simple
binary and unary operations. */
@@ -239,7 +251,7 @@ extern Node_Id error_gnat_node;
/* This is equivalent to stabilize_reference in GCC's tree.c, but we know
how to handle our new nodes and we take an extra argument that says
whether to force evaluation of everything. */
-extern tree gnat_stabilize_reference (tree, bool);
+extern tree gnat_stabilize_reference (tree ref, bool force);
/* Highest number in the front-end node table. */
extern int max_gnat_nodes;
@@ -381,10 +393,10 @@ extern void gnat_poplevel (void);
/* Set SUPERCONTEXT of the BLOCK for the current binding level to FNDECL
and point FNDECL to this BLOCK. */
-extern void set_current_block_context (tree);
+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);
+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);
@@ -392,42 +404,42 @@ extern tree get_block_jmpbuf_decl (void);
/* Insert BLOCK at the end of the list of subblocks of the
current binding level. This is used when a BIND_EXPR is expanded,
to handle the BLOCK node inside the BIND_EXPR. */
-extern void insert_block (tree);
+extern void insert_block (tree block);
/* Records a ..._DECL node DECL as belonging to the current lexical scope
- and uses GNAT_ENTITY for location information. */
-extern void gnat_pushdecl (tree, Entity_Id);
+ and uses GNAT_NODE for location information. */
+extern void gnat_pushdecl (tree decl, Node_Id gnat_node);
extern void gnat_init_stmt_group (void);
extern void gnat_init_decl_processing (void);
-extern void init_gigi_decls (tree, tree);
+extern void init_gigi_decls (tree long_long_float_type, tree exception_type);
extern void gnat_init_gcc_eh (void);
/* Return an integer type with the number of bits of precision given by
PRECISION. UNSIGNEDP is nonzero if the type is unsigned; otherwise
it is a signed type. */
-extern tree gnat_type_for_size (unsigned, int);
+extern tree gnat_type_for_size (unsigned precision, int unsignedp);
/* Return a data type that has machine mode MODE. UNSIGNEDP selects
an unsigned type; otherwise a signed type is returned. */
-extern tree gnat_type_for_mode (enum machine_mode, int);
+extern tree gnat_type_for_mode (enum machine_mode mode, int unsignedp);
/* Return the unsigned version of a TYPE_NODE, a scalar type. */
-extern tree gnat_unsigned_type (tree);
+extern tree gnat_unsigned_type (tree type_node);
/* Return the signed version of a TYPE_NODE, a scalar type. */
-extern tree gnat_signed_type (tree);
+extern tree gnat_signed_type (tree type_node);
/* Return a type the same as TYPE except unsigned or signed according to
UNSIGNEDP. */
-extern tree gnat_signed_or_unsigned_type (int, tree);
+extern tree gnat_signed_or_unsigned_type (int unsignedp, tree type);
/* Create an expression whose value is that of EXPR,
converted to type TYPE. The TREE_TYPE of the value
is always TYPE. This function implements all reasonable
conversions; callers should filter out those that are
not permitted by the language being compiled. */
-extern tree convert (tree, tree);
+extern tree convert (tree type, tree expr);
/* Routines created solely for the tree translator's sake. Their prototypes
can be changed as desired. */
@@ -437,15 +449,16 @@ extern tree convert (tree, tree);
GNAT_ENTITY. Such gnu tree node is always an ..._DECL node.
If NO_CHECK is nonzero, the latter check is suppressed.
If GNU_DECL is zero, a previous association is to be reset. */
-extern void save_gnu_tree (Entity_Id, tree, bool);
+extern void save_gnu_tree (Entity_Id gnat_entity, tree gnu_decl,
+ bool no_check);
/* GNAT_ENTITY is a GNAT tree node for a defining identifier.
Return the ..._DECL node that was associated with it. If there is no tree
node associated with GNAT_ENTITY, abort. */
-extern tree get_gnu_tree (Entity_Id);
+extern tree get_gnu_tree (Entity_Id gnat_entity);
/* Return nonzero if a GCC tree has been associated with GNAT_ENTITY. */
-extern bool present_gnu_tree (Entity_Id);
+extern bool present_gnu_tree (Entity_Id gnat_entity);
/* Initialize tables for above routines. */
extern void init_gnat_to_gnu (void);
@@ -456,7 +469,11 @@ extern void init_gnat_to_gnu (void);
layout_type but merely set the size and alignment ourselves.
If DEFER_DEBUG is true, do not call the debugging routines
on this type; it will be done later. */
-extern void finish_record_type (tree, tree, bool, bool);
+extern void finish_record_type (tree record_type, tree fieldlist,
+ bool has_rep, bool defer_debug);
+
+/* Output the debug information associated to a record type. */
+extern void write_record_type_debug_info (tree);
/* Returns a FUNCTION_TYPE node. RETURN_TYPE is the type returned by the
subprogram. If it is void_type_node, then we are dealing with a procedure,
@@ -469,14 +486,17 @@ extern void finish_record_type (tree, tree, bool, bool);
depressed stack pointer. RETURNS_BY_TARGET_PTR is true if the function
is to be passed (as its first parameter) the address of the place to copy
its result. */
-extern tree create_subprog_type (tree, tree, tree, bool, bool, bool, bool);
+extern tree create_subprog_type (tree return_type, tree param_decl_list,
+ tree cico_list, bool returns_unconstrained,
+ bool returns_by_ref, bool returns_with_dsp,
+ bool returns_by_target_ptr);
/* Return a copy of TYPE, but safe to modify in any way. */
-extern tree copy_type (tree);
+extern tree copy_type (tree type);
/* Return an INTEGER_TYPE of SIZETYPE with range MIN to MAX and whose
TYPE_INDEX_TYPE is INDEX. */
-extern tree create_index_type (tree, tree, tree);
+extern tree create_index_type (tree min, tree max, tree index);
/* Return a TYPE_DECL node. TYPE_NAME gives the name of the type (a character
string) and TYPE is a ..._TYPE node giving its data type.
@@ -484,8 +504,10 @@ extern tree create_index_type (tree, tree, tree);
by the compiler. DEBUG_INFO_P is true if we need to write debugging
information about this type. GNAT_NODE is used for the position of
the decl. */
-extern tree create_type_decl (tree, tree, struct attrib *, bool, bool,
- Node_Id);
+extern tree create_type_decl (tree type_name, tree type,
+ struct attrib *attr_list,
+ bool artificial_p, bool debug_info_p,
+ Node_Id gnat_node);
/* Returns a GCC VAR_DECL node. VAR_NAME gives the name of the variable.
ASM_NAME is its assembler name (if provided). TYPE is
@@ -504,11 +526,14 @@ extern tree create_type_decl (tree, tree, struct attrib *, bool, bool,
it indicates whether to always allocate storage to the variable.
GNAT_NODE is used for the position of the decl. */
-extern tree create_var_decl (tree, tree, tree, tree, bool, bool, bool, bool,
- struct attrib *, Node_Id);
+extern tree create_var_decl (tree var_name, tree asm_name, tree type,
+ tree var_init, bool const_flag,
+ bool public_flag, bool extern_flag,
+ bool static_flag,
+ struct attrib *attr_list, Node_Id gnat_node);
/* Given a DECL and ATTR_LIST, apply the listed attributes. */
-extern void process_attributes (tree, struct attrib *);
+extern void process_attributes (tree decl, struct attrib *attr_list);
/* Returns a FIELD_DECL node. FIELD_NAME the field name, FIELD_TYPE is its
type, and RECORD_TYPE is the type of the parent. PACKED is nonzero if
@@ -516,13 +541,16 @@ extern void process_attributes (tree, struct attrib *);
it is the specified size for this field. If POS is nonzero, it is the bit
position. If ADDRESSABLE is nonzero, it means we are allowed to take
the address of this field for aliasing purposes. */
-extern tree create_field_decl (tree, tree, tree, int, tree, tree, int);
+extern tree create_field_decl (tree field_name, tree field_type,
+ tree record_type, int packed, tree size,
+ tree pos, int addressable);
/* Returns a PARM_DECL node. PARAM_NAME is the name of the parameter,
PARAM_TYPE is its type. READONLY is true if the parameter is
readonly (either an IN parameter or an address of a pass-by-ref
parameter). */
-extern tree create_param_decl (tree, tree, bool);
+extern tree create_param_decl (tree param_name, tree param_type,
+ bool readonly);
/* Returns a FUNCTION_DECL node. SUBPROG_NAME is the name of the subprogram,
ASM_NAME is its assembler name, SUBPROG_TYPE is its type (a FUNCTION_TYPE
@@ -531,26 +559,29 @@ extern tree create_param_decl (tree, tree, bool);
INLINE_FLAG, PUBLIC_FLAG, EXTERN_FLAG, and ATTR_LIST are used to set the
appropriate fields in the FUNCTION_DECL. GNAT_NODE gives the location. */
-extern tree create_subprog_decl (tree, tree, tree, tree, bool, bool, bool,
- struct attrib *, Node_Id);
+extern tree create_subprog_decl (tree subprog_name, tree asm_name,
+ tree subprog_type, tree param_decl_list,
+ bool inlinee_flag, bool public_flag,
+ bool extern_flag,
+ struct attrib *attr_list, Node_Id gnat_node);
/* Returns a LABEL_DECL node for LABEL_NAME. */
-extern tree create_label_decl (tree);
+extern tree create_label_decl (tree label_name);
/* Set up the framework for generating code for SUBPROG_DECL, a subprogram
body. This routine needs to be invoked before processing the declarations
appearing in the subprogram. */
-extern void begin_subprog_body (tree);
+extern void begin_subprog_body (tree subprog_decl);
/* Finish the definition of the current subprogram and compile it all the way
to assembler language output. BODY is the tree corresponding to
the subprogram. */
-extern void end_subprog_body (tree);
+extern void end_subprog_body (tree body);
/* Build a template of type TEMPLATE_TYPE from the array bounds of ARRAY_TYPE.
EXPR is an expression that we can use to locate any PLACEHOLDER_EXPRs.
Return a constructor for the template. */
-extern tree build_template (tree, tree, tree);
+extern tree build_template (tree template_type, tree array_type, tree expr);
/* Build a VMS descriptor from a Mechanism_Type, which must specify
a descriptor type, and the GCC type of an object. Each FIELD_DECL
@@ -559,7 +590,8 @@ extern tree build_template (tree, tree, tree);
to print out an error message if the mechanism cannot be applied to
an object of that type and also for the name. */
-extern tree build_vms_descriptor (tree, Mechanism_Type, Entity_Id);
+extern tree build_vms_descriptor (tree type, Mechanism_Type mech,
+ Entity_Id gnat_entity);
/* Build a type to be used to represent an aliased object whose nominal
type is an unconstrained array. This consists of a RECORD_TYPE containing
@@ -567,94 +599,99 @@ extern tree build_vms_descriptor (tree, Mechanism_Type, Entity_Id);
ARRAY_TYPE. If ARRAY_TYPE is that of the unconstrained array, this
is used to represent an arbitrary unconstrained object. Use NAME
as the name of the record. */
-extern tree build_unc_object_type (tree, tree, tree);
+extern tree build_unc_object_type (tree template_type, tree object_type,
+ tree name);
/* Update anything previously pointing to OLD_TYPE to point to NEW_TYPE. In
the normal case this is just two adjustments, but we have more to do
if NEW is an UNCONSTRAINED_ARRAY_TYPE. */
-extern void update_pointer_to (tree, tree);
+extern void update_pointer_to (tree old_type, tree new_type);
/* EXP is an expression for the size of an object. If this size contains
discriminant references, replace them with the maximum (if MAX_P) or
minimum (if !MAX_P) possible value of the discriminant. */
-extern tree max_size (tree, bool);
+extern tree max_size (tree exp, bool max_p);
/* Remove all conversions that are done in EXP. This includes converting
from a padded type or to a left-justified modular type. If TRUE_ADDRESS
is true, always return the address of the containing object even if
the address is not bit-aligned. */
-extern tree remove_conversions (tree, bool);
+extern tree remove_conversions (tree exp, bool true_address);
/* If EXP's type is an UNCONSTRAINED_ARRAY_TYPE, return an expression that
refers to the underlying array. If its type has TYPE_CONTAINS_TEMPLATE_P,
likewise return an expression pointing to the underlying array. */
-extern tree maybe_unconstrained_array (tree);
+extern tree maybe_unconstrained_array (tree exp);
/* Return an expression that does an unchecked converstion of EXPR to TYPE.
If NOTRUNC_P is true, truncation operations should be suppressed. */
-extern tree unchecked_convert (tree, tree, bool);
+extern tree unchecked_convert (tree type, tree expr, bool notrunc_p);
/* Prepare expr to be an argument of a TRUTH_NOT_EXPR or other logical
operation.
This preparation consists of taking the ordinary
- representation of an expression expr and producing a valid tree
- boolean expression describing whether expr is nonzero. We could
+ representation of an expression EXPR and producing a valid tree
+ boolean expression describing whether EXPR is nonzero. We could
simply always do build_binary_op (NE_EXPR, expr, integer_zero_node, 1),
but we optimize comparisons, &&, ||, and !.
The resulting type should always be the same as the input type.
This function is simpler than the corresponding C version since
the only possible operands will be things of Boolean type. */
-extern tree gnat_truthvalue_conversion (tree);
+extern tree gnat_truthvalue_conversion (tree expr);
/* Return the base type of TYPE. */
-extern tree get_base_type (tree);
+extern tree get_base_type (tree type);
/* Likewise, but only return types known at Ada source. */
-extern tree get_ada_base_type (tree);
+extern tree get_ada_base_type (tree type);
/* EXP is a GCC tree representing an address. See if we can find how
strictly the object at that address is aligned. Return that alignment
strictly the object at that address is aligned. Return that alignment
in bits. If we don't know anything about the alignment, return 0. */
-extern unsigned int known_alignment (tree);
+extern unsigned int known_alignment (tree exp);
/* Make a binary operation of kind OP_CODE. RESULT_TYPE is the type
desired for the result. Usually the operation is to be performed
in that type. For MODIFY_EXPR and ARRAY_REF, RESULT_TYPE may be 0
in which case the type to be used will be derived from the operands. */
-extern tree build_binary_op (enum tree_code, tree, tree, tree);
+extern tree build_binary_op (enum tree_code op_code, tree retult_type,
+ tree left_operand, tree right_operand);
/* Similar, but make unary operation. */
-extern tree build_unary_op (enum tree_code, tree, tree);
+extern tree build_unary_op (enum tree_code op_code, tree result_type,
+ tree operand);
/* Similar, but for COND_EXPR. */
-extern tree build_cond_expr (tree, tree, tree, tree);
+extern tree build_cond_expr (tree result_type, tree condition_operand,
+ tree true_operand, tree false_operand);
/* Build a CALL_EXPR to call FUNDECL with one argument, ARG. Return
the CALL_EXPR. */
-extern tree build_call_1_expr (tree, tree);
+extern tree build_call_1_expr (tree fundecl, tree arg);
/* Build a CALL_EXPR to call FUNDECL with two argument, ARG1 & ARG2. Return
the CALL_EXPR. */
-extern tree build_call_2_expr (tree, tree, tree);
+extern tree build_call_2_expr (tree fundecl, tree arg1, tree arg2);
/* Likewise to call FUNDECL with no arguments. */
-extern tree build_call_0_expr (tree);
+extern tree build_call_0_expr (tree fundecl);
/* Call a function that raises an exception and pass the line number and file
name, if requested. MSG says which exception function to call. */
-extern tree build_call_raise (int);
+extern tree build_call_raise (int msg);
/* Return a CONSTRUCTOR of TYPE whose list is LIST. This is not the
same as build_constructor in the language-independent tree.c. */
-extern tree gnat_build_constructor (tree, tree);
+extern tree gnat_build_constructor (tree type, tree list);
/* 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_component_ref (tree, tree, tree, bool);
+extern tree build_component_ref (tree record_variable, tree component,
+ tree field, bool no_fold_p);
/* Build a GCC tree to call an allocation or deallocation function.
If GNU_OBJ is nonzero, it is an object to deallocate. Otherwise,
@@ -663,8 +700,9 @@ extern tree build_component_ref (tree, tree, tree, bool);
GNU_SIZE is the size of the object and ALIGN is the alignment.
GNAT_PROC, if present is a procedure to call and GNAT_POOL is the
storage pool to use. If not preset, malloc and free will be used. */
-extern tree build_call_alloc_dealloc (tree, tree, unsigned int, Entity_Id,
- Entity_Id, Node_Id);
+extern tree build_call_alloc_dealloc (tree gnu_obj, tree gnu_size,
+ unsigned align, Entity_Id gnat_proc,
+ Entity_Id gnat_pool, Node_Id gnat_node);
/* Build a GCC tree to correspond to allocating an object of TYPE whose
initial value if INIT, if INIT is nonzero. Convert the expression to
@@ -672,25 +710,28 @@ extern tree build_call_alloc_dealloc (tree, tree, unsigned int, Entity_Id,
GNAT_PROC and GNAT_POOL optionally give the procedure to call and
the storage pool to use. GNAT_NODE is used to provide an error
location for restriction violations messages. */
-extern tree build_allocator (tree, tree, tree, Entity_Id, Entity_Id, Node_Id);
+extern tree build_allocator (tree type, tree init, tree result_type,
+ Entity_Id gnat_proc, Entity_Id gnat_pool,
+ Node_Id gnat_node);
/* Fill in a VMS descriptor for EXPR and return a constructor for it.
GNAT_FORMAL is how we find the descriptor record. */
-extern tree fill_vms_descriptor (tree, Entity_Id);
+extern tree fill_vms_descriptor (tree expr, Entity_Id gnat_formal);
/* Indicate that we need to make the address of EXPR_NODE and it therefore
should not be allocated in a register. Return true if successful. */
-extern bool gnat_mark_addressable (tree);
+extern bool gnat_mark_addressable (tree expr_node);
/* Implementation of the builtin_function langhook. */
-extern tree builtin_function (const char *, tree, int, enum built_in_class,
- const char *, tree);
+extern tree builtin_function (const char *name, tree type, int function_code,
+ enum built_in_class class,
+ const char *library_name, tree attrs);
/* Search the chain of currently reachable declarations for a builtin
FUNCTION_DECL node corresponding to function NAME (an IDENTIFIER_NODE).
Return the first node found, if any, or NULL_TREE otherwise. */
-extern tree builtin_decl_for (tree);
+extern tree builtin_decl_for (tree name ATTRIBUTE_UNUSED);
/* This function is called by the front end to enumerate all the supported
modes for the machine. We pass a function which is called back with
@@ -708,8 +749,8 @@ extern void enumerate_modes (void (*f) (int, int, int, int, int, int,
/* These are temporary function to deal with recent GCC changes related to
FP type sizes and precisions. */
-extern int fp_prec_to_size (int);
-extern int fp_size_to_prec (int);
+extern int fp_prec_to_size (int prec);
+extern int fp_size_to_prec (int size);
/* These functions return the basic data type sizes and related parameters
about the target machine. */