Commit 68ad9159 by Jason Merrill Committed by Jason Merrill

tree.h (IS_EXPR_CODE_CLASS): Also include 'r' and 's'.

        * tree.h (IS_EXPR_CODE_CLASS): Also include 'r' and 's'.
        (EXPR_CHECK): Don't check for 'r' or 's' if we're
        checking IS_EXPR_CODE_CLASS.
        * calls.c (calls_function_1): Likewise.
        * fold-const.c (fold): Likewise.
        * tree.c (iterative_hash_expr): Likewise.
        * tree-inline.c (walk_tree, copy_tree_r): Likewise.

From-SVN: r70617
parent c8e60672
2003-08-20 Jason Merrill <jason@redhat.com>
* tree.h (IS_EXPR_CODE_CLASS): Also include 'r' and 's'.
(EXPR_CHECK): Don't check for 'r' or 's' if we're
checking IS_EXPR_CODE_CLASS.
* calls.c (calls_function_1): Likewise.
* fold-const.c (fold): Likewise.
* tree.c (iterative_hash_expr): Likewise.
* tree-inline.c (walk_tree, copy_tree_r): Likewise.
2003-08-20 Gunther Nikl <gni@gecko.de> 2003-08-20 Gunther Nikl <gni@gecko.de>
* config/m68k/m68k.c (m68k_output_mi_thunk): delete obsolete code * config/m68k/m68k.c (m68k_output_mi_thunk): delete obsolete code
......
...@@ -262,8 +262,8 @@ calls_function_1 (tree exp, int which) ...@@ -262,8 +262,8 @@ calls_function_1 (tree exp, int which)
break; break;
} }
/* Only expressions, references, and blocks can contain calls. */ /* Only expressions and blocks can contain calls. */
if (! IS_EXPR_CODE_CLASS (class) && class != 'r' && class != 'b') if (! IS_EXPR_CODE_CLASS (class) && class != 'b')
return 0; return 0;
for (i = 0; i < length; i++) for (i = 0; i < length; i++)
......
...@@ -5032,7 +5032,7 @@ fold (tree expr) ...@@ -5032,7 +5032,7 @@ fold (tree expr)
do arithmetic on them. */ do arithmetic on them. */
wins = 0; wins = 0;
} }
else if (IS_EXPR_CODE_CLASS (kind) || kind == 'r') else if (IS_EXPR_CODE_CLASS (kind))
{ {
int len = first_rtl_op (code); int len = first_rtl_op (code);
int i; int i;
......
...@@ -1661,15 +1661,11 @@ walk_tree (tree *tp, walk_tree_fn func, void *data, void *htab_) ...@@ -1661,15 +1661,11 @@ walk_tree (tree *tp, walk_tree_fn func, void *data, void *htab_)
} }
/* Handle common cases up front. */ /* Handle common cases up front. */
if (IS_EXPR_CODE_CLASS (TREE_CODE_CLASS (code)) if (IS_EXPR_CODE_CLASS (TREE_CODE_CLASS (code)))
|| TREE_CODE_CLASS (code) == 'r'
|| TREE_CODE_CLASS (code) == 's')
#else /* INLINER_FOR_JAVA */ #else /* INLINER_FOR_JAVA */
if (code != EXIT_BLOCK_EXPR if (code != EXIT_BLOCK_EXPR
&& code != SAVE_EXPR && code != SAVE_EXPR
&& (IS_EXPR_CODE_CLASS (TREE_CODE_CLASS (code)) && IS_EXPR_CODE_CLASS (TREE_CODE_CLASS (code)))
|| TREE_CODE_CLASS (code) == 'r'
|| TREE_CODE_CLASS (code) == 's'))
#endif /* INLINER_FOR_JAVA */ #endif /* INLINER_FOR_JAVA */
{ {
int i, len; int i, len;
...@@ -1862,9 +1858,7 @@ copy_tree_r (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED) ...@@ -1862,9 +1858,7 @@ copy_tree_r (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
/* We make copies of most nodes. */ /* We make copies of most nodes. */
if (IS_EXPR_CODE_CLASS (TREE_CODE_CLASS (code)) if (IS_EXPR_CODE_CLASS (TREE_CODE_CLASS (code))
|| TREE_CODE_CLASS (code) == 'r'
|| TREE_CODE_CLASS (code) == 'c' || TREE_CODE_CLASS (code) == 'c'
|| TREE_CODE_CLASS (code) == 's'
|| code == TREE_LIST || code == TREE_LIST
|| code == TREE_VEC || code == TREE_VEC
|| (*lang_hooks.tree_inlining.tree_chain_matters_p) (*tp)) || (*lang_hooks.tree_inlining.tree_chain_matters_p) (*tp))
......
...@@ -3527,7 +3527,7 @@ iterative_hash_expr (tree t, hashval_t val) ...@@ -3527,7 +3527,7 @@ iterative_hash_expr (tree t, hashval_t val)
else else
abort (); abort ();
} }
else if (IS_EXPR_CODE_CLASS (class) || class == 'r') else if (IS_EXPR_CODE_CLASS (class))
{ {
val = iterative_hash_object (code, val); val = iterative_hash_object (code, val);
......
...@@ -57,7 +57,8 @@ extern const char tree_code_type[]; ...@@ -57,7 +57,8 @@ extern const char tree_code_type[];
expression. */ expression. */
#define IS_EXPR_CODE_CLASS(CLASS) \ #define IS_EXPR_CODE_CLASS(CLASS) \
((CLASS) == '<' || (CLASS) == '1' || (CLASS) == '2' || (CLASS) == 'e') ((CLASS) == '<' || (CLASS) == '1' || (CLASS) == '2' || (CLASS) == 'e' \
|| (CLASS) == 'r' || (CLASS) == 's')
/* Number of argument-words in each kind of tree-node. */ /* Number of argument-words in each kind of tree-node. */
...@@ -291,7 +292,7 @@ struct tree_common GTY(()) ...@@ -291,7 +292,7 @@ struct tree_common GTY(())
#define EXPR_CHECK(T) __extension__ \ #define EXPR_CHECK(T) __extension__ \
({ const tree __t = (T); \ ({ const tree __t = (T); \
char const __c = TREE_CODE_CLASS (TREE_CODE (__t)); \ char const __c = TREE_CODE_CLASS (TREE_CODE (__t)); \
if (!IS_EXPR_CODE_CLASS (__c) && __c != 'r' && __c != 's') \ if (!IS_EXPR_CODE_CLASS (__c)) \
tree_class_check_failed (__t, 'e', __FILE__, __LINE__, \ tree_class_check_failed (__t, 'e', __FILE__, __LINE__, \
__FUNCTION__); \ __FUNCTION__); \
__t; }) __t; })
......
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