From 66dc8a3f8c9e4b63e54a3bca9092304b4794fdbc Mon Sep 17 00:00:00 2001 From: Christian Humer Date: Mon, 21 Jul 2025 11:55:31 +0200 Subject: [PATCH] Fix possible transient issue. --- .../test/InstrumentationTestLanguage.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/truffle/src/com.oracle.truffle.api.instrumentation.test/src/com/oracle/truffle/api/instrumentation/test/InstrumentationTestLanguage.java b/truffle/src/com.oracle.truffle.api.instrumentation.test/src/com/oracle/truffle/api/instrumentation/test/InstrumentationTestLanguage.java index 91d62fbe89d8..8eb9abd9189a 100644 --- a/truffle/src/com.oracle.truffle.api.instrumentation.test/src/com/oracle/truffle/api/instrumentation/test/InstrumentationTestLanguage.java +++ b/truffle/src/com.oracle.truffle.api.instrumentation.test/src/com/oracle/truffle/api/instrumentation/test/InstrumentationTestLanguage.java @@ -3154,18 +3154,18 @@ static final class WhileLoopNode extends InstrumentedNode { this.loop = Truffle.getRuntime().createLoopNode(new LoopConditionNode(loopCount, infinite, cond, children)); } - Integer getLoopIndex() { + Integer getLoopIndex(VirtualFrame frame) { if (loopIndexSlot == null) { CompilerDirectives.transferToInterpreterAndInvalidate(); - loopIndexSlot = getRootNode().getFrameDescriptor().findOrAddAuxiliarySlot("loopIndex" + getLoopDepth()); + loopIndexSlot = frame.getFrameDescriptor().findOrAddAuxiliarySlot("loopIndex" + getLoopDepth()); } return loopIndexSlot; } - Integer getResult() { + Integer getResult(VirtualFrame frame) { if (loopResultSlot == null) { CompilerDirectives.transferToInterpreterAndInvalidate(); - loopResultSlot = getRootNode().getFrameDescriptor().findOrAddAuxiliarySlot("loopResult" + getLoopDepth()); + loopResultSlot = frame.getFrameDescriptor().findOrAddAuxiliarySlot("loopResult" + getLoopDepth()); } return loopResultSlot; } @@ -3184,8 +3184,8 @@ private int getLoopDepth() { @Override public Object execute(VirtualFrame frame) { - frame.setAuxiliarySlot(getResult(), Null.INSTANCE); - frame.setAuxiliarySlot(getLoopIndex(), 0); + frame.setAuxiliarySlot(getResult(frame), Null.INSTANCE); + frame.setAuxiliarySlot(getLoopIndex(frame), 0); loop.execute(frame); try { return frame.getAuxiliarySlot(loopResultSlot);