Commit 3fcb9d1b by Nathan Froyd Committed by Nathan Froyd

tree.h (build_call_list): Remove.

gcc/
	* tree.h (build_call_list): Remove.
	* tree.c (build_call_list): Remove.

gcc/ada/
	* gcc-interface/trans.c (call_to_gnu): Use build_call_vec instead of
	build_call_list.
	* gcc-interface/utils.c (build_function_stub): Likewise.

gcc/cp/
	* tree.c (build_min_non_dep_call_vec): Update comment.

gcc/java/
	* expr.c (expand_java_multianewarray): Use build_call_vec instead of
	build_call_list.
	(pop_arguments): Return a VEC instead of a tree.  Take a method type
	rather than a list of argument types.
	(rewrite_rule): Change signature. of rewrite_arglist member.
	(rewrite_arglist_getcaller): Update signature.
	(rewrite_arglist_getclass): Likewise.
	(maybe_rewrite_invocation): Update for rewrite_arglist change.
	(build_known_method_ref): Take a VEC instead of a tree.
	(invoke_build_dtable): Likewise.
	(expand_invoke): Update calls to pop_arguments.  Use build_call_vec
	instead of build_call_list.
	(build_jni_stub): Use build_call_vec instead of build_call_list.
	* java-tree.h (maybe_rewrite_invocation): Update declaration.
	(build_known_method_ref): Likewise.
	(invoke_build_dtable): Likewise.

