Use new TRY_FINALLY_EXPR tree node.
authorPer Bothner <bothner@gcc.gnu.org>
Fri, 19 Feb 1999 12:32:39 +0000 (04:32 -0800)
committerPer Bothner <bothner@gcc.gnu.org>
Fri, 19 Feb 1999 12:32:39 +0000 (04:32 -0800)
(
Use new TRY_FINALLY_EXPR tree node.  See ChangeLog.

From-SVN: r25312

gcc/java/check-init.c

index acd63c1..24dcc2c 100644 (file)
@@ -543,7 +543,6 @@ check_init (exp, before)
       {
        tree try_clause = TREE_OPERAND (exp, 0);
        tree clause = TREE_OPERAND (exp, 1);
-        tree finally = TREE_OPERAND (exp, 2);
        words save = ALLOC_WORDS (num_current_words);
        words tmp = ALLOC_WORDS (num_current_words);
        struct alternatives alt;
@@ -559,17 +558,22 @@ check_init (exp, before)
            check_init (catch_clause, tmp);
            done_alternative (tmp, &alt);
          }
-       if (finally != NULL_TREE)
-         {
-           check_init (finally, save);
-           UNION (alt.combined, alt.combined, save);
-         }
        FREE_WORDS (tmp);
        FREE_WORDS (save);
        END_ALTERNATIVES (before, alt);
       }
     return;
 
+    case TRY_FINALLY_EXPR:
+      {
+       words tmp = ALLOC_WORDS (num_current_words);
+       COPY (tmp, before);
+       check_init (TREE_OPERAND (exp, 0), tmp);
+       check_init (TREE_OPERAND (exp, 1), before);
+       FREE_WORDS (tmp);
+      }
+      return;
+
     case RETURN_EXPR:
     case THROW_EXPR:
       if (TREE_OPERAND (exp, 0))