From d1016559e583631b7aa96cfeb23573da8d03a7c1 Mon Sep 17 00:00:00 2001 From: bothner Date: Sun, 15 Nov 1998 14:12:42 +0000 Subject: 8 * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): New macro. * jcf-io.c (find_class): Simpler/cleaner structure fixes a bug. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23659 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/java/jcf-parse.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'gcc/java/jcf-parse.c') diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c index dd411b376f6..9e277dad36b 100644 --- a/gcc/java/jcf-parse.c +++ b/gcc/java/jcf-parse.c @@ -155,6 +155,18 @@ set_source_filename (jcf, index) DECL_LINENUMBERS_OFFSET (current_method) = JCF_TELL (jcf) - 2; \ JCF_SKIP (jcf, n * 4); } +#define HANDLE_EXCEPTIONS_ATTRIBUTE(COUNT) \ +{ \ + int n = COUNT; \ + tree list = DECL_FUNCTION_THROWS (current_method); \ + while (--n >= 0) \ + { \ + tree thrown_class = get_class_constant (jcf, JCF_readu2 (jcf)); \ + list = tree_cons (NULL_TREE, thrown_class, list); \ + } \ + DECL_FUNCTION_THROWS (current_method) = nreverse (list); \ +} + #include "jcf-reader.c" static int yydebug; -- cgit v1.2.3