]> gcc.gnu.org Git - gcc.git/commitdiff
except.c, [...] (expand_resume_after_catch): new function.
authorAndrew Haley <aph@cygnus.com>
Mon, 25 Jan 1999 10:32:18 +0000 (10:32 +0000)
committerAndrew Haley <aph@gcc.gnu.org>
Mon, 25 Jan 1999 10:32:18 +0000 (10:32 +0000)
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.

From-SVN: r24857

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

index 9b67b0ab46e4e21c18a00596071f704ce592e34f..b2419f8d0eeef73cba560caaa2686009945cb1e3 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 4628823f11d26c027aebff501ee6afb47b063b40..7c393be6c461428db796dd3b5f859b88bd778c9d 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 77cd45e80881fffea97b110a10aefae4608bbbd1..55e6ef63d2ce75b2d5a0f39c4b71171c21ebd1b9 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 f6e77b0d447ad904837fa72bc1814f767d059b6c..cdc123d744aa2edbf945ec82642bbef7309a9852 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));
This page took 0.078372 seconds and 5 git commands to generate.