tree.h (TREE_CODE_LENGTH): New macro.

* tree.h (TREE_CODE_LENGTH): New macro.
	* c-common.c (c_find_base_decl): Use it.
	* expr.c (safe_from_p): Likewise.
	* print-tree.c (print_node): Likewise.
	* tree.c (make_node, copy_node, get_identifier): Likewie.
	(first_rtl_op, contains_placeholder_p, substitute_in_expr): Likewise.
	(build, build_nt, build_parse_node, simple_cst_equal): Likewise.
	* fold-const.c (make_range): Likewise.
	(fold): Likewise; also use first_rtl_op.
	* c-iterate.c (collect_iterators): Use first_rtl_op.
	* calls.c (calls_function_1): Likewise; also rename TYPE to CLASS.
	Use IS_EXPR_CODE_CLASS.
	(preexpand_calls): Likewise.
	* ggc-common.c (ggc_mark_trees): Rework to use first_rtl_op
	and TREE_CODE_LENGTH.
	* stmt.c (warn_if_unused_value): If no operands, no unused value.
	* ch/lang.c (deep_const_expr): Use first_rtl_op.
	* ch/satisfy.c (satisfy): Use TREE_CODE_LENGTH.
	* cp/method.c (mangle_expression): Use TREE_CODE_LENGTH.
	* cp/tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
	(built_min, cp_tree_equal): Likewise.

From-SVN: r34295
This commit is contained in:
Richard Kenner 2000-05-31 07:55:53 -04:00
parent d067e2aae0
commit efd5878344

View File

@ -3337,7 +3337,7 @@ make_range (exp, pin_p, plow, phigh)
if (TREE_CODE_CLASS (code) == '2'
|| TREE_CODE_CLASS (code) == '<'
|| (TREE_CODE_CLASS (code) == 'e'
&& tree_code_length[(int) code] > 1))
&& TREE_CODE_LENGTH (code) > 1))
arg1 = TREE_OPERAND (exp, 1);
}
@ -4748,10 +4748,9 @@ fold (expr)
do arithmetic on them. */
wins = 0;
}
else if (kind == 'e' || kind == '<'
|| kind == '1' || kind == '2' || kind == 'r')
else if (IS_EXPR_CODE_CLASS (kind) || kind == 'r')
{
register int len = tree_code_length[(int) code];
register int len = TREE_CODE_LENGTH (code);
register int i;
for (i = 0; i < len; i++)
{