Skip to content

Commit 07a483a

Browse files
committed
Fix IsSame usage
1 parent 68e16f9 commit 07a483a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/expression/IsExpressionNode.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -314,10 +314,10 @@ static boolean doPString(PString left, PString right,
314314
}
315315

316316
// everything else
317-
@Specialization(guards = "isFallbackCase(left, right)", limit = "getCallSiteInlineCacheMaxDepth()")
317+
@Specialization(guards = "isFallbackCase(left, right)")
318318
static boolean doOther(Object left, Object right,
319319
@Cached IsForeignObjectNode isForeignObjectNode,
320-
@CachedLibrary("left") PythonObjectLibrary lib) {
320+
@CachedLibrary(limit = "3") PythonObjectLibrary lib) {
321321
if (left == right) {
322322
return true;
323323
}
@@ -326,8 +326,8 @@ static boolean doOther(Object left, Object right,
326326
// is an object that is a wrapped Python object and uses a ReflectionLibrary, it
327327
// will not appear foreign, but the isSame call will unpack it from its wrapper and
328328
// may lead straight back to this node, but this time with the unwrapped Python
329-
// object that will no longer satisfy the isReflectedObject condition.
330-
return lib.isSame(lib.getDelegatedValue(left), right);
329+
// object that will no longer satisfy the isForeignObject condition.
330+
return lib.isSame(left, right);
331331
}
332332
return false;
333333
}

0 commit comments

Comments
 (0)