diff graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/CompareNode.java @ 19115:1d33f713897d

More restructuring of CompareNode. Move unorderedIsTrue flag to a field.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Wed, 04 Feb 2015 02:38:59 +0100
parents b1dbba1f3f03
children 7227f5671c87
line wrap: on
line diff
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/CompareNode.java	Wed Feb 04 02:28:28 2015 +0100
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/CompareNode.java	Wed Feb 04 02:38:59 2015 +0100
@@ -40,6 +40,7 @@
 public abstract class CompareNode extends BinaryOpLogicNode {
 
     protected final Condition condition;
+    protected final boolean unorderedIsTrue;
 
     /**
      * Constructs a new Compare instruction.
@@ -47,9 +48,10 @@
      * @param x the instruction producing the first input to the instruction
      * @param y the instruction that produces the second input to this instruction
      */
-    public CompareNode(Condition condition, ValueNode x, ValueNode y) {
+    public CompareNode(Condition condition, boolean unorderedIsTrue, ValueNode x, ValueNode y) {
         super(x, y);
         this.condition = condition;
+        this.unorderedIsTrue = unorderedIsTrue;
     }
 
     /**
@@ -66,7 +68,9 @@
      *
      * @return {@code true} if unordered inputs produce true
      */
-    public abstract boolean unorderedIsTrue();
+    public final boolean unorderedIsTrue() {
+        return this.unorderedIsTrue;
+    }
 
     private ValueNode optimizeConditional(Constant constant, ConditionalNode conditionalNode, ConstantReflectionProvider constantReflection, Condition cond) {
         Constant trueConstant = conditionalNode.trueValue().asConstant();