c-decl.c (maybe_build_cleanup): Remove.
* c-decl.c (maybe_build_cleanup): Remove. * expr.c (expand_expr): Use langhook. * langhooks-def.h (lhd_return_null_tree, LANG_HOOKS_MAYBE_BUILD_CLEANUP): New. (LANGHOOKS_INITIALIZER): Update. * langhooks.c (lhd_return_null_tree): New. * langhooks.h (struct lang_hooks): New hook. * tree-inline.c (initialize_inlined_parameters): Use langhook. * tree.h (maybe_build_cleanup): Remove. ada: * misc.c (maybe_build_cleanup): Remove. cp: * cp-tree.h (cxx_maybe_build_cleanup): New. * decl.c (destroy_local_var, hack_incomplete_structures): Update. (maybe_build_cleanup): Rename cxx_maybe_build_cleanup. * tree.c (build_target_expr): Update. f: * com.c (maybe_build_cleanup): Remove. java: * decl.c (maybe_build_cleanup): Remove. From-SVN: r51324
This commit is contained in:
parent
2188d04d14
commit
c88770e9df
18 changed files with 55 additions and 57 deletions
|
@ -1,3 +1,15 @@
|
|||
2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
|
||||
|
||||
* c-decl.c (maybe_build_cleanup): Remove.
|
||||
* expr.c (expand_expr): Use langhook.
|
||||
* langhooks-def.h (lhd_return_null_tree,
|
||||
LANG_HOOKS_MAYBE_BUILD_CLEANUP): New.
|
||||
(LANGHOOKS_INITIALIZER): Update.
|
||||
* langhooks.c (lhd_return_null_tree): New.
|
||||
* langhooks.h (struct lang_hooks): New hook.
|
||||
* tree-inline.c (initialize_inlined_parameters): Use langhook.
|
||||
* tree.h (maybe_build_cleanup): Remove.
|
||||
|
||||
2002-03-25 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* regrename.c (build_def_use): Move recog_memoized
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
|
||||
|
||||
* misc.c (maybe_build_cleanup): Remove.
|
||||
|
||||
2002-03-24 Neil Booth <neil@daikokuya.demon.co.uk>
|
||||
|
||||
* gigi.h (yyparse): Remove.
|
||||
|
|
|
@ -406,18 +406,6 @@ gnat_init_gcc_eh ()
|
|||
#endif
|
||||
}
|
||||
|
||||
|
||||
/* If DECL has a cleanup, build and return that cleanup here.
|
||||
This is a callback called by expand_expr. */
|
||||
|
||||
tree
|
||||
maybe_build_cleanup (decl)
|
||||
tree decl ATTRIBUTE_UNUSED;
|
||||
{
|
||||
/* There are no cleanups in C. */
|
||||
return NULL_TREE;
|
||||
}
|
||||
|
||||
/* Hooks for print-tree.c: */
|
||||
|
||||
static void
|
||||
|
|
11
gcc/c-decl.c
11
gcc/c-decl.c
|
@ -3657,17 +3657,6 @@ finish_decl (decl, init, asmspec_tree)
|
|||
get_pending_sizes ();
|
||||
}
|
||||
|
||||
/* If DECL has a cleanup, build and return that cleanup here.
|
||||
This is a callback called by expand_expr. */
|
||||
|
||||
tree
|
||||
maybe_build_cleanup (decl)
|
||||
tree decl ATTRIBUTE_UNUSED;
|
||||
{
|
||||
/* There are no cleanups in C. */
|
||||
return NULL_TREE;
|
||||
}
|
||||
|
||||
/* Given a parsed parameter declaration,
|
||||
decode it into a PARM_DECL and push that on the current binding level.
|
||||
Also, for the sake of forward parm decls,
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
|
||||
|
||||
* cp-tree.h (cxx_maybe_build_cleanup): New.
|
||||
* decl.c (destroy_local_var, hack_incomplete_structures): Update.
|
||||
(maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
|
||||
* tree.c (build_target_expr): Update.
|
||||
|
||||
2002-03-24 Neil Booth <neil@daikokuya.demon.co.uk>
|
||||
|
||||
* decl2.c (cxx_decode_option): Handle -E.
|
||||
|
|
|
@ -4241,6 +4241,7 @@ extern void end_input PARAMS ((void));
|
|||
/* in tree.c */
|
||||
extern tree stabilize_expr PARAMS ((tree, tree *));
|
||||
extern tree cxx_unsave_expr_now PARAMS ((tree));
|
||||
extern tree cxx_maybe_build_cleanup PARAMS ((tree));
|
||||
extern void init_tree PARAMS ((void));
|
||||
extern int pod_type_p PARAMS ((tree));
|
||||
extern tree canonical_type_variant PARAMS ((tree));
|
||||
|
|
|
@ -8034,7 +8034,7 @@ destroy_local_var (decl)
|
|||
return;
|
||||
|
||||
/* Compute the cleanup. */
|
||||
cleanup = maybe_build_cleanup (decl);
|
||||
cleanup = cxx_maybe_build_cleanup (decl);
|
||||
|
||||
/* Record the cleanup required for this declaration. */
|
||||
if (DECL_SIZE (decl) && cleanup)
|
||||
|
@ -14451,7 +14451,7 @@ hack_incomplete_structures (type)
|
|||
{
|
||||
tree cleanup;
|
||||
expand_decl (decl);
|
||||
cleanup = maybe_build_cleanup (decl);
|
||||
cleanup = cxx_maybe_build_cleanup (decl);
|
||||
expand_decl_init (decl);
|
||||
if (! expand_decl_cleanup (decl, cleanup))
|
||||
error ("parser lost in parsing declaration of `%D'",
|
||||
|
@ -14479,7 +14479,7 @@ hack_incomplete_structures (type)
|
|||
here. */
|
||||
|
||||
tree
|
||||
maybe_build_cleanup (decl)
|
||||
cxx_maybe_build_cleanup (decl)
|
||||
tree decl;
|
||||
{
|
||||
tree type = TREE_TYPE (decl);
|
||||
|
|
|
@ -234,7 +234,7 @@ build_target_expr (decl, value)
|
|||
tree t;
|
||||
|
||||
t = build (TARGET_EXPR, TREE_TYPE (decl), decl, value,
|
||||
maybe_build_cleanup (decl), NULL_TREE);
|
||||
cxx_maybe_build_cleanup (decl), NULL_TREE);
|
||||
/* We always set TREE_SIDE_EFFECTS so that expand_expr does not
|
||||
ignore the TARGET_EXPR. If there really turn out to be no
|
||||
side-effects, then the optimizer should be able to get rid of
|
||||
|
|
|
@ -8379,7 +8379,8 @@ expand_expr (exp, target, tmode, modifier)
|
|||
built here. */
|
||||
|
||||
if (TREE_OPERAND (exp, 2) == 0)
|
||||
TREE_OPERAND (exp, 2) = maybe_build_cleanup (slot);
|
||||
TREE_OPERAND (exp, 2)
|
||||
= (*lang_hooks.maybe_build_cleanup) (slot);
|
||||
cleanups = TREE_OPERAND (exp, 2);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
Mon Mar 25 19:27:11 2002 Neil Booth <neil@daikokuya.demon.co.uk>
|
||||
|
||||
* com.c (maybe_build_cleanup): Remove.
|
||||
|
||||
2002-03-23 Toon Moene <toon@moene.indiv.nluug.nl>
|
||||
|
||||
* com.c (ffecom_check_size_overflow_): Add a test
|
||||
|
|
11
gcc/f/com.c
11
gcc/f/com.c
|
@ -14381,17 +14381,6 @@ mark_addressable (exp)
|
|||
}
|
||||
}
|
||||
|
||||
/* If DECL has a cleanup, build and return that cleanup here.
|
||||
This is a callback called by expand_expr. */
|
||||
|
||||
tree
|
||||
maybe_build_cleanup (decl)
|
||||
tree decl UNUSED;
|
||||
{
|
||||
/* There are no cleanups in Fortran. */
|
||||
return NULL_TREE;
|
||||
}
|
||||
|
||||
/* Exit a binding level.
|
||||
Pop the level off, and restore the state of the identifier-decl mappings
|
||||
that were in effect when this level was entered.
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
|
||||
|
||||
* decl.c (maybe_build_cleanup): Remove.
|
||||
|
||||
2002-03-22 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
Andrew Haley <aph@cambridge.redhat.com>
|
||||
|
|
|
@ -1565,17 +1565,6 @@ java_dup_lang_specific_decl (node)
|
|||
DECL_LANG_SPECIFIC (node) = x;
|
||||
}
|
||||
|
||||
/* If DECL has a cleanup, build and return that cleanup here.
|
||||
This is a callback called by expand_expr. */
|
||||
|
||||
tree
|
||||
maybe_build_cleanup (decl)
|
||||
tree decl ATTRIBUTE_UNUSED;
|
||||
{
|
||||
/* There are no cleanups in Java (I think). */
|
||||
return NULL_TREE;
|
||||
}
|
||||
|
||||
void
|
||||
give_name_to_locals (jcf)
|
||||
JCF *jcf;
|
||||
|
|
|
@ -42,6 +42,7 @@ extern void lhd_do_nothing_t PARAMS ((tree));
|
|||
extern int lhd_decode_option PARAMS ((int, char **));
|
||||
extern HOST_WIDE_INT lhd_get_alias_set PARAMS ((tree));
|
||||
extern tree lhd_return_tree PARAMS ((tree));
|
||||
extern tree lhd_return_null_tree PARAMS ((tree));
|
||||
extern int lhd_safe_from_p PARAMS ((rtx, tree));
|
||||
extern int lhd_staticp PARAMS ((tree));
|
||||
extern void lhd_clear_binding_stack PARAMS ((void));
|
||||
|
@ -81,6 +82,7 @@ tree lhd_tree_inlining_convert_parm_for_inlining PARAMS ((tree, tree, tree));
|
|||
#define LANG_HOOKS_STATICP lhd_staticp
|
||||
#define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL lhd_do_nothing_t
|
||||
#define LANG_HOOKS_UNSAVE_EXPR_NOW lhd_unsave_expr_now
|
||||
#define LANG_HOOKS_MAYBE_BUILD_CLEANUP lhd_return_null_tree
|
||||
#define LANG_HOOKS_HONOR_READONLY false
|
||||
#define LANG_HOOKS_PRINT_STATISTICS lhd_do_nothing
|
||||
#define LANG_HOOKS_PRINT_XNODE lhd_print_tree_nothing
|
||||
|
@ -175,6 +177,7 @@ int lhd_tree_dump_type_quals PARAMS ((tree));
|
|||
LANG_HOOKS_STATICP, \
|
||||
LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, \
|
||||
LANG_HOOKS_UNSAVE_EXPR_NOW, \
|
||||
LANG_HOOKS_MAYBE_BUILD_CLEANUP, \
|
||||
LANG_HOOKS_HONOR_READONLY, \
|
||||
LANG_HOOKS_PRINT_STATISTICS, \
|
||||
LANG_HOOKS_PRINT_XNODE, \
|
||||
|
|
|
@ -56,6 +56,15 @@ lhd_return_tree (t)
|
|||
return t;
|
||||
}
|
||||
|
||||
/* Do nothing (return NULL_TREE). */
|
||||
|
||||
tree
|
||||
lhd_return_null_tree (t)
|
||||
tree t ATTRIBUTE_UNUSED;
|
||||
{
|
||||
return NULL_TREE;
|
||||
}
|
||||
|
||||
/* Do nothing; the default hook to decode an option. */
|
||||
|
||||
int
|
||||
|
|
|
@ -180,6 +180,10 @@ struct lang_hooks
|
|||
things are cleared out. */
|
||||
tree (*unsave_expr_now) PARAMS ((tree));
|
||||
|
||||
/* Called by expand_expr to build and return the cleanup-expression
|
||||
for the passed TARGET_EXPR. Return NULL if there is none. */
|
||||
tree (*maybe_build_cleanup) PARAMS ((tree));
|
||||
|
||||
/* Nonzero if TYPE_READONLY and TREE_READONLY should always be honored. */
|
||||
bool honor_readonly;
|
||||
|
||||
|
|
|
@ -562,7 +562,7 @@ initialize_inlined_parameters (id, args, fn)
|
|||
}
|
||||
|
||||
/* See if we need to clean up the declaration. */
|
||||
cleanup = maybe_build_cleanup (var);
|
||||
cleanup = (*lang_hooks.maybe_build_cleanup) (var);
|
||||
if (cleanup)
|
||||
{
|
||||
tree cleanup_stmt;
|
||||
|
|
|
@ -2641,12 +2641,6 @@ extern tree unsigned_type PARAMS ((tree));
|
|||
|
||||
extern tree signed_type PARAMS ((tree));
|
||||
|
||||
/* This function must be defined in the language-specific files.
|
||||
expand_expr calls it to build the cleanup-expression for a TARGET_EXPR.
|
||||
This is defined in a language-specific file. */
|
||||
|
||||
extern tree maybe_build_cleanup PARAMS ((tree));
|
||||
|
||||
/* Given an expression EXP that may be a COMPONENT_REF or an ARRAY_REF,
|
||||
look for nested component-refs or array-refs at constant positions
|
||||
and find the ultimate containing object, which is returned. */
|
||||
|
|
Loading…
Add table
Reference in a new issue