aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/jcf-write.c
diff options
context:
space:
mode:
authorAlexandre Petit-Bianco <apbianco@cygnus.com>2000-08-16 00:05:29 +0000
committerAlexandre Petit-Bianco <apbianco@gcc.gnu.org>2000-08-15 17:05:29 -0700
commit81baa09a56392e03742b4b253b9fd82b3ecbd783 (patch)
tree47c003e5fda0d849252fa5da30922b5b0e325a33 /gcc/java/jcf-write.c
parentf507188ad0d1632b463e3f9f46967497db91fc5e (diff)
downloadgcc-81baa09a56392e03742b4b253b9fd82b3ecbd783.zip
gcc-81baa09a56392e03742b4b253b9fd82b3ecbd783.tar.gz
gcc-81baa09a56392e03742b4b253b9fd82b3ecbd783.tar.bz2
jcf-write.c (generate_bytecode_conditional): Re-installed lost Jan 6 2000 patch.
2000-08-14 Alexandre Petit-Bianco <apbianco@cygnus.com> * jcf-write.c (generate_bytecode_conditional): Re-installed lost Jan 6 2000 patch. (generate_bytecode_insns): Check `nargs' before emitting it. * verify.c (merge_type_state): Fixed typo. * ChangeLog: Fixed typo in some jcf-write.c entries mentioning generate_bytecode_{conditional,insns}. (http://gcc.gnu.org/ml/gcc-patches/2000-08/msg00617.html) From-SVN: r35733
Diffstat (limited to 'gcc/java/jcf-write.c')
-rw-r--r--gcc/java/jcf-write.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/java/jcf-write.c b/gcc/java/jcf-write.c
index df50fff..7ab1518 100644
--- a/gcc/java/jcf-write.c
+++ b/gcc/java/jcf-write.c
@@ -1254,7 +1254,7 @@ generate_bytecode_conditional (exp, true_label, false_label,
}
if (integer_zerop (exp1) || integer_zerop (exp0))
{
- generate_bytecode_insns (integer_zerop (exp1) ? exp0 : exp0,
+ generate_bytecode_insns (integer_zerop (exp0) ? exp1 : exp0,
STACK_TARGET, state);
op = op + (OPCODE_ifnull - OPCODE_if_acmpeq);
negop = (op & 1) ? op - 1 : op + 1;
@@ -2565,6 +2565,9 @@ generate_bytecode_insns (exp, target, state)
if (interface)
{
DECL_CONTEXT (f) = saved_context;
+ if (nargs <= 0)
+ fatal ("Illegal number of arguments to invokeinterface, nargs=%d",
+ nargs);
OP1 (nargs);
OP1 (0);
}