* cp-tree.h (scratch_tree_cons): Remove.
* call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
and perm_tree_cons with plain tree_cons.
* class.c: Likewise.
* decl.c: Likewise.
* decl2.c: Likewise.
* except.c: Likewise.
* expr.c: Likewise.
* init.c: Likewise.
* lex.c: Likewise.
* method.c: Likewise.
* parse.y: Likewise.
* pt.c: Likewise.
* repo.c: Likewise.
* rtti.c: Likewise.
* search.c: Likewise.
* typeck.c: Likewise.
* parse.c: Regenerated.
* tree.c (build_srcloc): Simplify.
From-SVN: r29225
else if (TREE_CODE (TREE_TYPE (TREE_TYPE (instance)))
== METHOD_TYPE)
return build_function_call
- (instance, expr_tree_cons (NULL_TREE, instance_ptr, parms));
+ (instance, tree_cons (NULL_TREE, instance_ptr, parms));
}
}
if (code == COND_EXPR)
{
if (real_lvalue_p (args[i]))
- types[i] = scratch_tree_cons
+ types[i] = tree_cons
(NULL_TREE, build_reference_type (argtypes[i]), types[i]);
- types[i] = scratch_tree_cons
+ types[i] = tree_cons
(NULL_TREE, TYPE_MAIN_VARIANT (argtypes[i]), types[i]);
}
continue;
if (code == COND_EXPR && TREE_CODE (type) == REFERENCE_TYPE)
- types[i] = scratch_tree_cons (NULL_TREE, type, types[i]);
+ types[i] = 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] = scratch_tree_cons (NULL_TREE, type, types[i]);
+ types[i] = 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] = scratch_tree_cons (NULL_TREE, type, types[i]);
+ types[i] = tree_cons (NULL_TREE, type, types[i]);
}
}
else
{
if (code == COND_EXPR && real_lvalue_p (args[i]))
- types[i] = scratch_tree_cons
+ types[i] = 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] = scratch_tree_cons (NULL_TREE, type, types[i]);
+ types[i] = tree_cons (NULL_TREE, type, types[i]);
if (INTEGRAL_TYPE_P (type))
type = type_promotes_to (type);
}
- types[i] = scratch_tree_cons (NULL_TREE, type, types[i]);
+ types[i] = tree_cons (NULL_TREE, type, types[i]);
}
}
TREE_TYPE (t) = build_pointer_type (totype);
args = build_scratch_list (NULL_TREE, expr);
if (TYPE_USES_VIRTUAL_BASECLASSES (totype))
- args = scratch_tree_cons (NULL_TREE, integer_one_node, args);
- args = scratch_tree_cons (NULL_TREE, t, args);
+ args = tree_cons (NULL_TREE, integer_one_node, args);
+ args = tree_cons (NULL_TREE, t, args);
ctors = TREE_VALUE (ctors);
}
if (TREE_CODE (ctor) == TEMPLATE_DECL)
{
- templates = scratch_tree_cons (NULL_TREE, ctor, templates);
+ templates = tree_cons (NULL_TREE, ctor, templates);
candidates =
add_template_candidate (candidates, ctor,
NULL_TREE, args, NULL_TREE, flags,
if (TREE_CODE (fn) == TEMPLATE_DECL)
{
- templates = scratch_tree_cons (NULL_TREE, fn, templates);
+ templates = tree_cons (NULL_TREE, fn, templates);
candidates =
add_template_candidate (candidates, fn, NULL_TREE,
args, totype, flags,
if (TREE_CODE (t) == TEMPLATE_DECL)
{
- templates = scratch_tree_cons (NULL_TREE, t, templates);
+ templates = tree_cons (NULL_TREE, t, templates);
candidates = add_template_candidate
(candidates, t, explicit_targs, args, NULL_TREE,
LOOKUP_NORMAL, DEDUCE_CALL);
if (fns)
{
tree base = TREE_PURPOSE (fns);
- mem_args = scratch_tree_cons (NULL_TREE, build_this (obj), args);
+ mem_args = tree_cons (NULL_TREE, build_this (obj), args);
for (fns = TREE_VALUE (fns); fns; fns = OVL_NEXT (fns))
{
arg2 = integer_zero_node;
if (arg2 && arg3)
- arglist = scratch_tree_cons (NULL_TREE, arg1, scratch_tree_cons
+ arglist = tree_cons (NULL_TREE, arg1, tree_cons
(NULL_TREE, arg2, build_scratch_list (NULL_TREE, arg3)));
else if (arg2)
- arglist = scratch_tree_cons (NULL_TREE, arg1, build_scratch_list (NULL_TREE, arg2));
+ arglist = tree_cons (NULL_TREE, arg1, build_scratch_list (NULL_TREE, arg2));
else
arglist = build_scratch_list (NULL_TREE, arg1);
tree fn = OVL_CURRENT (fns);
if (TREE_CODE (fn) == TEMPLATE_DECL)
{
- templates = scratch_tree_cons (NULL_TREE, fn, templates);
+ templates = tree_cons (NULL_TREE, fn, templates);
candidates
= add_template_candidate (candidates, fn, NULL_TREE,
arglist, TREE_TYPE (fnname),
if (fns)
{
tree basetype = TREE_PURPOSE (fns);
- mem_arglist = scratch_tree_cons (NULL_TREE, build_this (arg1), TREE_CHAIN (arglist));
+ mem_arglist = tree_cons (NULL_TREE, build_this (arg1), TREE_CHAIN (arglist));
for (fns = TREE_VALUE (fns); fns; fns = OVL_NEXT (fns))
{
tree fn = OVL_CURRENT (fns);
if (TREE_CODE (fn) == TEMPLATE_DECL)
{
/* A member template. */
- templates = scratch_tree_cons (NULL_TREE, fn, templates);
+ templates = tree_cons (NULL_TREE, fn, templates);
candidates
= add_template_candidate (candidates, fn, NULL_TREE,
this_arglist, TREE_TYPE (fnname),
if (TREE_CODE (fns) == TREE_LIST)
/* Member functions. */
enforce_access (TREE_PURPOSE (fns), fn);
- return build_function_call (fn, expr_tree_cons (NULL_TREE, addr, args));
+ return build_function_call (fn, tree_cons (NULL_TREE, addr, args));
}
/* If we are doing placement delete we do nothing if we don't find a
/* Member functions. */
enforce_access (TREE_PURPOSE (fns), fn);
return build_function_call
- (fn, expr_tree_cons (NULL_TREE, addr,
- build_expr_list (NULL_TREE, size)));
+ (fn, tree_cons (NULL_TREE, addr,
+ build_expr_list (NULL_TREE, size)));
}
/* finish_function passes LOOKUP_SPECULATIVELY if we're in a
args = build_scratch_list (NULL_TREE, expr);
if (TYPE_USES_VIRTUAL_BASECLASSES (DECL_CONTEXT (fn)))
- args = scratch_tree_cons (NULL_TREE, integer_one_node, args);
- args = scratch_tree_cons (NULL_TREE, t, args);
+ args = tree_cons (NULL_TREE, integer_one_node, args);
+ args = tree_cons (NULL_TREE, t, args);
}
else
args = build_this (expr);
resolution, and must be of the proper type. */
if (DECL_CONSTRUCTOR_P (fn))
{
- converted_args = expr_tree_cons (NULL_TREE, TREE_VALUE (arg), converted_args);
+ converted_args = 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 = expr_tree_cons
+ converted_args = tree_cons
(NULL_TREE, TREE_VALUE (arg), converted_args);
arg = TREE_CHAIN (arg);
parm = TREE_CHAIN (parm);
optimize accordingly. */
my_friendly_assert (TREE_CODE (parmtype) == POINTER_TYPE, 19990811);
t = convert_pointer_to_real (TREE_TYPE (parmtype), TREE_VALUE (arg));
- converted_args = expr_tree_cons (NULL_TREE, t, converted_args);
+ converted_args = tree_cons (NULL_TREE, t, converted_args);
parm = TREE_CHAIN (parm);
arg = TREE_CHAIN (arg);
++i;
|| TREE_CODE (type) == ENUMERAL_TYPE)
&& (TYPE_PRECISION (type) < TYPE_PRECISION (integer_type_node)))
val = default_conversion (val);
- converted_args = expr_tree_cons (NULL_TREE, val, converted_args);
+ converted_args = tree_cons (NULL_TREE, val, converted_args);
}
/* Default arguments */
for (; parm && parm != void_list_node; parm = TREE_CHAIN (parm))
converted_args
- = expr_tree_cons (NULL_TREE,
- convert_default_arg (TREE_VALUE (parm),
- TREE_PURPOSE (parm),
- fn),
- converted_args);
+ = tree_cons (NULL_TREE,
+ convert_default_arg (TREE_VALUE (parm),
+ TREE_PURPOSE (parm),
+ fn),
+ converted_args);
/* Ellipsis */
for (; arg; arg = TREE_CHAIN (arg))
converted_args
- = expr_tree_cons (NULL_TREE,
- convert_arg_to_ellipsis (TREE_VALUE (arg)),
- converted_args);
+ = tree_cons (NULL_TREE,
+ convert_arg_to_ellipsis (TREE_VALUE (arg)),
+ converted_args);
converted_args = nreverse (converted_args);
&& ! (flags & LOOKUP_HAS_IN_CHARGE))
{
flags |= LOOKUP_HAS_IN_CHARGE;
- args = scratch_tree_cons (NULL_TREE, integer_one_node, args);
+ args = tree_cons (NULL_TREE, integer_one_node, args);
}
- mem_args = scratch_tree_cons (NULL_TREE, instance_ptr, args);
+ mem_args = tree_cons (NULL_TREE, instance_ptr, args);
for (; fn; fn = OVL_NEXT (fn))
{
tree t = OVL_CURRENT (fn);
if (TREE_CODE (t) == TEMPLATE_DECL)
{
/* A member template. */
- templates = scratch_tree_cons (NULL_TREE, t, templates);
+ templates = tree_cons (NULL_TREE, t, templates);
candidates =
add_template_candidate (candidates, t, explicit_targs,
this_arglist,
add_warning (winner, loser)
struct z_candidate *winner, *loser;
{
- winner->warnings = expr_tree_cons (NULL_PTR,
- build_expr_ptr_wrapper (loser),
- winner->warnings);
+ winner->warnings = tree_cons (NULL_PTR,
+ build_expr_ptr_wrapper (loser),
+ winner->warnings);
}
/* Returns true iff functions are equivalent. Equivalent functions are
else
{
extern int flag_huge_objects;
- tree elems = expr_tree_cons (NULL_TREE, delta,
- expr_tree_cons (NULL_TREE, integer_zero_node,
+ tree elems = tree_cons (NULL_TREE, delta,
+ tree_cons (NULL_TREE, integer_zero_node,
build_expr_list (NULL_TREE, pfn)));
tree entry = build (CONSTRUCTOR, vtable_entry_type, NULL_TREE, elems);
else
fields = TREE_CHAIN (x);
- access_decls = scratch_tree_cons (NULL_TREE, x, access_decls);
+ access_decls = tree_cons (NULL_TREE, x, access_decls);
continue;
}
fntype = build_pointer_type (fntype);
if (can_convert_arg (target_type, fntype, fn))
- matches = scratch_tree_cons (fn, NULL_TREE, matches);
+ matches = tree_cons (fn, NULL_TREE, matches);
}
}
else if (!is_reference)
instantiation_type = build_pointer_type (instantiation_type);
if (can_convert_arg (target_type, instantiation_type, instantiation))
- matches = scratch_tree_cons (instantiation, fn, matches);
+ matches = tree_cons (instantiation, fn, matches);
}
/* Now, remove all but the most specialized of the matches. */
explicit_targs);
if (match != error_mark_node)
- matches = scratch_tree_cons (match, NULL_TREE, NULL_TREE);
+ matches = tree_cons (match, NULL_TREE, NULL_TREE);
}
}
TREE_VALUE slots, so we cons one up here (we're losing anyway,
so why be clever?). */
for (; overload; overload = OVL_NEXT (overload))
- matches = scratch_tree_cons (NULL_TREE, OVL_CURRENT (overload),
- matches);
+ matches = tree_cons (NULL_TREE, OVL_CURRENT (overload),
+ matches);
print_candidates (matches);
}
cp_build_qualified_type_real ((TYPE), (QUALS), /*complain=*/1)
#define scratchalloc expralloc
-#define scratch_tree_cons expr_tree_cons
#define build_scratch_list build_expr_list
#define make_scratch_vec make_temp_vec
#define push_scratch_obstack push_expression_obstack
that won't happen below because B is not the class
binding level, but is instead the pseudo-global level. */
b->level_chain->tags =
- saveable_tree_cons (name, type, b->level_chain->tags);
+ tree_cons (name, type, b->level_chain->tags);
if (TYPE_SIZE (current_class_type) == NULL_TREE)
CLASSTYPE_TAGS (current_class_type) = b->level_chain->tags;
}
|| (globalize && b->parm_flag == 2))
b = b->level_chain;
- if (toplevel_bindings_p ())
- b->tags = perm_tree_cons (name, type, b->tags);
- else
- b->tags = saveable_tree_cons (name, type, b->tags);
+ b->tags = tree_cons (name, type, b->tags);
if (name)
{
ancestor = namespace_ancestor (current_decl_namespace (), used);
ud = current_binding_level->using_directives;
- ud = perm_tree_cons (used, ancestor, ud);
+ ud = tree_cons (used, ancestor, ud);
current_binding_level->using_directives = ud;
return ud;
}
for (; !val; scope = CP_DECL_CONTEXT (scope))
{
if (spacesp)
- *spacesp = scratch_tree_cons (scope, NULL_TREE, *spacesp);
+ *spacesp = tree_cons (scope, NULL_TREE, *spacesp);
val = binding_for_name (name, scope);
/* Initialize binding for this context. */
mark_addressable (cleanup);
cleanup = build_unary_op (ADDR_EXPR, cleanup, 0);
fcall = build_function_call (Atexit,
- expr_tree_cons (NULL_TREE,
- cleanup,
- NULL_TREE));
+ tree_cons (NULL_TREE,
+ cleanup,
+ NULL_TREE));
finish_expr_stmt (fcall);
}
currently in the temporary obstack. */
if (!TYPE_NEEDS_CONSTRUCTING (TREE_TYPE (decl)))
preserve_initializer ();
- static_aggregates = perm_tree_cons (init, decl, static_aggregates);
+ static_aggregates = tree_cons (init, decl, static_aggregates);
}
}
the information in the TEMPLATE_ID_EXPR. */
SET_DECL_IMPLICIT_INSTANTIATION (decl);
DECL_TEMPLATE_INFO (decl)
- = perm_tree_cons (TREE_OPERAND (orig_declarator, 0),
- TREE_OPERAND (orig_declarator, 1),
- NULL_TREE);
+ = tree_cons (TREE_OPERAND (orig_declarator, 0),
+ TREE_OPERAND (orig_declarator, 1),
+ NULL_TREE);
if (has_default_arg)
{
TREE_CHAIN (list_node) = NULL_TREE;
}
else
- list_node = saveable_tree_cons (init, type, NULL_TREE);
+ list_node = tree_cons (init, type, NULL_TREE);
if (result == NULL_TREE)
{
result = list_node;
enum_overflow = tree_int_cst_lt (enum_next_value, value);
}
- result = saveable_tree_cons (name, decl, NULL_TREE);
+ result = tree_cons (name, decl, NULL_TREE);
return result;
}
}
if (DECL_STATIC_CONSTRUCTOR (fndecl))
- static_ctors = perm_tree_cons (NULL_TREE, fndecl, static_ctors);
+ static_ctors = tree_cons (NULL_TREE, fndecl, static_ctors);
if (DECL_STATIC_DESTRUCTOR (fndecl))
- static_dtors = perm_tree_cons (NULL_TREE, fndecl, static_dtors);
+ static_dtors = tree_cons (NULL_TREE, fndecl, static_dtors);
if (! nested)
{
if (TYPE_USES_VIRTUAL_BASECLASSES (type)
&& ! TYPE_HAS_DESTRUCTOR (type))
- rval = build_compound_expr (expr_tree_cons (NULL_TREE, rval,
+ rval = build_compound_expr (tree_cons (NULL_TREE, rval,
build_expr_list (NULL_TREE, build_vbase_delete (type, decl))));
if (TREE_CODE (decl) != PARM_DECL)
/* If there's a cleanup to do, it belongs in the
TREE_PURPOSE of the following TREE_LIST. */
- *elems = scratch_tree_cons (NULL_TREE, decl, *elems);
+ *elems = tree_cons (NULL_TREE, decl, *elems);
TREE_TYPE (*elems) = type;
}
/* Create the parameters. */
parm_types = void_list_node;
- parm_types = perm_tree_cons (NULL_TREE, integer_type_node, parm_types);
- parm_types = perm_tree_cons (NULL_TREE, integer_type_node, parm_types);
+ parm_types = tree_cons (NULL_TREE, integer_type_node, parm_types);
+ parm_types = tree_cons (NULL_TREE, integer_type_node, parm_types);
type = build_function_type (void_type_node, parm_types);
/* Create the FUNCTION_DECL itself. */
chain = TREE_CHAIN (t);
if (chain && chain != void_type_node)
chain = build_expr_from_tree (chain);
- return expr_tree_cons (purpose, value, chain);
+ return tree_cons (purpose, value, chain);
}
case COMPONENT_REF:
/* Add used to the user's using list. */
DECL_NAMESPACE_USING (user)
- = perm_tree_cons (used, namespace_ancestor (user, used),
- DECL_NAMESPACE_USING (user));
+ = tree_cons (used, namespace_ancestor (user, used),
+ DECL_NAMESPACE_USING (user));
TREE_INDIRECT_USING (DECL_NAMESPACE_USING (user)) = indirect;
/* Add user to the used's users list. */
DECL_NAMESPACE_USERS (used)
- = perm_tree_cons (user, 0, DECL_NAMESPACE_USERS (used));
+ = tree_cons (user, 0, DECL_NAMESPACE_USERS (used));
/* Recursively add all namespaces used. */
for (t = DECL_NAMESPACE_USING (used); t; t = TREE_CHAIN (t))
if (TREE_VALUE (iter) == scope)
{
if (spacesp)
- *spacesp = scratch_tree_cons (TREE_PURPOSE (iter), NULL_TREE,
- *spacesp);
+ *spacesp = tree_cons (TREE_PURPOSE (iter), NULL_TREE,
+ *spacesp);
val1 = binding_for_name (name, TREE_PURPOSE (iter));
/* Resolve ambiguities. */
val = ambiguous_decl (name, val, val1, flags);
mark_used (fn);
/* Arrange to do a dynamically scoped cleanup upon exit from this region. */
cleanup = lookup_name (get_identifier ("__exception_info"), 0);
- cleanup = build_function_call (fn, expr_tree_cons
+ cleanup = build_function_call (fn, tree_cons
(NULL_TREE, cleanup, NULL_TREE));
return cleanup;
}
/* Build up an array of type_infos. */
for (; raises && TREE_VALUE (raises); raises = TREE_CHAIN (raises))
{
- types = expr_tree_cons
+ types = tree_cons
(NULL_TREE, build_eh_type_type (TREE_VALUE (raises)), types);
++count;
}
}
mark_used (fn);
- tmp = expr_tree_cons (NULL_TREE, build_int_2 (count, 0), expr_tree_cons
- (NULL_TREE, decl, NULL_TREE));
+ tmp = tree_cons (NULL_TREE, build_int_2 (count, 0),
+ tree_cons (NULL_TREE, decl, NULL_TREE));
tmp = build_call (fn, TREE_TYPE (TREE_TYPE (fn)), tmp);
expand_expr (tmp, const0_rtx, VOIDmode, EXPAND_NORMAL);
}
mark_used (fn);
- exp = build_function_call (fn, expr_tree_cons
+ exp = build_function_call (fn, tree_cons
(NULL_TREE, size_in_bytes (type), NULL_TREE));
exp = build1 (NOP_EXPR, build_pointer_type (type), exp);
return exp;
}
mark_used (fn);
- e = expr_tree_cons (NULL_TREE, exp, expr_tree_cons
- (NULL_TREE, throw_type, expr_tree_cons
- (NULL_TREE, cleanup, NULL_TREE)));
+ e = tree_cons (NULL_TREE, exp, tree_cons
+ (NULL_TREE, throw_type, tree_cons
+ (NULL_TREE, cleanup, NULL_TREE)));
e = build_function_call (fn, e);
expand_expr (e, const0_rtx, VOIDmode, 0);
}
parameter value. */
mark_addressable (slot);
if (TREE_PERMANENT (args))
- args = expr_tree_cons (0, build1 (ADDR_EXPR, type, slot),
+ args = tree_cons (0, build1 (ADDR_EXPR, type, slot),
TREE_CHAIN (args));
else
TREE_VALUE (args) = build1 (ADDR_EXPR, type, slot);
if (TYPE_USES_VIRTUAL_BASECLASSES (type))
{
if (true_exp == exp)
- parms = expr_tree_cons (NULL_TREE, integer_one_node, parms);
+ parms = tree_cons (NULL_TREE, integer_one_node, parms);
else
- parms = expr_tree_cons (NULL_TREE, integer_zero_node, parms);
+ parms = tree_cons (NULL_TREE, integer_zero_node, parms);
flags |= LOOKUP_HAS_IN_CHARGE;
}
susp = suspend_momentary ();
rval = build_op_new_call
- (code, true_type, expr_tree_cons (NULL_TREE, size, placement),
+ (code, true_type, tree_cons (NULL_TREE, size, placement),
LOOKUP_NORMAL | (use_global_new * LOOKUP_GLOBAL));
rval = cp_convert (build_pointer_type (true_type), rval);
TREE_SIDE_EFFECTS (exp1) = 1;
rval = cp_convert (build_pointer_type (true_type), rval);
rval = build_compound_expr
- (expr_tree_cons (NULL_TREE, exp1,
+ (tree_cons (NULL_TREE, exp1,
build_expr_list (NULL_TREE, rval)));
}
if (rval && TYPE_USES_VIRTUAL_BASECLASSES (true_type))
{
- init = expr_tree_cons (NULL_TREE, integer_one_node, init);
+ init = tree_cons (NULL_TREE, integer_one_node, init);
flags |= LOOKUP_HAS_IN_CHARGE;
}
else
body = NULL_TREE;
- body = expr_tree_cons (NULL_TREE,
+ body = tree_cons (NULL_TREE,
build_delete (ptype, tbase, auto_delete,
LOOKUP_NORMAL|LOOKUP_DESTRUCTOR, 1),
body);
- body = expr_tree_cons (NULL_TREE,
+ body = tree_cons (NULL_TREE,
build_modify_expr (tbase, NOP_EXPR, build (MINUS_EXPR, ptype, tbase, size_exp)),
body);
- body = expr_tree_cons (NULL_TREE,
+ body = 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 = expr_tree_cons (NULL_TREE, tbase_init,
- expr_tree_cons (NULL_TREE, loop, NULL_TREE));
+ loop = tree_cons (NULL_TREE, tbase_init,
+ tree_cons (NULL_TREE, loop, NULL_TREE));
loop = build_compound_expr (loop);
no_destructor:
if (loop && deallocate_expr != integer_zero_node)
{
- body = expr_tree_cons (NULL_TREE, loop,
- expr_tree_cons (NULL_TREE, deallocate_expr, NULL_TREE));
+ body = tree_cons (NULL_TREE, loop,
+ tree_cons (NULL_TREE, deallocate_expr, NULL_TREE));
body = build_compound_expr (body);
}
else
expr = build_scoped_method_call
(ref, base_binfo, dtor_identifier,
build_expr_list (NULL_TREE, this_auto_delete));
- exprstmt = expr_tree_cons (NULL_TREE, expr, exprstmt);
+ exprstmt = tree_cons (NULL_TREE, expr, exprstmt);
}
/* Take care of the remaining baseclasses. */
(ref, base_binfo, dtor_identifier,
build_expr_list (NULL_TREE, integer_zero_node));
- exprstmt = expr_tree_cons (NULL_TREE, expr, exprstmt);
+ exprstmt = tree_cons (NULL_TREE, expr, exprstmt);
}
for (member = TYPE_FIELDS (type); member; member = TREE_CHAIN (member))
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 = expr_tree_cons (NULL_TREE, expr, exprstmt);
+ exprstmt = tree_cons (NULL_TREE, expr, exprstmt);
}
}
{
tree this_addr = convert_force (build_pointer_type (BINFO_TYPE (vbases)),
addr, 0);
- result = expr_tree_cons (NULL_TREE,
+ result = tree_cons (NULL_TREE,
build_delete (TREE_TYPE (this_addr), this_addr,
integer_zero_node,
LOOKUP_NORMAL|LOOKUP_DESTRUCTOR, 0),
}
pending_vtables
- = perm_tree_cons (NULL_TREE,
- get_identifier (TREE_STRING_POINTER (yylval.ttype)),
- pending_vtables);
+ = tree_cons (NULL_TREE,
+ get_identifier (TREE_STRING_POINTER (yylval.ttype)),
+ pending_vtables);
token = real_yylex ();
if (token != END_OF_LINE)
warning ("trailing characters ignored");
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 = expr_tree_cons (NULL_TREE, t, NULL_TREE);
+ t = tree_cons (NULL_TREE, t, NULL_TREE);
for (a = TREE_CHAIN (a); a; a = TREE_CHAIN (a))
- t = expr_tree_cons (NULL_TREE, a, t);
+ t = tree_cons (NULL_TREE, a, t);
t = nreverse (t);
t = build_call (function, TREE_TYPE (TREE_TYPE (function)), t);
c_expand_return (t);
break;}
case 209:
#line 1075 "parse.y"
-{ yyval.ttype = expr_tree_cons (NULL_TREE, yyval.ttype,
+{ yyval.ttype = tree_cons (NULL_TREE, yyval.ttype,
build_expr_list (NULL_TREE, yyvsp[0].ttype)); ;
break;}
case 210:
#line 1078 "parse.y"
-{ yyval.ttype = expr_tree_cons (NULL_TREE, yyval.ttype,
+{ yyval.ttype = tree_cons (NULL_TREE, yyval.ttype,
build_expr_list (NULL_TREE, error_mark_node)); ;
break;}
case 211:
break;}
case 455:
#line 2055 "parse.y"
-{ yyval.ttype = expr_tree_cons (NULL_TREE, yyvsp[0].ttype, yyval.ttype); ;
+{ yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyval.ttype); ;
break;}
case 456:
#line 2058 "parse.y"
break;}
case 458:
#line 2062 "parse.y"
-{ yyval.ttype = expr_tree_cons (yyvsp[-2].ttype, yyvsp[0].ttype, yyval.ttype); ;
+{ yyval.ttype = tree_cons (yyvsp[-2].ttype, yyvsp[0].ttype, yyval.ttype); ;
break;}
case 459:
#line 2067 "parse.y"
nontrivial_exprlist:
expr_no_commas ',' expr_no_commas
- { $$ = expr_tree_cons (NULL_TREE, $$,
+ { $$ = tree_cons (NULL_TREE, $$,
build_expr_list (NULL_TREE, $3)); }
| expr_no_commas ',' error
- { $$ = expr_tree_cons (NULL_TREE, $$,
+ { $$ = tree_cons (NULL_TREE, $$,
build_expr_list (NULL_TREE, error_mark_node)); }
| nontrivial_exprlist ',' expr_no_commas
{ chainon ($$, build_expr_list (NULL_TREE, $3)); }
init
{ $$ = build_tree_list (NULL_TREE, $$); }
| initlist ',' init
- { $$ = expr_tree_cons (NULL_TREE, $3, $$); }
+ { $$ = tree_cons (NULL_TREE, $3, $$); }
/* These are for labeled elements. */
| '[' expr_no_commas ']' init
{ $$ = build_expr_list ($2, $4); }
| identifier ':' init
{ $$ = build_expr_list ($$, $3); }
| initlist ',' identifier ':' init
- { $$ = expr_tree_cons ($3, $5, $$); }
+ { $$ = tree_cons ($3, $5, $$); }
;
fn.defpen:
}
DECL_TEMPLATE_SPECIALIZATIONS (tmpl)
- = perm_tree_cons (args, spec, DECL_TEMPLATE_SPECIALIZATIONS (tmpl));
+ = tree_cons (args, spec, DECL_TEMPLATE_SPECIALIZATIONS (tmpl));
return spec;
}
tree fn;
{
DECL_TEMPLATE_SPECIALIZATIONS (tmpl)
- = perm_tree_cons (fn, spec, DECL_TEMPLATE_SPECIALIZATIONS (tmpl));
+ = tree_cons (fn, spec, DECL_TEMPLATE_SPECIALIZATIONS (tmpl));
return spec;
}
continue;
/* Save this template, and the arguments deduced. */
- templates = scratch_tree_cons (targs, tmpl, templates);
+ templates = tree_cons (targs, tmpl, templates);
}
if (templates && TREE_CHAIN (templates))
if (tmpl && tmpl != error_mark_node)
{
targs = get_bindings (tmpl, decl, explicit_targs);
- templates = scratch_tree_cons (targs, tmpl, NULL_TREE);
+ templates = tree_cons (targs, tmpl, NULL_TREE);
}
}
}
/* Set up the DECL_TEMPLATE_INFO for DECL. */
- DECL_TEMPLATE_INFO (decl)
- = perm_tree_cons (tmpl, targs, NULL_TREE);
+ DECL_TEMPLATE_INFO (decl) = tree_cons (tmpl, targs, NULL_TREE);
/* Mangle the function name appropriately. Note that we do
not mangle specializations of non-template member
return decl;
DECL_TEMPLATE_SPECIALIZATIONS (maintmpl) = CLASSTYPE_TI_SPEC_INFO (type)
- = perm_tree_cons (inner_args, inner_parms,
- DECL_TEMPLATE_SPECIALIZATIONS (maintmpl));
+ = tree_cons (inner_args, inner_parms,
+ DECL_TEMPLATE_SPECIALIZATIONS (maintmpl));
TREE_TYPE (DECL_TEMPLATE_SPECIALIZATIONS (maintmpl)) = type;
return decl;
}
TREE_TYPE (new_tmpl) = TREE_TYPE (decl);
DECL_TI_TEMPLATE (decl) = new_tmpl;
SET_DECL_TEMPLATE_SPECIALIZATION (new_tmpl);
- DECL_TEMPLATE_INFO (new_tmpl) =
- perm_tree_cons (tmpl, args, NULL_TREE);
+ DECL_TEMPLATE_INFO (new_tmpl)
+ = tree_cons (tmpl, args, NULL_TREE);
register_specialization (new_tmpl, tmpl, args);
return decl;
if (primary)
DECL_PRIMARY_TEMPLATE (tmpl) = tmpl;
- info = perm_tree_cons (tmpl, args, NULL_TREE);
+ info = tree_cons (tmpl, args, NULL_TREE);
if (DECL_IMPLICIT_TYPEDEF_P (decl))
{
if (TI_PENDING_TEMPLATE_FLAG (ti))
return;
- *template_tail = perm_tree_cons
- (build_srcloc_here (), d, NULL_TREE);
+ *template_tail = tree_cons (build_srcloc_here (), d, NULL_TREE);
template_tail = &TREE_CHAIN (*template_tail);
TI_PENDING_TEMPLATE_FLAG (ti) = 1;
}
return error_mark_node;
TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO (parm)
- = perm_tree_cons (template2, arglist2, NULL_TREE);
+ = tree_cons (template2, arglist2, NULL_TREE);
TYPE_SIZE (parm) = 0;
return parm;
}
if (gen_tmpl)
{
DECL_TEMPLATE_INFO (r)
- = perm_tree_cons (gen_tmpl, argvec, NULL_TREE);
+ = tree_cons (gen_tmpl, argvec, NULL_TREE);
SET_DECL_IMPLICIT_INSTANTIATION (r);
register_specialization (r, gen_tmpl, argvec);
if (ctx)
DECL_EXTERNAL (r) = 1;
- DECL_TEMPLATE_INFO (r) = perm_tree_cons (tmpl, argvec, NULL_TREE);
+ DECL_TEMPLATE_INFO (r) = tree_cons (tmpl, argvec, NULL_TREE);
SET_DECL_IMPLICIT_INSTANTIATION (r);
if (ctx)
register_specialization (r, gen_tmpl, argvec);
return error_mark_node;
TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO (r)
- = perm_tree_cons (TYPE_NAME (t), argvec, NULL_TREE);
+ = tree_cons (TYPE_NAME (t), argvec, NULL_TREE);
}
break;
/* This is a template conversion operator. Use the return types
as well as the argument types. We use it instead of 'this', since
we could be comparing conversions from different classes. */
- parms = scratch_tree_cons (NULL_TREE, TREE_TYPE (fntype),
- TREE_CHAIN (parms));
- args = scratch_tree_cons (NULL_TREE, return_type, TREE_CHAIN (args));
+ parms = tree_cons (NULL_TREE, TREE_TYPE (fntype),
+ TREE_CHAIN (parms));
+ args = tree_cons (NULL_TREE, return_type, TREE_CHAIN (args));
}
/* We allow incomplete unification without an error message here
args = get_bindings (candidate, decl, explicit_args);
if (args)
- candidates = scratch_tree_cons (NULL_TREE, candidate,
- candidates);
+ candidates = tree_cons (NULL_TREE, candidate, candidates);
}
return most_specialized_instantiation (candidates, explicit_args);
return;
}
- *maybe_template_tail = perm_tree_cons (t, d, NULL_TREE);
+ *maybe_template_tail = tree_cons (t, d, NULL_TREE);
maybe_template_tail = &TREE_CHAIN (*maybe_template_tail);
DECL_MAYBE_TEMPLATE (d) = 1;
}
if (! IDENTIFIER_REPO_USED (id))
{
IDENTIFIER_REPO_USED (id) = 1;
- pending_repo = perm_tree_cons (NULL_TREE, id, pending_repo);
+ pending_repo = tree_cons (NULL_TREE, id, pending_repo);
}
}
if (! flag_use_repository)
return;
- pending_repo = perm_tree_cons (NULL_TREE, t, pending_repo);
+ pending_repo = tree_cons (NULL_TREE, t, pending_repo);
}
/* Note that an inline with external linkage has been used, and offer to
return;
}
- pending_repo = perm_tree_cons (NULL_TREE, fn, pending_repo);
+ pending_repo = tree_cons (NULL_TREE, fn, pending_repo);
}
/* Note that a particular typeinfo node has been used, and offer to
else
orig = NULL_TREE;
- original_repo = perm_tree_cons (orig, id, original_repo);
+ original_repo = tree_cons (orig, id, original_repo);
}
break;
default:
tree bad = throw_bad_typeid ();
bad = build_compound_expr
- (expr_tree_cons (NULL_TREE, bad, build_expr_list
+ (tree_cons (NULL_TREE, bad, build_expr_list
(NULL_TREE, cp_convert (type, integer_zero_node))));
exp = build (COND_EXPR, type, cond, exp, bad);
}
{
expr1 = throw_bad_cast ();
expr1 = build_compound_expr
- (expr_tree_cons (NULL_TREE, expr1,
+ (tree_cons (NULL_TREE, expr1,
build_expr_list (NULL_TREE, cp_convert (type, integer_zero_node))));
TREE_TYPE (expr1) = type;
result = save_expr (result);
(NULL_TREE, isvir, tree_cons
(NULL_TREE, access, NULL_TREE)))));
TREE_HAS_CONSTRUCTOR (elt) = TREE_CONSTANT (elt) = TREE_STATIC (elt) = 1;
- elts = expr_tree_cons (NULL_TREE, elt, elts);
+ elts = tree_cons (NULL_TREE, elt, elts);
base_cnt++;
}
#if 0
offset = BINFO_OFFSET (vb);
isvir = build_int_2 (1, 0);
- 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_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_cnt++;
vb = TREE_CHAIN (vb);
elems = tree_cons
(NULL_TREE, decay_conversion (tdecl), tree_cons
(NULL_TREE, decay_conversion (name_string), tree_cons
- (NULL_TREE, attrval, expr_tree_cons (NULL_TREE, t, NULL_TREE))));
+ (NULL_TREE, attrval, tree_cons (NULL_TREE, t, NULL_TREE))));
fn = get_identifier ("__rtti_attr");
if (IDENTIFIER_GLOBAL_VALUE (fn))
/* This is the first time we noticed an ambiguity. Add
what we previously thought was a reasonable candidate
to the list. */
- lfi->ambiguous = scratch_tree_cons (NULL_TREE, lfi->rval,
- NULL_TREE);
+ lfi->ambiguous = tree_cons (NULL_TREE, lfi->rval, NULL_TREE);
TREE_TYPE (lfi->ambiguous) = error_mark_node;
}
/* Add the new value. */
- lfi->ambiguous = scratch_tree_cons (NULL_TREE, nval,
- lfi->ambiguous);
+ lfi->ambiguous = tree_cons (NULL_TREE, nval, lfi->ambiguous);
TREE_TYPE (lfi->ambiguous) = error_mark_node;
lfi->errstr = "request for member `%D' is ambiguous";
}
if (rval && is_overloaded_fn (rval))
{
- rval = scratch_tree_cons (basetype_path, rval, NULL_TREE);
+ rval = tree_cons (basetype_path, rval, NULL_TREE);
SET_BASELINK_P (rval);
}
idx = lookup_fnfields_here (BINFO_TYPE (binfo), gvnti->name);
if (idx >= 0)
gvnti->fields
- = scratch_tree_cons (binfo,
- TREE_VEC_ELT (CLASSTYPE_METHOD_VEC (type),
- idx),
- gvnti->fields);
+ = tree_cons (binfo,
+ TREE_VEC_ELT (CLASSTYPE_METHOD_VEC (type), idx),
+ gvnti->fields);
return NULL_TREE;
}
#endif /* GATHER_STATISTICS */
}
-#define scratch_tree_cons expr_tree_cons
-
static tree
add_conversions (binfo, data)
tree binfo;
/* Make sure we don't already have this conversion. */
if (! IDENTIFIER_MARKED (name))
{
- *conversions = scratch_tree_cons (binfo, tmp, *conversions);
+ *conversions = tree_cons (binfo, tmp, *conversions);
IDENTIFIER_MARKED (name) = 1;
}
}
{
tree t;
- /* Make sure that we put these on the permanent obstack; up in
- add_pending_template, we pass this return value into perm_tree_cons,
- which also puts it on the permanent_obstack. However, this wasn't
- explicitly doing the same. */
- register struct obstack *ambient_obstack = current_obstack;
- current_obstack = &permanent_obstack;
-
t = make_node (SRCLOC);
SRCLOC_FILE (t) = file;
SRCLOC_LINE (t) = line;
- current_obstack = ambient_obstack;
-
return t;
}
function = TREE_OPERAND (function, 1);
function = get_member_function_from_ptrfunc (&decl_addr, function);
- params = expr_tree_cons (NULL_TREE, decl_addr, params);
+ params = tree_cons (NULL_TREE, decl_addr, params);
return build_function_call (function, params);
}
}
else
decl = build_c_cast (ctypeptr, decl);
- params = expr_tree_cons (NULL_TREE, decl, params);
+ params = tree_cons (NULL_TREE, decl, params);
}
return build_function_call (function, params);
if (parmval == error_mark_node)
return error_mark_node;
- result = expr_tree_cons (NULL_TREE, parmval, result);
+ result = tree_cons (NULL_TREE, parmval, result);
}
else
{
if (TREE_CODE (TREE_TYPE (val)) == REFERENCE_TYPE)
val = convert_from_reference (val);
- result = expr_tree_cons (NULL_TREE,
+ result = tree_cons (NULL_TREE,
convert_arg_to_ellipsis (val),
result);
}
if (parmval == error_mark_node)
return error_mark_node;
- result = expr_tree_cons (0, parmval, result);
+ result = tree_cons (0, parmval, result);
typetail = TREE_CHAIN (typetail);
/* ends with `...'. */
if (typetail == NULL_TREE)
result = build_opfncall (COMPOUND_EXPR, LOOKUP_NORMAL,
TREE_VALUE (list), TREE_VALUE (rest), NULL_TREE);
if (result)
- return build_x_compound_expr (expr_tree_cons (NULL_TREE, result,
+ return build_x_compound_expr (tree_cons (NULL_TREE, result,
TREE_CHAIN (rest)));
if (! TREE_SIDE_EFFECTS (TREE_VALUE (list)))
#endif
return build_compound_expr
- (expr_tree_cons (NULL_TREE, TREE_VALUE (list),
+ (tree_cons (NULL_TREE, TREE_VALUE (list),
build_expr_list (NULL_TREE,
build_x_compound_expr (rest))));
}
if (pfn)
{
u = build_nt (CONSTRUCTOR, NULL_TREE,
- expr_tree_cons (pfn_identifier, pfn, NULL_TREE));
+ tree_cons (pfn_identifier, pfn, NULL_TREE));
}
else
{
u = build_nt (CONSTRUCTOR, NULL_TREE,
- expr_tree_cons (delta2_identifier, delta2, NULL_TREE));
+ tree_cons (delta2_identifier, delta2, NULL_TREE));
}
u = build_nt (CONSTRUCTOR, NULL_TREE,
- expr_tree_cons (NULL_TREE, delta,
- expr_tree_cons (NULL_TREE, idx,
- expr_tree_cons (NULL_TREE, u, NULL_TREE))));
+ tree_cons (NULL_TREE, delta,
+ tree_cons (NULL_TREE, idx,
+ tree_cons (NULL_TREE, u, NULL_TREE))));
return digest_init (type, u, (tree*)0);
#else
{
allconstant = TREE_CONSTANT (pfn);
allsimple = !! initializer_constant_valid_p (pfn, TREE_TYPE (pfn));
- u = expr_tree_cons (pfn_field, pfn, NULL_TREE);
+ u = 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 = expr_tree_cons (delta2_field, delta2, NULL_TREE);
+ u = tree_cons (delta2_field, delta2, NULL_TREE);
}
delta = convert_and_check (delta_type_node, delta);
&& initializer_constant_valid_p (idx, TREE_TYPE (idx));
u = build (CONSTRUCTOR, subtype, NULL_TREE, u);
- u = expr_tree_cons (delta_field, delta,
- expr_tree_cons (idx_field, idx,
- expr_tree_cons (pfn_or_delta2_field, u, NULL_TREE)));
+ u = tree_cons (delta_field, delta,
+ tree_cons (idx_field, idx,
+ 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;