git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@824 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 26 years ago
parent 1d511e8ab8
commit cf14cfde92
  1. 14
      jode/jode/expr/CompareToIntOperator.java

@ -22,15 +22,15 @@ import jode.type.Type;
import jode.decompiler.TabbedPrintWriter; import jode.decompiler.TabbedPrintWriter;
public class CompareToIntOperator extends Operator { public class CompareToIntOperator extends Operator {
boolean allowsNAN; boolean allowsNaN;
boolean greaterOnNAN; boolean greaterOnNaN;
Type compareType; Type compareType;
public CompareToIntOperator(Type type, boolean greaterOnNAN) { public CompareToIntOperator(Type type, boolean greaterOnNaN) {
super(Type.tInt, 0); super(Type.tInt, 0);
compareType = type; compareType = type;
this.allowsNAN = (type == Type.tFloat || type == Type.tDouble); this.allowsNaN = (type == Type.tFloat || type == Type.tDouble);
this.greaterOnNAN = greaterOnNAN; this.greaterOnNaN = greaterOnNaN;
initOperands(2); initOperands(2);
} }
@ -55,8 +55,8 @@ public class CompareToIntOperator extends Operator {
{ {
subExpressions[0].dumpExpression(writer, 550); subExpressions[0].dumpExpression(writer, 550);
writer.print(" <=>"); writer.print(" <=>");
if (allowsNAN) if (allowsNaN)
writer.print(greaterOnNAN ? "g" : "l"); writer.print(greaterOnNaN ? "g" : "l");
writer.print(" "); writer.print(" ");
subExpressions[1].dumpExpression(writer, 551); subExpressions[1].dumpExpression(writer, 551);
} }

Loading…
Cancel
Save