aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/expr.c
diff options
context:
space:
mode:
authorPer Bothner <bothner@gcc.gnu.org>1999-02-19 04:32:40 -0800
committerPer Bothner <bothner@gcc.gnu.org>1999-02-19 04:32:40 -0800
commit10b3fbc51554ecdbabd91b418f09ed010dbeca27 (patch)
tree0aaaf75cc8fa11e0d573ae386d82fd85f129447d /gcc/java/expr.c
parent0a3af4d86cbcdb2fd11d4ca6580f572c3be673a6 (diff)
downloadgcc-10b3fbc51554ecdbabd91b418f09ed010dbeca27.zip
gcc-10b3fbc51554ecdbabd91b418f09ed010dbeca27.tar.gz
gcc-10b3fbc51554ecdbabd91b418f09ed010dbeca27.tar.bz2
Use new TRY_FINALLY_EXPR tree node.
h Use new TRY_FINALLY_EXPR tree node. See ChangeLog. From-SVN: r25313
Diffstat (limited to 'gcc/java/expr.c')
-rw-r--r--gcc/java/expr.c26
1 files changed, 5 insertions, 21 deletions
diff --git a/gcc/java/expr.c b/gcc/java/expr.c
index dde41b9..aeded3a 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;