use of com.oracle.truffle.api.nodes.BlockNode in project graal by oracle.
the class OptimizedBlockNodeTest method createTest.
private static OptimizedCallTarget createTest(BlockNode<?> block) {
TestRootNode root = new TestRootNode(block, "Block[" + block.getElements().length + "]");
OptimizedCallTarget target = (OptimizedCallTarget) root.getCallTarget();
root.accept(new NodeVisitor() {
@Override
public boolean visit(Node node) {
if (node instanceof TestElement) {
((TestElement) node).onAdopt();
}
return true;
}
});
return target;
}
Aggregations