function.c, [...]: Move max_size hook to type hooks; remove bogus PARAMS.

* function.c, langhooks-def.h, langhooks.h: Move max_size hook
	to type hooks; remove bogus PARAMS.

From-SVN: r84113
This commit is contained in:
Richard Kenner 2004-07-05 14:22:28 +00:00 committed by Richard Kenner
parent 879dc459de
commit 8963a5172c
4 changed files with 12 additions and 7 deletions

View File

@ -1,3 +1,8 @@
2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* function.c, langhooks-def.h, langhooks.h: Move max_size hook
to type hooks; remove bogus PARAMS.
2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
* c-tree.h (TYPE_ACTUAL_ARG_TYPES): Use TYPE_LANG_SLOT_1.

View File

@ -852,7 +852,7 @@ assign_temp (tree type_or_decl, int keep, int memory_required,
/* If we still haven't been able to get a size, see if the language
can compute a maximum size. */
if (size == -1
&& (size_tree = lang_hooks.type_max_size (type)) != 0
&& (size_tree = lang_hooks.types.max_size (type)) != 0
&& host_integerp (size_tree, 1))
size = tree_low_cst (size_tree, 1);

View File

@ -127,7 +127,6 @@ extern int lhd_gimplify_expr (tree *, tree *, tree *);
#define LANG_HOOKS_DECL_PRINTABLE_NAME lhd_decl_printable_name
#define LANG_HOOKS_GET_CALLEE_FNDECL lhd_return_null_tree
#define LANG_HOOKS_EXPR_SIZE lhd_expr_size
#define LANG_HOOKS_TYPE_MAX_SIZE lhd_return_null_tree
#define LANG_HOOKS_TREE_SIZE lhd_tree_size
#define LANG_HOOKS_TYPES_COMPATIBLE_P lhd_types_compatible_p
#define LANG_HOOKS_UPDATE_DECL_AFTER_SAVING NULL
@ -223,6 +222,7 @@ extern tree lhd_make_node (enum tree_code);
#define LANG_HOOKS_INCOMPLETE_TYPE_ERROR lhd_incomplete_type_error
#define LANG_HOOKS_TYPE_PROMOTES_TO lhd_type_promotes_to
#define LANG_HOOKS_REGISTER_BUILTIN_TYPE lhd_register_builtin_type
#define LANG_HOOKS_TYPE_MAX_SIZE lhd_return_null_tree
#define LANG_HOOKS_HASH_TYPES true
#define LANG_HOOKS_FOR_TYPES_INITIALIZER { \
@ -235,6 +235,7 @@ extern tree lhd_make_node (enum tree_code);
LANG_HOOKS_TYPE_PROMOTES_TO, \
LANG_HOOKS_REGISTER_BUILTIN_TYPE, \
LANG_HOOKS_INCOMPLETE_TYPE_ERROR, \
LANG_HOOKS_TYPE_MAX_SIZE, \
LANG_HOOKS_HASH_TYPES \
}
@ -306,7 +307,6 @@ extern tree lhd_make_node (enum tree_code);
LANG_HOOKS_GET_CALLEE_FNDECL, \
LANG_HOOKS_PRINT_ERROR_FUNCTION, \
LANG_HOOKS_EXPR_SIZE, \
LANG_HOOKS_TYPE_MAX_SIZE, \
LANG_HOOKS_UPDATE_DECL_AFTER_SAVING, \
LANG_HOOKS_ATTRIBUTE_TABLE, \
LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, \

View File

@ -141,6 +141,10 @@ struct lang_hooks_for_types
invalid. */
void (*incomplete_type_error) (tree value, tree type);
/* Called from assign_temp to return the maximum size, if there is one,
for a type. */
tree (*max_size) (tree);
/* Nonzero if types that are identical are to be hashed so that only
one copy is kept. If a language requires unique types for each
user-specified type, such as Ada, this should be set to TRUE. */
@ -390,10 +394,6 @@ struct lang_hooks
semantics in cases that it doesn't want to handle specially. */
tree (*expr_size) (tree);
/* Called from assign_temp to return the maximum size, if there is one,
for a type. */
tree (*type_max_size) PARAMS ((tree));
/* Update lang specific fields after duplicating function body. */
void (*update_decl_after_saving) (tree, void *);