Mercurial > hg > truffle
diff graal/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/ReplaceTest.java @ 7530:5e3d1a68664e
applied mx eclipseformat to all Java files
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 23 Jan 2013 16:34:57 +0100 |
parents | a4b84ba6dc2e |
children | 7f6580db1e88 |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/ReplaceTest.java Wed Jan 23 16:34:38 2013 +0100 +++ b/graal/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/ReplaceTest.java Wed Jan 23 16:34:57 2013 +0100 @@ -32,22 +32,21 @@ import com.oracle.truffle.api.frame.*; import com.oracle.truffle.api.nodes.*; - /** * <h3>Replacing Nodes at Run Time</h3> - * + * * <p> - * The structure of the Truffle tree can be changed at run time by replacing nodes using the {@link Node#replace(Node)} - * method. This method will automatically change the child pointer in the parent of the node and replace it with a - * pointer to the new node. + * The structure of the Truffle tree can be changed at run time by replacing nodes using the + * {@link Node#replace(Node)} method. This method will automatically change the child pointer in the + * parent of the node and replace it with a pointer to the new node. * </p> - * + * * <p> - * Replacing nodes is a costly operation, so it should not happen too often. The convention is that the implementation - * of the Truffle nodes should ensure that there are maximal a small (and constant) number of node replacements per - * Truffle node. + * Replacing nodes is a costly operation, so it should not happen too often. The convention is that + * the implementation of the Truffle nodes should ensure that there are maximal a small (and + * constant) number of node replacements per Truffle node. * </p> - * + * * <p> * The next part of the Truffle API introduction is at {@link com.oracle.truffle.api.test.CallTest}. * </p> @@ -99,10 +98,12 @@ } abstract class ValueNode extends Node { + abstract int execute(); } class UnresolvedNode extends ValueNode { + private final String value; public UnresolvedNode(String value) { @@ -118,6 +119,7 @@ } class ResolvedNode extends ValueNode { + private final int value; ResolvedNode(int value) { @@ -130,4 +132,3 @@ } } } -