From: Per Bothner Date: Fri, 19 Feb 1999 12:32:40 +0000 (-0800) Subject: Use new TRY_FINALLY_EXPR tree node. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=10b3fbc51554ecdbabd91b418f09ed010dbeca27;p=gcc.git Use new TRY_FINALLY_EXPR tree node. h Use new TRY_FINALLY_EXPR tree node. See ChangeLog. From-SVN: r25313 --- diff --git a/gcc/java/expr.c b/gcc/java/expr.c index dde41b904b4..aeded3a4181 100644 --- a/gcc/java/expr.c +++ b/gcc/java/expr.c @@ -1750,6 +1750,7 @@ java_lang_expand_expr (exp, target, tmode, modifier) { tree current; int has_finally_p; + rtx op0; switch (TREE_CODE (exp)) { @@ -1873,13 +1874,12 @@ java_lang_expand_expr (exp, target, tmode, modifier) return const0_rtx; case TRY_EXPR: - /* We expand a try[-catch][-finally] block */ + /* We expand a try[-catch] block */ /* Expand the try block */ expand_eh_region_start (); expand_expr_stmt (TREE_OPERAND (exp, 0)); expand_start_all_catch (); - has_finally_p = (TREE_OPERAND (exp, 2) ? 1 : 0); /* Expand all catch clauses (EH handlers) */ for (current = TREE_OPERAND (exp, 1); current; @@ -1887,31 +1887,15 @@ java_lang_expand_expr (exp, target, tmode, modifier) { extern rtx return_label; tree type; - /* If we have a finally, the last exception handler is the - one that is supposed to catch everything. */ - if (has_finally_p && !TREE_CHAIN (current)) - type = NULL_TREE; - else - { - tree catch = java_get_catch_block (current, has_finally_p); - tree decl = BLOCK_EXPR_DECLS (catch); - type = (decl ? TREE_TYPE (TREE_TYPE (decl)) : NULL_TREE); - } + tree catch = TREE_OPERAND (current, 0); + tree decl = BLOCK_EXPR_DECLS (catch); + type = (decl ? TREE_TYPE (TREE_TYPE (decl)) : NULL_TREE); start_catch_handler (prepare_eh_table_type (type)); expand_expr_stmt (TREE_OPERAND (current, 0)); expand_resume_after_catch (); end_catch_handler (); } - - /* Expand the finally block, if any */ - if (has_finally_p) - { - tree finally = TREE_OPERAND (exp, 2); - if (FINALLY_EXPR_LABEL (finally)) - emit_label (label_rtx (FINALLY_EXPR_LABEL (finally))); - expand_expr_stmt (FINALLY_EXPR_BLOCK (finally)); - } expand_end_all_catch (); break;