90
90
import com .oracle .graal .python .builtins .objects .cext .structs .CStructs ;
91
91
import com .oracle .graal .python .builtins .objects .floats .PFloat ;
92
92
import com .oracle .graal .python .builtins .objects .getsetdescriptor .DescriptorDeleteMarker ;
93
+ import com .oracle .graal .python .builtins .objects .memoryview .PMemoryView ;
93
94
import com .oracle .graal .python .builtins .objects .object .PythonObject ;
94
95
import com .oracle .graal .python .builtins .objects .traceback .LazyTraceback ;
95
96
import com .oracle .graal .python .builtins .objects .tuple .PTuple ;
@@ -924,6 +925,7 @@ static long doOther(Node inliningTarget, PythonAbstractObjectNativeWrapper wrapp
924
925
@ Exclusive @ Cached InlinedConditionProfile isVarObjectProfile ,
925
926
@ Exclusive @ Cached InlinedConditionProfile isGcProfile ,
926
927
@ Exclusive @ Cached InlinedConditionProfile isFloatObjectProfile ,
928
+ @ Exclusive @ Cached InlinedConditionProfile isMemViewObjectProfile ,
927
929
@ Cached GetClassNode getClassNode ,
928
930
@ Cached (inline = false ) GetTypeFlagsNode getTypeFlagsNode ,
929
931
@ Exclusive @ Cached AllocateNativeObjectStubNode allocateNativeObjectStubNode ) {
@@ -939,6 +941,8 @@ static long doOther(Node inliningTarget, PythonAbstractObjectNativeWrapper wrapp
939
941
ctype = CStructs .GraalPyVarObject ;
940
942
} else if (isFloatObjectProfile .profile (inliningTarget , delegate instanceof Double || delegate instanceof PFloat )) {
941
943
ctype = CStructs .GraalPyFloatObject ;
944
+ } else if (isMemViewObjectProfile .profile (inliningTarget , delegate instanceof PMemoryView )) {
945
+ ctype = CStructs .PyMemoryViewObject ;
942
946
} else {
943
947
ctype = CStructs .GraalPyObject ;
944
948
}
@@ -1438,7 +1442,7 @@ protected boolean needsTransfer() {
1438
1442
static Object doWrapper (PythonNativeWrapper value ,
1439
1443
@ Bind ("$node" ) Node inliningTarget ,
1440
1444
@ Exclusive @ Cached InlinedExactClassProfile wrapperProfile ,
1441
- @ Cached UpdateRefNode updateRefNode ) {
1445
+ @ Exclusive @ Cached UpdateRefNode updateRefNode ) {
1442
1446
return handleWrapper (inliningTarget , wrapperProfile , updateRefNode , false , value );
1443
1447
}
1444
1448
@@ -1455,7 +1459,7 @@ Object doNonWrapper(Object value,
1455
1459
@ Cached InlinedConditionProfile isNativeWrapperProfile ,
1456
1460
@ Cached InlinedConditionProfile isHandleSpaceProfile ,
1457
1461
@ Exclusive @ Cached InlinedExactClassProfile wrapperProfile ,
1458
- @ Cached UpdateRefNode updateRefNode ) {
1462
+ @ Exclusive @ Cached UpdateRefNode updateRefNode ) {
1459
1463
assert !(value instanceof TruffleString );
1460
1464
assert !(value instanceof PythonAbstractObject );
1461
1465
assert !(value instanceof Number );
0 commit comments