@@ -371,7 +371,7 @@ public abstract static class ToJavaClassNode extends ToJavaObjectNode {
371371 abstract static class TruffleString_AsString extends NativeBuiltin {
372372
373373 @ Specialization (guards = "isString(str)" )
374- Object run (Object str ,
374+ static Object run (Object str ,
375375 @ Cached AsCharPointerNode asCharPointerNode ) {
376376 return asCharPointerNode .execute (str );
377377 }
@@ -386,7 +386,7 @@ Object run(VirtualFrame frame, Object o) {
386386 @ GenerateNodeFactory
387387 public abstract static class PyErrorHandlerNode extends PythonUnaryBuiltinNode {
388388 @ Specialization
389- Object run (PythonModule cextPython ) {
389+ static Object run (PythonModule cextPython ) {
390390 return ((PythonCextBuiltins ) cextPython .getBuiltins ()).errorHandler ;
391391 }
392392 }
@@ -395,7 +395,7 @@ Object run(PythonModule cextPython) {
395395 @ GenerateNodeFactory
396396 public abstract static class PyNotImplementedNode extends PythonBuiltinNode {
397397 @ Specialization
398- Object run () {
398+ static Object run () {
399399 return PNotImplemented .NOT_IMPLEMENTED ;
400400 }
401401 }
@@ -404,7 +404,7 @@ Object run() {
404404 @ GenerateNodeFactory
405405 public abstract static class PyTrueNode extends PythonBuiltinNode {
406406 @ Specialization
407- Object run () {
407+ static Object run () {
408408 return true ;
409409 }
410410 }
@@ -413,7 +413,7 @@ Object run() {
413413 @ GenerateNodeFactory
414414 public abstract static class PyFalseNode extends PythonBuiltinNode {
415415 @ Specialization
416- Object run () {
416+ static Object run () {
417417 return false ;
418418 }
419419 }
@@ -422,7 +422,7 @@ Object run() {
422422 @ GenerateNodeFactory
423423 public abstract static class PyEllipsisNode extends PythonBuiltinNode {
424424 @ Specialization
425- Object run () {
425+ static Object run () {
426426 return PEllipsis .INSTANCE ;
427427 }
428428 }
@@ -433,7 +433,7 @@ Object run() {
433433 @ GenerateNodeFactory
434434 public abstract static class PyDictProxyNewNode extends PythonUnaryBuiltinNode {
435435 @ Specialization
436- public Object values (VirtualFrame frame , Object obj ,
436+ public static Object values (VirtualFrame frame , Object obj ,
437437 @ Cached MappingproxyNode mappingNode ) {
438438 return mappingNode .execute (frame , PythonBuiltinClassType .PMappingproxy , obj );
439439 }
@@ -446,7 +446,7 @@ public Object values(VirtualFrame frame, Object obj,
446446 public abstract static class PyChangeREFNode extends PythonUnaryBuiltinNode {
447447 @ SuppressWarnings ("unused" )
448448 @ Specialization
449- public Object values (Object obj ) {
449+ public static Object values (Object obj ) {
450450 // pass
451451 return PNone .NONE ;
452452 }
@@ -463,7 +463,7 @@ public Object values(Object obj) {
463463 public abstract static class ToSulongNode extends PythonUnaryBuiltinNode {
464464
465465 @ Specialization
466- Object run (Object obj ,
466+ static Object run (Object obj ,
467467 @ Cached CExtNodes .ToSulongNode toSulongNode ) {
468468 return toSulongNode .execute (obj );
469469 }
@@ -732,7 +732,7 @@ Object doWithoutTraceback(@SuppressWarnings("unused") Object typ, PBaseException
732732
733733 @ Fallback
734734 @ SuppressWarnings ("unused" )
735- Object doFallback (Object typ , Object val , Object tb ) {
735+ static Object doFallback (Object typ , Object val , Object tb ) {
736736 // TODO we should still store the values to return them with 'PyErr_GetExcInfo' (or
737737 // 'sys.exc_info')
738738 return PNone .NONE ;
@@ -749,7 +749,7 @@ abstract static class PyErrDisplay extends PythonBuiltinNode {
749749
750750 @ Specialization
751751 @ SuppressWarnings ("unused" )
752- Object run (Object typ , PBaseException val , Object tb ) {
752+ static Object run (Object typ , PBaseException val , Object tb ) {
753753 if (val .getException () != null ) {
754754 ExceptionUtils .printPythonLikeStackTrace (val .getException ());
755755 }
@@ -778,21 +778,21 @@ abstract static class PyObject_Setattr extends PythonTernaryBuiltinNode {
778778 abstract Object execute (Object object , String key , Object value );
779779
780780 @ Specialization
781- Object doBuiltinClass (PythonBuiltinClass object , String key , Object value ,
781+ static Object doBuiltinClass (PythonBuiltinClass object , String key , Object value ,
782782 @ Exclusive @ Cached ("createForceType()" ) WriteAttributeToObjectNode writeAttrNode ) {
783783 writeAttrNode .execute (object , key , value );
784784 return PNone .NONE ;
785785 }
786786
787787 @ Specialization
788- Object doNativeClass (PythonNativeClass object , String key , Object value ,
788+ static Object doNativeClass (PythonNativeClass object , String key , Object value ,
789789 @ Exclusive @ Cached ("createForceType()" ) WriteAttributeToObjectNode writeAttrNode ) {
790790 writeAttrNode .execute (object , key , value );
791791 return PNone .NONE ;
792792 }
793793
794794 @ Specialization (guards = {"!isPythonBuiltinClass(object)" })
795- Object doObject (PythonObject object , String key , Object value ,
795+ static Object doObject (PythonObject object , String key , Object value ,
796796 @ Exclusive @ Cached WriteAttributeToDynamicObjectNode writeAttrToDynamicObjectNode ) {
797797 writeAttrToDynamicObjectNode .execute (object .getStorage (), key , value );
798798 return PNone .NONE ;
@@ -865,7 +865,7 @@ private static Object[] collect(MroSequenceStorage mro, int idx) {
865865 @ GenerateNodeFactory
866866 abstract static class Py_NoValue extends PythonBuiltinNode {
867867 @ Specialization
868- PNone doNoValue () {
868+ static PNone doNoValue () {
869869 return PNone .NO_VALUE ;
870870 }
871871 }
@@ -874,7 +874,7 @@ PNone doNoValue() {
874874 @ GenerateNodeFactory
875875 abstract static class PyNoneNode extends PythonBuiltinNode {
876876 @ Specialization
877- PNone doNativeNone () {
877+ static PNone doNativeNone () {
878878 return PNone .NONE ;
879879 }
880880 }
@@ -1150,12 +1150,12 @@ Object doUnicode(VirtualFrame frame, Object s, long elementSize, Object errorMar
11501150 @ GenerateNodeFactory
11511151 abstract static class PyTruffle_Bytes_AsString extends NativeBuiltin {
11521152 @ Specialization
1153- Object doBytes (PBytes bytes , @ SuppressWarnings ("unused" ) Object errorMarker ) {
1153+ static Object doBytes (PBytes bytes , @ SuppressWarnings ("unused" ) Object errorMarker ) {
11541154 return new PySequenceArrayWrapper (bytes , 1 );
11551155 }
11561156
11571157 @ Specialization
1158- Object doUnicode (PString str , @ SuppressWarnings ("unused" ) Object errorMarker ) {
1158+ static Object doUnicode (PString str , @ SuppressWarnings ("unused" ) Object errorMarker ) {
11591159 return new CStringWrapper (str .getValue ());
11601160 }
11611161
@@ -1169,7 +1169,7 @@ Object doUnicode(VirtualFrame frame, Object o, Object errorMarker) {
11691169 @ GenerateNodeFactory
11701170 abstract static class PyHashImagNode extends PythonBuiltinNode {
11711171 @ Specialization
1172- long getHash () {
1172+ static long getHash () {
11731173 return SysModuleBuiltins .HASH_IMAG ;
11741174 }
11751175 }
@@ -1500,7 +1500,7 @@ static Object upcall(VirtualFrame frame, @SuppressWarnings("unused") Object self
15001500 abstract static class UpcallDNode extends UpcallLandingNode {
15011501
15021502 @ Specialization
1503- double upcall (VirtualFrame frame , @ SuppressWarnings ("unused" ) Object self , Object [] args , @ SuppressWarnings ("unused" ) PKeyword [] kwargs ,
1503+ static double upcall (VirtualFrame frame , @ SuppressWarnings ("unused" ) Object self , Object [] args , @ SuppressWarnings ("unused" ) PKeyword [] kwargs ,
15041504 @ Cached CastToJavaDoubleNode castToDoubleNode ,
15051505 @ Cached ObjectUpcallNode upcallNode ,
15061506 @ Cached TransformExceptionToNativeNode transformExceptionToNativeNode ) {
@@ -1535,14 +1535,14 @@ Object upcall(VirtualFrame frame, @SuppressWarnings("unused") PythonModule cextM
15351535 abstract static class UpcallCextBorrowedNode extends UpcallLandingNode {
15361536
15371537 @ Specialization (guards = "isStringCallee(args)" )
1538- Object upcall (VirtualFrame frame , PythonModule cextModule , Object [] args , @ SuppressWarnings ("unused" ) PKeyword [] kwargs ,
1538+ static Object upcall (VirtualFrame frame , PythonModule cextModule , Object [] args , @ SuppressWarnings ("unused" ) PKeyword [] kwargs ,
15391539 @ Cached CextUpcallNode upcallNode ,
15401540 @ Shared ("toSulongNode" ) @ Cached CExtNodes .ToSulongNode toSulongNode ) {
15411541 return toSulongNode .execute (upcallNode .execute (frame , cextModule , args ));
15421542 }
15431543
15441544 @ Specialization (guards = "!isStringCallee(args)" )
1545- Object doDirect (VirtualFrame frame , @ SuppressWarnings ("unused" ) PythonModule cextModule , Object [] args , @ SuppressWarnings ("unused" ) PKeyword [] kwargs ,
1545+ static Object doDirect (VirtualFrame frame , @ SuppressWarnings ("unused" ) PythonModule cextModule , Object [] args , @ SuppressWarnings ("unused" ) PKeyword [] kwargs ,
15461546 @ Cached DirectUpcallNode upcallNode ,
15471547 @ Shared ("toSulongNode" ) @ Cached CExtNodes .ToSulongNode toSulongNode ) {
15481548 return toSulongNode .execute (upcallNode .execute (frame , args ));
@@ -1579,14 +1579,14 @@ static Object doDirect(VirtualFrame frame, @SuppressWarnings("unused") PythonMod
15791579 abstract static class UpcallCextDNode extends UpcallLandingNode {
15801580
15811581 @ Specialization (guards = "isStringCallee(args)" )
1582- double upcall (VirtualFrame frame , PythonModule cextModule , Object [] args , @ SuppressWarnings ("unused" ) PKeyword [] kwargs ,
1582+ static double upcall (VirtualFrame frame , PythonModule cextModule , Object [] args , @ SuppressWarnings ("unused" ) PKeyword [] kwargs ,
15831583 @ Cached CextUpcallNode upcallNode ,
15841584 @ Shared ("castToDoubleNode" ) @ Cached CastToJavaDoubleNode castToDoubleNode ) {
15851585 return castToDoubleNode .execute (upcallNode .execute (frame , cextModule , args ));
15861586 }
15871587
15881588 @ Specialization (guards = "!isStringCallee(args)" )
1589- double doDirect (VirtualFrame frame , @ SuppressWarnings ("unused" ) PythonModule cextModule , Object [] args , @ SuppressWarnings ("unused" ) PKeyword [] kwargs ,
1589+ static double doDirect (VirtualFrame frame , @ SuppressWarnings ("unused" ) PythonModule cextModule , Object [] args , @ SuppressWarnings ("unused" ) PKeyword [] kwargs ,
15901590 @ Cached DirectUpcallNode upcallNode ,
15911591 @ Shared ("castToDoubleNode" ) @ Cached CastToJavaDoubleNode castToDoubleNode ) {
15921592 return castToDoubleNode .execute (upcallNode .execute (frame , args ));
@@ -1699,7 +1699,7 @@ Object doIt(VirtualFrame frame, Object object,
16991699 @ GenerateNodeFactory
17001700 abstract static class AsDouble extends PythonUnaryBuiltinNode {
17011701 @ Specialization
1702- double doIt (Object object ,
1702+ static double doIt (Object object ,
17031703 @ Cached CastToJavaDoubleNode castToDoubleNode ) {
17041704 return castToDoubleNode .execute (object );
17051705 }
@@ -1761,7 +1761,7 @@ protected static Class<?> getClazz(Object v) {
17611761 }
17621762
17631763 @ Specialization (replaces = "doCached" , guards = {"cachedClassA == getClazz(a)" , "cachedClassB == getClazz(b)" }, limit = "getVariableArgumentInlineCacheLimit()" )
1764- int doCachedClass (VirtualFrame frame , Object a , Object b ,
1764+ static int doCachedClass (VirtualFrame frame , Object a , Object b ,
17651765 @ Cached ("getClazz(a)" ) Class <?> cachedClassA ,
17661766 @ Cached ("getClazz(b)" ) Class <?> cachedClassB ,
17671767 @ Cached ToJavaNode leftToJavaNode ,
@@ -1773,7 +1773,7 @@ int doCachedClass(VirtualFrame frame, Object a, Object b,
17731773 }
17741774
17751775 @ Specialization (replaces = {"doCached" , "doCachedClass" })
1776- int doGeneric (VirtualFrame frame , Object a , Object b ,
1776+ static int doGeneric (VirtualFrame frame , Object a , Object b ,
17771777 @ Cached ToJavaNode leftToJavaNode ,
17781778 @ Cached ToJavaNode rightToJavaNode ,
17791779 @ Cached IsSubtypeNode isSubtypeNode ) {
@@ -1782,7 +1782,7 @@ int doGeneric(VirtualFrame frame, Object a, Object b,
17821782 return isSubtypeNode .execute (frame , ua , ub ) ? 1 : 0 ;
17831783 }
17841784
1785- int doSlow (VirtualFrame frame , Object derived , Object cls ) {
1785+ static int doSlow (VirtualFrame frame , Object derived , Object cls ) {
17861786 return doGeneric (frame , derived , cls , ToJavaNodeGen .getUncached (), ToJavaNodeGen .getUncached (), IsSubtypeNodeGen .getUncached ());
17871787 }
17881788 }
0 commit comments