< prev index next >

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/Node.java

Print this page

        

*** 36,45 **** --- 36,46 ---- import java.util.Formatter; import java.util.HashMap; import java.util.Map; import java.util.Objects; import java.util.function.Predicate; + import java.util.function.Supplier; import org.graalvm.compiler.core.common.Fields; import org.graalvm.compiler.core.common.type.AbstractPointerStamp; import org.graalvm.compiler.core.common.type.Stamp; import org.graalvm.compiler.debug.DebugCloseable;
*** 596,605 **** --- 597,615 ---- if (sourcePosition != null && graph != null && !graph.seenNodeSourcePosition) { graph.seenNodeSourcePosition = true; } } + /** + * Update the source position only if it is null. + */ + public void updateNodeSourcePosition(Supplier<NodeSourcePosition> sourcePositionSupp) { + if (this.sourcePosition == null) { + setNodeSourcePosition(sourcePositionSupp.get()); + } + } + public DebugCloseable withNodeSourcePosition() { return graph.withNodeSourcePosition(this); } public final NodeClass<? extends Node> getNodeClass() {
< prev index next >