@Override public org.graalvm.compiler.truffle.common.TruffleSourceLanguagePosition getPosition(JavaConstant node) { Node truffleNode = runtime().asObject(Node.class, node); if (truffleNode == null) { return null; } SourceSection section = null; if (truffleNode instanceof DirectCallNode) { section = ((DirectCallNode) truffleNode).getCurrentRootNode().getSourceSection(); } if (section == null) { section = truffleNode.getSourceSection(); } if (section == null) { Node cur = truffleNode.getParent(); while (cur != null) { section = cur.getSourceSection(); if (section != null) { break; } cur = cur.getParent(); } } if (section != null) { return new TruffleSourceLanguagePosition(section); } return null; }