All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.oracle.truffle.api.instrumentation.test.TestNode2Wrapper Maven / Gradle / Ivy

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.instrumentation.InstrumentableFactory;
import com.oracle.truffle.api.instrumentation.ProbeNode;
import com.oracle.truffle.api.instrumentation.test.InstrumentableTest.TestNode2;
import com.oracle.truffle.api.nodes.NodeCost;
import com.oracle.truffle.api.source.SourceSection;

@GeneratedBy(TestNode2.class)
public final class TestNode2Wrapper implements InstrumentableFactory {

    @Override
    public WrapperNode createWrapper(TestNode2 delegateNode, ProbeNode probeNode) {
        return new TestNode2Wrapper0(delegateNode.getSourceSection(), delegateNode, probeNode);
    }

    @GeneratedBy(TestNode2.class)
    private static final class TestNode2Wrapper0 extends TestNode2 implements WrapperNode {

        @Child private TestNode2 delegateNode;
        @Child private ProbeNode probeNode;

        private TestNode2Wrapper0(SourceSection sourceSection, TestNode2 delegateNode, ProbeNode probeNode) {
            super(sourceSection);
            this.delegateNode = delegateNode;
            this.probeNode = probeNode;
        }

        @Override
        public TestNode2 getDelegateNode() {
            return delegateNode;
        }

        @Override
        public ProbeNode getProbeNode() {
            return probeNode;
        }

        @Override
        public NodeCost getCost() {
            return NodeCost.NONE;
        }

        @Override
        public void execute1() {
            try {
                probeNode.onEnter(null);
                delegateNode.execute1();
                probeNode.onReturnValue(null, null);
            } catch (Throwable t) {
                probeNode.onReturnExceptional(null, t);
                throw t;
            }
        }

    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy