summaryrefslogtreecommitdiff
path: root/gcc/java/jcf-parse.c
diff options
context:
space:
mode:
authorbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>1998-11-15 14:12:42 +0000
committerbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>1998-11-15 14:12:42 +0000
commitd1016559e583631b7aa96cfeb23573da8d03a7c1 (patch)
tree60f9d02b1b9c05fbbb80d07ea00e1cbb99a19cd1 /gcc/java/jcf-parse.c
parent7f0c41050fb30616668626bbefcbda7b1e679c7e (diff)
downloadgcc-d1016559e583631b7aa96cfeb23573da8d03a7c1.tar.gz
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
Diffstat (limited to 'gcc/java/jcf-parse.c')
-rw-r--r--gcc/java/jcf-parse.c12
1 files changed, 12 insertions, 0 deletions
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;