org.jruby.truffle.language.methods.ModuleBodyDefinitionNodeWrapper Maven / Gradle / Ivy
// CheckStyle: start generated
package org.jruby.truffle.language.methods;
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.nodes.NodeCost;
import com.oracle.truffle.api.nodes.UnexpectedResultException;
import com.oracle.truffle.api.object.DynamicObject;
import org.jruby.truffle.language.NotProvided;
@GeneratedBy(ModuleBodyDefinitionNode.class)
public final class ModuleBodyDefinitionNodeWrapper implements InstrumentableFactory {
@Override
public WrapperNode createWrapper(ModuleBodyDefinitionNode delegateNode, ProbeNode probeNode) {
return new ModuleBodyDefinitionNodeWrapper0(delegateNode, delegateNode, probeNode);
}
@GeneratedBy(ModuleBodyDefinitionNode.class)
private static final class ModuleBodyDefinitionNodeWrapper0 extends ModuleBodyDefinitionNode implements WrapperNode {
@Child private ModuleBodyDefinitionNode delegateNode;
@Child private ProbeNode probeNode;
private ModuleBodyDefinitionNodeWrapper0(ModuleBodyDefinitionNode node, ModuleBodyDefinitionNode delegateNode, ProbeNode probeNode) {
super(node);
this.delegateNode = delegateNode;
this.probeNode = probeNode;
}
@Override
public ModuleBodyDefinitionNode 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;
}
}
@Override
public boolean executeBoolean(VirtualFrame frame) throws UnexpectedResultException {
try {
probeNode.onEnter(frame);
boolean returnValue = delegateNode.executeBoolean(frame);
probeNode.onReturnValue(frame, returnValue);
return returnValue;
} catch (Throwable t) {
probeNode.onReturnExceptional(frame, t);
throw t;
}
}
@Override
public double executeDouble(VirtualFrame frame) throws UnexpectedResultException {
try {
probeNode.onEnter(frame);
double returnValue = delegateNode.executeDouble(frame);
probeNode.onReturnValue(frame, returnValue);
return returnValue;
} catch (Throwable t) {
probeNode.onReturnExceptional(frame, t);
throw t;
}
}
@Override
public DynamicObject executeDynamicObject(VirtualFrame frame) throws UnexpectedResultException {
try {
probeNode.onEnter(frame);
DynamicObject returnValue = delegateNode.executeDynamicObject(frame);
probeNode.onReturnValue(frame, returnValue);
return returnValue;
} catch (Throwable t) {
probeNode.onReturnExceptional(frame, t);
throw t;
}
}
@Override
public int executeInteger(VirtualFrame frame) throws UnexpectedResultException {
try {
probeNode.onEnter(frame);
int returnValue = delegateNode.executeInteger(frame);
probeNode.onReturnValue(frame, returnValue);
return returnValue;
} catch (Throwable t) {
probeNode.onReturnExceptional(frame, t);
throw t;
}
}
@Override
public long executeLong(VirtualFrame frame) throws UnexpectedResultException {
try {
probeNode.onEnter(frame);
long returnValue = delegateNode.executeLong(frame);
probeNode.onReturnValue(frame, returnValue);
return returnValue;
} catch (Throwable t) {
probeNode.onReturnExceptional(frame, t);
throw t;
}
}
@Override
public NotProvided executeNotProvided(VirtualFrame frame) throws UnexpectedResultException {
try {
probeNode.onEnter(frame);
NotProvided returnValue = delegateNode.executeNotProvided(frame);
probeNode.onReturnValue(frame, returnValue);
return returnValue;
} catch (Throwable t) {
probeNode.onReturnExceptional(frame, t);
throw t;
}
}
@Override
public Object[] executeObjectArray(VirtualFrame frame) throws UnexpectedResultException {
try {
probeNode.onEnter(frame);
Object[] returnValue = delegateNode.executeObjectArray(frame);
probeNode.onReturnValue(frame, returnValue);
return returnValue;
} catch (Throwable t) {
probeNode.onReturnExceptional(frame, t);
throw t;
}
}
@Override
public void executeVoid(VirtualFrame frame) {
try {
probeNode.onEnter(frame);
delegateNode.executeVoid(frame);
probeNode.onReturnValue(frame, null);
} catch (Throwable t) {
probeNode.onReturnExceptional(frame, t);
throw t;
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy