]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
*** empty log message ***
authorAlexandre Petit-Bianco <apbianco@redhat.com>
Wed, 1 Aug 2001 02:28:43 +0000 (19:28 -0700)
committerAlexandre Petit-Bianco <apbianco@gcc.gnu.org>
Wed, 1 Aug 2001 02:28:43 +0000 (19:28 -0700)
From-SVN: r44528

12 files changed:
gcc/ChangeLog
gcc/cp/ChangeLog
gcc/cp/tree.c
gcc/expr.c
gcc/java/ChangeLog
gcc/java/check-init.c
gcc/java/decl.c
gcc/java/jcf-write.c
gcc/java/parse.y
gcc/tree.c
gcc/tree.def
gcc/tree.h

index f5d2ec568cd55a6cbe9389fa890ae7e7b2359337..aae0db0f68bf29155c8610131737e5a67089f124 100644 (file)
@@ -1,3 +1,19 @@
+2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
+
+       * expr.c (safe_from_p): Use WITH_CLEANUP_EXPR_RTL instead of
+       RTL_EXPR_RTL while handling WITH_CLEANUP_EXPR nodes. Fixed typo in
+       comment.
+       (expand_expr): Use WITH_CLEANUP_EXPR_RTL instead of RTL_EXPR_RTL
+       while handling WITH_CLEANUP_EXPR node. Use second operand calling
+       expand_decl_cleanup.
+       * tree.c (firt_rtl_op): The third operand of WITH_CLEANUP_EXPR is
+       the first RTX.
+       (simple_cst_equal): WITH_CLEANUP_EXPR node to use its second
+       operand while calling simple_cst_equal.
+       * tree.def (WITH_CLEANUP_EXPR): Switched operands: the second
+       operand is the cleanup expression, the third is the RTL_EXPR.
+       * tree.h (WITH_CLEANUP_EXPR_RTL): New macro.    
+
 2001-07-31  Jeff Sturm  <jsturm@one-point.com>
 
         * except.c (duplicate_eh_regions): Test n_array[i] for NULL.
index 39689e8cd3bf46a2984dd615e99f1e6574eab65d..393da2e43322384baa4acf8f6dda276d9bfb5aa2 100644 (file)
@@ -1,3 +1,8 @@
+2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
+
+       * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
+       operand while calling cp_tree_equal.
+
 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
 
        The 3.0 ABI no longer has vbase pointer fields.
index 59c08bcbf13d5650081a9017b1e418bf5069a57f..348942c29ea561bd539c81f757c2098f030082ab 100644 (file)
@@ -1958,7 +1958,7 @@ cp_tree_equal (t1, t2)
       cmp = cp_tree_equal (TREE_OPERAND (t1, 0), TREE_OPERAND (t2, 0));
       if (cmp <= 0)
        return cmp;
-      return cp_tree_equal (TREE_OPERAND (t1, 2), TREE_OPERAND (t1, 2));
+      return cp_tree_equal (TREE_OPERAND (t1, 1), TREE_OPERAND (t1, 1));
 
     case COMPONENT_REF:
       if (TREE_OPERAND (t1, 1) == TREE_OPERAND (t2, 1))
index bd60d3f59b96163e13b8557dc413e9305c5fabbd..80f73f854dcd2dcf06730257db3f9595c1bd1526 100644 (file)
@@ -5858,7 +5858,7 @@ safe_from_p (x, exp, top_p)
          break;
 
        case WITH_CLEANUP_EXPR:
-         exp_rtl = RTL_EXPR_RTL (exp);
+         exp_rtl = WITH_CLEANUP_EXPR_RTL (exp);
          break;
 
        case CLEANUP_POINT_EXPR:
@@ -6452,7 +6452,7 @@ expand_expr (exp, target, tmode, modifier)
        lineno = EXPR_WFL_LINENO (exp);
        if (EXPR_WFL_EMIT_LINE_NOTE (exp))
          emit_line_note (input_filename, lineno);
-       /* Possibly avoid switching back and force here.  */
+       /* Possibly avoid switching back and forth here.  */
        to_return = expand_expr (EXPR_WFL_NODE (exp), target, tmode, modifier);
        input_filename = saved_input_filename;
        lineno = saved_lineno;
@@ -7376,16 +7376,16 @@ expand_expr (exp, target, tmode, modifier)
       }
 
     case WITH_CLEANUP_EXPR:
-      if (RTL_EXPR_RTL (exp) == 0)
+      if (WITH_CLEANUP_EXPR_RTL (exp) == 0)
        {
-         RTL_EXPR_RTL (exp)
+         WITH_CLEANUP_EXPR_RTL (exp)
            = expand_expr (TREE_OPERAND (exp, 0), target, tmode, ro_modifier);
-         expand_decl_cleanup (NULL_TREE, TREE_OPERAND (exp, 2));
+         expand_decl_cleanup (NULL_TREE, TREE_OPERAND (exp, 1));
 
          /* That's it for this cleanup.  */
-         TREE_OPERAND (exp, 2) = 0;
+         TREE_OPERAND (exp, 1) = 0;
        }
-      return RTL_EXPR_RTL (exp);
+      return WITH_CLEANUP_EXPR_RTL (exp);
 
     case CLEANUP_POINT_EXPR:
       {
index a694743e6ce67fb7aac14b4d2303abd2d2c1cd80..69f5705516216178692b5cf3d80dfc5995019a1c 100644 (file)
@@ -1,3 +1,16 @@
+2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
+
+       * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
+       second operand calling check_init.
+       * decl.c (complete_start_java_method): Swaped second and third
+       arguments while creating WITH_CLEANUP_EXPR node.
+       * jcf-write.c (generate_bytecode_insns): Use second operand
+       instead of third when handling WITH_CLEANUP_EXPR.
+       * parse.y (java_complete_lhs): Expand second operand of
+       WITH_CLEANUP_EXPR nodes.
+       (patch_synchronized_statement): Swaped second and third arguments
+       while creating WITH_CLEANUP_EXPR node.
+
 2001-07-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
 
        * parse.y (create_interface): Avoid cyclic inheritance report when
index 05e3aa31ae627ee5e7e199e83d5813eec2d50ac1..0e340dd85416a3a0c5d299eb6efd6216bae4954c 100644 (file)
@@ -537,7 +537,7 @@ check_init (exp, before)
 #endif
        check_init (TREE_OPERAND (exp, 0), before);
        UNION (alt->combined, alt->combined, before);
-       check_init (TREE_OPERAND (exp, 2), alt->combined);
+       check_init (TREE_OPERAND (exp, 1), alt->combined);
        return;
       }
 
index 1e8c934f6e2179035e3226f2d99935d89818c88e..3b856db50d87f186c15c0b98b3c6dd2955118bc0 100644 (file)
@@ -1738,7 +1738,7 @@ complete_start_java_method (fndecl)
          tree function_body = DECL_FUNCTION_BODY (fndecl);
          tree body = BLOCK_EXPR_BODY (function_body);
          lock = build (WITH_CLEANUP_EXPR, void_type_node,
-                       enter,  NULL_TREE, exit);
+                       enter, exit, NULL_TREE);
          TREE_SIDE_EFFECTS (lock) = 1;
          lock = build (COMPOUND_EXPR, TREE_TYPE (body), lock, body);
          TREE_SIDE_EFFECTS (lock) = 1;
index 9a4eb5b21c6b9d34ca3ffa411e98298c7942d9b7..ca453c8edd9b96483d947886d86728aad2679276 100644 (file)
@@ -2293,7 +2293,7 @@ generate_bytecode_insns (exp, target, state)
        label->next = state->labeled_blocks;
        state->labeled_blocks = label;
        state->num_finalizers++;
