diff options
author | Per Bothner <per@bothner.com> | 2001-03-23 17:13:30 -0800 |
---|---|---|
committer | Per Bothner <bothner@gcc.gnu.org> | 2001-03-23 17:13:30 -0800 |
commit | fa029f453a551f13f36cd997618629998696849e (patch) | |
tree | b1eef7b31ca3d14d2d241bc45c3318313375f660 /gcc/java/verify.c | |
parent | 3c45ffa5146a7132ea4867981f0d2a737d656e54 (diff) | |
download | gcc-fa029f453a551f13f36cd997618629998696849e.zip gcc-fa029f453a551f13f36cd997618629998696849e.tar.gz gcc-fa029f453a551f13f36cd997618629998696849e.tar.bz2 |
re PR java/1208 (Gcj can't compile a class file it generates.)
e
* verify.c (verify_jvm_instructions): Replace 3 pop_type by POP_TYPE
macro for better error pin-pointing.
* java-tree.h: Fix typo in comment.
* jcf-write.c (generate_bytecode_insns): Changes to TRY_FINALLY_EXPR.
Don't include jsr/goto in exception range.
Check if start and end of exception range are the same (also TRY_EXPR).
Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
However, do emit the following goto even if try_block is empty.
Defer freeing exception_decl until after the finalizer, to make
sure the local isn't reused in the finalizer. Fixes PR java/1208.
* parse.y (java_complete_lhs): If the try-clause is empty, just
return the finally-clause and vice versa.
From-SVN: r40801
Diffstat (limited to 'gcc/java/verify.c')
-rw-r--r-- | gcc/java/verify.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/java/verify.c b/gcc/java/verify.c index bb10b44..9b83363 100644 --- a/gcc/java/verify.c +++ b/gcc/java/verify.c @@ -1137,7 +1137,7 @@ verify_jvm_instructions (jcf, byte_ops, length) case OPCODE_athrow: /* FIXME: athrow also empties the stack. */ - pop_type (throwable_type_node); + POP_TYPE (throwable_type_node, "missing throwable at athrow" ); INVALIDATE_PC; break; @@ -1156,7 +1156,7 @@ verify_jvm_instructions (jcf, byte_ops, length) { jint low, high; - pop_type (int_type_node); + POP_TYPE (int_type_node, "missing int for tableswitch"); while (PC%4) { if (byte_ops[PC++]) @@ -1179,7 +1179,7 @@ verify_jvm_instructions (jcf, byte_ops, length) { jint npairs, last = 0, not_registered = 1; - pop_type (int_type_node); + POP_TYPE (int_type_node, "missing int for lookupswitch"); while (PC%4) { if (byte_ops[PC++]) |