Skip to content

Commit fc906ef

Browse files
steve-sansalond
authored andcommitted
Remove assertion that uses deprecated Truffle API
(cherry picked from commit c177142)
1 parent d0ab334 commit fc906ef

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/variables/ReadVariableNode.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,7 @@ public static RArgsValuesAndNames lookupVarArgs(Frame variableFrame) {
837837
}
838838

839839
private static Object getValue(boolean[] seenValueKinds, Frame variableFrame, FrameSlot frameSlot) {
840-
assert variableFrame.getFrameDescriptor() == frameSlot.getFrameDescriptor();
840+
assert variableFrame.getFrameDescriptor().getSlots().contains(frameSlot) : frameSlot.getIdentifier();
841841
Object value = variableFrame.getValue(frameSlot);
842842
if (variableFrame.isObject(frameSlot)) {
843843
value = FrameSlotChangeMonitor.getValue(frameSlot, variableFrame);
@@ -853,7 +853,7 @@ private static Object getValue(boolean[] seenValueKinds, Frame variableFrame, Fr
853853
}
854854

855855
static Object profiledGetValue(boolean[] seenValueKinds, Frame variableFrame, FrameSlot frameSlot) {
856-
assert variableFrame.getFrameDescriptor() == frameSlot.getFrameDescriptor();
856+
assert variableFrame.getFrameDescriptor().getSlots().contains(frameSlot) : frameSlot.getIdentifier();
857857
try {
858858
if (seenValueKinds[FrameSlotKind.Object.ordinal()] && variableFrame.isObject(frameSlot)) {
859859
return FrameSlotChangeMonitor.getObject(frameSlot, variableFrame);

com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/env/frame/FrameSlotChangeMonitor.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -776,8 +776,7 @@ private static synchronized FrameSlot findOrAddFrameSlot(FrameDescriptor fd, Obj
776776
* @param invalidateProfile Used to guard the invalidation code.
777777
*/
778778
private static void checkAndInvalidate(Frame curFrame, FrameSlot slot, boolean isNonLocal, BranchProfile invalidateProfile) {
779-
assert curFrame.getFrameDescriptor() == slot.getFrameDescriptor();
780-
779+
assert curFrame.getFrameDescriptor().getSlots().contains(slot) : slot.getIdentifier();
781780
if (getNotChangedNonLocallyAssumption(slot).isValid()) {
782781
// Check whether current frame is used outside a regular stack
783782
if (isNonLocal || RArguments.getIsIrregular(curFrame)) {

0 commit comments

Comments
 (0)