Commit 138657ec by Andrew Haley Committed by Andrew Haley

parse.y (source_end_java_method): If the current method contains any exception handlers...

1999-05-11  Andrew Haley  <aph@cygnus.com>
        * parse.y (source_end_java_method): If the current method contains
        any exception handlers, force asynchronous_exceptions: this is
        necessary because signal handlers in libjava may throw exceptions.
        * decl.c (end_java_method): Ditto.

From-SVN: r26884
parent 6a09296d
1999-05-11 Andrew Haley <aph@cygnus.com>
* parse.y (source_end_java_method): If the current method contains
any exception handlers, force asynchronous_exceptions: this is
necessary because signal handlers in libjava may throw exceptions.
* decl.c (end_java_method): Ditto.
1999-05-11 Tom Tromey <tromey@cygnus.com>
* Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
......
......@@ -32,6 +32,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "java-tree.h"
#include "jcf.h"
#include "toplev.h"
#include "except.h"
static tree push_jvm_slot PROTO ((int, tree));
static tree builtin_function PROTO ((const char *, tree,
......@@ -1642,6 +1643,7 @@ void
end_java_method ()
{
tree fndecl = current_function_decl;
int flag_asynchronous_exceptions = asynchronous_exceptions;
expand_end_bindings (getdecls (), 1, 0);
/* pop out of function */
......@@ -1657,9 +1659,17 @@ end_java_method ()
/* Generate rtl for function exit. */
expand_function_end (input_filename, lineno, 0);
/* FIXME: If the current method contains any exception handlers,
force asynchronous_exceptions: this is necessary because signal
handlers in libjava may throw exceptions. This is far from being
a perfect solution, but it's better than doing nothing at all.*/
if (catch_clauses)
asynchronous_exceptions = 1;
/* Run the optimizers and output assembler code for this function. */
rest_of_compilation (fndecl);
current_function_decl = NULL_TREE;
permanent_allocation (1);
asynchronous_exceptions = flag_asynchronous_exceptions;
}
......@@ -62,6 +62,7 @@ definitions and other extensions. */
#include "convert.h"
#include "buffer.h"
#include "xref.h"
#include "except.h"
#ifndef DIR_SEPARATOR
#define DIR_SEPARATOR '/'
......@@ -5516,6 +5517,7 @@ static void
source_end_java_method ()
{
tree fndecl = current_function_decl;
int flag_asynchronous_exceptions = asynchronous_exceptions;
java_parser_context_save_global ();
lineno = ctxp->last_ccb_indent1;
......@@ -5548,6 +5550,13 @@ source_end_java_method ()
emit_handlers ();
expand_function_end (input_filename, lineno, 0);
/* FIXME: If the current method contains any exception handlers,
force asynchronous_exceptions: this is necessary because signal
handlers in libjava may throw exceptions. This is far from being
a perfect solution, but it's better than doing nothing at all.*/
if (catch_clauses)
asynchronous_exceptions = 1;
/* Run the optimizers and output assembler code for this function. */
rest_of_compilation (fndecl);
}
......@@ -5555,6 +5564,7 @@ source_end_java_method ()
current_function_decl = NULL_TREE;
/* permanent_allocation (1); */
java_parser_context_restore_global ();
asynchronous_exceptions = flag_asynchronous_exceptions;
}
/* Record EXPR in the current function block. Complements compound
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment