Skip to content

Commit cbf2aac

Browse files
committed
Do not manually send 'IS_POINTER' to pointer object.
1 parent fade5e8 commit cbf2aac

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/PythonObjectNativeWrapperMR.java

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -800,18 +800,8 @@ Object access(PythonNativeWrapper obj) {
800800

801801
@Resolve(message = "IS_POINTER")
802802
abstract static class IsPointerNode extends Node {
803-
@Child private Node isPointerNode;
804-
805803
boolean access(PythonNativeWrapper obj) {
806-
return obj.isNative() && (!(obj.getNativePointer() instanceof TruffleObject) || ForeignAccess.sendIsPointer(getIsPointerNode(), (TruffleObject) obj.getNativePointer()));
807-
}
808-
809-
private Node getIsPointerNode() {
810-
if (isPointerNode == null) {
811-
CompilerDirectives.transferToInterpreterAndInvalidate();
812-
isPointerNode = insert(Message.IS_POINTER.createNode());
813-
}
814-
return isPointerNode;
804+
return obj.isNative();
815805
}
816806
}
817807

0 commit comments

Comments
 (0)