@@ -195,7 +195,7 @@ private static boolean isBuiltinClassNotModule(Object lazyClass) {
195
195
if (lazyClass instanceof PythonBuiltinClass ) {
196
196
return ((PythonBuiltinClass ) lazyClass ).getType () != PythonBuiltinClassType .PythonModule ;
197
197
} else if (lazyClass instanceof PythonBuiltinClassType ) {
198
- return (( PythonBuiltinClassType ) lazyClass ) != PythonBuiltinClassType .PythonModule ;
198
+ return lazyClass != PythonBuiltinClassType .PythonModule ;
199
199
}
200
200
return false ;
201
201
}
@@ -235,13 +235,13 @@ public final Object varArgExecute(VirtualFrame frame, @SuppressWarnings("unused"
235
235
236
236
@ Specialization (guards = {"arguments.length == 0" , "keywords.length == 0" })
237
237
@ SuppressWarnings ("unused" )
238
- public PNone initNoArgs (Object self , Object [] arguments , PKeyword [] keywords ) {
238
+ static PNone initNoArgs (Object self , Object [] arguments , PKeyword [] keywords ) {
239
239
return PNone .NONE ;
240
240
}
241
241
242
242
@ Specialization (replaces = "initNoArgs" )
243
243
@ SuppressWarnings ("unused" )
244
- public PNone init (Object self , Object [] arguments , PKeyword [] keywords ,
244
+ PNone init (Object self , Object [] arguments , PKeyword [] keywords ,
245
245
@ Cached GetClassNode getClassNode ,
246
246
@ Cached ConditionProfile overridesNew ,
247
247
@ Cached ConditionProfile overridesInit ,
@@ -292,7 +292,7 @@ public static <T extends NodeFactory<? extends PythonBuiltinBaseNode>> boolean o
292
292
public abstract static class HashNode extends PythonUnaryBuiltinNode {
293
293
@ TruffleBoundary
294
294
@ Specialization
295
- public int hash (Object self ) {
295
+ public static int hash (Object self ) {
296
296
return self .hashCode ();
297
297
}
298
298
}
@@ -301,7 +301,7 @@ public int hash(Object self) {
301
301
@ GenerateNodeFactory
302
302
public abstract static class EqNode extends PythonBinaryBuiltinNode {
303
303
@ Specialization
304
- Object eq (Object self , Object other ,
304
+ static Object eq (Object self , Object other ,
305
305
@ Cached ConditionProfile isEq ,
306
306
@ Cached IsNode isNode ) {
307
307
if (isEq .profile (isNode .execute (self , other ))) {
@@ -322,7 +322,7 @@ public abstract static class NeNode extends PythonBinaryBuiltinNode {
322
322
@ Child private CoerceToBooleanNode ifFalseNode ;
323
323
324
324
@ Specialization
325
- boolean ne (PythonAbstractNativeObject self , PythonAbstractNativeObject other ,
325
+ static boolean ne (PythonAbstractNativeObject self , PythonAbstractNativeObject other ,
326
326
@ Cached CExtNodes .PointerCompareNode nativeNeNode ) {
327
327
return nativeNeNode .execute (__NE__ , self , other );
328
328
}
@@ -353,7 +353,7 @@ Object ne(VirtualFrame frame, Object self, Object other) {
353
353
public abstract static class LtLeGtGeNode extends PythonBinaryBuiltinNode {
354
354
@ Specialization
355
355
@ SuppressWarnings ("unused" )
356
- Object notImplemented (Object self , Object other ) {
356
+ static Object notImplemented (Object self , Object other ) {
357
357
return PNotImplemented .NOT_IMPLEMENTED ;
358
358
}
359
359
}
@@ -728,7 +728,7 @@ Object dict(PythonAbstractNativeObject self, @SuppressWarnings("unused") PNone n
728
728
}
729
729
730
730
@ Specialization (limit = "1" )
731
- Object dict (VirtualFrame frame , @ SuppressWarnings ("unused" ) PythonObject self , @ SuppressWarnings ("unused" ) DescriptorDeleteMarker marker ,
731
+ static Object dict (VirtualFrame frame , @ SuppressWarnings ("unused" ) PythonObject self , @ SuppressWarnings ("unused" ) DescriptorDeleteMarker marker ,
732
732
@ Cached GetClassNode getClassNode ,
733
733
@ Cached GetBaseClassNode getBaseNode ,
734
734
@ Cached ("createForLookupOfUnmanagedClasses(__DICT__)" ) LookupAttributeInMRONode getDescrNode ,
@@ -744,8 +744,7 @@ Object dict(VirtualFrame frame, @SuppressWarnings("unused") PythonObject self, @
744
744
try {
745
745
lib .deleteDict (self );
746
746
} catch (UnsupportedMessageException e ) {
747
- CompilerDirectives .transferToInterpreterAndInvalidate ();
748
- throw new IllegalStateException (e );
747
+ throw CompilerDirectives .shouldNotReachHere (e );
749
748
}
750
749
return PNone .NONE ;
751
750
}
@@ -808,7 +807,7 @@ abstract static class RichCompareNode extends PythonTernaryBuiltinNode {
808
807
protected static final int NO_SLOW_PATH = Integer .MAX_VALUE ;
809
808
@ CompilationFinal private boolean seenNonBoolean = false ;
810
809
811
- protected BinaryComparisonNode createOp (String op ) {
810
+ static BinaryComparisonNode createOp (String op ) {
812
811
return (BinaryComparisonNode ) PythonLanguage .getCurrent ().getNodeFactory ().createComparisonOperation (op , null , null );
813
812
}
814
813
@@ -835,7 +834,7 @@ boolean richcmp(VirtualFrame frame, Object left, Object right, @SuppressWarnings
835
834
@ GenerateNodeFactory
836
835
abstract static class InitSubclass extends PythonUnaryBuiltinNode {
837
836
@ Specialization
838
- PNone initSubclass (@ SuppressWarnings ("unused" ) Object self ) {
837
+ static PNone initSubclass (@ SuppressWarnings ("unused" ) Object self ) {
839
838
return PNone .NONE ;
840
839
}
841
840
}
@@ -889,7 +888,7 @@ Object doit(VirtualFrame frame, Object obj,
889
888
public abstract static class ReduceNode extends PythonBuiltinNode {
890
889
@ Specialization
891
890
@ SuppressWarnings ("unused" )
892
- Object doit (VirtualFrame frame , Object obj , @ SuppressWarnings ("unused" ) Object ignored ,
891
+ static Object doit (VirtualFrame frame , Object obj , @ SuppressWarnings ("unused" ) Object ignored ,
893
892
@ Cached ObjectNodes .CommonReduceNode commonReduceNode ) {
894
893
return commonReduceNode .execute (frame , obj , 0 );
895
894
}
@@ -910,7 +909,7 @@ protected ArgumentClinicProvider getArgumentClinic() {
910
909
911
910
@ Specialization
912
911
@ SuppressWarnings ("unused" )
913
- Object doit (VirtualFrame frame , Object obj , int proto ,
912
+ static Object doit (VirtualFrame frame , Object obj , int proto ,
914
913
@ Cached ConditionProfile reduceProfile ,
915
914
@ Cached ObjectNodes .CommonReduceNode commonReduceNode ,
916
915
@ CachedLibrary (limit = "getCallSiteInlineCacheMaxDepth()" ) PythonObjectLibrary pol ) {
0 commit comments