comparison 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
comparison
equal deleted inserted replaced
16955:7ef0a2355540 16961:a1427e40deaf
91 Node parent = getParent(); 91 Node parent = getParent();
92 92
93 if (parent == null) 93 if (parent == null)
94 throw new IllegalStateException("Cannot probe a node without a parent"); 94 throw new IllegalStateException("Cannot probe a node without a parent");
95 95
96 if (parent instanceof SLStatementWrapper) 96 if (parent instanceof SLStatementWrapper) {
97 return ((SLStatementWrapper) parent).getProbe(); 97 return ((SLStatementWrapper) parent).getProbe();
98 }
98 99
100 // Create a new wrapper/probe with this node as its child.
99 SLStatementWrapper wrapper = new SLStatementWrapper((SLContext) context, this); 101 SLStatementWrapper wrapper = new SLStatementWrapper((SLContext) context, this);
102
103 // Replace this node in the AST with the wrapper
100 this.replace(wrapper); 104 this.replace(wrapper);
101 wrapper.insertChild(); 105
102 return wrapper.getProbe(); 106 return wrapper.getProbe();
103 } 107 }
104 } 108 }