Mercurial > hg > graal-compiler
diff graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/SLStatementNode.java @ 16961:a1427e40deaf
Truffle/Instrumentation: some Javadoc revistions; minor code cleanups; remove one redundant operation; add tracing to the LineLocation maps.
author | Michael Van De Vanter <michael.van.de.vanter@oracle.com> |
---|---|
date | Tue, 26 Aug 2014 13:54:53 -0700 |
parents | 826c172a048f |
children | f0c3de09f12a |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/SLStatementNode.java Tue Aug 26 09:35:08 2014 -0700 +++ b/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/SLStatementNode.java Tue Aug 26 13:54:53 2014 -0700 @@ -93,12 +93,16 @@ if (parent == null) throw new IllegalStateException("Cannot probe a node without a parent"); - if (parent instanceof SLStatementWrapper) + if (parent instanceof SLStatementWrapper) { return ((SLStatementWrapper) parent).getProbe(); + } + // Create a new wrapper/probe with this node as its child. SLStatementWrapper wrapper = new SLStatementWrapper((SLContext) context, this); + + // Replace this node in the AST with the wrapper this.replace(wrapper); - wrapper.insertChild(); + return wrapper.getProbe(); } }