From: Per Bothner Date: Tue, 2 Feb 1999 12:20:34 +0000 (-0800) Subject: Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bb31662fadb407a0b9ed2d44a8171d830a060b05;p=gcc.git Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'. Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'. * jcf-write.c (generate_bytecode_return): New function. (generate_bytecode_insns): Use it, for RETURN_EXPR. * jcf-write.c (generate_bytecode_insns): For REAL_CST that is 0 or 1, generate special [fd]const_[01] instructions. * jcf-parse.c (yyparse): Don't emit_register_classes if -fsyntax-only. * verify.c (verify_jvm_instructions): Do INVALIDATE_PC after handling OPCODE_lookupswitch or OPCODE_tableswitch. From-SVN: r24970 --- diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 63e1254ced9..292cf4ca4b3 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,17 @@ +Tue Feb 2 10:39:47 1999 Per Bothner + + Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'. + * jcf-write.c (generate_bytecode_return): New function. + (generate_bytecode_insns): Use it, for RETURN_EXPR. + + * jcf-write.c (generate_bytecode_insns): For REAL_CST that is 0 or 1, + generate special [fd]const_[01] instructions. + + * jcf-parse.c (yyparse): Don't emit_register_classes if -fsyntax-only. + + * verify.c (verify_jvm_instructions): Do INVALIDATE_PC after + handling OPCODE_lookupswitch or OPCODE_tableswitch. + Mon Feb 1 20:44:47 1999 Per Bothner * parse.y (patch_method_invocation): Handle calling static methods,