Skip to content

Commit 8f33e91

Browse files
committed
Pass frame to size node in TypeNodes
1 parent 348ca41 commit 8f33e91

File tree

1 file changed

+5
-5
lines changed
  • graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/type

1 file changed

+5
-5
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/type/TypeNodes.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,7 @@ private boolean compatibleWithBase(VirtualFrame frame, Object child, Object pare
879879
if (childSlots == null && parentSlots != null || childSlots != null && parentSlots == null) {
880880
return false;
881881
}
882-
if (!compareSlots(parent, child, parentSlots, childSlots)) {
882+
if (!compareSlots(frame, parent, child, parentSlots, childSlots)) {
883883
return false;
884884
}
885885

@@ -893,10 +893,10 @@ private boolean sameSlotsAdded(VirtualFrame frame, Object a, Object b) {
893893
}
894894
Object aSlots = getSlotsFromDict(frame, a);
895895
Object bSlots = getSlotsFromDict(frame, b);
896-
return compareSlots(a, b, aSlots, bSlots);
896+
return compareSlots(frame, a, b, aSlots, bSlots);
897897
}
898898

899-
private boolean compareSlots(Object aType, Object bType, Object aSlotsArg, Object bSlotsArg) {
899+
private boolean compareSlots(VirtualFrame frame, Object aType, Object bType, Object aSlotsArg, Object bSlotsArg) {
900900
Object aSlots = aSlotsArg;
901901
Object bSlots = bSlotsArg;
902902

@@ -910,8 +910,8 @@ private boolean compareSlots(Object aType, Object bType, Object aSlotsArg, Objec
910910

911911
aSlots = getLookupSlots().execute(aType);
912912
bSlots = getLookupSlots().execute(bType);
913-
int aSize = aSlots != PNone.NO_VALUE ? getSizeNode().execute(null, aSlots) : 0;
914-
int bSize = bSlots != PNone.NO_VALUE ? getSizeNode().execute(null, bSlots) : 0;
913+
int aSize = aSlots != PNone.NO_VALUE ? getSizeNode().execute(frame, aSlots) : 0;
914+
int bSize = bSlots != PNone.NO_VALUE ? getSizeNode().execute(frame, bSlots) : 0;
915915
return aSize == bSize;
916916
}
917917

0 commit comments

Comments
 (0)