-       label->u.labeled_block = TREE_OPERAND (exp, 2);
+       label->u.labeled_block = TREE_OPERAND (exp, 1);
        label->v.start_label = get_jcf_label_here (state);
        if (target != IGNORE_TARGET)
          abort ();
index 1fb08bcd343e04d34dd034cea13d9a19f4e5ac3c..05be63314a8f256f05053c1e4a173184c6e59802 100644 (file)
@@ -11326,7 +11326,7 @@ java_complete_lhs (node)
 
     case WITH_CLEANUP_EXPR:
       COMPLETE_CHECK_OP_0 (node);
-      COMPLETE_CHECK_OP_2 (node);
+      COMPLETE_CHECK_OP_1 (node);
       CAN_COMPLETE_NORMALLY (node) = 
        CAN_COMPLETE_NORMALLY (TREE_OPERAND (node, 0));
       TREE_TYPE (node) = void_type_node;
@@ -15326,7 +15326,7 @@ patch_synchronized_statement (node, wfl_op1)
                        build (WITH_CLEANUP_EXPR, NULL_TREE,
                               build (COMPOUND_EXPR, NULL_TREE,
                                      assignment, enter),
-                              NULL_TREE, exit),
+                              exit, NULL_TREE),
                        block));
   node = build_expr_block (node, expr_decl);
 
index 7ad066538d0823f205b161681e75bd59218c3697..9ce19057b6aae3e7b712f1fffbe277a180329eac 100644 (file)
@@ -1628,8 +1628,7 @@ first_rtl_op (code)
     case RTL_EXPR:
       return 0;
     case WITH_CLEANUP_EXPR:
-      /* Should be defined to be 2.  */
-      return 1;
+      return 2;
     case METHOD_CALL_EXPR:
       return 3;
     default:
@@ -3679,7 +3678,7 @@ simple_cst_equal (t1, t2)
       if (cmp <= 0)
        return cmp;
 
-      return simple_cst_equal (TREE_OPERAND (t1, 2), TREE_OPERAND (t1, 2));
+      return simple_cst_equal (TREE_OPERAND (t1, 1), TREE_OPERAND (t1, 1));
 
     case COMPONENT_REF:
       if (TREE_OPERAND (t1, 1) == TREE_OPERAND (t2, 1))
index 56bc8ef15e72c87c55740e596cb60d3c8b9cab4e..84801e674fd2ac87fd0aec73bcad1ae6e1a7a140 100644 (file)
@@ -472,8 +472,8 @@ DEFTREECODE (METHOD_CALL_EXPR, "method_call_expr", 'e', 4)
 
 /* Specify a value to compute along with its corresponding cleanup.
    Operand 0 argument is an expression whose value needs a cleanup.
-   Operand 1 is an RTL_EXPR which will eventually represent that value.
-   Operand 2 is the cleanup expression for the object.
+   Operand 1 is the cleanup expression for the object.
+   Operand 2 is an RTL_EXPR which will eventually represent that value.
      The RTL_EXPR is used in this expression, which is how the expression
      manages to act on the proper value.
    The cleanup is executed by the first enclosing CLEANUP_POINT_EXPR, if
index efd4e6cd9532da2bf1f161fce0fb7fd152758217..70143515808a91a307011a3988fd1683453102c4 100644 (file)
@@ -792,6 +792,10 @@ struct tree_vec
 #define RTL_EXPR_SEQUENCE(NODE) (*(struct rtx_def **) &EXPR_CHECK (NODE)->exp.operands[0])
 #define RTL_EXPR_RTL(NODE) (*(struct rtx_def **) &EXPR_CHECK (NODE)->exp.operands[1])
 
+/* In a WITH_CLEANUP_EXPR node.  */
+#define WITH_CLEANUP_EXPR_RTL(NODE) \
+  (*(struct rtx_def **) &EXPR_CHECK (NODE)->exp.operands[2])
+
 /* In a CONSTRUCTOR node.  */
 #define CONSTRUCTOR_ELTS(NODE) TREE_OPERAND (NODE, 1)