File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/interop Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -56,18 +56,18 @@ Object access(Object object) {
56
56
57
57
public static boolean isBoxed (Object object ) {
58
58
if (object instanceof PFloat ) {
59
- return !(( PFloat ) object ). isNative () ;
59
+ return true ;
60
60
} else if (object instanceof PInt ) {
61
61
try {
62
62
// try to use primitive
63
63
PInt boxed = (PInt ) object ;
64
64
boxed .longValueExact ();
65
- return ! boxed . isNative () ;
65
+ return true ;
66
66
} catch (ArithmeticException e ) {
67
67
return false ;
68
68
}
69
69
} else if (object instanceof PString ) {
70
- return !(( PString ) object ). isNative () ;
70
+ return true ;
71
71
}
72
72
return false ;
73
73
}
Original file line number Diff line number Diff line change @@ -54,27 +54,27 @@ public static PTypeUnboxNode create() {
54
54
55
55
public abstract Object execute (Object value );
56
56
57
- @ Specialization ( guards = "!obj.isNative()" )
57
+ @ Specialization
58
58
String access (PString obj ) {
59
59
return obj .getValue ();
60
60
}
61
61
62
- @ Specialization ( guards = "!obj.isNative()" )
62
+ @ Specialization
63
63
double access (PFloat obj ) {
64
64
return obj .getValue ();
65
65
}
66
66
67
- @ Specialization (guards = "!obj.isNative()" , rewriteOn = ArithmeticException .class )
67
+ @ Specialization (rewriteOn = ArithmeticException .class )
68
68
int accessInt (PInt obj ) {
69
69
return obj .intValueExact ();
70
70
}
71
71
72
- @ Specialization (guards = "!obj.isNative()" , rewriteOn = ArithmeticException .class )
72
+ @ Specialization (rewriteOn = ArithmeticException .class )
73
73
long accessLong (PInt obj ) {
74
74
return obj .longValueExact ();
75
75
}
76
76
77
- @ Specialization ( guards = "!obj.isNative()" )
77
+ @ Specialization
78
78
Object accessPInt (PInt obj ) {
79
79
try {
80
80
// try to use primitive
You can’t perform that action at this time.
0 commit comments