Skip to content

Commit ea13540

Browse files
committed
[GR-67826] Fix possible transient issue.
PullRequest: graal/21541
2 parents 25287fe + 66dc8a3 commit ea13540

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

truffle/src/com.oracle.truffle.api.instrumentation.test/src/com/oracle/truffle/api/instrumentation/test/InstrumentationTestLanguage.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3154,18 +3154,18 @@ static final class WhileLoopNode extends InstrumentedNode {
31543154
this.loop = Truffle.getRuntime().createLoopNode(new LoopConditionNode(loopCount, infinite, cond, children));
31553155
}
31563156

3157-
Integer getLoopIndex() {
3157+
Integer getLoopIndex(VirtualFrame frame) {
31583158
if (loopIndexSlot == null) {
31593159
CompilerDirectives.transferToInterpreterAndInvalidate();
3160-
loopIndexSlot = getRootNode().getFrameDescriptor().findOrAddAuxiliarySlot("loopIndex" + getLoopDepth());
3160+
loopIndexSlot = frame.getFrameDescriptor().findOrAddAuxiliarySlot("loopIndex" + getLoopDepth());
31613161
}
31623162
return loopIndexSlot;
31633163
}
31643164

3165-
Integer getResult() {
3165+
Integer getResult(VirtualFrame frame) {
31663166
if (loopResultSlot == null) {
31673167
CompilerDirectives.transferToInterpreterAndInvalidate();
3168-
loopResultSlot = getRootNode().getFrameDescriptor().findOrAddAuxiliarySlot("loopResult" + getLoopDepth());
3168+
loopResultSlot = frame.getFrameDescriptor().findOrAddAuxiliarySlot("loopResult" + getLoopDepth());
31693169
}
31703170
return loopResultSlot;
31713171
}
@@ -3184,8 +3184,8 @@ private int getLoopDepth() {
31843184

31853185
@Override
31863186
public Object execute(VirtualFrame frame) {
3187-
frame.setAuxiliarySlot(getResult(), Null.INSTANCE);
3188-
frame.setAuxiliarySlot(getLoopIndex(), 0);
3187+
frame.setAuxiliarySlot(getResult(frame), Null.INSTANCE);
3188+
frame.setAuxiliarySlot(getLoopIndex(frame), 0);
31893189
loop.execute(frame);
31903190
try {
31913191
return frame.getAuxiliarySlot(loopResultSlot);

0 commit comments

Comments
 (0)