changeset 22249:60d75935edf2

NodeValueMap: improve javadoc.
author Josef Eisl <josef.eisl@jku.at>
date Thu, 02 Jul 2015 10:13:58 +0200
parents d1ef84d3776d
children 29e41630c86c
files graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/NodeValueMap.java
diffstat 1 files changed, 21 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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);
 }