# HG changeset patch # User Josef Eisl # Date 1435824838 -7200 # Node ID 60d75935edf2f36638207f95e8043f6201953dc4 # Parent d1ef84d3776def87eb05a60621bb047fd945bd22 NodeValueMap: improve javadoc. diff -r d1ef84d3776d -r 60d75935edf2 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/NodeValueMap.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/NodeValueMap.java Mon Jul 20 15:25:38 2015 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/NodeValueMap.java Thu Jul 02 10:13:58 2015 +0200 @@ -30,15 +30,33 @@ public interface NodeValueMap { - Value operand(Node object); + /** + * Returns the operand that has been previously initialized by + * {@link #setResult(ValueNode, Value)} with the result of an instruction. It's a code + * generation error to ask for the operand of ValueNode that doesn't have one yet. + * + * @param node A node that produces a result value. + */ + Value operand(Node node); - boolean hasOperand(Node object); + /** + * @return {@code true} if there is an {@link Value operand} associated with the {@code node} in + * the current block. + */ + boolean hasOperand(Node node); - Value setResult(ValueNode x, Value operand); + /** + * Associates {@code operand} with the {@code node} in the current block. + * + * @return {@code operand} + */ + Value setResult(ValueNode node, Value operand); /** * Gets the the {@link ValueNode} that produced a {@code value}. If the {@code value} is not * associated with a {@link ValueNode} {@code null} is returned. + * + * This method is intended for debugging purposes only. */ ValueNode valueForOperand(Value value); }