jcf-write.c (generate_bytecode_insns): Handle emitting iinc when result is is needed (target is STACK_TARGET).

* jcf-write.c (generate_bytecode_insns):  Handle emitting iinc
	when result is is needed (target is STACK_TARGET).

From-SVN: r40585
This commit is contained in:
Per Bothner 2001-03-17 12:44:24 -08:00 committed by Per Bothner
parent daaaf29f2a
commit 478e7ed675
2 changed files with 5 additions and 0 deletions

View File

@ -1,5 +1,8 @@
2001-03-17 Per Bothner <per@bothner.com>
* jcf-write.c (generate_bytecode_insns): Handle emitting iinc
when result is is needed (target is STACK_TARGET).
* parse.h (JDEP_SOLV): Removed.
* parse.y (incomplete_class_list): Removed.
(register_incomplete_type): Use JDEP_TO_RESOLVE instead of JDEP_SOLV.

View File

@ -2009,6 +2009,8 @@ generate_bytecode_insns (exp, target, state)
if (TREE_CODE (rhs) == MINUS_EXPR)
value = -value;
emit_iinc (lhs, value, state);
if (target != IGNORE_TARGET)
emit_load (lhs, state);
break;
}
}