From-SVN: r159548
parent 58efc3ac
2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
* tree.h (build_call_list): Remove.
* tree.c (build_call_list): Remove.
2010-05-18 Jan Hubicka <jh@suse.cz> 2010-05-18 Jan Hubicka <jh@suse.cz>
* ipa-reference.c (propagate): Walk all nodes in the cleanup stage. * ipa-reference.c (propagate): Walk all nodes in the cleanup stage.
......
2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
* gcc-interface/trans.c (call_to_gnu): Use build_call_vec instead of
build_call_list.
* gcc-interface/utils.c (build_function_stub): Likewise.
2010-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org> 2010-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
* gcc-interface/misc.c (gnat_handle_option): Remove special logic * gcc-interface/misc.c (gnat_handle_option): Remove special logic
......
...@@ -2623,7 +2623,7 @@ call_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, tree gnu_target) ...@@ -2623,7 +2623,7 @@ call_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, tree gnu_target)
tree gnu_subprog_addr = build_unary_op (ADDR_EXPR, NULL_TREE, gnu_subprog); tree gnu_subprog_addr = build_unary_op (ADDR_EXPR, NULL_TREE, gnu_subprog);
Entity_Id gnat_formal; Entity_Id gnat_formal;
Node_Id gnat_actual; Node_Id gnat_actual;
tree gnu_actual_list = NULL_TREE; VEC(tree,gc) *gnu_actual_vec = NULL;
tree gnu_name_list = NULL_TREE; tree gnu_name_list = NULL_TREE;
tree gnu_before_list = NULL_TREE; tree gnu_before_list = NULL_TREE;
tree gnu_after_list = NULL_TREE; tree gnu_after_list = NULL_TREE;
...@@ -2973,11 +2973,11 @@ call_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, tree gnu_target) ...@@ -2973,11 +2973,11 @@ call_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, tree gnu_target)
gnu_actual = convert (DECL_ARG_TYPE (gnu_formal), gnu_actual); gnu_actual = convert (DECL_ARG_TYPE (gnu_formal), gnu_actual);
} }
gnu_actual_list = tree_cons (NULL_TREE, gnu_actual, gnu_actual_list); VEC_safe_push (tree, gc, gnu_actual_vec, gnu_actual);
} }
gnu_call = build_call_list (TREE_TYPE (gnu_subprog_type), gnu_subprog_addr, gnu_call = build_call_vec (TREE_TYPE (gnu_subprog_type), gnu_subprog_addr,
nreverse (gnu_actual_list)); gnu_actual_vec);
set_expr_location_from_node (gnu_call, gnat_node); set_expr_location_from_node (gnu_call, gnat_node);
/* If it's a function call, the result is the call expression unless a target /* If it's a function call, the result is the call expression unless a target
......
...@@ -3245,12 +3245,12 @@ void ...@@ -3245,12 +3245,12 @@ void
build_function_stub (tree gnu_subprog, Entity_Id gnat_subprog) build_function_stub (tree gnu_subprog, Entity_Id gnat_subprog)
{ {
tree gnu_subprog_type, gnu_subprog_addr, gnu_subprog_call; tree gnu_subprog_type, gnu_subprog_addr, gnu_subprog_call;
tree gnu_stub_param, gnu_param_list, gnu_arg_types, gnu_param; tree gnu_stub_param, gnu_arg_types, gnu_param;
tree gnu_stub_decl = DECL_FUNCTION_STUB (gnu_subprog); tree gnu_stub_decl = DECL_FUNCTION_STUB (gnu_subprog);
tree gnu_body; tree gnu_body;
VEC(tree,gc) *gnu_param_vec = NULL;
gnu_subprog_type = TREE_TYPE (gnu_subprog); gnu_subprog_type = TREE_TYPE (gnu_subprog);
gnu_param_list = NULL_TREE;
begin_subprog_body (gnu_stub_decl); begin_subprog_body (gnu_stub_decl);
gnat_pushlevel (); gnat_pushlevel ();
...@@ -3274,7 +3274,7 @@ build_function_stub (tree gnu_subprog, Entity_Id gnat_subprog) ...@@ -3274,7 +3274,7 @@ build_function_stub (tree gnu_subprog, Entity_Id gnat_subprog)
else else
gnu_param = gnu_stub_param; gnu_param = gnu_stub_param;
gnu_param_list = tree_cons (NULL_TREE, gnu_param, gnu_param_list); VEC_safe_push (tree, gc, gnu_param_vec, gnu_param);
} }
gnu_body = end_stmt_group (); gnu_body = end_stmt_group ();
...@@ -3282,9 +3282,8 @@ build_function_stub (tree gnu_subprog, Entity_Id gnat_subprog) ...@@ -3282,9 +3282,8 @@ build_function_stub (tree gnu_subprog, Entity_Id gnat_subprog)
/* Invoke the internal subprogram. */ /* Invoke the internal subprogram. */
gnu_subprog_addr = build1 (ADDR_EXPR, build_pointer_type (gnu_subprog_type), gnu_subprog_addr = build1 (ADDR_EXPR, build_pointer_type (gnu_subprog_type),
gnu_subprog); gnu_subprog);
gnu_subprog_call = build_call_list (TREE_TYPE (gnu_subprog_type), gnu_subprog_call = build_call_vec (TREE_TYPE (gnu_subprog_type),
gnu_subprog_addr, gnu_subprog_addr, gnu_param_vec);
nreverse (gnu_param_list));
/* Propagate the return value, if any. */ /* Propagate the return value, if any. */
if (VOID_TYPE_P (TREE_TYPE (gnu_subprog_type))) if (VOID_TYPE_P (TREE_TYPE (gnu_subprog_type)))
......
2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
* tree.c (build_min_non_dep_call_vec): Update comment.
2010-05-17 Jason Merrill <jason@redhat.com> 2010-05-17 Jason Merrill <jason@redhat.com>
* call.c (struct z_candidate): Add explicit_targs field. * call.c (struct z_candidate): Add explicit_targs field.
......
...@@ -1905,9 +1905,9 @@ build_min_non_dep (enum tree_code code, tree non_dep, ...) ...@@ -1905,9 +1905,9 @@ build_min_non_dep (enum tree_code code, tree non_dep, ...)
return t; return t;
} }
/* Similar to `build_call_list', but for template definitions of non-dependent /* Similar to `build_nt_call_vec', but for template definitions of
expressions. NON_DEP is the non-dependent expression that has been non-dependent expressions. NON_DEP is the non-dependent expression
built. */ that has been built. */
tree tree
build_min_non_dep_call_vec (tree non_dep, tree fn, VEC(tree,gc) *argvec) build_min_non_dep_call_vec (tree non_dep, tree fn, VEC(tree,gc) *argvec)
......
2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
* expr.c (expand_java_multianewarray): Use build_call_vec instead of
build_call_list.
(pop_arguments): Return a VEC instead of a tree. Take a method type
rather than a list of argument types.
(rewrite_rule): Change signature. of rewrite_arglist member.
(rewrite_arglist_getcaller): Update signature.
(rewrite_arglist_getclass): Likewise.
(maybe_rewrite_invocation): Update for rewrite_arglist change.
(build_known_method_ref): Take a VEC instead of a tree.
(invoke_build_dtable): Likewise.
(expand_invoke): Update calls to pop_arguments. Use build_call_vec
instead of build_call_list.
(build_jni_stub): Use build_call_vec instead of build_call_list.
* java-tree.h (maybe_rewrite_invocation): Update declaration.
(build_known_method_ref): Likewise.
(invoke_build_dtable): Likewise.
2010-05-14 Nathan Froyd <froydnj@codesourcery.com> 2010-05-14 Nathan Froyd <froydnj@codesourcery.com>
PR 44103 PR 44103
......
...@@ -1067,14 +1067,14 @@ extern void initialize_builtins (void); ...@@ -1067,14 +1067,14 @@ extern void initialize_builtins (void);
extern tree lookup_name (tree); extern tree lookup_name (tree);
extern bool special_method_p (tree); extern bool special_method_p (tree);
extern void maybe_rewrite_invocation (tree *, tree *, tree *, tree *); extern void maybe_rewrite_invocation (tree *, VEC(tree,gc) **, tree *, tree *);
extern tree build_known_method_ref (tree, tree, tree, tree, tree, tree); extern tree build_known_method_ref (tree, tree, tree, tree, VEC(tree,gc) *, tree);
extern tree build_class_init (tree, tree); extern tree build_class_init (tree, tree);
extern int attach_init_test_initialization_flags (void **, void *); extern int attach_init_test_initialization_flags (void **, void *);
extern tree build_invokevirtual (tree, tree, tree); extern tree build_invokevirtual (tree, tree, tree);
extern tree build_invokeinterface (tree, tree); extern tree build_invokeinterface (tree, tree);
extern tree build_jni_stub (tree); extern tree build_jni_stub (tree);
extern tree invoke_build_dtable (int, tree); extern tree invoke_build_dtable (int, VEC(tree,gc) *);
extern tree build_field_ref (tree, tree, tree); extern tree build_field_ref (tree, tree, tree);
extern tree java_modify_addr_for_volatile (tree); extern tree java_modify_addr_for_volatile (tree);
extern void pushdecl_force_head (tree); extern void pushdecl_force_head (tree);
......
...@@ -9486,27 +9486,6 @@ build_vl_exp_stat (enum tree_code code, int len MEM_STAT_DECL) ...@@ -9486,27 +9486,6 @@ build_vl_exp_stat (enum tree_code code, int len MEM_STAT_DECL)
return t; return t;
} }
/* Build a CALL_EXPR of class tcc_vl_exp with the indicated RETURN_TYPE
and FN and a null static chain slot. ARGLIST is a TREE_LIST of the
arguments. */
tree
build_call_list (tree return_type, tree fn, tree arglist)
{
tree t;
int i;
t = build_vl_exp (CALL_EXPR, list_length (arglist) + 3);
TREE_TYPE (t) = return_type;
CALL_EXPR_FN (t) = fn;
CALL_EXPR_STATIC_CHAIN (t) = NULL_TREE;
for (i = 0; arglist; arglist = TREE_CHAIN (arglist), i++)
CALL_EXPR_ARG (t, i) = TREE_VALUE (arglist);
process_call_operands (t);
return t;
}
/* Build a CALL_EXPR of class tcc_vl_exp with the indicated RETURN_TYPE and /* Build a CALL_EXPR of class tcc_vl_exp with the indicated RETURN_TYPE and
FN and a null static chain slot. NARGS is the number of call arguments FN and a null static chain slot. NARGS is the number of call arguments
which are specified as "..." arguments. */ which are specified as "..." arguments. */
......
...@@ -4038,7 +4038,6 @@ extern tree build_omp_clause (location_t, enum omp_clause_code); ...@@ -4038,7 +4038,6 @@ extern tree build_omp_clause (location_t, enum omp_clause_code);
extern tree build_vl_exp_stat (enum tree_code, int MEM_STAT_DECL); extern tree build_vl_exp_stat (enum tree_code, int MEM_STAT_DECL);
#define build_vl_exp(c,n) build_vl_exp_stat (c,n MEM_STAT_INFO) #define build_vl_exp(c,n) build_vl_exp_stat (c,n MEM_STAT_INFO)
extern tree build_call_list (tree, tree, tree);
extern tree build_call_nary (tree, tree, int, ...); extern tree build_call_nary (tree, tree, int, ...);
extern tree build_call_valist (tree, tree, int, va_list); extern tree build_call_valist (tree, tree, int, va_list);
#define build_call_array(T1,T2,N,T3)\ #define build_call_array(T1,T2,N,T3)\
......
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