From d8a01790c49f68057d682c9dd7c3e668b78a31ce Mon Sep 17 00:00:00 2001 From: Andrew Dinn Date: Fri, 23 Jul 2021 13:55:04 +0100 Subject: [PATCH] ensure source position for new instance node is tracked --- .../src/org/graalvm/compiler/nodes/java/NewInstanceNode.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/src/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/NewInstanceNode.java b/compiler/src/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/NewInstanceNode.java index 705da03a04e56..fcb83d2c2ba10 100644 --- a/compiler/src/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/NewInstanceNode.java +++ b/compiler/src/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/NewInstanceNode.java @@ -88,6 +88,8 @@ public void virtualize(VirtualizerTool tool) { } tool.createVirtualObject(virtualObject, state, Collections. emptyList(), false); tool.replaceWithVirtual(virtualObject); + /* Track the original source node position across the substitution. */ + virtualObject.setNodeSourcePosition(getNodeSourcePosition()); } } }