diff options
author | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-07 19:52:53 +0000 |
---|---|---|
committer | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-07 19:52:53 +0000 |
commit | 1d41ee0fbb9f9522f253434306109d44da443e35 (patch) | |
tree | b12eaf8066a9e3f36a310863af9847788fd50cf0 /gcc/ada/gigi.h | |
parent | 125a69b9437baea693eb48327cd02428ba9882e5 (diff) | |
download | gcc-1d41ee0fbb9f9522f253434306109d44da443e35.tar.gz |
* ada-tree.def (TRANSFORM_EXPR, ALLOCATE_EXPR, USE_EXPR): Deleted.
(GNAT_NOP_EXPR, GNAT_LOOP_ID, EXPR_STMT, NULL_STMT): Likewise.
(BLOCK_STMT, IF_STMT, GOTO_STMT, LABEL_STMT, RETURN_STMT): Likewise.
(ASM_STMT, BREAK_STMT, REGION_STMT,HANDLER_STMT): Likewise.
(STMT_STMT, USE_STMT): New statement codes.
(LOOP_STMT, EXIT_STMT): Make slight semantic changes.
* ada-tree.h: Reflect above changes.
(struct tree_loop_id): Deleted.
(union lang_tree_node, struct lang_decl, struct lang_type):
Now just contains a tree node; update macros using TYPE_LANG_SPECIFIC
and DECL_LANGUAGE_SPECIFIC to reflect these changes.
(DECL_INIT_BY_ASSIGN_P, TRE_LOOP_NODE_ID, TREE_SLOC): Deleted.
(IS_ADA_STMT): New macro.
* decl.c (annotate_decl_with_node): New function.
(gnat_to_gnu_entity): Use it and Sloc_to_locus instead of set_lineno.
(gnat_to_gnu_entity, case object): Remove call to expand CONVERT_EXPR.
Call add_stmt_with_node to do needed assignments.
Add call to update setjmp buffer directly, not via EXPR_STMT.
(maybe_variable): Argment GNAT_NODE deleted.
* gigi.h (maybe_variable): Likewise.
(make_transform, add_stmt_with_node, set_block_for_group): New.
(gnat_gimplify_expr, gnat_expand_body, Sloc_to_locus): Likewise.
(set_block_jmpbuf_decl, get_block_jmpbuf_decl): Likewise.
(discard_file_names, gnu_block_stack, gnat_to_code): Deleted.
(set_lineno, set_lineno_from_sloc): Likewise.
(record_code_position, insert_code_for): Likewise.
(gnat_poplevel): Now returns void.
(end_subprog_body): Now takes argument.
* misc.c (cgraph.h, tree-inline.h): New includes.
(gnat_tree_size, LANG_HOOKS_TREE_SIZE): Deleted.
(gnat_post_options, LANG_HOOKS_POST_OPTIONS): New.
(LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Likewise.
(LANG_HOOKS_RTL_EXPAND_STMT, LANG_HOOKS_GIMPLIFY_EXPR): Likewise.
(gnat_parse_file): Don't set immediate_size_expand.
Call cgraph functions.
(gnat_expand_expr): Remove most cases.
(record_code_position, insert_code_for): Remove from here.
* trans.c (toplev.h, tree-gimple.h): Now included.
(discard_file_names): Deleted.
(gnu_block_stack, gnu_block_stmt_node, gnu_block_stmt_free_list): Del.
(first_nondeleted_insn, make_expr_stmt_from_rtl): Likewise.
(struct stmt_group, current_stmt_group, stmt_group_free_list): New.
(gnu_stack_free_list, record_cost_position, insert_code_for): Likewise.
(add_cleanup, push_stack, gnat_gimplify_stmt, add_cleanup): Likewise.
(gnat_gimplify_type_sizes, gnat_gimplify_one_sizepos): Likewise.
(gnat_expand_body_1, gnat_gimplify_expr, annotate_with_node): Likewise.
(set_block_for_group, add_stmt_list): Likewise.
(start_stmt_group): Renamed from start_block_stmt.
(end_stmt_group): Likewise, from end_block_stmt.
(build_stmt_group): Likewise, from build_block_stmt, also add arg.
(gigi): Don't set discard_file_names or call set_lineno.
Disallow front end ZCX; call gnat_to_gnu, not gnat_to_code.
(tree_transform): Deleted, now renamed to be gnat_to_gnu.
Numerous changes throughout to reflect new names and complete
function-at-a-time implementation.
(gnat_expand_stmt): Delete or comment out all cases.
(process_inlined_subprograms): Use add_stmt.
(process_decls): Use gnat_to_gnu, not gnat_to_code, and don't
call set_lineno; also remove unneeded block handling.
(process_type): Remove unneeded block handling.
(build_unit_elab): Remove calls to deleted functions.
* utils.c (cgraph.h, tree-inline.h, tree-gimple.h): Now include.
(tree-dump.h): Likewise.
(struct ada_binding_level): Add field jmpbuf_decl.
(gnat_define_builtin, gnat_install_builtins): New.
(gnat_gimplify_function, gnat_finalize): Likewise.
(gnat_poplevel): No longer return BLOCK, set it instead.
Remove code dealing with nested functions.
(gnat_init_decl_processing): Also set size_type_node.
Call gnat_install_builtins.
(create_var_decl): Don't set DECL_INIT_BY_ASSIGN.
(create_subprog_decl): Change handling of inline_flag; set TREE_STATIC.
Remove special-case for "main".
(end_subprog_body): Add arg and rework for tree-ssa.
(convert): Don't use GNAT_NOP_EXPR or look for TRANSFORM_EXPR.
Add case for BOOLEAN_TYPE.
* utils2.c (rtl.h): Now include.
(build_call_raise): Test Debug_Flag_NN directly.
(build_call_alloc_dealloc): Don't use local stack allocation for now.
(gnat_mark_addressable, case GNAT_NOP_EXPR): Deleted.
(gnat_mark_addressable, case VAR_DECL): Handle both early & late cases.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82714 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/gigi.h')
-rw-r--r-- | gcc/ada/gigi.h | 70 |
1 files changed, 32 insertions, 38 deletions
diff --git a/gcc/ada/gigi.h b/gcc/ada/gigi.h index b9c1d2c4cb8..ae8b401b766 100644 --- a/gcc/ada/gigi.h +++ b/gcc/ada/gigi.h @@ -36,12 +36,6 @@ extern unsigned int largest_move_alignment; /* Declare all functions and types used by gigi. */ -/* Record the current code position in GNAT_NODE. */ -extern void record_code_position (Node_Id); - -/* Insert the code for GNAT_NODE at the position saved for that node. */ -extern void insert_code_for (Node_Id); - /* Compute the alignment of the largest mode that can be used for copying objects. */ extern void gnat_compute_largest_alignment (void); @@ -50,9 +44,6 @@ extern void gnat_compute_largest_alignment (void); expression that contains the last address on the stack to check. */ extern tree emit_stack_check (tree); -/* Make a TRANSFORM_EXPR to later expand GNAT_NODE into code. */ -extern tree make_transform_expr (Node_Id); - /* GNU_TYPE is a type. Determine if it should be passed by reference by default. */ extern int default_pass_by_ref (tree); @@ -92,6 +83,12 @@ extern tree gnat_to_gnu_type (Entity_Id); /* Add GNU_STMT to the current BLOCK_STMT node. */ extern void add_stmt (tree); +/* Similar, but set the location of GNU_STMT to that of GNAT_NODE. */ +extern void add_stmt_with_node (tree, Node_Id); + +/* 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_stmt (tree, Entity_Id); @@ -111,7 +108,7 @@ extern tree make_dummy_type (Entity_Id); extern tree get_unpadded_type (Entity_Id); /* Called when we need to protect a variable object using a save_expr. */ -extern tree maybe_variable (tree, Node_Id); +extern tree maybe_variable (tree); /* Create a record type that contains a field of TYPE with a starting bit position so that it is aligned to ALIGN bits. */ @@ -147,22 +144,14 @@ extern tree get_entity_name (Entity_Id); SUFFIX. */ extern tree create_concat_name (Entity_Id, const char *); -/* Flag indicating whether file names are discarded in exception messages */ -extern int discard_file_names; - -/* 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 representation information */ +/* 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 + representation information. */ extern int type_annotate_only; /* Current file name without path */ extern const char *ref_filename; -/* List of TREE_LIST nodes representing a block stack. TREE_VALUE - of each gives the variable used for the setjmp buffer in the current - block, if any. */ -extern GTY(()) tree gnu_block_stack; - /* This is the main program of the back-end. It sets up all the table structures and then generates code. */ @@ -171,11 +160,6 @@ extern void gigi (Node_Id, int, int, struct Node *, Node_Id *, Node_Id *, struct String_Entry *, Char_Code *, struct List_Header *, Int, char *, Entity_Id, Entity_Id, Entity_Id, Int); -/* This function is the driver of the GNAT to GCC tree transformation process. - GNAT_NODE is the root of some gnat tree. It generates code for that - part of the tree. */ -extern void gnat_to_code (Node_Id); - /* 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 @@ -185,19 +169,23 @@ extern tree gnat_to_gnu (Node_Id); /* GNU_STMT is a statement. We generate code for that statement. */ extern void gnat_expand_stmt (tree); +extern int gnat_gimplify_expr (tree *, tree *, tree *); + +/* Expand the body of GNU_DECL, which is not a nested function. */ +extern void gnat_expand_body (tree); + /* 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); -/* Determine the input_filename and the input_line from the source location - (Sloc) of GNAT_NODE node. Set the global variable input_filename and - input_line. If WRITE_NOTE_P is true, emit a line number note. */ -extern void set_lineno (Node_Id, int); - -/* Likewise, but passed a Sloc. */ -extern void set_lineno_from_sloc (Source_Ptr, int); +/* 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 *); /* 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 @@ -383,10 +371,15 @@ extern int global_bindings_p (void); is in reverse order (it has to be so for back-end compatibility). */ extern tree getdecls (void); -/* Enter and exit a new binding level. We return the BLOCK node, if any - when we exit a binding level. */ +/* Enter and exit a new binding level. */ extern void gnat_pushlevel (void); -extern tree gnat_poplevel (void); +extern void gnat_poplevel (void); + +/* Set the jmpbuf_decl for the current binding level to DECL. */ +extern void set_block_jmpbuf_decl (tree); + +/* Get the setjmp_decl, if any, for the current binding level. */ +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, @@ -563,8 +556,9 @@ extern tree create_label_decl (tree); extern void begin_subprog_body (tree); /* Finish the definition of the current subprogram and compile it all the way - to assembler language output. */ -extern void end_subprog_body (void); + to assembler language output. BODY is the tree corresponding to + the subprogram. */ +extern void end_subprog_body (tree); /* 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. |