cp-tree.h (scratchalloc, [...]): Define as macros for now.
* cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec, scratch_tree_cons): Define as macros for now. * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c, lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c, typeck2.c: Use them and the expression_obstack variants. From-SVN: r15900
This commit is contained in:
parent
22ef8a131a
commit
e66d884e7b
|
@ -1,8 +1,15 @@
|
|||
Tue Oct 14 11:46:14 1997 Jason Merrill <jason@yorick.cygnus.com>
|
||||
|
||||
* cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
|
||||
scratch_tree_cons): Define as macros for now.
|
||||
* call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
|
||||
lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
|
||||
typeck2.c: Use them and the expression_obstack variants.
|
||||
|
||||
Mon Oct 13 17:41:26 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
|
||||
|
||||
* decl.c (store_return_init): Allow classes with explicit ctors to
|
||||
be used with the named return values extension.
|
||||
|
||||
* decl.c (store_return_init): Allow classes with explicit ctors to
|
||||
be used with the named return values extension.
|
||||
|
||||
Fri Oct 10 12:21:11 1997 Jason Merrill <jason@yorick.cygnus.com>
|
||||
|
||||
|
|
128
gcc/cp/call.c
128
gcc/cp/call.c
|
@ -1267,7 +1267,7 @@ build_field_call (basetype_path, instance_ptr, name, parms)
|
|||
if (TREE_CODE (TREE_TYPE (TREE_TYPE (instance))) == FUNCTION_TYPE)
|
||||
return build_function_call (instance, parms);
|
||||
else if (TREE_CODE (TREE_TYPE (TREE_TYPE (instance))) == METHOD_TYPE)
|
||||
return build_function_call (instance, tree_cons (NULL_TREE, current_class_ptr, parms));
|
||||
return build_function_call (instance, expr_tree_cons (NULL_TREE, current_class_ptr, parms));
|
||||
}
|
||||
}
|
||||
return NULL_TREE;
|
||||
|
@ -2110,14 +2110,14 @@ build_method_call (instance, name, parms, basetype_path, flags)
|
|||
of the signature pointer? */
|
||||
constp = TYPE_READONLY (basetype);
|
||||
volatilep = TYPE_VOLATILE (basetype);
|
||||
parms = tree_cons (NULL_TREE, instance_ptr, parms);
|
||||
parms = expr_tree_cons (NULL_TREE, instance_ptr, parms);
|
||||
}
|
||||
else if (instance)
|
||||
{
|
||||
/* TREE_READONLY (instance) fails for references. */
|
||||
constp = TYPE_READONLY (TREE_TYPE (TREE_TYPE (instance_ptr)));
|
||||
volatilep = TYPE_VOLATILE (TREE_TYPE (TREE_TYPE (instance_ptr)));
|
||||
parms = tree_cons (NULL_TREE, instance_ptr, parms);
|
||||
parms = expr_tree_cons (NULL_TREE, instance_ptr, parms);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2126,18 +2126,18 @@ build_method_call (instance, name, parms, basetype_path, flags)
|
|||
&& ! (flags & LOOKUP_HAS_IN_CHARGE))
|
||||
{
|
||||
flags |= LOOKUP_HAS_IN_CHARGE;
|
||||
parms = tree_cons (NULL_TREE, integer_one_node, parms);
|
||||
parmtypes = tree_cons (NULL_TREE, integer_type_node, parmtypes);
|
||||
parms = expr_tree_cons (NULL_TREE, integer_one_node, parms);
|
||||
parmtypes = scratch_tree_cons (NULL_TREE, integer_type_node, parmtypes);
|
||||
}
|
||||
|
||||
constp = 0;
|
||||
volatilep = 0;
|
||||
instance_ptr = build_int_2 (0, 0);
|
||||
TREE_TYPE (instance_ptr) = build_pointer_type (basetype);
|
||||
parms = tree_cons (NULL_TREE, instance_ptr, parms);
|
||||
parms = expr_tree_cons (NULL_TREE, instance_ptr, parms);
|
||||
}
|
||||
|
||||
parmtypes = tree_cons (NULL_TREE, TREE_TYPE (instance_ptr), parmtypes);
|
||||
parmtypes = scratch_tree_cons (NULL_TREE, TREE_TYPE (instance_ptr), parmtypes);
|
||||
|
||||
if (last == NULL_TREE)
|
||||
last = parmtypes;
|
||||
|
@ -2171,10 +2171,10 @@ build_method_call (instance, name, parms, basetype_path, flags)
|
|||
tree tmplist;
|
||||
|
||||
flags |= LOOKUP_HAS_IN_CHARGE;
|
||||
tmplist = tree_cons (NULL_TREE, integer_zero_node,
|
||||
tmplist = expr_tree_cons (NULL_TREE, integer_zero_node,
|
||||
TREE_CHAIN (parms));
|
||||
TREE_CHAIN (parms) = tmplist;
|
||||
tmplist = tree_cons (NULL_TREE, integer_type_node, TREE_CHAIN (parmtypes));
|
||||
tmplist = scratch_tree_cons (NULL_TREE, integer_type_node, TREE_CHAIN (parmtypes));
|
||||
TREE_CHAIN (parmtypes) = tmplist;
|
||||
}
|
||||
basetype = BINFO_TYPE (tmp);
|
||||
|
@ -2225,7 +2225,7 @@ build_method_call (instance, name, parms, basetype_path, flags)
|
|||
else
|
||||
my_friendly_abort (167);
|
||||
|
||||
friend_parms = tree_cons (NULL_TREE, parm, TREE_CHAIN (parms));
|
||||
friend_parms = expr_tree_cons (NULL_TREE, parm, TREE_CHAIN (parms));
|
||||
|
||||
cp->h_len = len;
|
||||
cp->harshness = (struct harshness_code *)
|
||||
|
@ -2275,7 +2275,7 @@ build_method_call (instance, name, parms, basetype_path, flags)
|
|||
#endif
|
||||
ever_seen++;
|
||||
if (pass > 0)
|
||||
found_fns = tree_cons (NULL_TREE, function, found_fns);
|
||||
found_fns = scratch_tree_cons (NULL_TREE, function, found_fns);
|
||||
|
||||
/* Not looking for friends here. */
|
||||
if (TREE_CODE (TREE_TYPE (function)) == FUNCTION_TYPE
|
||||
|
@ -2606,7 +2606,7 @@ build_method_call (instance, name, parms, basetype_path, flags)
|
|||
instance_ptr = convert_pointer_to (basetype, instance_ptr);
|
||||
instance = build_indirect_ref (instance_ptr, NULL_PTR);
|
||||
}
|
||||
parms = tree_cons (NULL_TREE, instance_ptr,
|
||||
parms = expr_tree_cons (NULL_TREE, instance_ptr,
|
||||
convert_arguments (NULL_TREE, TREE_CHAIN (TYPE_ARG_TYPES (fntype)), TREE_CHAIN (parms), function, sub_flags));
|
||||
}
|
||||
else
|
||||
|
@ -2654,7 +2654,7 @@ build_method_call (instance, name, parms, basetype_path, flags)
|
|||
|| TREE_OPERAND (instance, 0) != instance_ptr)
|
||||
instance = build_indirect_ref (instance_ptr, NULL_PTR);
|
||||
}
|
||||
parms = tree_cons (NULL_TREE, instance_ptr,
|
||||
parms = expr_tree_cons (NULL_TREE, instance_ptr,
|
||||
convert_arguments (NULL_TREE, TREE_CHAIN (TYPE_ARG_TYPES (fntype)), TREE_CHAIN (parms), function, LOOKUP_NORMAL));
|
||||
}
|
||||
|
||||
|
@ -2842,7 +2842,7 @@ build_overload_call_real (fnname, parms, flags, final_cp, require_complete)
|
|||
if (TREE_CODE (function) == TEMPLATE_DECL)
|
||||
{
|
||||
int ntparms = DECL_NTPARMS (function);
|
||||
tree targs = make_tree_vec (ntparms);
|
||||
tree targs = make_scratch_vec (ntparms);
|
||||
int i;
|
||||
|
||||
i = type_unification (DECL_INNERMOST_TEMPLATE_PARMS (function),
|
||||
|
@ -2885,7 +2885,7 @@ build_overload_call_real (fnname, parms, flags, final_cp, require_complete)
|
|||
passed to calling function. */
|
||||
cp->h_len = parmlength;
|
||||
cp->harshness = (struct harshness_code *)
|
||||
oballoc ((parmlength + 1) * sizeof (struct harshness_code));
|
||||
scratchalloc ((parmlength + 1) * sizeof (struct harshness_code));
|
||||
|
||||
compute_conversion_costs (function, parms, cp, parmlength);
|
||||
|
||||
|
@ -3379,7 +3379,7 @@ add_function_candidate (candidates, fn, arglist, flags)
|
|||
}
|
||||
|
||||
len = list_length (argnode);
|
||||
convs = make_tree_vec (len);
|
||||
convs = make_scratch_vec (len);
|
||||
|
||||
for (i = 0; i < len; ++i)
|
||||
{
|
||||
|
@ -3428,7 +3428,7 @@ add_function_candidate (candidates, fn, arglist, flags)
|
|||
break;
|
||||
}
|
||||
|
||||
cand = (struct z_candidate *) oballoc (sizeof (struct z_candidate));
|
||||
cand = (struct z_candidate *) scratchalloc (sizeof (struct z_candidate));
|
||||
|
||||
cand->fn = fn;
|
||||
cand->convs = convs;
|
||||
|
@ -3454,7 +3454,7 @@ add_conv_candidate (candidates, fn, obj, arglist)
|
|||
tree totype = TREE_TYPE (TREE_TYPE (fn));
|
||||
tree parmlist = TYPE_ARG_TYPES (TREE_TYPE (totype));
|
||||
int i, len = list_length (arglist) + 1;
|
||||
tree convs = make_tree_vec (len);
|
||||
tree convs = make_scratch_vec (len);
|
||||
tree parmnode = parmlist;
|
||||
tree argnode = arglist;
|
||||
int viable = 1;
|
||||
|
@ -3505,7 +3505,7 @@ add_conv_candidate (candidates, fn, obj, arglist)
|
|||
break;
|
||||
}
|
||||
|
||||
cand = (struct z_candidate *) oballoc (sizeof (struct z_candidate));
|
||||
cand = (struct z_candidate *) scratchalloc (sizeof (struct z_candidate));
|
||||
|
||||
cand->fn = fn;
|
||||
cand->convs = convs;
|
||||
|
@ -3534,7 +3534,7 @@ build_builtin_candidate (candidates, fnname, type1, type2,
|
|||
types[0] = type1;
|
||||
types[1] = type2;
|
||||
|
||||
convs = make_tree_vec (args[2] ? 3 : (args[1] ? 2 : 1));
|
||||
convs = make_scratch_vec (args[2] ? 3 : (args[1] ? 2 : 1));
|
||||
|
||||
for (i = 0; i < 2; ++i)
|
||||
{
|
||||
|
@ -3565,7 +3565,7 @@ build_builtin_candidate (candidates, fnname, type1, type2,
|
|||
viable = 0;
|
||||
}
|
||||
|
||||
cand = (struct z_candidate *) oballoc (sizeof (struct z_candidate));
|
||||
cand = (struct z_candidate *) scratchalloc (sizeof (struct z_candidate));
|
||||
|
||||
cand->fn = fnname;
|
||||
cand->convs = convs;
|
||||
|
@ -4074,10 +4074,10 @@ add_builtin_candidates (candidates, code, code2, fnname, args, flags)
|
|||
if (code == COND_EXPR)
|
||||
{
|
||||
if (real_lvalue_p (args[i]))
|
||||
types[i] = tree_cons
|
||||
types[i] = scratch_tree_cons
|
||||
(NULL_TREE, build_reference_type (argtypes[i]), types[i]);
|
||||
|
||||
types[i] = tree_cons
|
||||
types[i] = scratch_tree_cons
|
||||
(NULL_TREE, TYPE_MAIN_VARIANT (argtypes[i]), types[i]);
|
||||
}
|
||||
|
||||
|
@ -4095,37 +4095,37 @@ add_builtin_candidates (candidates, code, code2, fnname, args, flags)
|
|||
continue;
|
||||
|
||||
if (code == COND_EXPR && TREE_CODE (type) == REFERENCE_TYPE)
|
||||
types[i] = tree_cons (NULL_TREE, type, types[i]);
|
||||
types[i] = scratch_tree_cons (NULL_TREE, type, types[i]);
|
||||
|
||||
type = non_reference (type);
|
||||
if (i != 0 || ! ref1)
|
||||
{
|
||||
type = TYPE_MAIN_VARIANT (type_decays_to (type));
|
||||
if (code == COND_EXPR && TREE_CODE (type) == ENUMERAL_TYPE)
|
||||
types[i] = tree_cons (NULL_TREE, type, types[i]);
|
||||
types[i] = scratch_tree_cons (NULL_TREE, type, types[i]);
|
||||
if (INTEGRAL_TYPE_P (type))
|
||||
type = type_promotes_to (type);
|
||||
}
|
||||
|
||||
if (! value_member (type, types[i]))
|
||||
types[i] = tree_cons (NULL_TREE, type, types[i]);
|
||||
types[i] = scratch_tree_cons (NULL_TREE, type, types[i]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (code == COND_EXPR && real_lvalue_p (args[i]))
|
||||
types[i] = tree_cons
|
||||
types[i] = scratch_tree_cons
|
||||
(NULL_TREE, build_reference_type (argtypes[i]), types[i]);
|
||||
type = non_reference (argtypes[i]);
|
||||
if (i != 0 || ! ref1)
|
||||
{
|
||||
type = TYPE_MAIN_VARIANT (type_decays_to (type));
|
||||
if (code == COND_EXPR && TREE_CODE (type) == ENUMERAL_TYPE)
|
||||
types[i] = tree_cons (NULL_TREE, type, types[i]);
|
||||
types[i] = scratch_tree_cons (NULL_TREE, type, types[i]);
|
||||
if (INTEGRAL_TYPE_P (type))
|
||||
type = type_promotes_to (type);
|
||||
}
|
||||
types[i] = tree_cons (NULL_TREE, type, types[i]);
|
||||
types[i] = scratch_tree_cons (NULL_TREE, type, types[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4161,7 +4161,7 @@ add_template_candidate (candidates, tmpl, explicit_targs,
|
|||
int flags;
|
||||
{
|
||||
int ntparms = DECL_NTPARMS (tmpl);
|
||||
tree targs = make_tree_vec (ntparms);
|
||||
tree targs = make_scratch_vec (ntparms);
|
||||
struct z_candidate *cand;
|
||||
int i;
|
||||
tree fn;
|
||||
|
@ -4188,7 +4188,7 @@ add_template_conv_candidate (candidates, tmpl, obj, arglist, return_type)
|
|||
tree tmpl, obj, arglist, return_type;
|
||||
{
|
||||
int ntparms = DECL_NTPARMS (tmpl);
|
||||
tree targs = make_tree_vec (ntparms);
|
||||
tree targs = make_scratch_vec (ntparms);
|
||||
struct z_candidate *cand;
|
||||
int i;
|
||||
tree fn;
|
||||
|
@ -4306,10 +4306,10 @@ build_user_type_conversion_1 (totype, expr, flags)
|
|||
{
|
||||
tree t = build_int_2 (0, 0);
|
||||
TREE_TYPE (t) = build_pointer_type (totype);
|
||||
args = build_tree_list (NULL_TREE, expr);
|
||||
args = build_scratch_list (NULL_TREE, expr);
|
||||
if (TYPE_USES_VIRTUAL_BASECLASSES (totype))
|
||||
args = tree_cons (NULL_TREE, integer_one_node, args);
|
||||
args = tree_cons (NULL_TREE, t, args);
|
||||
args = scratch_tree_cons (NULL_TREE, integer_one_node, args);
|
||||
args = scratch_tree_cons (NULL_TREE, t, args);
|
||||
|
||||
ctors = TREE_VALUE (ctors);
|
||||
}
|
||||
|
@ -4320,7 +4320,7 @@ build_user_type_conversion_1 (totype, expr, flags)
|
|||
|
||||
if (TREE_CODE (ctors) == TEMPLATE_DECL)
|
||||
{
|
||||
templates = decl_tree_cons (NULL_TREE, ctors, templates);
|
||||
templates = scratch_tree_cons (NULL_TREE, ctors, templates);
|
||||
candidates =
|
||||
add_template_candidate (candidates, ctors,
|
||||
NULL_TREE, args, NULL_TREE, flags);
|
||||
|
@ -4337,7 +4337,7 @@ build_user_type_conversion_1 (totype, expr, flags)
|
|||
}
|
||||
|
||||
if (convs)
|
||||
args = build_tree_list (NULL_TREE, build_this (expr));
|
||||
args = build_scratch_list (NULL_TREE, build_this (expr));
|
||||
|
||||
for (; convs; convs = TREE_CHAIN (convs))
|
||||
{
|
||||
|
@ -4362,7 +4362,7 @@ build_user_type_conversion_1 (totype, expr, flags)
|
|||
{
|
||||
if (TREE_CODE (fn) == TEMPLATE_DECL)
|
||||
{
|
||||
templates = decl_tree_cons (NULL_TREE, fn, templates);
|
||||
templates = scratch_tree_cons (NULL_TREE, fn, templates);
|
||||
candidates =
|
||||
add_template_candidate (candidates, fn, NULL_TREE,
|
||||
args, totype, flags);
|
||||
|
@ -4507,7 +4507,7 @@ build_new_function_call (fn, args, obj)
|
|||
{
|
||||
if (TREE_CODE (t) == TEMPLATE_DECL)
|
||||
{
|
||||
templates = decl_tree_cons (NULL_TREE, t, templates);
|
||||
templates = scratch_tree_cons (NULL_TREE, t, templates);
|
||||
candidates = add_template_candidate
|
||||
(candidates, t, explicit_targs, args, NULL_TREE,
|
||||
LOOKUP_NORMAL);
|
||||
|
@ -4570,13 +4570,13 @@ build_object_call (obj, args)
|
|||
if (fns)
|
||||
{
|
||||
tree fn = TREE_VALUE (fns);
|
||||
mem_args = tree_cons (NULL_TREE, build_this (obj), args);
|
||||
mem_args = scratch_tree_cons (NULL_TREE, build_this (obj), args);
|
||||
|
||||
for (; fn; fn = DECL_CHAIN (fn))
|
||||
{
|
||||
if (TREE_CODE (fn) == TEMPLATE_DECL)
|
||||
{
|
||||
templates = decl_tree_cons (NULL_TREE, fn, templates);
|
||||
templates = scratch_tree_cons (NULL_TREE, fn, templates);
|
||||
candidates
|
||||
= add_template_candidate (candidates, fn, NULL_TREE,
|
||||
mem_args, NULL_TREE,
|
||||
|
@ -4604,7 +4604,7 @@ build_object_call (obj, args)
|
|||
{
|
||||
if (TREE_CODE (fn) == TEMPLATE_DECL)
|
||||
{
|
||||
templates = decl_tree_cons (NULL_TREE, fn, templates);
|
||||
templates = scratch_tree_cons (NULL_TREE, fn, templates);
|
||||
candidates = add_template_conv_candidate (candidates,
|
||||
fn,
|
||||
obj,
|
||||
|
@ -4718,7 +4718,7 @@ build_new_op (code, flags, arg1, arg2, arg3)
|
|||
{
|
||||
tree rval;
|
||||
|
||||
arglist = tree_cons (NULL_TREE, arg2, arg3);
|
||||
arglist = scratch_tree_cons (NULL_TREE, arg2, arg3);
|
||||
if (flags & LOOKUP_GLOBAL)
|
||||
return build_new_function_call
|
||||
(lookup_name_nonclass (fnname), arglist, NULL_TREE);
|
||||
|
@ -4746,9 +4746,9 @@ build_new_op (code, flags, arg1, arg2, arg3)
|
|||
if (flags & LOOKUP_GLOBAL)
|
||||
return build_new_function_call
|
||||
(lookup_name_nonclass (fnname),
|
||||
build_tree_list (NULL_TREE, arg1), NULL_TREE);
|
||||
build_scratch_list (NULL_TREE, arg1), NULL_TREE);
|
||||
|
||||
arglist = tree_cons (NULL_TREE, arg1, build_tree_list (NULL_TREE, arg2));
|
||||
arglist = scratch_tree_cons (NULL_TREE, arg1, build_scratch_list (NULL_TREE, arg2));
|
||||
|
||||
arg1 = TREE_TYPE (arg1);
|
||||
|
||||
|
@ -4814,12 +4814,12 @@ build_new_op (code, flags, arg1, arg2, arg3)
|
|||
/* + Koenig lookup */
|
||||
|
||||
if (arg2 && arg3)
|
||||
arglist = tree_cons (NULL_TREE, arg1, tree_cons
|
||||
(NULL_TREE, arg2, build_tree_list (NULL_TREE, arg3)));
|
||||
arglist = scratch_tree_cons (NULL_TREE, arg1, scratch_tree_cons
|
||||
(NULL_TREE, arg2, build_scratch_list (NULL_TREE, arg3)));
|
||||
else if (arg2)
|
||||
arglist = tree_cons (NULL_TREE, arg1, build_tree_list (NULL_TREE, arg2));
|
||||
arglist = scratch_tree_cons (NULL_TREE, arg1, build_scratch_list (NULL_TREE, arg2));
|
||||
else
|
||||
arglist = build_tree_list (NULL_TREE, arg1);
|
||||
arglist = build_scratch_list (NULL_TREE, arg1);
|
||||
|
||||
if (fns && TREE_CODE (fns) == TREE_LIST)
|
||||
fns = TREE_VALUE (fns);
|
||||
|
@ -4827,7 +4827,7 @@ build_new_op (code, flags, arg1, arg2, arg3)
|
|||
{
|
||||
if (TREE_CODE (fns) == TEMPLATE_DECL)
|
||||
{
|
||||
templates = decl_tree_cons (NULL_TREE, fns, templates);
|
||||
templates = scratch_tree_cons (NULL_TREE, fns, templates);
|
||||
candidates
|
||||
= add_template_candidate (candidates, fns, NULL_TREE,
|
||||
arglist, TREE_TYPE (fnname),
|
||||
|
@ -4845,7 +4845,7 @@ build_new_op (code, flags, arg1, arg2, arg3)
|
|||
if (fns)
|
||||
{
|
||||
tree fn = TREE_VALUE (fns);
|
||||
mem_arglist = tree_cons (NULL_TREE, build_this (arg1), TREE_CHAIN (arglist));
|
||||
mem_arglist = scratch_tree_cons (NULL_TREE, build_this (arg1), TREE_CHAIN (arglist));
|
||||
for (; fn; fn = DECL_CHAIN (fn))
|
||||
{
|
||||
tree this_arglist;
|
||||
|
@ -4858,7 +4858,7 @@ build_new_op (code, flags, arg1, arg2, arg3)
|
|||
if (TREE_CODE (fn) == TEMPLATE_DECL)
|
||||
{
|
||||
/* A member template. */
|
||||
templates = decl_tree_cons (NULL_TREE, fn, templates);
|
||||
templates = scratch_tree_cons (NULL_TREE, fn, templates);
|
||||
candidates
|
||||
= add_template_candidate (candidates, fn, NULL_TREE,
|
||||
this_arglist, TREE_TYPE
|
||||
|
@ -5134,10 +5134,10 @@ convert_like (convs, expr)
|
|||
tree t = build_int_2 (0, 0);
|
||||
TREE_TYPE (t) = build_pointer_type (DECL_CONTEXT (fn));
|
||||
|
||||
args = build_tree_list (NULL_TREE, expr);
|
||||
args = build_scratch_list (NULL_TREE, expr);
|
||||
if (TYPE_USES_VIRTUAL_BASECLASSES (DECL_CONTEXT (fn)))
|
||||
args = tree_cons (NULL_TREE, integer_one_node, args);
|
||||
args = tree_cons (NULL_TREE, t, args);
|
||||
args = scratch_tree_cons (NULL_TREE, integer_one_node, args);
|
||||
args = scratch_tree_cons (NULL_TREE, t, args);
|
||||
}
|
||||
else
|
||||
args = build_this (expr);
|
||||
|
@ -5232,19 +5232,19 @@ build_over_call (fn, convs, args, flags)
|
|||
int is_method = 0;
|
||||
|
||||
if (args && TREE_CODE (args) != TREE_LIST)
|
||||
args = build_tree_list (NULL_TREE, args);
|
||||
args = build_scratch_list (NULL_TREE, args);
|
||||
arg = args;
|
||||
|
||||
/* The implicit parameters to a constructor are not considered by overload
|
||||
resolution, and must be of the proper type. */
|
||||
if (DECL_CONSTRUCTOR_P (fn))
|
||||
{
|
||||
converted_args = tree_cons (NULL_TREE, TREE_VALUE (arg), converted_args);
|
||||
converted_args = expr_tree_cons (NULL_TREE, TREE_VALUE (arg), converted_args);
|
||||
arg = TREE_CHAIN (arg);
|
||||
parm = TREE_CHAIN (parm);
|
||||
if (TYPE_USES_VIRTUAL_BASECLASSES (DECL_CONTEXT (fn)))
|
||||
{
|
||||
converted_args = tree_cons
|
||||
converted_args = expr_tree_cons
|
||||
(NULL_TREE, TREE_VALUE (arg), converted_args);
|
||||
arg = TREE_CHAIN (arg);
|
||||
parm = TREE_CHAIN (parm);
|
||||
|
@ -5267,7 +5267,7 @@ build_over_call (fn, convs, args, flags)
|
|||
cp_pedwarn ("passing `%T' as `this' argument of `%#D' discards %s",
|
||||
TREE_TYPE (argtype), fn, p);
|
||||
}
|
||||
converted_args = tree_cons
|
||||
converted_args = expr_tree_cons
|
||||
(NULL_TREE, convert_force (TREE_VALUE (parm), TREE_VALUE (arg), CONV_C_CAST),
|
||||
converted_args);
|
||||
parm = TREE_CHAIN (parm);
|
||||
|
@ -5311,7 +5311,7 @@ build_over_call (fn, convs, args, flags)
|
|||
&& (TYPE_PRECISION (type) < TYPE_PRECISION (integer_type_node)))
|
||||
val = default_conversion (val);
|
||||
#endif
|
||||
converted_args = tree_cons (NULL_TREE, val, converted_args);
|
||||
converted_args = expr_tree_cons (NULL_TREE, val, converted_args);
|
||||
}
|
||||
|
||||
/* Default arguments */
|
||||
|
@ -5324,7 +5324,7 @@ build_over_call (fn, convs, args, flags)
|
|||
not in tsubst. */
|
||||
arg = tsubst_expr (arg, DECL_TI_ARGS (fn),
|
||||
TREE_VEC_LENGTH (DECL_TI_ARGS (fn)), NULL_TREE);
|
||||
converted_args = tree_cons
|
||||
converted_args = expr_tree_cons
|
||||
(NULL_TREE, convert_default_arg (TREE_VALUE (parm), arg),
|
||||
converted_args);
|
||||
}
|
||||
|
@ -5347,7 +5347,7 @@ build_over_call (fn, convs, args, flags)
|
|||
/* Convert `short' and `char' to full-size `int'. */
|
||||
val = default_conversion (val);
|
||||
|
||||
converted_args = tree_cons (NULL_TREE, val, converted_args);
|
||||
converted_args = expr_tree_cons (NULL_TREE, val, converted_args);
|
||||
}
|
||||
|
||||
converted_args = nreverse (converted_args);
|
||||
|
@ -5551,9 +5551,9 @@ build_new_method_call (instance, name, args, basetype_path, flags)
|
|||
&& ! (flags & LOOKUP_HAS_IN_CHARGE))
|
||||
{
|
||||
flags |= LOOKUP_HAS_IN_CHARGE;
|
||||
args = tree_cons (NULL_TREE, integer_one_node, args);
|
||||
args = scratch_tree_cons (NULL_TREE, integer_one_node, args);
|
||||
}
|
||||
mem_args = tree_cons (NULL_TREE, instance_ptr, args);
|
||||
mem_args = scratch_tree_cons (NULL_TREE, instance_ptr, args);
|
||||
for (; t; t = DECL_CHAIN (t))
|
||||
{
|
||||
tree this_arglist;
|
||||
|
@ -5571,7 +5571,7 @@ build_new_method_call (instance, name, args, basetype_path, flags)
|
|||
if (TREE_CODE (t) == TEMPLATE_DECL)
|
||||
{
|
||||
/* A member template. */
|
||||
templates = decl_tree_cons (NULL_TREE, t, templates);
|
||||
templates = scratch_tree_cons (NULL_TREE, t, templates);
|
||||
candidates =
|
||||
add_template_candidate (candidates, t, explicit_targs,
|
||||
this_arglist,
|
||||
|
|
|
@ -270,6 +270,7 @@ build_vbase_path (code, type, expr, path, alias_this)
|
|||
{
|
||||
tree reverse_path = NULL_TREE;
|
||||
|
||||
push_expression_obstack ();
|
||||
while (path)
|
||||
{
|
||||
tree r = copy_node (path);
|
||||
|
@ -278,6 +279,7 @@ build_vbase_path (code, type, expr, path, alias_this)
|
|||
path = BINFO_INHERITANCE_CHAIN (path);
|
||||
}
|
||||
path = reverse_path;
|
||||
pop_obstacks ();
|
||||
}
|
||||
|
||||
basetype = BINFO_TYPE (path);
|
||||
|
@ -447,9 +449,9 @@ build_vtable_entry (delta, pfn)
|
|||
else
|
||||
{
|
||||
extern int flag_huge_objects;
|
||||
tree elems = tree_cons (NULL_TREE, delta,
|
||||
tree_cons (NULL_TREE, integer_zero_node,
|
||||
build_tree_list (NULL_TREE, pfn)));
|
||||
tree elems = expr_tree_cons (NULL_TREE, delta,
|
||||
expr_tree_cons (NULL_TREE, integer_zero_node,
|
||||
build_expr_list (NULL_TREE, pfn)));
|
||||
tree entry = build (CONSTRUCTOR, vtable_entry_type, NULL_TREE, elems);
|
||||
|
||||
/* DELTA is constructed by `size_int', which means it may be an
|
||||
|
@ -3324,7 +3326,7 @@ finish_struct_1 (t, warn_anon)
|
|||
fdecl = lookup_fnfields (binfo, sname, 0);
|
||||
|
||||
if (fdecl)
|
||||
access_decls = tree_cons (access, fdecl, access_decls);
|
||||
access_decls = scratch_tree_cons (access, fdecl, access_decls);
|
||||
else
|
||||
cp_error_at ("no members matching `%D' in `%#T'", x, ctype);
|
||||
continue;
|
||||
|
@ -5100,7 +5102,7 @@ instantiate_type (lhstype, rhs, complain)
|
|||
if (TREE_CODE (elem) == TEMPLATE_DECL)
|
||||
{
|
||||
int n = DECL_NTPARMS (elem);
|
||||
tree t = make_tree_vec (n);
|
||||
tree t = make_scratch_vec (n);
|
||||
int i, d = 0;
|
||||
i = type_unification
|
||||
(DECL_INNERMOST_TEMPLATE_PARMS (elem),
|
||||
|
|
|
@ -2471,6 +2471,10 @@ extern int cp_tree_equal PROTO((tree, tree));
|
|||
extern int can_free PROTO((struct obstack *, tree));
|
||||
extern tree mapcar PROTO((tree, tree (*) (tree)));
|
||||
extern void debug_binfo PROTO((tree));
|
||||
#define scratchalloc expralloc
|
||||
#define scratch_tree_cons expr_tree_cons
|
||||
#define build_scratch_list build_expr_list
|
||||
#define make_scratch_vec make_temp_vec
|
||||
|
||||
/* in typeck.c */
|
||||
extern tree condition_conversion PROTO((tree));
|
||||
|
|
22
gcc/cp/cvt.c
22
gcc/cp/cvt.c
|
@ -579,7 +579,7 @@ convert_to_reference (reftype, expr, convtype, flags, decl)
|
|||
&& ! CLASSTYPE_ABSTRACT_VIRTUALS (type)
|
||||
&& (rval = build_method_call
|
||||
(NULL_TREE, ctor_identifier,
|
||||
build_tree_list (NULL_TREE, expr), TYPE_BINFO (type),
|
||||
build_expr_list (NULL_TREE, expr), TYPE_BINFO (type),
|
||||
LOOKUP_NO_CONVERSION|LOOKUP_SPECULATIVELY
|
||||
| LOOKUP_ONLYCONVERTING)))
|
||||
{
|
||||
|
@ -589,7 +589,7 @@ convert_to_reference (reftype, expr, convtype, flags, decl)
|
|||
{
|
||||
tree t = get_temp_name (type, toplevel_bindings_p ());
|
||||
init = build_method_call (t, ctor_identifier,
|
||||
build_tree_list (NULL_TREE, expr),
|
||||
build_expr_list (NULL_TREE, expr),
|
||||
TYPE_BINFO (type),
|
||||
LOOKUP_NORMAL|LOOKUP_NO_CONVERSION
|
||||
| LOOKUP_ONLYCONVERTING);
|
||||
|
@ -604,7 +604,7 @@ convert_to_reference (reftype, expr, convtype, flags, decl)
|
|||
else
|
||||
{
|
||||
init = build_method_call (NULL_TREE, ctor_identifier,
|
||||
build_tree_list (NULL_TREE, expr),
|
||||
build_expr_list (NULL_TREE, expr),
|
||||
TYPE_BINFO (type),
|
||||
LOOKUP_NORMAL|LOOKUP_NO_CONVERSION
|
||||
|LOOKUP_ONLYCONVERTING);
|
||||
|
@ -711,18 +711,18 @@ convert_to_aggr (type, expr, msgp, protect)
|
|||
can_be_private = 0;
|
||||
can_be_protected = IDENTIFIER_CLASS_VALUE (name) || name == current_class_name;
|
||||
|
||||
parmlist = build_tree_list (NULL_TREE, expr);
|
||||
parmtypes = tree_cons (NULL_TREE, TREE_TYPE (expr), void_list_node);
|
||||
parmlist = build_expr_list (NULL_TREE, expr);
|
||||
parmtypes = scratch_tree_cons (NULL_TREE, TREE_TYPE (expr), void_list_node);
|
||||
|
||||
if (TYPE_USES_VIRTUAL_BASECLASSES (basetype))
|
||||
{
|
||||
parmtypes = tree_cons (NULL_TREE, integer_type_node, parmtypes);
|
||||
parmlist = tree_cons (NULL_TREE, integer_one_node, parmlist);
|
||||
parmtypes = expr_tree_cons (NULL_TREE, integer_type_node, parmtypes);
|
||||
parmlist = scratch_tree_cons (NULL_TREE, integer_one_node, parmlist);
|
||||
}
|
||||
|
||||
/* The type of the first argument will be filled in inside the loop. */
|
||||
parmlist = tree_cons (NULL_TREE, integer_zero_node, parmlist);
|
||||
parmtypes = tree_cons (NULL_TREE, build_pointer_type (basetype), parmtypes);
|
||||
parmlist = expr_tree_cons (NULL_TREE, integer_zero_node, parmlist);
|
||||
parmtypes = scratch_tree_cons (NULL_TREE, build_pointer_type (basetype), parmtypes);
|
||||
|
||||
/* No exact conversion was found. See if an approximate
|
||||
one will do. */
|
||||
|
@ -1119,7 +1119,7 @@ ocp_convert (type, expr, convtype, flags)
|
|||
}
|
||||
if (ctor)
|
||||
ctor = build_method_call (NULL_TREE, ctor_identifier,
|
||||
build_tree_list (NULL_TREE, ctor),
|
||||
build_expr_list (NULL_TREE, ctor),
|
||||
TYPE_BINFO (type), flags);
|
||||
if (ctor)
|
||||
return build_cplus_new (type, ctor);
|
||||
|
@ -1139,7 +1139,7 @@ ocp_convert (type, expr, convtype, flags)
|
|||
|
||||
if (TYPE_HAS_CONSTRUCTOR (complete_type (type)))
|
||||
ctor = build_method_call (NULL_TREE, ctor_identifier,
|
||||
build_tree_list (NULL_TREE, e),
|
||||
build_expr_list (NULL_TREE, e),
|
||||
TYPE_BINFO (type),
|
||||
(flags & LOOKUP_NORMAL)
|
||||
| LOOKUP_SPECULATIVELY
|
||||
|
|
|
@ -7045,7 +7045,7 @@ expand_static_init (decl, init)
|
|||
end_anon_func ();
|
||||
mark_addressable (cleanup);
|
||||
cleanup = build_unary_op (ADDR_EXPR, cleanup, 0);
|
||||
fcall = build_function_call (Atexit, tree_cons (NULL_TREE, cleanup, NULL_TREE));
|
||||
fcall = build_function_call (Atexit, expr_tree_cons (NULL_TREE, cleanup, NULL_TREE));
|
||||
expand_expr_stmt (fcall);
|
||||
}
|
||||
|
||||
|
@ -11318,7 +11318,7 @@ start_function (declspecs, declarator, attrs, pre_parsed_p)
|
|||
&& ! CLASSTYPE_GOT_SEMICOLON (restype))
|
||||
{
|
||||
cp_error ("semicolon missing after declaration of `%#T'", restype);
|
||||
shadow_tag (build_tree_list (NULL_TREE, restype));
|
||||
shadow_tag (build_expr_list (NULL_TREE, restype));
|
||||
CLASSTYPE_GOT_SEMICOLON (restype) = 1;
|
||||
if (TREE_CODE (fntype) == FUNCTION_TYPE)
|
||||
fntype = build_function_type (integer_type_node,
|
||||
|
@ -12013,7 +12013,7 @@ finish_function (lineno, call_poplevel, nested)
|
|||
expand_expr_stmt
|
||||
(build_scoped_method_call
|
||||
(current_class_ref, vb, dtor_identifier,
|
||||
build_tree_list (NULL_TREE, integer_zero_node)));
|
||||
build_expr_list (NULL_TREE, integer_zero_node)));
|
||||
}
|
||||
vbases = TREE_CHAIN (vbases);
|
||||
}
|
||||
|
@ -12038,8 +12038,8 @@ finish_function (lineno, call_poplevel, nested)
|
|||
error_mark_node),
|
||||
NULL_PTR),
|
||||
ansi_opname[(int) DELETE_EXPR],
|
||||
tree_cons (NULL_TREE, current_class_ptr,
|
||||
build_tree_list (NULL_TREE, virtual_size)),
|
||||
expr_tree_cons (NULL_TREE, current_class_ptr,
|
||||
build_expr_list (NULL_TREE, virtual_size)),
|
||||
NULL_TREE, LOOKUP_NORMAL);
|
||||
else if (TYPE_USES_VIRTUAL_BASECLASSES (current_class_type))
|
||||
exprstmt = build_x_delete (ptr_type_node, current_class_ptr, 0,
|
||||
|
@ -12675,8 +12675,8 @@ maybe_build_cleanup_1 (decl, auto_delete)
|
|||
|
||||
if (TYPE_USES_VIRTUAL_BASECLASSES (type)
|
||||
&& ! TYPE_HAS_DESTRUCTOR (type))
|
||||
rval = build_compound_expr (tree_cons (NULL_TREE, rval,
|
||||
build_tree_list (NULL_TREE, build_vbase_delete (type, decl))));
|
||||
rval = build_compound_expr (expr_tree_cons (NULL_TREE, rval,
|
||||
build_expr_list (NULL_TREE, build_vbase_delete (type, decl))));
|
||||
|
||||
if (TREE_CODE (decl) != PARM_DECL)
|
||||
resume_momentary (temp);
|
||||
|
|
|
@ -1446,7 +1446,7 @@ check_classfn (ctype, function)
|
|||
/* This function might be an instantiation
|
||||
or specialization of fndecl. */
|
||||
templates =
|
||||
tree_cons (NULL_TREE, fndecl, templates);
|
||||
scratch_tree_cons (NULL_TREE, fndecl, templates);
|
||||
}
|
||||
#endif
|
||||
fndecl = DECL_CHAIN (fndecl);
|
||||
|
@ -1462,7 +1462,7 @@ check_classfn (ctype, function)
|
|||
the names don't match, there is some specialization
|
||||
occurring. */
|
||||
templates =
|
||||
tree_cons (NULL_TREE, fndecl, templates);
|
||||
scratch_tree_cons (NULL_TREE, fndecl, templates);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2217,7 +2217,7 @@ finish_anon_union (anon_union_decl)
|
|||
DECL_INITIAL (decl) = NULL_TREE;
|
||||
/* If there's a cleanup to do, it belongs in the
|
||||
TREE_PURPOSE of the following TREE_LIST. */
|
||||
elems = tree_cons (NULL_TREE, decl, elems);
|
||||
elems = scratch_tree_cons (NULL_TREE, decl, elems);
|
||||
TREE_TYPE (elems) = type;
|
||||
}
|
||||
if (static_p)
|
||||
|
@ -3598,7 +3598,7 @@ build_expr_from_tree (t)
|
|||
chain = TREE_CHAIN (t);
|
||||
if (chain && chain != void_type_node)
|
||||
chain = build_expr_from_tree (chain);
|
||||
return tree_cons (purpose, value, chain);
|
||||
return expr_tree_cons (purpose, value, chain);
|
||||
}
|
||||
|
||||
case COMPONENT_REF:
|
||||
|
@ -3645,7 +3645,7 @@ reparse_decl_as_expr (type, decl)
|
|||
{
|
||||
decl = build_expr_from_tree (decl);
|
||||
if (type)
|
||||
return build_functional_cast (type, build_tree_list (NULL_TREE, decl));
|
||||
return build_functional_cast (type, build_expr_list (NULL_TREE, decl));
|
||||
else
|
||||
return decl;
|
||||
}
|
||||
|
|
|
@ -487,11 +487,11 @@ expand_start_catch_block (declspecs, declarator)
|
|||
init_type = build_reference_type (init_type);
|
||||
|
||||
exp = saved_throw_value;
|
||||
exp = tree_cons (NULL_TREE,
|
||||
exp = expr_tree_cons (NULL_TREE,
|
||||
build_eh_type_type (TREE_TYPE (decl)),
|
||||
tree_cons (NULL_TREE,
|
||||
expr_tree_cons (NULL_TREE,
|
||||
saved_throw_type,
|
||||
tree_cons (NULL_TREE, exp, NULL_TREE)));
|
||||
expr_tree_cons (NULL_TREE, exp, NULL_TREE)));
|
||||
exp = build_function_call (CatchMatch, exp);
|
||||
call_rtx = expand_call (exp, NULL_RTX, 0);
|
||||
assemble_external (TREE_OPERAND (CatchMatch, 0));
|
||||
|
@ -618,7 +618,7 @@ do_unwind (inner_throw_label)
|
|||
rtx temp;
|
||||
|
||||
/* Call to __builtin_return_address. */
|
||||
params = tree_cons (NULL_TREE, integer_zero_node, NULL_TREE);
|
||||
params = expr_tree_cons (NULL_TREE, integer_zero_node, NULL_TREE);
|
||||
fcall = build_function_call (BuiltinReturnAddress, params);
|
||||
next_pc = expand_expr (fcall, NULL_RTX, Pmode, 0);
|
||||
/* In the return, the new pc is pc+8, as the value coming in is
|
||||
|
@ -671,14 +671,14 @@ do_unwind (inner_throw_label)
|
|||
#if 0
|
||||
/* I would like to do this here, but the move below doesn't seem to work. */
|
||||
/* Call to __builtin_return_address. */
|
||||
params = tree_cons (NULL_TREE, integer_zero_node, NULL_TREE);
|
||||
params = expr_tree_cons (NULL_TREE, integer_zero_node, NULL_TREE);
|
||||
fcall = build_function_call (BuiltinReturnAddress, params);
|
||||
next_pc = expand_expr (fcall, NULL_RTX, Pmode, 0);
|
||||
|
||||
emit_move_insn (next_pc, inner_throw_label);
|
||||
/* So, for now, just pass throw label to stack unwinder. */
|
||||
#endif
|
||||
params = tree_cons (NULL_TREE, make_tree (ptr_type_node,
|
||||
params = expr_tree_cons (NULL_TREE, make_tree (ptr_type_node,
|
||||
inner_throw_label), NULL_TREE);
|
||||
|
||||
do_function_call (Unwind, params, NULL_TREE);
|
||||
|
@ -752,7 +752,7 @@ expand_builtin_throw ()
|
|||
|
||||
/* search for an exception handler for the saved_pc */
|
||||
handler = do_function_call (FirstExceptionMatch,
|
||||
tree_cons (NULL_TREE, saved_pc,
|
||||
expr_tree_cons (NULL_TREE, saved_pc,
|
||||
NULL_TREE),
|
||||
ptr_type_node);
|
||||
assemble_external (TREE_OPERAND (FirstExceptionMatch, 0));
|
||||
|
@ -800,7 +800,7 @@ expand_builtin_throw ()
|
|||
emit_move_insn (next_pc,
|
||||
gen_rtx (MEM, Pmode, plus_constant (hard_frame_pointer_rtx, -4)));
|
||||
#else
|
||||
params = tree_cons (NULL_TREE, integer_zero_node, NULL_TREE);
|
||||
params = expr_tree_cons (NULL_TREE, integer_zero_node, NULL_TREE);
|
||||
fcall = build_function_call (BuiltinReturnAddress, params);
|
||||
next_pc = expand_expr (fcall, NULL_RTX, Pmode, 0);
|
||||
#endif
|
||||
|
@ -969,11 +969,11 @@ expand_end_eh_spec (raises)
|
|||
{
|
||||
/* check TREE_VALUE (raises) here */
|
||||
exp = saved_throw_value;
|
||||
exp = tree_cons (NULL_TREE,
|
||||
exp = expr_tree_cons (NULL_TREE,
|
||||
build_eh_type_type (match_type),
|
||||
tree_cons (NULL_TREE,
|
||||
expr_tree_cons (NULL_TREE,
|
||||
saved_throw_type,
|
||||
tree_cons (NULL_TREE, exp, NULL_TREE)));
|
||||
expr_tree_cons (NULL_TREE, exp, NULL_TREE)));
|
||||
exp = build_function_call (CatchMatch, exp);
|
||||
assemble_external (TREE_OPERAND (CatchMatch, 0));
|
||||
|
||||
|
@ -1137,7 +1137,7 @@ expand_throw (exp)
|
|||
|
||||
/* Make a copy of the thrown object. WP 15.1.5 */
|
||||
exp = build_new (NULL_TREE, TREE_TYPE (exp),
|
||||
build_tree_list (NULL_TREE, exp),
|
||||
build_expr_list (NULL_TREE, exp),
|
||||
0);
|
||||
|
||||
if (exp == error_mark_node)
|
||||
|
|
|
@ -112,7 +112,7 @@ cplus_expand_expr (exp, target, tmode, modifier)
|
|||
parameter value. */
|
||||
mark_addressable (slot);
|
||||
if (TREE_PERMANENT (args))
|
||||
args = tree_cons (0, build1 (ADDR_EXPR, type, slot),
|
||||
args = expr_tree_cons (0, build1 (ADDR_EXPR, type, slot),
|
||||
TREE_CHAIN (args));
|
||||
else
|
||||
TREE_VALUE (args) = build1 (ADDR_EXPR, type, slot);
|
||||
|
|
|
@ -173,7 +173,7 @@ perform_member_init (member, name, init, explicit)
|
|||
/* Since `init' is already a TREE_LIST on the current_member_init_list,
|
||||
only build it into one if we aren't already a list. */
|
||||
if (init != NULL_TREE && TREE_CODE (init) != TREE_LIST)
|
||||
init = build_tree_list (NULL_TREE, init);
|
||||
init = build_expr_list (NULL_TREE, init);
|
||||
|
||||
decl = build_component_ref (current_class_ref, name, NULL_TREE, explicit);
|
||||
|
||||
|
@ -489,7 +489,7 @@ build_partial_cleanup_for (binfo)
|
|||
{
|
||||
return build_scoped_method_call
|
||||
(current_class_ref, binfo, dtor_identifier,
|
||||
build_tree_list (NULL_TREE, integer_zero_node));
|
||||
build_expr_list (NULL_TREE, integer_zero_node));
|
||||
}
|
||||
|
||||
/* Perform whatever initializations have yet to be done on the base
|
||||
|
@ -1287,14 +1287,14 @@ expand_default_init (binfo, true_exp, exp, init, alias_this, flags)
|
|||
return;
|
||||
}
|
||||
else
|
||||
parms = build_tree_list (NULL_TREE, init);
|
||||
parms = build_expr_list (NULL_TREE, init);
|
||||
|
||||
if (TYPE_USES_VIRTUAL_BASECLASSES (type))
|
||||
{
|
||||
if (true_exp == exp)
|
||||
parms = tree_cons (NULL_TREE, integer_one_node, parms);
|
||||
parms = expr_tree_cons (NULL_TREE, integer_one_node, parms);
|
||||
else
|
||||
parms = tree_cons (NULL_TREE, integer_zero_node, parms);
|
||||
parms = expr_tree_cons (NULL_TREE, integer_zero_node, parms);
|
||||
flags |= LOOKUP_HAS_IN_CHARGE;
|
||||
}
|
||||
|
||||
|
@ -1549,7 +1549,7 @@ expand_aggr_init_1 (binfo, true_exp, exp, init, alias_this, flags)
|
|||
{
|
||||
/* See if there is a constructor for``type'' that takes a
|
||||
``ttype''-typed object. */
|
||||
tree parms = build_tree_list (NULL_TREE, init);
|
||||
tree parms = build_expr_list (NULL_TREE, init);
|
||||
tree as_cons = NULL_TREE;
|
||||
if (TYPE_HAS_CONSTRUCTOR (type))
|
||||
as_cons = build_method_call (exp, ctor_identifier,
|
||||
|
@ -2508,7 +2508,7 @@ build_new (placement, decl, init, use_global_new)
|
|||
{
|
||||
rval = build_builtin_call (build_pointer_type (true_type),
|
||||
has_array ? BIVN : BIN,
|
||||
build_tree_list (NULL_TREE, size));
|
||||
build_expr_list (NULL_TREE, size));
|
||||
TREE_CALLS_NEW (rval) = 1;
|
||||
}
|
||||
|
||||
|
@ -2538,8 +2538,8 @@ build_new (placement, decl, init, use_global_new)
|
|||
rval = cp_convert (build_pointer_type (true_type), rval);
|
||||
TREE_CALLS_NEW (rval) = 1;
|
||||
TREE_SIDE_EFFECTS (rval) = 1;
|
||||
rval = build_compound_expr (tree_cons (NULL_TREE, exp1,
|
||||
build_tree_list (NULL_TREE, rval)));
|
||||
rval = build_compound_expr (expr_tree_cons (NULL_TREE, exp1,
|
||||
build_expr_list (NULL_TREE, rval)));
|
||||
}
|
||||
|
||||
if (rval == error_mark_node)
|
||||
|
@ -2590,7 +2590,7 @@ build_new (placement, decl, init, use_global_new)
|
|||
|
||||
if (rval && TYPE_USES_VIRTUAL_BASECLASSES (true_type))
|
||||
{
|
||||
init = tree_cons (NULL_TREE, integer_one_node, init);
|
||||
init = expr_tree_cons (NULL_TREE, integer_one_node, init);
|
||||
flags |= LOOKUP_HAS_IN_CHARGE;
|
||||
}
|
||||
|
||||
|
@ -2717,7 +2717,7 @@ build_new (placement, decl, init, use_global_new)
|
|||
|
||||
if (pending_sizes)
|
||||
rval = build_compound_expr (chainon (pending_sizes,
|
||||
build_tree_list (NULL_TREE, rval)));
|
||||
build_expr_list (NULL_TREE, rval)));
|
||||
|
||||
return rval;
|
||||
}
|
||||
|
@ -2785,7 +2785,7 @@ build_vec_delete_1 (base, maxindex, type, auto_delete_vec, auto_delete,
|
|||
1));
|
||||
/* This is the real size */
|
||||
virtual_size = size_binop (PLUS_EXPR, virtual_size, BI_header_size);
|
||||
body = build_tree_list (NULL_TREE,
|
||||
body = build_expr_list (NULL_TREE,
|
||||
build_x_delete (ptype, base_tbd,
|
||||
2 | use_global_delete,
|
||||
virtual_size));
|
||||
|
@ -2797,24 +2797,24 @@ build_vec_delete_1 (base, maxindex, type, auto_delete_vec, auto_delete,
|
|||
else
|
||||
body = NULL_TREE;
|
||||
|
||||
body = tree_cons (NULL_TREE,
|
||||
body = expr_tree_cons (NULL_TREE,
|
||||
build_delete (ptype, tbase, auto_delete,
|
||||
LOOKUP_NORMAL|LOOKUP_DESTRUCTOR, 1),
|
||||
body);
|
||||
|
||||
body = tree_cons (NULL_TREE,
|
||||
body = expr_tree_cons (NULL_TREE,
|
||||
build_modify_expr (tbase, NOP_EXPR, build (MINUS_EXPR, ptype, tbase, size_exp)),
|
||||
body);
|
||||
|
||||
body = tree_cons (NULL_TREE,
|
||||
body = expr_tree_cons (NULL_TREE,
|
||||
build (EXIT_EXPR, void_type_node,
|
||||
build (EQ_EXPR, boolean_type_node, base, tbase)),
|
||||
body);
|
||||
|
||||
loop = build (LOOP_EXPR, void_type_node, build_compound_expr (body));
|
||||
|
||||
loop = tree_cons (NULL_TREE, tbase_init,
|
||||
tree_cons (NULL_TREE, loop, NULL_TREE));
|
||||
loop = expr_tree_cons (NULL_TREE, tbase_init,
|
||||
expr_tree_cons (NULL_TREE, loop, NULL_TREE));
|
||||
loop = build_compound_expr (loop);
|
||||
|
||||
no_destructor:
|
||||
|
@ -2855,8 +2855,8 @@ build_vec_delete_1 (base, maxindex, type, auto_delete_vec, auto_delete,
|
|||
|
||||
if (loop && deallocate_expr != integer_zero_node)
|
||||
{
|
||||
body = tree_cons (NULL_TREE, loop,
|
||||
tree_cons (NULL_TREE, deallocate_expr, NULL_TREE));
|
||||
body = expr_tree_cons (NULL_TREE, loop,
|
||||
expr_tree_cons (NULL_TREE, deallocate_expr, NULL_TREE));
|
||||
body = build_compound_expr (body);
|
||||
}
|
||||
else
|
||||
|
@ -3158,7 +3158,7 @@ build_x_delete (type, addr, which_delete, virtual_size)
|
|||
rval = build_opfncall (code, LOOKUP_NORMAL, addr, virtual_size, NULL_TREE);
|
||||
else
|
||||
rval = build_builtin_call (void_type_node, use_vec_delete ? BIVD : BID,
|
||||
build_tree_list (NULL_TREE, addr));
|
||||
build_expr_list (NULL_TREE, addr));
|
||||
return rval;
|
||||
}
|
||||
|
||||
|
@ -3209,7 +3209,7 @@ build_delete (type, addr, auto_delete, flags, use_global_delete)
|
|||
{
|
||||
/* Call the builtin operator delete. */
|
||||
return build_builtin_call (void_type_node, BID,
|
||||
build_tree_list (NULL_TREE, addr));
|
||||
build_expr_list (NULL_TREE, addr));
|
||||
}
|
||||
if (TREE_SIDE_EFFECTS (addr))
|
||||
addr = save_expr (addr);
|
||||
|
@ -3267,7 +3267,7 @@ build_delete (type, addr, auto_delete, flags, use_global_delete)
|
|||
|
||||
/* Call the builtin operator delete. */
|
||||
return build_builtin_call (void_type_node, BID,
|
||||
build_tree_list (NULL_TREE, addr));
|
||||
build_expr_list (NULL_TREE, addr));
|
||||
}
|
||||
|
||||
/* Below, we will reverse the order in which these calls are made.
|
||||
|
@ -3284,7 +3284,7 @@ build_delete (type, addr, auto_delete, flags, use_global_delete)
|
|||
tree cond = fold (build (BIT_AND_EXPR, integer_type_node,
|
||||
auto_delete, integer_one_node));
|
||||
tree call = build_builtin_call
|
||||
(void_type_node, BID, build_tree_list (NULL_TREE, addr));
|
||||
(void_type_node, BID, build_expr_list (NULL_TREE, addr));
|
||||
|
||||
cond = fold (build (COND_EXPR, void_type_node, cond,
|
||||
call, void_zero_node));
|
||||
|
@ -3298,7 +3298,7 @@ build_delete (type, addr, auto_delete, flags, use_global_delete)
|
|||
passed_auto_delete = auto_delete;
|
||||
|
||||
expr = build_method_call
|
||||
(ref, dtor_identifier, build_tree_list (NULL_TREE, passed_auto_delete),
|
||||
(ref, dtor_identifier, build_expr_list (NULL_TREE, passed_auto_delete),
|
||||
NULL_TREE, flags);
|
||||
|
||||
if (do_delete)
|
||||
|
@ -3337,14 +3337,14 @@ build_delete (type, addr, auto_delete, flags, use_global_delete)
|
|||
cond = build (COND_EXPR, void_type_node,
|
||||
build (BIT_AND_EXPR, integer_type_node, auto_delete, integer_one_node),
|
||||
build_builtin_call (void_type_node, BID,
|
||||
build_tree_list (NULL_TREE, addr)),
|
||||
build_expr_list (NULL_TREE, addr)),
|
||||
void_zero_node);
|
||||
}
|
||||
else
|
||||
cond = NULL_TREE;
|
||||
|
||||
if (cond)
|
||||
exprstmt = build_tree_list (NULL_TREE, cond);
|
||||
exprstmt = build_expr_list (NULL_TREE, cond);
|
||||
|
||||
if (base_binfo
|
||||
&& ! TREE_VIA_VIRTUAL (base_binfo)
|
||||
|
@ -3359,8 +3359,8 @@ build_delete (type, addr, auto_delete, flags, use_global_delete)
|
|||
|
||||
expr = build_scoped_method_call
|
||||
(ref, base_binfo, dtor_identifier,
|
||||
build_tree_list (NULL_TREE, this_auto_delete));
|
||||
exprstmt = tree_cons (NULL_TREE, expr, exprstmt);
|
||||
build_expr_list (NULL_TREE, this_auto_delete));
|
||||
exprstmt = expr_tree_cons (NULL_TREE, expr, exprstmt);
|
||||
}
|
||||
|
||||
/* Take care of the remaining baseclasses. */
|
||||
|
@ -3373,9 +3373,9 @@ build_delete (type, addr, auto_delete, flags, use_global_delete)
|
|||
|
||||
expr = build_scoped_method_call
|
||||
(ref, base_binfo, dtor_identifier,
|
||||
build_tree_list (NULL_TREE, integer_zero_node));
|
||||
build_expr_list (NULL_TREE, integer_zero_node));
|
||||
|
||||
exprstmt = tree_cons (NULL_TREE, expr, exprstmt);
|
||||
exprstmt = expr_tree_cons (NULL_TREE, expr, exprstmt);
|
||||
}
|
||||
|
||||
for (member = TYPE_FIELDS (type); member; member = TREE_CHAIN (member))
|
||||
|
@ -3387,7 +3387,7 @@ build_delete (type, addr, auto_delete, flags, use_global_delete)
|
|||
tree this_member = build_component_ref (ref, DECL_NAME (member), NULL_TREE, 0);
|
||||
tree this_type = TREE_TYPE (member);
|
||||
expr = build_delete (this_type, this_member, integer_two_node, flags, 0);
|
||||
exprstmt = tree_cons (NULL_TREE, expr, exprstmt);
|
||||
exprstmt = expr_tree_cons (NULL_TREE, expr, exprstmt);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3414,7 +3414,7 @@ build_vbase_delete (type, decl)
|
|||
{
|
||||
tree this_addr = convert_force (build_pointer_type (BINFO_TYPE (vbases)),
|
||||
addr, 0);
|
||||
result = tree_cons (NULL_TREE,
|
||||
result = expr_tree_cons (NULL_TREE,
|
||||
build_delete (TREE_TYPE (this_addr), this_addr,
|
||||
integer_zero_node,
|
||||
LOOKUP_NORMAL|LOOKUP_DESTRUCTOR, 0),
|
||||
|
|
|
@ -4461,7 +4461,7 @@ make_lang_type (code)
|
|||
pi[--i] = 0;
|
||||
|
||||
TYPE_LANG_SPECIFIC (t) = (struct lang_type *) pi;
|
||||
CLASSTYPE_AS_LIST (t) = build_tree_list (NULL_TREE, t);
|
||||
CLASSTYPE_AS_LIST (t) = build_expr_list (NULL_TREE, t);
|
||||
SET_CLASSTYPE_INTERFACE_UNKNOWN_X (t, interface_unknown);
|
||||
CLASSTYPE_INTERFACE_ONLY (t) = interface_only;
|
||||
CLASSTYPE_VBASE_SIZE (t) = integer_zero_node;
|
||||
|
|
|
@ -1375,7 +1375,7 @@ build_opfncall (code, flags, xarg1, xarg2, arg3)
|
|||
case VEC_NEW_EXPR:
|
||||
case NEW_EXPR:
|
||||
{
|
||||
tree args = tree_cons (NULL_TREE, xarg2, arg3);
|
||||
tree args = expr_tree_cons (NULL_TREE, xarg2, arg3);
|
||||
fnname = ansi_opname[(int) code];
|
||||
if (flags & LOOKUP_GLOBAL)
|
||||
return build_overload_call (fnname, args, flags & LOOKUP_COMPLAIN);
|
||||
|
@ -1401,7 +1401,7 @@ build_opfncall (code, flags, xarg1, xarg2, arg3)
|
|||
fnname = ansi_opname[(int) code];
|
||||
if (flags & LOOKUP_GLOBAL)
|
||||
return build_overload_call (fnname,
|
||||
build_tree_list (NULL_TREE, xarg1),
|
||||
build_expr_list (NULL_TREE, xarg1),
|
||||
flags & LOOKUP_COMPLAIN);
|
||||
arg1 = TREE_TYPE (xarg1);
|
||||
|
||||
|
@ -1425,8 +1425,8 @@ build_opfncall (code, flags, xarg1, xarg2, arg3)
|
|||
(build_indirect_ref (build1 (NOP_EXPR, arg1,
|
||||
error_mark_node),
|
||||
NULL_PTR),
|
||||
fnname, tree_cons (NULL_TREE, xarg1,
|
||||
build_tree_list (NULL_TREE, xarg2)),
|
||||
fnname, expr_tree_cons (NULL_TREE, xarg1,
|
||||
build_expr_list (NULL_TREE, xarg2)),
|
||||
NULL_TREE, flags);
|
||||
#if 0
|
||||
/* This can happen when operator delete is protected. */
|
||||
|
@ -1604,25 +1604,25 @@ build_opfncall (code, flags, xarg1, xarg2, arg3)
|
|||
}
|
||||
else if (code == COND_EXPR)
|
||||
{
|
||||
parms = tree_cons (NULL_TREE, xarg2, build_tree_list (NULL_TREE, arg3));
|
||||
parms = expr_tree_cons (NULL_TREE, xarg2, build_expr_list (NULL_TREE, arg3));
|
||||
rval = build_method_call (xarg1, fnname, parms, NULL_TREE, flags);
|
||||
}
|
||||
else if (code == METHOD_CALL_EXPR)
|
||||
{
|
||||
/* must be a member function. */
|
||||
parms = tree_cons (NULL_TREE, xarg2, arg3);
|
||||
parms = expr_tree_cons (NULL_TREE, xarg2, arg3);
|
||||
return build_method_call (xarg1, fnname, parms, NULL_TREE,
|
||||
LOOKUP_NORMAL);
|
||||
}
|
||||
else if (fields1)
|
||||
{
|
||||
parms = build_tree_list (NULL_TREE, xarg2);
|
||||
parms = build_expr_list (NULL_TREE, xarg2);
|
||||
rval = build_method_call (xarg1, fnname, parms, NULL_TREE, flags);
|
||||
}
|
||||
else
|
||||
{
|
||||
parms = tree_cons (NULL_TREE, xarg1,
|
||||
build_tree_list (NULL_TREE, xarg2));
|
||||
parms = expr_tree_cons (NULL_TREE, xarg1,
|
||||
build_expr_list (NULL_TREE, xarg2));
|
||||
rval = build_overload_call (fnname, parms, flags);
|
||||
}
|
||||
|
||||
|
@ -1919,9 +1919,9 @@ emit_thunk (thunk_fndecl)
|
|||
t = build_int_2 (delta, -1 * (delta < 0));
|
||||
TREE_TYPE (t) = signed_type (sizetype);
|
||||
t = fold (build (PLUS_EXPR, TREE_TYPE (a), a, t));
|
||||
t = tree_cons (NULL_TREE, t, NULL_TREE);
|
||||
t = expr_tree_cons (NULL_TREE, t, NULL_TREE);
|
||||
for (a = TREE_CHAIN (a); a; a = TREE_CHAIN (a))
|
||||
t = tree_cons (NULL_TREE, a, t);
|
||||
t = expr_tree_cons (NULL_TREE, a, t);
|
||||
t = nreverse (t);
|
||||
t = build_call (function, TREE_TYPE (TREE_TYPE (function)), t);
|
||||
c_expand_return (t);
|
||||
|
@ -2102,7 +2102,7 @@ do_build_assign_ref (fndecl)
|
|||
CONV_IMPLICIT|CONV_CONST, LOOKUP_COMPLAIN, NULL_TREE);
|
||||
p = convert_from_reference (p);
|
||||
p = build_member_call (basetype, ansi_opname [MODIFY_EXPR],
|
||||
build_tree_list (NULL_TREE, p));
|
||||
build_expr_list (NULL_TREE, p));
|
||||
expand_expr_stmt (p);
|
||||
}
|
||||
for (; fields; fields = TREE_CHAIN (fields))
|
||||
|
|
|
@ -1049,20 +1049,20 @@ already_scoped_stmt:
|
|||
|
||||
nontrivial_exprlist:
|
||||
expr_no_commas ',' expr_no_commas
|
||||
{ $$ = tree_cons (NULL_TREE, $$,
|
||||
build_tree_list (NULL_TREE, $3)); }
|
||||
{ $$ = expr_tree_cons (NULL_TREE, $$,
|
||||
build_expr_list (NULL_TREE, $3)); }
|
||||
| expr_no_commas ',' error
|
||||
{ $$ = tree_cons (NULL_TREE, $$,
|
||||
build_tree_list (NULL_TREE, error_mark_node)); }
|
||||
{ $$ = expr_tree_cons (NULL_TREE, $$,
|
||||
build_expr_list (NULL_TREE, error_mark_node)); }
|
||||
| nontrivial_exprlist ',' expr_no_commas
|
||||
{ chainon ($$, build_tree_list (NULL_TREE, $3)); }
|
||||
{ chainon ($$, build_expr_list (NULL_TREE, $3)); }
|
||||
| nontrivial_exprlist ',' error
|
||||
{ chainon ($$, build_tree_list (NULL_TREE, error_mark_node)); }
|
||||
{ chainon ($$, build_expr_list (NULL_TREE, error_mark_node)); }
|
||||
;
|
||||
|
||||
nonnull_exprlist:
|
||||
expr_no_commas
|
||||
{ $$ = build_tree_list (NULL_TREE, $$); }
|
||||
{ $$ = build_expr_list (NULL_TREE, $$); }
|
||||
| nontrivial_exprlist
|
||||
;
|
||||
|
||||
|
@ -2169,16 +2169,16 @@ initlist:
|
|||
init
|
||||
{ $$ = build_tree_list (NULL_TREE, $$); }
|
||||
| initlist ',' init
|
||||
{ $$ = tree_cons (NULL_TREE, $3, $$); }
|
||||
{ $$ = expr_tree_cons (NULL_TREE, $3, $$); }
|
||||
/* These are for labeled elements. */
|
||||
| '[' expr_no_commas ']' init
|
||||
{ $$ = build_tree_list ($2, $4); }
|
||||
{ $$ = build_expr_list ($2, $4); }
|
||||
| initlist ',' CASE expr_no_commas ':' init
|
||||
{ $$ = tree_cons ($4, $6, $$); }
|
||||
{ $$ = expr_tree_cons ($4, $6, $$); }
|
||||
| identifier ':' init
|
||||
{ $$ = build_tree_list ($$, $3); }
|
||||
{ $$ = build_expr_list ($$, $3); }
|
||||
| initlist ',' identifier ':' init
|
||||
{ $$ = tree_cons ($3, $5, $$); }
|
||||
{ $$ = expr_tree_cons ($3, $5, $$); }
|
||||
;
|
||||
|
||||
fn.defpen:
|
||||
|
|
13
gcc/cp/pt.c
13
gcc/cp/pt.c
|
@ -380,7 +380,7 @@ determine_explicit_specialization (template_id, type, targs_out,
|
|||
if (list_length (TREE_OPERAND (template_id, 1)) > DECL_NTPARMS (fn))
|
||||
continue;
|
||||
|
||||
targs = make_tree_vec (DECL_NTPARMS (fn));
|
||||
targs = make_scratch_vec (DECL_NTPARMS (fn));
|
||||
|
||||
/* We allow incomplete unification here, because we are going to
|
||||
check all the functions. */
|
||||
|
@ -417,7 +417,7 @@ determine_explicit_specialization (template_id, type, targs_out,
|
|||
}
|
||||
}
|
||||
|
||||
matching_fns = tree_cons (fn, targs, matching_fns);
|
||||
matching_fns = scratch_tree_cons (fn, targs, matching_fns);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3438,6 +3438,7 @@ instantiate_template (tmpl, targ_ptr)
|
|||
}
|
||||
TREE_VEC_ELT (targ_ptr, i) = copy_to_permanent (t);
|
||||
}
|
||||
targ_ptr = copy_to_permanent (targ_ptr);
|
||||
|
||||
if (DECL_TEMPLATE_INFO (tmpl) && DECL_TI_ARGS (tmpl))
|
||||
targ_ptr = add_to_template_args (DECL_TI_ARGS (tmpl), targ_ptr);
|
||||
|
@ -3491,10 +3492,10 @@ fn_type_unification (fn, explicit_targs, targs, args, return_type, strict)
|
|||
{
|
||||
/* This is a template conversion operator. Use the return types
|
||||
as well as the argument types. */
|
||||
fn_arg_types = tree_cons (NULL_TREE,
|
||||
fn_arg_types = scratch_tree_cons (NULL_TREE,
|
||||
TREE_TYPE (TREE_TYPE (fn)),
|
||||
fn_arg_types);
|
||||
decl_arg_types = tree_cons (NULL_TREE,
|
||||
decl_arg_types = scratch_tree_cons (NULL_TREE,
|
||||
return_type,
|
||||
decl_arg_types);
|
||||
}
|
||||
|
@ -3653,7 +3654,7 @@ type_unification_real (tparms, targs, parms, args, nsubsts, subr,
|
|||
nsubsts = 0;
|
||||
ntparms = DECL_NTPARMS (arg);
|
||||
targs = (tree *) alloca (sizeof (tree) * ntparms);
|
||||
parm = tree_cons (NULL_TREE, parm, NULL_TREE);
|
||||
parm = expr_tree_cons (NULL_TREE, parm, NULL_TREE);
|
||||
return
|
||||
type_unification (DECL_INNERMOST_TEMPLATE_PARMS (arg),
|
||||
targs,
|
||||
|
@ -4029,7 +4030,7 @@ get_bindings (fn, decl)
|
|||
tree fn, decl;
|
||||
{
|
||||
int ntparms = DECL_NTPARMS (fn);
|
||||
tree targs = make_tree_vec (ntparms);
|
||||
tree targs = make_scratch_vec (ntparms);
|
||||
int i;
|
||||
|
||||
i = fn_type_unification (fn, NULL_TREE, targs,
|
||||
|
|
|
@ -269,7 +269,7 @@ build_x_typeid (exp)
|
|||
tree bad = throw_bad_typeid ();
|
||||
|
||||
bad = build_compound_expr
|
||||
(tree_cons (NULL_TREE, bad, build_tree_list
|
||||
(expr_tree_cons (NULL_TREE, bad, build_expr_list
|
||||
(NULL_TREE, cp_convert (type, integer_zero_node))));
|
||||
exp = build (COND_EXPR, type, cond, exp, bad);
|
||||
}
|
||||
|
@ -624,8 +624,8 @@ build_dynamic_cast_1 (type, expr)
|
|||
{
|
||||
expr1 = throw_bad_cast ();
|
||||
expr1 = build_compound_expr
|
||||
(tree_cons (NULL_TREE, expr1,
|
||||
build_tree_list (NULL_TREE, cp_convert (type, integer_zero_node))));
|
||||
(expr_tree_cons (NULL_TREE, expr1,
|
||||
build_expr_list (NULL_TREE, cp_convert (type, integer_zero_node))));
|
||||
TREE_TYPE (expr1) = type;
|
||||
result = save_expr (result);
|
||||
return build (COND_EXPR, type, result, result, expr1);
|
||||
|
@ -810,7 +810,7 @@ expand_class_desc (tdecl, type)
|
|||
(NULL_TREE, isvir, tree_cons
|
||||
(NULL_TREE, access, NULL_TREE)))));
|
||||
TREE_HAS_CONSTRUCTOR (elt) = TREE_CONSTANT (elt) = TREE_STATIC (elt) = 1;
|
||||
elts = tree_cons (NULL_TREE, elt, elts);
|
||||
elts = expr_tree_cons (NULL_TREE, elt, elts);
|
||||
base_cnt++;
|
||||
}
|
||||
#if 0
|
||||
|
@ -837,10 +837,10 @@ expand_class_desc (tdecl, type)
|
|||
offset = BINFO_OFFSET (vb);
|
||||
isvir = build_int_2 (1, 0);
|
||||
|
||||
base_list = tree_cons (NULL_TREE, base, base_list);
|
||||
isvir_list = tree_cons (NULL_TREE, isvir, isvir_list);
|
||||
acc_list = tree_cons (NULL_TREE, access, acc_list);
|
||||
off_list = tree_cons (NULL_TREE, offset, off_list);
|
||||
base_list = expr_tree_cons (NULL_TREE, base, base_list);
|
||||
isvir_list = expr_tree_cons (NULL_TREE, isvir, isvir_list);
|
||||
acc_list = expr_tree_cons (NULL_TREE, access, acc_list);
|
||||
off_list = expr_tree_cons (NULL_TREE, offset, off_list);
|
||||
|
||||
base_cnt++;
|
||||
vb = TREE_CHAIN (vb);
|
||||
|
@ -957,7 +957,7 @@ expand_attr_desc (tdecl, type)
|
|||
elems = tree_cons
|
||||
(NULL_TREE, decay_conversion (tdecl), tree_cons
|
||||
(NULL_TREE, decay_conversion (name_string), tree_cons
|
||||
(NULL_TREE, attrval, tree_cons (NULL_TREE, t, NULL_TREE))));
|
||||
(NULL_TREE, attrval, expr_tree_cons (NULL_TREE, t, NULL_TREE))));
|
||||
|
||||
fn = get_identifier ("__rtti_attr");
|
||||
if (IDENTIFIER_GLOBAL_VALUE (fn))
|
||||
|
@ -1199,9 +1199,9 @@ build_t_desc (type, definition)
|
|||
/* Show that we are defining the t_desc for this type. */
|
||||
DECL_INITIAL (tdecl) = error_mark_node;
|
||||
|
||||
parents = build_tree_list (NULL_TREE, integer_zero_node);
|
||||
vbases = build_tree_list (NULL_TREE, integer_zero_node);
|
||||
offsets = build_tree_list (NULL_TREE, integer_zero_node);
|
||||
parents = build_expr_list (NULL_TREE, integer_zero_node);
|
||||
vbases = build_expr_list (NULL_TREE, integer_zero_node);
|
||||
offsets = build_expr_list (NULL_TREE, integer_zero_node);
|
||||
methods = NULL_TREE;
|
||||
ivars = NULL_TREE;
|
||||
|
||||
|
|
|
@ -1317,7 +1317,7 @@ lookup_field (xbasetype, name, protect, want_type)
|
|||
return rval;
|
||||
}
|
||||
|
||||
basetype_chain = build_tree_list (NULL_TREE, basetype_path);
|
||||
basetype_chain = build_expr_list (NULL_TREE, basetype_path);
|
||||
TREE_VIA_PUBLIC (basetype_chain) = TREE_VIA_PUBLIC (basetype_path);
|
||||
TREE_VIA_PROTECTED (basetype_chain) = TREE_VIA_PROTECTED (basetype_path);
|
||||
TREE_VIA_VIRTUAL (basetype_chain) = TREE_VIA_VIRTUAL (basetype_path);
|
||||
|
@ -1348,11 +1348,11 @@ lookup_field (xbasetype, name, protect, want_type)
|
|||
TREE_VIA_PROTECTED (btypes) = TREE_VIA_PROTECTED (base_binfo);
|
||||
TREE_VIA_VIRTUAL (btypes) = TREE_VIA_VIRTUAL (base_binfo);
|
||||
if (TREE_VIA_VIRTUAL (base_binfo))
|
||||
btypes = tree_cons (NULL_TREE,
|
||||
btypes = my_tree_cons (NULL_TREE,
|
||||
TYPE_BINFO (BINFO_TYPE (TREE_VEC_ELT (BINFO_BASETYPES (binfo_h), i))),
|
||||
btypes);
|
||||
else
|
||||
btypes = tree_cons (NULL_TREE,
|
||||
btypes = my_tree_cons (NULL_TREE,
|
||||
TREE_VEC_ELT (BINFO_BASETYPES (binfo_h), i),
|
||||
btypes);
|
||||
obstack_ptr_grow (&search_obstack, btypes);
|
||||
|
@ -1838,7 +1838,7 @@ lookup_fnfields (basetype_path, name, complain)
|
|||
}
|
||||
else
|
||||
{
|
||||
basetype_chain = build_tree_list (NULL_TREE, basetype_path);
|
||||
basetype_chain = build_expr_list (NULL_TREE, basetype_path);
|
||||
TREE_VIA_PUBLIC (basetype_chain) = TREE_VIA_PUBLIC (basetype_path);
|
||||
TREE_VIA_PROTECTED (basetype_chain) = TREE_VIA_PROTECTED (basetype_path);
|
||||
TREE_VIA_VIRTUAL (basetype_chain) = TREE_VIA_VIRTUAL (basetype_path);
|
||||
|
@ -1870,11 +1870,11 @@ lookup_fnfields (basetype_path, name, complain)
|
|||
TREE_VIA_PROTECTED (btypes) = TREE_VIA_PROTECTED (base_binfo);
|
||||
TREE_VIA_VIRTUAL (btypes) = TREE_VIA_VIRTUAL (base_binfo);
|
||||
if (TREE_VIA_VIRTUAL (base_binfo))
|
||||
btypes = tree_cons (NULL_TREE,
|
||||
btypes = my_tree_cons (NULL_TREE,
|
||||
TYPE_BINFO (BINFO_TYPE (TREE_VEC_ELT (BINFO_BASETYPES (binfo_h), i))),
|
||||
btypes);
|
||||
else
|
||||
btypes = tree_cons (NULL_TREE,
|
||||
btypes = my_tree_cons (NULL_TREE,
|
||||
TREE_VEC_ELT (BINFO_BASETYPES (binfo_h), i),
|
||||
btypes);
|
||||
obstack_ptr_grow (&search_obstack, btypes);
|
||||
|
@ -3672,6 +3672,8 @@ reinit_search_statistics ()
|
|||
#endif /* GATHER_STATISTICS */
|
||||
}
|
||||
|
||||
#define scratch_tree_cons expr_tree_cons
|
||||
|
||||
static tree conversions;
|
||||
static void
|
||||
add_conversions (binfo)
|
||||
|
@ -3685,7 +3687,7 @@ add_conversions (binfo)
|
|||
tree tmp = TREE_VEC_ELT (method_vec, i);
|
||||
if (! IDENTIFIER_TYPENAME_P (DECL_NAME (tmp)))
|
||||
break;
|
||||
conversions = tree_cons (binfo, tmp, conversions);
|
||||
conversions = scratch_tree_cons (binfo, tmp, conversions);
|
||||
}
|
||||
SET_BINFO_MARKED (binfo);
|
||||
}
|
||||
|
|
|
@ -1655,14 +1655,9 @@ extern int depth_reached;
|
|||
void
|
||||
print_lang_statistics ()
|
||||
{
|
||||
extern struct obstack maybepermanent_obstack, decl_obstack;
|
||||
extern struct obstack decl_obstack;
|
||||
print_obstack_statistics ("class_obstack", &class_obstack);
|
||||
print_obstack_statistics ("decl_obstack", &decl_obstack);
|
||||
print_obstack_statistics ("permanent_obstack", &permanent_obstack);
|
||||
print_obstack_statistics ("maybepermanent_obstack", &maybepermanent_obstack);
|
||||
#if 0
|
||||
print_inline_obstack_statistics ();
|
||||
#endif
|
||||
print_search_statistics ();
|
||||
print_class_statistics ();
|
||||
#ifdef GATHER_STATISTICS
|
||||
|
@ -1765,8 +1760,6 @@ break_out_target_exprs (t)
|
|||
/* Obstack used for allocating nodes in template function and variable
|
||||
definitions. */
|
||||
|
||||
extern struct obstack *expression_obstack;
|
||||
|
||||
/* Similar to `build_nt', except we build
|
||||
on the permanent_obstack, regardless. */
|
||||
|
||||
|
@ -2063,13 +2056,20 @@ make_temp_vec (len)
|
|||
int len;
|
||||
{
|
||||
register tree node;
|
||||
push_obstacks_nochange ();
|
||||
resume_temporary_allocation ();
|
||||
register struct obstack *ambient_obstack = current_obstack;
|
||||
current_obstack = expression_obstack;
|
||||
node = make_tree_vec (len);
|
||||
pop_obstacks ();
|
||||
current_obstack = ambient_obstack;
|
||||
return node;
|
||||
}
|
||||
|
||||
void
|
||||
push_expression_obstack ()
|
||||
{
|
||||
push_obstacks_nochange ();
|
||||
current_obstack = expression_obstack;
|
||||
}
|
||||
|
||||
/* The type of ARG when used as an lvalue. */
|
||||
|
||||
tree
|
||||
|
|
|
@ -2417,7 +2417,7 @@ build_x_function_call (function, params, decl)
|
|||
decl_addr = build_unary_op (ADDR_EXPR, decl, 0);
|
||||
function = get_member_function_from_ptrfunc (&decl_addr,
|
||||
TREE_OPERAND (function, 1));
|
||||
params = tree_cons (NULL_TREE, decl_addr, params);
|
||||
params = expr_tree_cons (NULL_TREE, decl_addr, params);
|
||||
return build_function_call (function, params);
|
||||
}
|
||||
|
||||
|
@ -2467,7 +2467,7 @@ build_x_function_call (function, params, decl)
|
|||
}
|
||||
else
|
||||
decl = build_c_cast (ctypeptr, decl);
|
||||
params = tree_cons (NULL_TREE, decl, params);
|
||||
params = expr_tree_cons (NULL_TREE, decl, params);
|
||||
}
|
||||
|
||||
return build_function_call (function, params);
|
||||
|
@ -2870,7 +2870,7 @@ convert_arguments (return_loc, typelist, values, fndecl, flags)
|
|||
if (parmval == error_mark_node)
|
||||
return error_mark_node;
|
||||
|
||||
result = tree_cons (NULL_TREE, parmval, result);
|
||||
result = expr_tree_cons (NULL_TREE, parmval, result);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2881,17 +2881,17 @@ convert_arguments (return_loc, typelist, values, fndecl, flags)
|
|||
&& (TYPE_PRECISION (TREE_TYPE (val))
|
||||
< TYPE_PRECISION (double_type_node)))
|
||||
/* Convert `float' to `double'. */
|
||||
result = tree_cons (NULL_TREE, cp_convert (double_type_node, val), result);
|
||||
result = expr_tree_cons (NULL_TREE, cp_convert (double_type_node, val), result);
|
||||
else if (TYPE_LANG_SPECIFIC (TREE_TYPE (val))
|
||||
&& ! TYPE_HAS_TRIVIAL_INIT_REF (TREE_TYPE (val)))
|
||||
{
|
||||
cp_warning ("cannot pass objects of type `%T' through `...'",
|
||||
TREE_TYPE (val));
|
||||
result = tree_cons (NULL_TREE, val, result);
|
||||
result = expr_tree_cons (NULL_TREE, val, result);
|
||||
}
|
||||
else
|
||||
/* Convert `short' and `char' to full-size `int'. */
|
||||
result = tree_cons (NULL_TREE, default_conversion (val), result);
|
||||
result = expr_tree_cons (NULL_TREE, default_conversion (val), result);
|
||||
}
|
||||
|
||||
if (typetail)
|
||||
|
@ -2936,7 +2936,7 @@ convert_arguments (return_loc, typelist, values, fndecl, flags)
|
|||
if (parmval == error_mark_node)
|
||||
return error_mark_node;
|
||||
|
||||
result = tree_cons (0, parmval, result);
|
||||
result = expr_tree_cons (0, parmval, result);
|
||||
typetail = TREE_CHAIN (typetail);
|
||||
/* ends with `...'. */
|
||||
if (typetail == NULL_TREE)
|
||||
|
@ -5146,7 +5146,7 @@ build_x_compound_expr (list)
|
|||
result = build_opfncall (COMPOUND_EXPR, LOOKUP_NORMAL,
|
||||
TREE_VALUE (list), TREE_VALUE (rest), NULL_TREE);
|
||||
if (result)
|
||||
return build_x_compound_expr (tree_cons (NULL_TREE, result, TREE_CHAIN (rest)));
|
||||
return build_x_compound_expr (expr_tree_cons (NULL_TREE, result, TREE_CHAIN (rest)));
|
||||
|
||||
if (! TREE_SIDE_EFFECTS (TREE_VALUE (list)))
|
||||
{
|
||||
|
@ -5163,8 +5163,8 @@ build_x_compound_expr (list)
|
|||
warn_if_unused_value (TREE_VALUE(list));
|
||||
#endif
|
||||
|
||||
return build_compound_expr (tree_cons (NULL_TREE, TREE_VALUE (list),
|
||||
build_tree_list (NULL_TREE, build_x_compound_expr (rest))));
|
||||
return build_compound_expr (expr_tree_cons (NULL_TREE, TREE_VALUE (list),
|
||||
build_expr_list (NULL_TREE, build_x_compound_expr (rest))));
|
||||
}
|
||||
|
||||
/* Given a list of expressions, return a compound expression
|
||||
|
@ -5248,7 +5248,7 @@ build_static_cast (type, expr)
|
|||
if (IS_AGGR_TYPE (type))
|
||||
return build_cplus_new
|
||||
(type, (build_method_call
|
||||
(NULL_TREE, ctor_identifier, build_tree_list (NULL_TREE, expr),
|
||||
(NULL_TREE, ctor_identifier, build_expr_list (NULL_TREE, expr),
|
||||
TYPE_BINFO (type), LOOKUP_NORMAL)));
|
||||
|
||||
expr = decay_conversion (expr);
|
||||
|
@ -5795,7 +5795,7 @@ build_modify_expr (lhs, modifycode, rhs)
|
|||
else
|
||||
{
|
||||
result = build_method_call (lhs, ctor_identifier,
|
||||
build_tree_list (NULL_TREE, rhs),
|
||||
build_expr_list (NULL_TREE, rhs),
|
||||
TYPE_BINFO (lhstype), LOOKUP_NORMAL);
|
||||
if (result == NULL_TREE)
|
||||
return error_mark_node;
|
||||
|
@ -6093,7 +6093,7 @@ build_modify_expr (lhs, modifycode, rhs)
|
|||
if (TREE_SIDE_EFFECTS (lhs))
|
||||
cond = build_compound_expr (tree_cons
|
||||
(NULL_TREE, lhs,
|
||||
build_tree_list (NULL_TREE, cond)));
|
||||
build_expr_list (NULL_TREE, cond)));
|
||||
|
||||
/* Cannot have two identical lhs on this one tree (result) as preexpand
|
||||
calls will rip them out and fill in RTL for them, but when the
|
||||
|
@ -6257,18 +6257,18 @@ build_ptrmemfunc1 (type, delta, idx, pfn, delta2)
|
|||
if (pfn)
|
||||
{
|
||||
u = build_nt (CONSTRUCTOR, NULL_TREE,
|
||||
tree_cons (pfn_identifier, pfn, NULL_TREE));
|
||||
expr_tree_cons (pfn_identifier, pfn, NULL_TREE));
|
||||
}
|
||||
else
|
||||
{
|
||||
u = build_nt (CONSTRUCTOR, NULL_TREE,
|
||||
tree_cons (delta2_identifier, delta2, NULL_TREE));
|
||||
expr_tree_cons (delta2_identifier, delta2, NULL_TREE));
|
||||
}
|
||||
|
||||
u = build_nt (CONSTRUCTOR, NULL_TREE,
|
||||
tree_cons (NULL_TREE, delta,
|
||||
tree_cons (NULL_TREE, idx,
|
||||
tree_cons (NULL_TREE, u, NULL_TREE))));
|
||||
expr_tree_cons (NULL_TREE, delta,
|
||||
expr_tree_cons (NULL_TREE, idx,
|
||||
expr_tree_cons (NULL_TREE, u, NULL_TREE))));
|
||||
|
||||
return digest_init (type, u, (tree*)0);
|
||||
#else
|
||||
|
@ -6287,14 +6287,14 @@ build_ptrmemfunc1 (type, delta, idx, pfn, delta2)
|
|||
{
|
||||
allconstant = TREE_CONSTANT (pfn);
|
||||
allsimple = !! initializer_constant_valid_p (pfn, TREE_TYPE (pfn));
|
||||
u = tree_cons (pfn_field, pfn, NULL_TREE);
|
||||
u = expr_tree_cons (pfn_field, pfn, NULL_TREE);
|
||||
}
|
||||
else
|
||||
{
|
||||
delta2 = convert_and_check (delta_type_node, delta2);
|
||||
allconstant = TREE_CONSTANT (delta2);
|
||||
allsimple = !! initializer_constant_valid_p (delta2, TREE_TYPE (delta2));
|
||||
u = tree_cons (delta2_field, delta2, NULL_TREE);
|
||||
u = expr_tree_cons (delta2_field, delta2, NULL_TREE);
|
||||
}
|
||||
|
||||
delta = convert_and_check (delta_type_node, delta);
|
||||
|
@ -6306,9 +6306,9 @@ build_ptrmemfunc1 (type, delta, idx, pfn, delta2)
|
|||
&& initializer_constant_valid_p (idx, TREE_TYPE (idx));
|
||||
|
||||
u = build (CONSTRUCTOR, subtype, NULL_TREE, u);
|
||||
u = tree_cons (delta_field, delta,
|
||||
tree_cons (idx_field, idx,
|
||||
tree_cons (pfn_or_delta2_field, u, NULL_TREE)));
|
||||
u = expr_tree_cons (delta_field, delta,
|
||||
expr_tree_cons (idx_field, idx,
|
||||
expr_tree_cons (pfn_or_delta2_field, u, NULL_TREE)));
|
||||
u = build (CONSTRUCTOR, type, NULL_TREE, u);
|
||||
TREE_CONSTANT (u) = allconstant;
|
||||
TREE_STATIC (u) = allconstant && allsimple;
|
||||
|
@ -7036,7 +7036,7 @@ convert_for_initialization (exp, type, rhs, flags, errtype, fndecl, parmnum)
|
|||
if (TYPE_HAS_INIT_REF (type))
|
||||
{
|
||||
tree init = build_method_call (exp, ctor_identifier,
|
||||
build_tree_list (NULL_TREE, rhs),
|
||||
build_expr_list (NULL_TREE, rhs),
|
||||
TYPE_BINFO (type), LOOKUP_NORMAL);
|
||||
|
||||
if (init == error_mark_node)
|
||||
|
|
|
@ -986,7 +986,7 @@ process_init_constructor (type, init, elts)
|
|||
allconstant = 0;
|
||||
else if (! initializer_constant_valid_p (next1, TREE_TYPE (next1)))
|
||||
allsimple = 0;
|
||||
members = tree_cons (NULL_TREE, next1, members);
|
||||
members = expr_tree_cons (NULL_TREE, next1, members);
|
||||
}
|
||||
}
|
||||
if (TREE_CODE (type) == RECORD_TYPE)
|
||||
|
@ -1021,7 +1021,7 @@ process_init_constructor (type, init, elts)
|
|||
|
||||
if (! DECL_NAME (field))
|
||||
{
|
||||
members = tree_cons (field, integer_zero_node, members);
|
||||
members = expr_tree_cons (field, integer_zero_node, members);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -1050,7 +1050,7 @@ process_init_constructor (type, init, elts)
|
|||
allconstant = 0;
|
||||
else if (! initializer_constant_valid_p (next1, TREE_TYPE (next1)))
|
||||
allsimple = 0;
|
||||
members = tree_cons (field, next1, members);
|
||||
members = expr_tree_cons (field, next1, members);
|
||||
}
|
||||
for (; field; field = TREE_CHAIN (field))
|
||||
{
|
||||
|
@ -1067,7 +1067,7 @@ process_init_constructor (type, init, elts)
|
|||
allconstant = 0;
|
||||
else if (! initializer_constant_valid_p (next1, TREE_TYPE (next1)))
|
||||
allsimple = 0;
|
||||
members = tree_cons (field, next1, members);
|
||||
members = expr_tree_cons (field, next1, members);
|
||||
}
|
||||
else if (TREE_READONLY (field))
|
||||
error ("uninitialized const member `%s'",
|
||||
|
@ -1149,7 +1149,7 @@ process_init_constructor (type, init, elts)
|
|||
allconstant = 0;
|
||||
else if (initializer_constant_valid_p (next1, TREE_TYPE (next1)) == 0)
|
||||
allsimple = 0;
|
||||
members = tree_cons (field, next1, members);
|
||||
members = expr_tree_cons (field, next1, members);
|
||||
}
|
||||
|
||||
/* If arguments were specified as a list, just remove the ones we used. */
|
||||
|
|
Loading…
Reference in New Issue