Mercurial > hg > truffle
comparison graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/CompareNode.java @ 19602:d5042bcd422f
Remove isCommutative method from BinaryCommutative interface.
author | Roland Schatz <roland.schatz@oracle.com> |
---|---|
date | Fri, 27 Feb 2015 12:08:57 +0100 |
parents | b92530cb27df |
children | 93c50cefb9e8 |
comparison
equal
deleted
inserted
replaced
19601:382e4f844d96 | 19602:d5042bcd422f |
---|---|
36 * | 36 * |
37 * Compare should probably be made a value (so that it can be canonicalized for example) and in later stages some Compare usage should be transformed | 37 * Compare should probably be made a value (so that it can be canonicalized for example) and in later stages some Compare usage should be transformed |
38 * into variants that do not materialize the value (CompareIf, CompareGuard...) | 38 * into variants that do not materialize the value (CompareIf, CompareGuard...) |
39 */ | 39 */ |
40 @NodeInfo | 40 @NodeInfo |
41 public abstract class CompareNode extends BinaryOpLogicNode { | 41 public abstract class CompareNode extends BinaryOpLogicNode implements Canonicalizable.Binary<ValueNode> { |
42 | 42 |
43 public static final NodeClass<CompareNode> TYPE = NodeClass.create(CompareNode.class); | 43 public static final NodeClass<CompareNode> TYPE = NodeClass.create(CompareNode.class); |
44 protected final Condition condition; | 44 protected final Condition condition; |
45 protected final boolean unorderedIsTrue; | 45 protected final boolean unorderedIsTrue; |
46 | 46 |
61 * | 61 * |
62 * @return the condition | 62 * @return the condition |
63 */ | 63 */ |
64 public final Condition condition() { | 64 public final Condition condition() { |
65 return condition; | 65 return condition; |
66 } | |
67 | |
68 @Override | |
69 public boolean isCommutative() { | |
70 return condition.isCommutative(); | |
71 } | 66 } |
72 | 67 |
73 /** | 68 /** |
74 * Checks whether unordered inputs mean true or false (only applies to float operations). | 69 * Checks whether unordered inputs mean true or false (only applies to float operations). |
75 * | 70 * |