comparison graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/RootNode.java @ 18845:f57d86eb036f

removed Node factory methods
author Doug Simon <doug.simon@oracle.com>
date Mon, 12 Jan 2015 20:39:04 +0100
parents e3c95cbbb50c
children 1cde96b96673
comparison
equal deleted inserted replaced
18843:f2261069ba99 18845:f57d86eb036f
70 * system might decide to create deep copies of the {@link RootNode} in order to gather context 70 * system might decide to create deep copies of the {@link RootNode} in order to gather context
71 * sensitive profiling feedback. The default implementation returns <code>false</code>. Guest 71 * sensitive profiling feedback. The default implementation returns <code>false</code>. Guest
72 * language specific implementations may want to return <code>true</code> here to indicate that 72 * language specific implementations may want to return <code>true</code> here to indicate that
73 * gathering call site specific profiling information might make sense for this {@link RootNode} 73 * gathering call site specific profiling information might make sense for this {@link RootNode}
74 * . 74 * .
75 * 75 *
76 * @return <code>true</code> if cloning is allowed else <code>false</code>. 76 * @return <code>true</code> if cloning is allowed else <code>false</code>.
77 */ 77 */
78 public boolean isCloningAllowed() { 78 public boolean isCloningAllowed() {
79 return false; 79 return false;
80 } 80 }
89 } 89 }
90 } 90 }
91 91
92 /** 92 /**
93 * Executes this function using the specified frame and returns the result value. 93 * Executes this function using the specified frame and returns the result value.
94 * 94 *
95 * @param frame the frame of the currently executing guest language method 95 * @param frame the frame of the currently executing guest language method
96 * @return the value of the execution 96 * @return the value of the execution
97 */ 97 */
98 public abstract Object execute(VirtualFrame frame); 98 public abstract Object execute(VirtualFrame frame);
99 99
112 /** 112 /**
113 * Returns the {@link ExecutionContext} associated with this <code>RootNode</code>. This allows 113 * Returns the {@link ExecutionContext} associated with this <code>RootNode</code>. This allows
114 * the correct <code>ExecutionContext</code> to be determined for a <code>RootNode</code> (and 114 * the correct <code>ExecutionContext</code> to be determined for a <code>RootNode</code> (and
115 * so also for a {@link RootCallTarget} and a {@link FrameInstance} obtained from the call 115 * so also for a {@link RootCallTarget} and a {@link FrameInstance} obtained from the call
116 * stack) without prior knowledge of the language it has come from. 116 * stack) without prior knowledge of the language it has come from.
117 * 117 *
118 * Used for instance to determine the language of a <code>RootNode<code>: 118 * Used for instance to determine the language of a <code>RootNode<code>:
119 * 119 *
120 * <pre> 120 * <pre>
121 * <code> 121 * <code>
122 * rootNode.getExecutionContext().getLanguageShortName(); 122 * rootNode.getExecutionContext().getLanguageShortName();
123 * </code> </pre> 123 * </code> </pre>
124 * 124 *
125 * Returns <code>null</code> by default. 125 * Returns <code>null</code> by default.
126 */ 126 */
127 public ExecutionContext getExecutionContext() { 127 public ExecutionContext getExecutionContext() {
128 return null; 128 return null;
129 } 129 }
149 * If this is not done, then the AST will not be subject to debugging or any other 149 * If this is not done, then the AST will not be subject to debugging or any other
150 * instrumentation-supported tooling. 150 * instrumentation-supported tooling.
151 * <p> 151 * <p>
152 * Implementations should ensure that instrumentation is never applied more than once to an AST, 152 * Implementations should ensure that instrumentation is never applied more than once to an AST,
153 * as this is not guaranteed to be error-free. 153 * as this is not guaranteed to be error-free.
154 * 154 *
155 * @see Probe#registerASTProber(com.oracle.truffle.api.instrument.ASTProber) 155 * @see Probe#registerASTProber(com.oracle.truffle.api.instrument.ASTProber)
156 */ 156 */
157 public void applyInstrumentation() { 157 public void applyInstrumentation() {
158 } 158 }
159 } 159 }