File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/capi Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -3168,8 +3168,7 @@ static Assumption getHandleValidAssumption(PythonNativeWrapper nativeWrapper) {
3168
3168
* any PyVarObject usually returns the number of contained elements.
3169
3169
*/
3170
3170
@ GenerateUncached
3171
- @ ImportStatic (PythonOptions .class )
3172
- abstract static class ObSizeNode extends Node {
3171
+ abstract static class ObSizeNode extends PNodeWithContext {
3173
3172
3174
3173
public abstract long execute (Object object );
3175
3174
@@ -3185,20 +3184,19 @@ long doLong(@SuppressWarnings("unused") long object) {
3185
3184
int size = 0 ;
3186
3185
while (t != 0 ) {
3187
3186
++size ;
3188
- t >>>= PythonContext . get ( this ).getCApiContext ().getPyLongBitsInDigit ();
3187
+ t >>>= getContext ( ).getCApiContext ().getPyLongBitsInDigit ();
3189
3188
}
3190
3189
return size * sign ;
3191
3190
}
3192
3191
3193
3192
@ Specialization
3194
3193
long doPInt (PInt object ) {
3195
- return ((PInt .bitLength (object .abs ()) - 1 ) / PythonContext . get ( this ).getCApiContext ().getPyLongBitsInDigit () + 1 ) * (object .isNegative () ? -1 : 1 );
3194
+ return ((PInt .bitLength (object .abs ()) - 1 ) / getContext ( ).getCApiContext ().getPyLongBitsInDigit () + 1 ) * (object .isNegative () ? -1 : 1 );
3196
3195
}
3197
3196
3198
3197
@ Specialization
3199
- static long doPythonNativeVoidPtr (@ SuppressWarnings ("unused" ) PythonNativeVoidPtr object ,
3200
- @ Shared ("context" ) @ CachedContext (PythonLanguage .class ) PythonContext context ) {
3201
- return ((Long .SIZE - 1 ) / context .getCApiContext ().getPyLongBitsInDigit () + 1 );
3198
+ long doPythonNativeVoidPtr (@ SuppressWarnings ("unused" ) PythonNativeVoidPtr object ) {
3199
+ return ((Long .SIZE - 1 ) / getContext ().getCApiContext ().getPyLongBitsInDigit () + 1 );
3202
3200
}
3203
3201
3204
3202
@ Specialization (guards = "isFallback(object)" )
You can’t perform that action at this time.
0 commit comments