Commit 90afe2c9 by Zack Weinberg

tree.def (documentation): Remove mention of class 'b'.

	* tree.def (documentation): Remove mention of class 'b'.
	(BLOCK): Now in class 'x'.
	* c-common.c (verify_tree): Remove case 'b'.
	* c-typeck.c (same_translation_unit_p): Change 'b' to 'x'.
	* calls.c (calls_function_1): Control cannot get past the switch
	when exp is a BLOCK.
	* print-tree.c (print_node): Move code for class 'b' to the class
	'c'/'x' switch, as case BLOCK.
	* tree.c (tree_size, make_node_stat, tree_node_structure): Likewise.
	(unsafe_for_reeval, substitute_placeholder_in_expr)
	(stabilize_reference_1): Remove case 'b'.
	* tree-browser.c (browse_tree): Change all tests for TREE_CODE_CLASS
	of something being 'b' to tests for TREE_CODE of something being
	BLOCK.
	* tree-ssa-operands.c (get_expr_operands): Likewise.
ada:
	* trans.c (gnat_stabilize_reference_1): Remove case 'b'.

From-SVN: r81831
parent eadf906f
2004-05-13 Zack Weinberg <zack@codesourcery.com>
* tree.def (documentation): Remove mention of class 'b'.
(BLOCK): Now in class 'x'.
* c-common.c (verify_tree): Remove case 'b'.
* c-typeck.c (same_translation_unit_p): Change 'b' to 'x'.
* calls.c (calls_function_1): Control cannot get past the switch
when exp is a BLOCK.
* print-tree.c (print_node): Move code for class 'b' to the class
'c'/'x' switch, as case BLOCK.
* tree.c (tree_size, make_node_stat, tree_node_structure): Likewise.
(unsafe_for_reeval, substitute_placeholder_in_expr)
(stabilize_reference_1): Remove case 'b'.
* tree-browser.c (browse_tree): Change all tests for TREE_CODE_CLASS
of something being 'b' to tests for TREE_CODE of something being
BLOCK.
* tree-ssa-operands.c (get_expr_operands): Likewise.
2004-05-13 Diego Novillo <dnovillo@redhat.com>
* tree-gimple.c: Rename from tree-simple.c.
......
2004-05-13 Zack Weinberg <zack@codesourcery.com>
* trans.c (gnat_stabilize_reference_1): Remove case 'b'.
2004-05-13 Diego Novillo <dnovillo@redhat.com>
Merge from tree-ssa-20020619-branch.
......
......@@ -5431,7 +5431,6 @@ gnat_stabilize_reference_1 (tree e, int force)
case 'x':
case 't':
case 'd':
case 'b':
case '<':
case 's':
case 'e':
......
......@@ -1692,7 +1692,6 @@ verify_tree (tree x, struct tlist **pbefore_sp, struct tlist **pno_sp,
case 'r':
case '<':
case '2':
case 'b':
case 'e':
case 's':
case 'x':
......
......@@ -640,7 +640,7 @@ same_translation_unit_p (tree t1, tree t2)
{
case 'd': t1 = DECL_CONTEXT (t1); break;
case 't': t1 = TYPE_CONTEXT (t1); break;
case 'b': t1 = BLOCK_SUPERCONTEXT (t1); break;
case 'x': t1 = BLOCK_SUPERCONTEXT (t1); break; /* assume block */
default: abort ();
}
......@@ -649,7 +649,7 @@ same_translation_unit_p (tree t1, tree t2)
{
case 'd': t2 = DECL_CONTEXT (t2); break;
case 't': t2 = TYPE_CONTEXT (t2); break;
case 'b': t2 = BLOCK_SUPERCONTEXT (t2); break;
case 'x': t2 = BLOCK_SUPERCONTEXT (t2); break; /* assume block */
default: abort ();
}
......
......@@ -259,8 +259,9 @@ calls_function_1 (tree exp, int which)
break;
}
/* Only expressions and blocks can contain calls. */
if (! IS_EXPR_CODE_CLASS (class) && class != 'b')
/* Only expressions and blocks can contain calls.
Blocks were handled above. */
if (! IS_EXPR_CODE_CLASS (class))
return 0;
for (i = 0; i < length; i++)
......
......@@ -569,15 +569,6 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
print_node_brief (file, "chain", TREE_CHAIN (node), indent + 4);
break;
case 'b':
print_node (file, "vars", BLOCK_VARS (node), indent + 4);
print_node (file, "supercontext", BLOCK_SUPERCONTEXT (node), indent + 4);
print_node (file, "subblocks", BLOCK_SUBBLOCKS (node), indent + 4);
print_node (file, "chain", BLOCK_CHAIN (node), indent + 4);
print_node (file, "abstract_origin",
BLOCK_ABSTRACT_ORIGIN (node), indent + 4);
break;
case 'e':
case '<':
case '1':
......@@ -733,6 +724,16 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
}
break;
case BLOCK:
print_node (file, "vars", BLOCK_VARS (node), indent + 4);
print_node (file, "supercontext", BLOCK_SUPERCONTEXT (node),
indent + 4);
print_node (file, "subblocks", BLOCK_SUBBLOCKS (node), indent + 4);
print_node (file, "chain", BLOCK_CHAIN (node), indent + 4);
print_node (file, "abstract_origin",
BLOCK_ABSTRACT_ORIGIN (node), indent + 4);
break;
default:
if (TREE_CODE_CLASS (TREE_CODE (node)) == 'x')
lang_hooks.print_xnode (file, node, indent);
......
......@@ -239,21 +239,21 @@ browse_tree (tree begin)
break;
case TB_SUBBLOCKS:
if (head && TREE_CODE_CLASS (TREE_CODE (head)) == 'b')
if (head && TREE_CODE (head) == BLOCK)
TB_SET_HEAD (BLOCK_SUBBLOCKS (head));
else
TB_WF;
break;
case TB_SUPERCONTEXT:
if (head && TREE_CODE_CLASS (TREE_CODE (head)) == 'b')
if (head && TREE_CODE (head) == BLOCK)
TB_SET_HEAD (BLOCK_SUPERCONTEXT (head));
else
TB_WF;
break;
case TB_VARS:
if (head && TREE_CODE_CLASS (TREE_CODE (head)) == 'b')
if (head && TREE_CODE (head) == BLOCK)
TB_SET_HEAD (BLOCK_VARS (head));
else if (head && TREE_CODE (head) == BIND_EXPR)
TB_SET_HEAD (TREE_OPERAND (head, 0));
......@@ -361,7 +361,7 @@ browse_tree (tree begin)
case TB_ABSTRACT_ORIGIN:
if (head && TREE_CODE_CLASS (TREE_CODE (head)) == 'd')
TB_SET_HEAD (DECL_ABSTRACT_ORIGIN (head));
else if (head && TREE_CODE_CLASS (TREE_CODE (head)) == 'b')
else if (head && TREE_CODE (head) == BLOCK)
TB_SET_HEAD (BLOCK_ABSTRACT_ORIGIN (head));
else
TB_WF;
......@@ -584,7 +584,7 @@ browse_tree (tree begin)
case TB_CHAIN:
/* Don't go further if it's the last node in this chain. */
if (head && TREE_CODE_CLASS (TREE_CODE (head)) == 'b')
if (head && TREE_CODE (head) == BLOCK)
TB_SET_HEAD (BLOCK_CHAIN (head));
else if (head && TREE_CHAIN (head))
TB_SET_HEAD (TREE_CHAIN (head));
......
......@@ -824,7 +824,7 @@ get_expr_operands (tree stmt, tree *expr_p, int flags, voperands_t prev_vops)
/* Expressions that make no memory references. */
if (class == 'c'
|| class == 't'
|| class == 'b'
|| code == BLOCK
|| code == FUNCTION_DECL
|| code == EXC_PTR_EXPR
|| code == FILTER_EXPR
......
......@@ -155,9 +155,6 @@ tree_size (tree node)
case 't': /* a type node */
return sizeof (struct tree_type);
case 'b': /* a lexical block node */
return sizeof (struct tree_block);
case 'r': /* a reference */
case 'e': /* an expression */
case 's': /* an expression with side effects */
......@@ -206,6 +203,7 @@ tree_size (tree node)
case EEXIT_NODE: return sizeof (struct tree_eref_common);
case STATEMENT_LIST: return sizeof (struct tree_statement_list);
case BLOCK: return sizeof (struct tree_block);
default:
return lang_hooks.tree_size (code);
......@@ -252,10 +250,6 @@ make_node_stat (enum tree_code code MEM_STAT_DECL)
kind = t_kind;
break;
case 'b': /* a lexical block */
kind = b_kind;
break;
case 's': /* an expression with side effects */
kind = s_kind;
break;
......@@ -284,6 +278,8 @@ make_node_stat (enum tree_code code MEM_STAT_DECL)
kind = phi_kind;
else if (code == SSA_NAME)
kind = ssa_name_kind;
else if (code == BLOCK)
kind = b_kind;
else
kind = x_kind;
break;
......@@ -1494,7 +1490,6 @@ tree_node_structure (tree t)
{
case 'd': return TS_DECL;
case 't': return TS_TYPE;
case 'b': return TS_BLOCK;
case 'r': case '<': case '1': case '2': case 'e': case 's':
return TS_EXP;
default: /* 'c' and 'x' */
......@@ -1521,6 +1516,7 @@ tree_node_structure (tree t)
case SSA_NAME: return TS_SSA_NAME;
case PLACEHOLDER_EXPR: return TS_COMMON;
case STATEMENT_LIST: return TS_STATEMENT_LIST;
case BLOCK: return TS_BLOCK;
default:
abort ();
......@@ -1646,7 +1642,6 @@ unsafe_for_reeval (tree expr)
case 't': /* a type node */
case 'x': /* something random, like an identifier or an ERROR_MARK. */
case 'd': /* A decl node */
case 'b': /* A block node */
return 0;
case 'e': /* an expression */
......@@ -2078,7 +2073,6 @@ substitute_placeholder_in_expr (tree exp, tree obj)
{
case 'c':
case 'd':
case 'b':
return exp;
case 'x':
......@@ -2267,7 +2261,6 @@ stabilize_reference_1 (tree e)
case 'x':
case 't':
case 'd':
case 'b':
case '<':
case 's':
case 'e':
......
......@@ -24,7 +24,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
/* The third argument can be:
'x' for an exceptional code (fits no category).
't' for a type object code.
'b' for a lexical block.
'c' for codes for constants.
'd' for codes for declarations (also serving as variable refs).
'r' for codes for references to storage.
......@@ -86,7 +85,7 @@ DEFTREECODE (TREE_VEC, "tree_vec", 'x', 0)
instance of an inline function).
TREE_ASM_WRITTEN is nonzero if the block was actually referenced
in the generated assembly. */
DEFTREECODE (BLOCK, "block", 'b', 0)
DEFTREECODE (BLOCK, "block", 'x', 0)
/* Each data type is represented by a tree node whose code is one of
the following: */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment