use of org.graalvm.compiler.truffle.test.nodes.StringEqualsNode in project graal by oracle.
the class SimplePartialEvaluationTest method intrinsicStatic.
@Test
public void intrinsicStatic() {
/*
* The intrinsic for String.equals() is inlined early during bytecode parsing, because we
* call equals() on a value that has the static type String.
*/
FrameDescriptor fd = new FrameDescriptor();
AbstractTestNode result = new StringEqualsNode("abc", "abf");
RootNode rootNode = new RootTestNode(fd, "intrinsicStatic", result);
OptimizedCallTarget compilable = compileHelper("intrinsicStatic", rootNode, new Object[0]);
Assert.assertEquals(42, compilable.call(new Object[0]));
}
Aggregations