@@ -371,7 +371,7 @@ public abstract static class ToJavaClassNode extends ToJavaObjectNode {
371
371
abstract static class TruffleString_AsString extends NativeBuiltin {
372
372
373
373
@ Specialization (guards = "isString(str)" )
374
- Object run (Object str ,
374
+ static Object run (Object str ,
375
375
@ Cached AsCharPointerNode asCharPointerNode ) {
376
376
return asCharPointerNode .execute (str );
377
377
}
@@ -386,7 +386,7 @@ Object run(VirtualFrame frame, Object o) {
386
386
@ GenerateNodeFactory
387
387
public abstract static class PyErrorHandlerNode extends PythonUnaryBuiltinNode {
388
388
@ Specialization
389
- Object run (PythonModule cextPython ) {
389
+ static Object run (PythonModule cextPython ) {
390
390
return ((PythonCextBuiltins ) cextPython .getBuiltins ()).errorHandler ;
391
391
}
392
392
}
@@ -395,7 +395,7 @@ Object run(PythonModule cextPython) {
395
395
@ GenerateNodeFactory
396
396
public abstract static class PyNotImplementedNode extends PythonBuiltinNode {
397
397
@ Specialization
398
- Object run () {
398
+ static Object run () {
399
399
return PNotImplemented .NOT_IMPLEMENTED ;
400
400
}
401
401
}
@@ -404,7 +404,7 @@ Object run() {
404
404
@ GenerateNodeFactory
405
405
public abstract static class PyTrueNode extends PythonBuiltinNode {
406
406
@ Specialization
407
- Object run () {
407
+ static Object run () {
408
408
return true ;
409
409
}
410
410
}
@@ -413,7 +413,7 @@ Object run() {
413
413
@ GenerateNodeFactory
414
414
public abstract static class PyFalseNode extends PythonBuiltinNode {
415
415
@ Specialization
416
- Object run () {
416
+ static Object run () {
417
417
return false ;
418
418
}
419
419
}
@@ -422,7 +422,7 @@ Object run() {
422
422
@ GenerateNodeFactory
423
423
public abstract static class PyEllipsisNode extends PythonBuiltinNode {
424
424
@ Specialization
425
- Object run () {
425
+ static Object run () {
426
426
return PEllipsis .INSTANCE ;
427
427
}
428
428
}
@@ -433,7 +433,7 @@ Object run() {
433
433
@ GenerateNodeFactory
434
434
public abstract static class PyDictProxyNewNode extends PythonUnaryBuiltinNode {
435
435
@ Specialization
436
- public Object values (VirtualFrame frame , Object obj ,
436
+ public static Object values (VirtualFrame frame , Object obj ,
437
437
@ Cached MappingproxyNode mappingNode ) {
438
438
return mappingNode .execute (frame , PythonBuiltinClassType .PMappingproxy , obj );
439
439
}
@@ -446,7 +446,7 @@ public Object values(VirtualFrame frame, Object obj,
446
446
public abstract static class PyChangeREFNode extends PythonUnaryBuiltinNode {
447
447
@ SuppressWarnings ("unused" )
448
448
@ Specialization
449
- public Object values (Object obj ) {
449
+ public static Object values (Object obj ) {
450
450
// pass
451
451
return PNone .NONE ;
452
452
}
@@ -463,7 +463,7 @@ public Object values(Object obj) {
463
463
public abstract static class ToSulongNode extends PythonUnaryBuiltinNode {
464
464
465
465
@ Specialization
466
- Object run (Object obj ,
466
+ static Object run (Object obj ,
467
467
@ Cached CExtNodes .ToSulongNode toSulongNode ) {
468
468
return toSulongNode .execute (obj );
469
469
}
@@ -732,7 +732,7 @@ Object doWithoutTraceback(@SuppressWarnings("unused") Object typ, PBaseException
732
732
733
733
@ Fallback
734
734
@ SuppressWarnings ("unused" )
735
- Object doFallback (Object typ , Object val , Object tb ) {
735
+ static Object doFallback (Object typ , Object val , Object tb ) {
736
736
// TODO we should still store the values to return them with 'PyErr_GetExcInfo' (or
737
737
// 'sys.exc_info')
738
738
return PNone .NONE ;
@@ -749,7 +749,7 @@ abstract static class PyErrDisplay extends PythonBuiltinNode {
749
749
750
750
@ Specialization
751
751
@ SuppressWarnings ("unused" )
752
- Object run (Object typ , PBaseException val , Object tb ) {
752
+ static Object run (Object typ , PBaseException val , Object tb ) {
753
753
if (val .getException () != null ) {
754
754
ExceptionUtils .printPythonLikeStackTrace (val .getException ());
755
755
}
@@ -778,21 +778,21 @@ abstract static class PyObject_Setattr extends PythonTernaryBuiltinNode {
778
778
abstract Object execute (Object object , String key , Object value );
779
779
780
780
@ Specialization
781
- Object doBuiltinClass (PythonBuiltinClass object , String key , Object value ,
781
+ static Object doBuiltinClass (PythonBuiltinClass object , String key , Object value ,
782
782
@ Exclusive @ Cached ("createForceType()" ) WriteAttributeToObjectNode writeAttrNode ) {
783
783
writeAttrNode .execute (object , key , value );
784
784
return PNone .NONE ;
785
785
}
786
786
787
787
@ Specialization
788
- Object doNativeClass (PythonNativeClass object , String key , Object value ,
788
+ static Object doNativeClass (PythonNativeClass object , String key , Object value ,
789
789
@ Exclusive @ Cached ("createForceType()" ) WriteAttributeToObjectNode writeAttrNode ) {
790
790
writeAttrNode .execute (object , key , value );
791
791
return PNone .NONE ;
792
792
}
793
793
794
794
@ Specialization (guards = {"!isPythonBuiltinClass(object)" })
795
- Object doObject (PythonObject object , String key , Object value ,
795
+ static Object doObject (PythonObject object , String key , Object value ,
796
796
@ Exclusive @ Cached WriteAttributeToDynamicObjectNode writeAttrToDynamicObjectNode ) {
797
797
writeAttrToDynamicObjectNode .execute (object .getStorage (), key , value );
798
798
return PNone .NONE ;
@@ -865,7 +865,7 @@ private static Object[] collect(MroSequenceStorage mro, int idx) {
865
865
@ GenerateNodeFactory
866
866
abstract static class Py_NoValue extends PythonBuiltinNode {
867
867
@ Specialization
868
- PNone doNoValue () {
868
+ static PNone doNoValue () {
869
869
return PNone .NO_VALUE ;
870
870
}
871
871
}
@@ -874,7 +874,7 @@ PNone doNoValue() {
874
874
@ GenerateNodeFactory
875
875
abstract static class PyNoneNode extends PythonBuiltinNode {
876
876
@ Specialization
877
- PNone doNativeNone () {
877
+ static PNone doNativeNone () {
878
878
return PNone .NONE ;
879
879
}
880
880
}
@@ -1150,12 +1150,12 @@ Object doUnicode(VirtualFrame frame, Object s, long elementSize, Object errorMar
1150
1150
@ GenerateNodeFactory
1151
1151
abstract static class PyTruffle_Bytes_AsString extends NativeBuiltin {
1152
1152
@ Specialization
1153
- Object doBytes (PBytes bytes , @ SuppressWarnings ("unused" ) Object errorMarker ) {
1153
+ static Object doBytes (PBytes bytes , @ SuppressWarnings ("unused" ) Object errorMarker ) {
1154
1154
return new PySequenceArrayWrapper (bytes , 1 );
1155
1155
}
1156
1156
1157
1157
@ Specialization
1158
- Object doUnicode (PString str , @ SuppressWarnings ("unused" ) Object errorMarker ) {
1158
+ static Object doUnicode (PString str , @ SuppressWarnings ("unused" ) Object errorMarker ) {
1159
1159
return new CStringWrapper (str .getValue ());
1160
1160
}
1161
1161
@@ -1169,7 +1169,7 @@ Object doUnicode(VirtualFrame frame, Object o, Object errorMarker) {
1169
1169
@ GenerateNodeFactory
1170
1170
abstract static class PyHashImagNode extends PythonBuiltinNode {
1171
1171
@ Specialization
1172
- long getHash () {
1172
+ static long getHash () {
1173
1173
return SysModuleBuiltins .HASH_IMAG ;
1174
1174
}
1175
1175
}
@@ -1500,7 +1500,7 @@ static Object upcall(VirtualFrame frame, @SuppressWarnings("unused") Object self
1500
1500
abstract static class UpcallDNode extends UpcallLandingNode {
1501
1501
1502
1502
@ 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 ,
1504
1504
@ Cached CastToJavaDoubleNode castToDoubleNode ,
1505
1505
@ Cached ObjectUpcallNode upcallNode ,
1506
1506
@ Cached TransformExceptionToNativeNode transformExceptionToNativeNode ) {
@@ -1535,14 +1535,14 @@ Object upcall(VirtualFrame frame, @SuppressWarnings("unused") PythonModule cextM
1535
1535
abstract static class UpcallCextBorrowedNode extends UpcallLandingNode {
1536
1536
1537
1537
@ 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 ,
1539
1539
@ Cached CextUpcallNode upcallNode ,
1540
1540
@ Shared ("toSulongNode" ) @ Cached CExtNodes .ToSulongNode toSulongNode ) {
1541
1541
return toSulongNode .execute (upcallNode .execute (frame , cextModule , args ));
1542
1542
}
1543
1543
1544
1544
@ 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 ,
1546
1546
@ Cached DirectUpcallNode upcallNode ,
1547
1547
@ Shared ("toSulongNode" ) @ Cached CExtNodes .ToSulongNode toSulongNode ) {
1548
1548
return toSulongNode .execute (upcallNode .execute (frame , args ));
@@ -1579,14 +1579,14 @@ static Object doDirect(VirtualFrame frame, @SuppressWarnings("unused") PythonMod
1579
1579
abstract static class UpcallCextDNode extends UpcallLandingNode {
1580
1580
1581
1581
@ 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 ,
1583
1583
@ Cached CextUpcallNode upcallNode ,
1584
1584
@ Shared ("castToDoubleNode" ) @ Cached CastToJavaDoubleNode castToDoubleNode ) {
1585
1585
return castToDoubleNode .execute (upcallNode .execute (frame , cextModule , args ));
1586
1586
}
1587
1587
1588
1588
@ 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 ,
1590
1590
@ Cached DirectUpcallNode upcallNode ,
1591
1591
@ Shared ("castToDoubleNode" ) @ Cached CastToJavaDoubleNode castToDoubleNode ) {
1592
1592
return castToDoubleNode .execute (upcallNode .execute (frame , args ));
@@ -1699,7 +1699,7 @@ Object doIt(VirtualFrame frame, Object object,
1699
1699
@ GenerateNodeFactory
1700
1700
abstract static class AsDouble extends PythonUnaryBuiltinNode {
1701
1701
@ Specialization
1702
- double doIt (Object object ,
1702
+ static double doIt (Object object ,
1703
1703
@ Cached CastToJavaDoubleNode castToDoubleNode ) {
1704
1704
return castToDoubleNode .execute (object );
1705
1705
}
@@ -1761,7 +1761,7 @@ protected static Class<?> getClazz(Object v) {
1761
1761
}
1762
1762
1763
1763
@ 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 ,
1765
1765
@ Cached ("getClazz(a)" ) Class <?> cachedClassA ,
1766
1766
@ Cached ("getClazz(b)" ) Class <?> cachedClassB ,
1767
1767
@ Cached ToJavaNode leftToJavaNode ,
@@ -1773,7 +1773,7 @@ int doCachedClass(VirtualFrame frame, Object a, Object b,
1773
1773
}
1774
1774
1775
1775
@ Specialization (replaces = {"doCached" , "doCachedClass" })
1776
- int doGeneric (VirtualFrame frame , Object a , Object b ,
1776
+ static int doGeneric (VirtualFrame frame , Object a , Object b ,
1777
1777
@ Cached ToJavaNode leftToJavaNode ,
1778
1778
@ Cached ToJavaNode rightToJavaNode ,
1779
1779
@ Cached IsSubtypeNode isSubtypeNode ) {
@@ -1782,7 +1782,7 @@ int doGeneric(VirtualFrame frame, Object a, Object b,
1782
1782
return isSubtypeNode .execute (frame , ua , ub ) ? 1 : 0 ;
1783
1783
}
1784
1784
1785
- int doSlow (VirtualFrame frame , Object derived , Object cls ) {
1785
+ static int doSlow (VirtualFrame frame , Object derived , Object cls ) {
1786
1786
return doGeneric (frame , derived , cls , ToJavaNodeGen .getUncached (), ToJavaNodeGen .getUncached (), IsSubtypeNodeGen .getUncached ());
1787
1787
}
1788
1788
}
0 commit comments