use of org.graalvm.compiler.truffle.test.nodes.RecursionTestNode in project graal by oracle.
the class SimplePartialEvaluationTest method allowedRecursion.
@Test
public void allowedRecursion() {
/* Recursion depth just below the threshold that reports it as too deep recursion. */
FrameDescriptor fd = new FrameDescriptor();
AbstractTestNode result = new RecursionTestNode(TruffleCompilerOptions.getValue(PEGraphDecoder.Options.InliningDepthError) - 5);
assertPartialEvalEquals("constant42", new RootTestNode(fd, "allowedRecursion", result));
}
use of org.graalvm.compiler.truffle.test.nodes.RecursionTestNode in project graal by oracle.
the class SimplePartialEvaluationTest method tooDeepRecursion.
@Test(expected = BailoutException.class)
public void tooDeepRecursion() {
/* Recursion depth just above the threshold that reports it as too deep recursion. */
FrameDescriptor fd = new FrameDescriptor();
AbstractTestNode result = new RecursionTestNode(TruffleCompilerOptions.getValue(PEGraphDecoder.Options.InliningDepthError));
assertPartialEvalEquals("constant42", new RootTestNode(fd, "tooDeepRecursion", result));
}
Aggregations