Skip to content

Commit b4ede76

Browse files
committed
invalidate code when changing frame slot kinds
1 parent 797e87a commit b4ede76

File tree

1 file changed

+2
-2
lines changed
  • graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/frame

1 file changed

+2
-2
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/frame/FrameSlotNode.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ protected final boolean isLongOrObjectKind(Frame frame) {
106106

107107
protected final boolean isOrSetObjectKind(Frame frame) {
108108
if (frame.getFrameDescriptor().getFrameSlotKind(frameSlot) != FrameSlotKind.Object) {
109-
CompilerDirectives.transferToInterpreter();
109+
CompilerDirectives.transferToInterpreterAndInvalidate();
110110
frame.getFrameDescriptor().setFrameSlotKind(frameSlot, FrameSlotKind.Object);
111111
}
112112
return true;
@@ -118,7 +118,7 @@ private boolean isKind(Frame frame, FrameSlotKind kind) {
118118

119119
private boolean initialSetKind(Frame frame, FrameSlotKind kind) {
120120
if (frame.getFrameDescriptor().getFrameSlotKind(frameSlot) == FrameSlotKind.Illegal) {
121-
CompilerDirectives.transferToInterpreter();
121+
CompilerDirectives.transferToInterpreterAndInvalidate();
122122
frame.getFrameDescriptor().setFrameSlotKind(frameSlot, kind);
123123
return true;
124124
}

0 commit comments

Comments
 (0)