OSDN Git Service

Mon Jan 25 17:39:19 1999 Andrew Haley <aph@cygnus.com>
authoraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 25 Jan 1999 10:32:18 +0000 (10:32 +0000)
committeraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 25 Jan 1999 10:32:18 +0000 (10:32 +0000)
        * except.c, java-except.h (expand_resume_after_catch): new
        function.
        * expr.c (java_lang_expand_expr): call expand_resume_after_catch
        to branch back to main flow of control after a catch block.

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

gcc/java/ChangeLog
gcc/java/except.c
gcc/java/expr.c
gcc/java/java-except.h

index 9b67b0a..b2419f8 100644 (file)
@@ -1,3 +1,10 @@
+Mon Jan 25 17:39:19 1999  Andrew Haley  <aph@cygnus.com>
+
+        * except.c, java-except.h (expand_resume_after_catch): new
+        function.
+        * expr.c (java_lang_expand_expr): call expand_resume_after_catch
+        to branch back to main flow of control after a catch block.
+
 Sat Jan 23 23:02:43 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * Makefile.in (parse.o): Depend on $(CONFIG_H) and
index 4628823..7c393be 100644 (file)
@@ -293,3 +293,12 @@ emit_handlers ()
       emit_label (funcend);
     }
 }
+
+/* Resume executing at the statement immediately after the end of an
+   exception region. */
+
+void
+expand_resume_after_catch ()
+{
+  expand_goto (top_label_entry (&caught_return_label_stack));
+}
index 77cd45e..55e6ef6 100644 (file)
@@ -1896,16 +1896,7 @@ java_lang_expand_expr (exp, target, tmode, modifier)
          start_catch_handler (prepare_eh_table_type (type));
          expand_expr_stmt (TREE_OPERAND (current, 0));
 
-         /* Need to expand a goto to the end of the function here,
-            but not for the catch everything handler. */
-         if (type)
-           {
-             if (return_label)
-               emit_jump (return_label);
-             else
-               fatal ("No return_label for this function - "
-                      "java_lang_expand_expr");
-           }
+         expand_resume_after_catch ();
          end_catch_handler ();
        }
 
index f6e77b0..cdc123d 100644 (file)
@@ -71,3 +71,4 @@ extern void maybe_end_try PROTO ((int));
 
 extern int add_handler PROTO ((int, int, tree, tree));
 
+extern void expand_resume_after_catch PROTO ((void));