Commit 2fa03086 by Eric Botcazou Committed by Eric Botcazou

gigi.h (end_subprog_body): Tweak comment.

	* gcc-interface/gigi.h (end_subprog_body): Tweak comment.
	* gcc-interface/utils.c (end_subprog_body): Likewise.
	* gcc-interface/trans.c (gigi): Likewise.
	(gnat_to_gnu): Likewise.

From-SVN: r150352
parent e2ab8b09
2009-08-02 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/gigi.h (end_subprog_body): Tweak comment.
* gcc-interface/utils.c (end_subprog_body): Likewise.
* gcc-interface/trans.c (gigi): Likewise.
(gnat_to_gnu): Likewise.
2009-07-30 Ben Brosgol <brosgol@adacore.com> 2009-07-30 Ben Brosgol <brosgol@adacore.com>
* gnat_ugn.texi: Correct minor texi glitch. * gnat_ugn.texi: Correct minor texi glitch.
......
...@@ -677,8 +677,7 @@ extern tree create_label_decl (tree label_name); ...@@ -677,8 +677,7 @@ extern tree create_label_decl (tree label_name);
appearing in the subprogram. */ appearing in the subprogram. */
extern void begin_subprog_body (tree subprog_decl); extern void begin_subprog_body (tree subprog_decl);
/* Finish the definition of the current subprogram BODY and compile it all the /* Finish the definition of the current subprogram BODY and finalize it. */
way to assembler language output. */
extern void end_subprog_body (tree body); extern void end_subprog_body (tree body);
/* Build a template of type TEMPLATE_TYPE from the array bounds of ARRAY_TYPE. /* Build a template of type TEMPLATE_TYPE from the array bounds of ARRAY_TYPE.
......
...@@ -626,8 +626,7 @@ gigi (Node_Id gnat_root, int max_gnat_node, int number_name, ...@@ -626,8 +626,7 @@ gigi (Node_Id gnat_root, int max_gnat_node, int number_name,
/* Finally see if we have any elaboration procedures to deal with. */ /* Finally see if we have any elaboration procedures to deal with. */
for (info = elab_info_list; info; info = info->next) for (info = elab_info_list; info; info = info->next)
{ {
tree gnu_body = DECL_SAVED_TREE (info->elab_proc); tree gnu_body = DECL_SAVED_TREE (info->elab_proc), gnu_stmts;
tree gnu_stmts;
/* Unshare SAVE_EXPRs between subprograms. These are not unshared by /* Unshare SAVE_EXPRs between subprograms. These are not unshared by
the gimplifier for obvious reasons, but it turns out that we need to the gimplifier for obvious reasons, but it turns out that we need to
...@@ -639,21 +638,16 @@ gigi (Node_Id gnat_root, int max_gnat_node, int number_name, ...@@ -639,21 +638,16 @@ gigi (Node_Id gnat_root, int max_gnat_node, int number_name,
an upstream bug for which we would not change the outcome. */ an upstream bug for which we would not change the outcome. */
walk_tree_without_duplicates (&gnu_body, unshare_save_expr, NULL); walk_tree_without_duplicates (&gnu_body, unshare_save_expr, NULL);
/* We should have a BIND_EXPR but it may not have any statements in it.
/* We should have a BIND_EXPR, but it may or may not have any statements If it doesn't have any, we have nothing to do except for setting the
in it. If it doesn't have any, we have nothing to do. */ flag on the GNAT node. Otherwise, process the function as others. */
gnu_stmts = gnu_body; gnu_stmts = gnu_body;
if (TREE_CODE (gnu_stmts) == BIND_EXPR) if (TREE_CODE (gnu_stmts) == BIND_EXPR)
gnu_stmts = BIND_EXPR_BODY (gnu_stmts); gnu_stmts = BIND_EXPR_BODY (gnu_stmts);
/* If there are no statements, there is no elaboration code. */
if (!gnu_stmts || !STATEMENT_LIST_HEAD (gnu_stmts)) if (!gnu_stmts || !STATEMENT_LIST_HEAD (gnu_stmts))
{ Set_Has_No_Elaboration_Code (info->gnat_node, 1);
Set_Has_No_Elaboration_Code (info->gnat_node, 1);
}
else else
{ {
/* Process the function as others. */
begin_subprog_body (info->elab_proc); begin_subprog_body (info->elab_proc);
end_subprog_body (gnu_body); end_subprog_body (gnu_body);
} }
...@@ -5294,12 +5288,11 @@ gnat_to_gnu (Node_Id gnat_node) ...@@ -5294,12 +5288,11 @@ gnat_to_gnu (Node_Id gnat_node)
gnu_result = alloc_stmt_list (); gnu_result = alloc_stmt_list ();
break; break;
/* SCIL nodes require no processing by this backend */
case N_SCIL_Dispatch_Table_Object_Init: case N_SCIL_Dispatch_Table_Object_Init:
case N_SCIL_Dispatch_Table_Tag_Init: case N_SCIL_Dispatch_Table_Tag_Init:
case N_SCIL_Dispatching_Call: case N_SCIL_Dispatching_Call:
case N_SCIL_Tag_Init: case N_SCIL_Tag_Init:
/* SCIL nodes require no processing for GCC. */
gnu_result = alloc_stmt_list (); gnu_result = alloc_stmt_list ();
break; break;
......
...@@ -2069,8 +2069,7 @@ gnat_genericize (tree fndecl) ...@@ -2069,8 +2069,7 @@ gnat_genericize (tree fndecl)
pointer_set_destroy (p_set); pointer_set_destroy (p_set);
} }
/* Finish the definition of the current subprogram BODY and compile it all the /* Finish the definition of the current subprogram BODY and finalize it. */
way to assembler language output. */
void void
end_subprog_body (tree body) end_subprog_body (tree body)
...@@ -2109,8 +2108,7 @@ end_subprog_body (tree body) ...@@ -2109,8 +2108,7 @@ end_subprog_body (tree body)
/* Dump functions before gimplification. */ /* Dump functions before gimplification. */
dump_function (TDI_original, fndecl); dump_function (TDI_original, fndecl);
/* We do different things for nested and non-nested functions. /* ??? This special handling of nested functions is probably obsolete. */
??? This should be in cgraph. */
if (!DECL_CONTEXT (fndecl)) if (!DECL_CONTEXT (fndecl))
cgraph_finalize_function (fndecl, false); cgraph_finalize_function (fndecl, false);
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment