public final class LogicConstantNode extends LogicNode implements LIRLowerable
LogicConstantNode
represents a boolean constant.Node.ConstantNodeParameter, Node.InjectedNodeParameter, Node.Input, Node.NodeIntrinsic, Node.OptionalInput, Node.Successor, Node.ValueNumberable
Modifier and Type | Field and Description |
---|---|
static NodeClass<LogicConstantNode> |
TYPE |
protected boolean |
value |
NODE_LIST, NOT_ITERABLE, USE_UNSAFE_TO_CLONE, WithAllEdges, WithNoEdges, WithOnlyInputEdges, WithOnlySucessorEdges
Constructor and Description |
---|
LogicConstantNode(boolean value) |
Modifier and Type | Method and Description |
---|---|
static LogicConstantNode |
contradiction()
Gets a constant for
false . |
static LogicConstantNode |
contradiction(Graph graph)
Gets a constant for
false . |
static LogicConstantNode |
forBoolean(boolean v)
Returns a node for a boolean constant.
|
static LogicConstantNode |
forBoolean(boolean v,
Graph graph)
Returns a node for a boolean constant.
|
void |
generate(NodeLIRBuilderTool generator) |
boolean |
getValue() |
static LogicConstantNode |
tautology()
Gets a constant for
true . |
static LogicConstantNode |
tautology(Graph graph)
Gets a constant for
true . |
and, and, isContradiction, isTautology, or, or
asNode
asConstant, asJavaConstant, getKind, graph, inferStamp, isAllowedUsageType, isConstant, isConstantPredicate, isNullConstant, setStamp, stamp, updateStamp
acceptInputs, acceptSuccessors, afterClone, assertFalse, assertTrue, cfgPredecessors, cfgSuccessors, clearInputs, clearSuccessors, copyWithInputs, copyWithInputs, equals, fail, formatTo, getDebugProperties, getDebugProperties, getId, getNodeClass, getUsageAt, getUsageCount, hashCode, hasNoUsages, hasUsages, inputs, isAlive, isDeleted, markDeleted, modCount, newIdentityMap, newIdentityMap, newIdentityMap, newMap, newMap, newMap, newSet, newSet, predecessor, pushInputs, removeUsage, replaceAndDelete, replaceAtMatchingUsages, replaceAtPredecessor, replaceAtUsages, replaceAtUsages, replaceAtUsages, replaceFirstInput, replaceFirstSuccessor, safeDelete, simplify, successors, toString, toString, updatePredecessor, updateUsages, updateUsagesInterface, usages, valueEquals, verify, verifyEdges, verifyInputs
public static final NodeClass<LogicConstantNode> TYPE
protected final boolean value
public LogicConstantNode(boolean value)
public static LogicConstantNode forBoolean(boolean v, Graph graph)
v
- the boolean value for which to create the instructiongraph
- public static LogicConstantNode forBoolean(boolean v)
v
- the boolean value for which to create the instructionpublic static LogicConstantNode tautology(Graph graph)
true
.public static LogicConstantNode contradiction(Graph graph)
false
.public static LogicConstantNode tautology()
true
.public static LogicConstantNode contradiction()
false
.public boolean getValue()
public void generate(NodeLIRBuilderTool generator)
generate
in interface LIRLowerable