Search in sources :

Example 1 with InliningNullCheckNode1

use of org.graalvm.compiler.truffle.test.nodes.InliningNullCheckNode1 in project graal by oracle.

the class SimplePartialEvaluationTest method inliningNullCheck1.

@Test
public void inliningNullCheck1() {
    FrameDescriptor fd = new FrameDescriptor();
    AbstractTestNode result = new InliningNullCheckNode1();
    RootNode rootNode = new RootTestNode(fd, "inliningNullCheck1", result);
    OptimizedCallTarget compilable = compileHelper("inliningNullCheck1", rootNode, new Object[0]);
    Assert.assertEquals(42, compilable.call(new Object[0]));
}
Also used : FrameDescriptor(com.oracle.truffle.api.frame.FrameDescriptor) RootNode(com.oracle.truffle.api.nodes.RootNode) AbstractTestNode(org.graalvm.compiler.truffle.test.nodes.AbstractTestNode) InliningNullCheckNode1(org.graalvm.compiler.truffle.test.nodes.InliningNullCheckNode1) OptimizedCallTarget(org.graalvm.compiler.truffle.runtime.OptimizedCallTarget) RootTestNode(org.graalvm.compiler.truffle.test.nodes.RootTestNode) Test(org.junit.Test)

Aggregations

FrameDescriptor (com.oracle.truffle.api.frame.FrameDescriptor)1 RootNode (com.oracle.truffle.api.nodes.RootNode)1 OptimizedCallTarget (org.graalvm.compiler.truffle.runtime.OptimizedCallTarget)1 AbstractTestNode (org.graalvm.compiler.truffle.test.nodes.AbstractTestNode)1 InliningNullCheckNode1 (org.graalvm.compiler.truffle.test.nodes.InliningNullCheckNode1)1 RootTestNode (org.graalvm.compiler.truffle.test.nodes.RootTestNode)1 Test (org.junit.Test)1