* cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
(begin_global_stmt_expr): ... this.
(genrtl_finish_stmt_expr): Rename to ...
(finish_global_stmt_expr): ... this.
* init.c (begin_init_stmts): Adjust calls.
(finish_init_stmts): Likewise.
* semantics.c (genrtl_begin_stmt_expr): Rename to ...
(begin_global_stmt_expr): ... this.
(genrtl_finish_stmt_expr): Rename to ...
(finish_global_stmt_expr): ... this.
From-SVN: r34702
+2000-06-25 Mark Mitchell <mark@codesourcery.com>
+
+ * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
+ (begin_global_stmt_expr): ... this.
+ (genrtl_finish_stmt_expr): Rename to ...
+ (finish_global_stmt_expr): ... this.
+ * init.c (begin_init_stmts): Adjust calls.
+ (finish_init_stmts): Likewise.
+ * semantics.c (genrtl_begin_stmt_expr): Rename to ...
+ (begin_global_stmt_expr): ... this.
+ (genrtl_finish_stmt_expr): Rename to ...
+ (finish_global_stmt_expr): ... this.
+
2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
* search.c (lookup_member): Fix typo in comment.
tree));
extern void genrtl_named_return_value PARAMS ((tree,
tree));
-extern tree genrtl_begin_stmt_expr PARAMS ((void));
-extern tree genrtl_finish_stmt_expr PARAMS ((tree));
+extern tree begin_global_stmt_expr PARAMS ((void));
+extern tree finish_global_stmt_expr PARAMS ((tree));
/* in spew.c */
if (building_stmt_tree ())
*stmt_expr_p = begin_stmt_expr ();
else
- *stmt_expr_p = genrtl_begin_stmt_expr ();
+ *stmt_expr_p = begin_global_stmt_expr ();
if (building_stmt_tree ())
*compound_stmt_p = begin_compound_stmt (/*has_no_scope=*/1);
if (building_stmt_tree ())
stmt_expr = finish_stmt_expr (stmt_expr);
else
- stmt_expr = genrtl_finish_stmt_expr (stmt_expr);
+ stmt_expr = finish_global_stmt_expr (stmt_expr);
/* To avoid spurious warnings about unused values, we set
TREE_USED. */
return expr;
}
-/* The last_tree will be NULL_TREE when entering this function. Unlike
- the other genrtl functions, in this function, that state can change
- hence the check at the end as in the original version of
- begin_stmt_expr. Generate the RTL for the start of a STMT_EXPR. */
-tree
-genrtl_begin_stmt_expr ()
-{
- if (! cfun && !last_tree)
- begin_stmt_tree (&scope_chain->x_saved_tree);
-
- keep_next_level (1);
-
- return (last_tree != NULL_TREE) ? last_tree : expand_start_stmt_expr();
-}
-
/* Begin a statement-expression. The value returned must be passed to
finish_stmt_expr. */
return last_tree;
}
-/* Generate the RTL for the end of the STMT_EXPR. */
+/* Used when beginning a statement-expression outside function scope.
+ For example, when handling a file-scope initializer, we use this
+ function. */
-tree
-genrtl_finish_stmt_expr (rtl_expr)
- tree rtl_expr;
+tree
+begin_global_stmt_expr ()
{
- tree result;
+ if (! cfun && !last_tree)
+ begin_stmt_tree (&scope_chain->x_saved_tree);
+
+ keep_next_level (1);
+
+ return (last_tree != NULL_TREE) ? last_tree : expand_start_stmt_expr();
+}
+
+/* Finish the STMT_EXPR last begun with begin_global_stmt_expr. */
- rtl_expr = expand_end_stmt_expr (rtl_expr);
- result = rtl_expr;
+tree
+finish_global_stmt_expr (stmt_expr)
+ tree stmt_expr;
+{
+ stmt_expr = expand_end_stmt_expr (stmt_expr);
if (! cfun
&& TREE_CHAIN (scope_chain->x_saved_tree) == NULL_TREE)
finish_stmt_tree (&scope_chain->x_saved_tree);
- return result;
+ return stmt_expr;
}
/* Finish a statement-expression. RTL_EXPR should be the value