# HG changeset patch # User Lukas Stadler # Date 1403688053 -7200 # Node ID dc1f9c606f36a6c2bdc557599707812e6295a50c # Parent e73e293c8a65680ebde1d208b06fd1fa3895f24d non-adding factory methods in LogicConstantNode diff -r e73e293c8a65 -r dc1f9c606f36 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/LogicConstantNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/LogicConstantNode.java Wed Jun 25 11:20:53 2014 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/LogicConstantNode.java Wed Jun 25 11:20:53 2014 +0200 @@ -40,7 +40,7 @@ /** * Returns a node for a boolean constant. - * + * * @param v the boolean value for which to create the instruction * @param graph * @return a node representing the boolean @@ -50,6 +50,16 @@ } /** + * Returns a node for a boolean constant. + * + * @param v the boolean value for which to create the instruction + * @return a node representing the boolean + */ + public static LogicConstantNode forBoolean(boolean v) { + return new LogicConstantNode(v); + } + + /** * Gets a constant for {@code true}. */ public static LogicConstantNode tautology(Graph graph) { @@ -63,6 +73,20 @@ return forBoolean(false, graph); } + /** + * Gets a constant for {@code true}. + */ + public static LogicConstantNode tautology() { + return forBoolean(true); + } + + /** + * Gets a constant for {@code false}. + */ + public static LogicConstantNode contradiction() { + return forBoolean(false); + } + public boolean getValue() { return value; }