File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed
graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 38
38
import com .oracle .graal .python .nodes .ErrorMessages ;
39
39
import com .oracle .graal .python .nodes .PRaiseNode ;
40
40
import com .oracle .graal .python .nodes .classes .IsSubtypeNode ;
41
+ import com .oracle .graal .python .nodes .interop .PForeignToPTypeNode ;
41
42
import com .oracle .graal .python .runtime .PythonContext ;
42
43
import com .oracle .truffle .api .CompilerAsserts ;
43
44
import com .oracle .truffle .api .CompilerDirectives ;
@@ -618,8 +619,9 @@ static boolean isMetaObject(@SuppressWarnings("unused") PythonBuiltinClassType s
618
619
@ ExportMessage
619
620
static boolean isMetaInstance (PythonBuiltinClassType self , Object instance ,
620
621
@ CachedLibrary (limit = "3" ) PythonObjectLibrary lib ,
622
+ @ Cached PForeignToPTypeNode convert ,
621
623
@ Cached IsSubtypeNode isSubtype ) {
622
- return isSubtype .execute (lib .getLazyPythonClass (instance ), self );
624
+ return isSubtype .execute (lib .getLazyPythonClass (convert . executeConvert ( instance ) ), self );
623
625
}
624
626
625
627
@ ExportMessage
Original file line number Diff line number Diff line change 67
67
import com .oracle .graal .python .nodes .ErrorMessages ;
68
68
import com .oracle .graal .python .nodes .PRaiseNode ;
69
69
import com .oracle .graal .python .nodes .classes .IsSubtypeNode ;
70
+ import com .oracle .graal .python .nodes .interop .PForeignToPTypeNode ;
70
71
import com .oracle .graal .python .nodes .object .IsBuiltinClassProfile ;
71
72
import com .oracle .truffle .api .Assumption ;
72
73
import com .oracle .truffle .api .CompilerAsserts ;
@@ -319,11 +320,12 @@ boolean isMetaObject(
319
320
boolean isMetaInstance (Object instance ,
320
321
@ Shared ("isType" ) @ Cached TypeNodes .IsTypeNode isType ,
321
322
@ CachedLibrary (limit = "3" ) PythonObjectLibrary plib ,
323
+ @ Cached PForeignToPTypeNode convert ,
322
324
@ Cached IsSubtypeNode isSubtype ) throws UnsupportedMessageException {
323
325
if (!isType .execute (this )) {
324
326
throw UnsupportedMessageException .create ();
325
327
}
326
- return isSubtype .execute (plib .getLazyPythonClass (instance ), this );
328
+ return isSubtype .execute (plib .getLazyPythonClass (convert . executeConvert ( instance ) ), this );
327
329
}
328
330
329
331
@ ExportMessage
Original file line number Diff line number Diff line change 29
29
import com .oracle .graal .python .builtins .objects .object .PythonObjectLibrary ;
30
30
import com .oracle .graal .python .nodes .attributes .ReadAttributeFromDynamicObjectNode ;
31
31
import com .oracle .graal .python .nodes .classes .IsSubtypeNode ;
32
+ import com .oracle .graal .python .nodes .interop .PForeignToPTypeNode ;
32
33
import com .oracle .truffle .api .dsl .Cached ;
33
34
import com .oracle .truffle .api .dsl .Cached .Shared ;
34
35
import com .oracle .truffle .api .interop .InteropLibrary ;
@@ -64,8 +65,9 @@ boolean isMetaObject() {
64
65
@ ExportMessage
65
66
boolean isMetaInstance (Object instance ,
66
67
@ CachedLibrary (limit = "3" ) PythonObjectLibrary plib ,
68
+ @ Cached PForeignToPTypeNode convert ,
67
69
@ Cached IsSubtypeNode isSubtype ) {
68
- return isSubtype .execute (plib .getLazyPythonClass (instance ), this );
70
+ return isSubtype .execute (plib .getLazyPythonClass (convert . executeConvert ( instance ) ), this );
69
71
}
70
72
71
73
@ ExportMessage
You can’t perform that action at this time.
0 commit comments