com.oracle.truffle.api.instrumentation.test.CustomScopeNodeWrapper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of truffle-instrument-test Show documentation
Show all versions of truffle-instrument-test Show documentation
Instrumentation tests including InstrumentationTestLanguage.
The newest version!
// CheckStyle: start generated
package com.oracle.truffle.api.instrumentation.test;
import com.oracle.truffle.api.dsl.GeneratedBy;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.instrumentation.InstrumentableFactory;
import com.oracle.truffle.api.instrumentation.ProbeNode;
import com.oracle.truffle.api.instrumentation.test.VariablesScopeTest.CustomScopeLanguage.CustomScopeNode;
import com.oracle.truffle.api.nodes.NodeCost;
@GeneratedBy(CustomScopeNode.class)
public final class CustomScopeNodeWrapper implements InstrumentableFactory {
@Override
public WrapperNode createWrapper(CustomScopeNode delegateNode, ProbeNode probeNode) {
return new CustomScopeNodeWrapper0(delegateNode, probeNode);
}
@GeneratedBy(CustomScopeNode.class)
private static final class CustomScopeNodeWrapper0 extends CustomScopeNode implements WrapperNode {
@Child private CustomScopeNode delegateNode;
@Child private ProbeNode probeNode;
private CustomScopeNodeWrapper0(CustomScopeNode delegateNode, ProbeNode probeNode) {
this.delegateNode = delegateNode;
this.probeNode = probeNode;
}
@Override
public CustomScopeNode getDelegateNode() {
return delegateNode;
}
@Override
public ProbeNode getProbeNode() {
return probeNode;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
@Override
public Object execute(VirtualFrame frame) {
try {
probeNode.onEnter(frame);
Object returnValue = delegateNode.execute(frame);
probeNode.onReturnValue(frame, returnValue);
return returnValue;
} catch (Throwable t) {
probeNode.onReturnExceptional(frame, t);
throw t;
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy