Patch: Java: Fix jcf-write fold() fallout
Bryce McKinlay
mckinlay@redhat.com
Sat May 29 01:03:00 GMT 2004
Per Bothner wrote:
> Tom Tromey wrote:
>
>> I think UNLT_EXPR(a,b) means "a < b, or a and b are unordered".
>
>
> If so, UNLT_EXPR(a, b) is the same as Java's "!(a >= b)",
> and so letting the existing GT_EXPR handle it and then reversing
> the result is correct, as (I think) Tom is saying.
>
> In any case, the comments are in tree.def are unacceptably unclear.
Does this look correct?
Index: jcf-write.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/jcf-write.c,v
retrieving revision 1.145
diff -u -r1.145 jcf-write.c
--- jcf-write.c 28 May 2004 23:59:49 -0000 1.145
+++ jcf-write.c 29 May 2004 00:52:01 -0000
@@ -1179,25 +1179,25 @@
op = OPCODE_if_icmpne;
goto compare;
- case UNLT_EXPR:
+ case UNLE_EXPR:
unordered = 1;
case GT_EXPR:
op = OPCODE_if_icmpgt;
goto compare;
- case UNGT_EXPR:
+ case UNGE_EXPR:
unordered = 1;
case LT_EXPR:
op = OPCODE_if_icmplt;
goto compare;
- case UNLE_EXPR:
+ case UNLT_EXPR:
unordered = 1;
case GE_EXPR:
op = OPCODE_if_icmpge;
goto compare;
- case UNGE_EXPR:
+ case UNGT_EXPR:
unordered = 1;
case LE_EXPR:
op = OPCODE_if_icmple;
Bryce
More information about the Java-patches
mailing list