OSDN Git Service

* tree.h (IS_EXPR_CODE_CLASS): Also include 'r' and 's'.
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 20 Aug 2003 21:46:48 +0000 (21:46 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 20 Aug 2003 21:46:48 +0000 (21:46 +0000)
        (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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70617 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/calls.c
gcc/fold-const.c
gcc/tree-inline.c
gcc/tree.c
gcc/tree.h

index b50dbb1..2ff2414 100644 (file)
@@ -1,3 +1,13 @@
+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>
 
        * config/m68k/m68k.c (m68k_output_mi_thunk): delete obsolete code
index bdb4288..f4bf6d3 100644 (file)
@@ -262,8 +262,8 @@ calls_function_1 (tree exp, int which)
       break;
     }
 
-  /* Only expressions, references, and blocks can contain calls.  */
-  if (! IS_EXPR_CODE_CLASS (class) && class != 'r' && class != 'b')
+  /* Only expressions and blocks can contain calls.  */
+  if (! IS_EXPR_CODE_CLASS (class) && class != 'b')
     return 0;
 
   for (i = 0; i < length; i++)
index 488239d..ef7c086 100644 (file)
@@ -5032,7 +5032,7 @@ fold (tree expr)
           do arithmetic on them.  */
        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 i;
index 07664bd..8893b26 100644 (file)
@@ -1661,15 +1661,11 @@ walk_tree (tree *tp, walk_tree_fn func, void *data, void *htab_)
     }
 
   /* Handle common cases up front.  */
-  if (IS_EXPR_CODE_CLASS (TREE_CODE_CLASS (code))
-      || TREE_CODE_CLASS (code) == 'r'
-      || TREE_CODE_CLASS (code) == 's')
+  if (IS_EXPR_CODE_CLASS (TREE_CODE_CLASS (code)))
 #else /* INLINER_FOR_JAVA */
   if (code != EXIT_BLOCK_EXPR
       && code != SAVE_EXPR
-      && (IS_EXPR_CODE_CLASS (TREE_CODE_CLASS (code))
-         || TREE_CODE_CLASS (code) == 'r'
-         || TREE_CODE_CLASS (code) == 's'))
+      && IS_EXPR_CODE_CLASS (TREE_CODE_CLASS (code)))
 #endif /* INLINER_FOR_JAVA */
     {
       int i, len;
@@ -1862,9 +1858,7 @@ copy_tree_r (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
 
   /* We make copies of most nodes.  */
   if (IS_EXPR_CODE_CLASS (TREE_CODE_CLASS (code))
-      || TREE_CODE_CLASS (code) == 'r'
       || TREE_CODE_CLASS (code) == 'c'
-      || TREE_CODE_CLASS (code) == 's'
       || code == TREE_LIST
       || code == TREE_VEC
       || (*lang_hooks.tree_inlining.tree_chain_matters_p) (*tp))
index 3bae512..d38a87d 100644 (file)
@@ -3527,7 +3527,7 @@ iterative_hash_expr (tree t, hashval_t val)
       else
        abort ();
     }
-  else if (IS_EXPR_CODE_CLASS (class) || class == 'r')
+  else if (IS_EXPR_CODE_CLASS (class))
     {
       val = iterative_hash_object (code, val);
 
index 6826109..0563f08 100644 (file)
@@ -57,7 +57,8 @@ extern const char tree_code_type[];
    expression.  */
 
 #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.  */
 
@@ -291,7 +292,7 @@ struct tree_common GTY(())
 #define EXPR_CHECK(T) __extension__                                    \
 ({  const tree __t = (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__,           \
                               __FUNCTION__);                           \
     __t; })