42
42
import com .oracle .graal .python .builtins .objects .floats .PFloat ;
43
43
import com .oracle .graal .python .builtins .objects .ints .PInt ;
44
44
import com .oracle .graal .python .builtins .objects .tuple .PTuple ;
45
- import com .oracle .graal .python .nodes .PBaseNode ;
46
45
import com .oracle .graal .python .nodes .PGuards ;
47
- import com .oracle .graal .python .nodes .SpecialMethodNames ;
48
46
import com .oracle .graal .python .nodes .call .special .LookupAndCallUnaryNode ;
49
47
import com .oracle .graal .python .nodes .control .GetIteratorNode ;
50
48
import com .oracle .graal .python .nodes .function .PythonBuiltinBaseNode ;
@@ -108,7 +106,7 @@ public abstract static class MathDoubleUnaryBuiltinNode extends MathUnaryBuiltin
108
106
109
107
public abstract double executeObject (Object value );
110
108
111
- public double count (@ SuppressWarnings ( "unused" ) double value ) {
109
+ public double count (double value ) {
112
110
throw raise (NotImplementedError , "count function in Math" );
113
111
}
114
112
@@ -336,7 +334,6 @@ public double copySignOO(Object magnitude, Object sign) {
336
334
337
335
@ Builtin (name = "factorial" , fixedNumOfArguments = 1 )
338
336
@ ImportStatic (Double .class )
339
- @ SuppressWarnings ("unused" )
340
337
@ GenerateNodeFactory
341
338
public abstract static class FactorialNode extends PythonUnaryBuiltinNode {
342
339
@@ -756,12 +753,12 @@ public PTuple frexpO(Object value,
756
753
@ GenerateNodeFactory
757
754
public abstract static class IsNanNode extends PythonUnaryBuiltinNode {
758
755
@ Specialization
759
- public boolean isNan (@ SuppressWarnings ( "unused" ) long value ) {
756
+ public boolean isNan (long value ) {
760
757
return false ;
761
758
}
762
759
763
760
@ Specialization
764
- public boolean isNan (@ SuppressWarnings ( "unused" ) PInt value ) {
761
+ public boolean isNan (PInt value ) {
765
762
return false ;
766
763
}
767
764
@@ -806,17 +803,17 @@ private boolean isCloseDouble(double a, double b, double rel_tol, double abs_tol
806
803
}
807
804
808
805
@ Specialization
809
- public boolean isClose (double a , double b , @ SuppressWarnings ( "unused" ) PNone rel_tol , @ SuppressWarnings ( "unused" ) PNone abs_tol ) {
806
+ public boolean isClose (double a , double b , PNone rel_tol , PNone abs_tol ) {
810
807
return isCloseDouble (a , b , DEFAULT_REL , DEFAULT_ABS );
811
808
}
812
809
813
810
@ Specialization
814
- public boolean isClose (double a , double b , @ SuppressWarnings ( "unused" ) PNone rel_tol , double abs_tol ) {
811
+ public boolean isClose (double a , double b , PNone rel_tol , double abs_tol ) {
815
812
return isCloseDouble (a , b , DEFAULT_REL , abs_tol );
816
813
}
817
814
818
815
@ Specialization
819
- public boolean isClose (double a , double b , double rel_tol , @ SuppressWarnings ( "unused" ) PNone abs_tol ) {
816
+ public boolean isClose (double a , double b , double rel_tol , PNone abs_tol ) {
820
817
return isCloseDouble (a , b , rel_tol , DEFAULT_ABS );
821
818
}
822
819
@@ -834,7 +831,6 @@ public boolean isClose(double a, long b, double rel_tol, PNone abs_tol) {
834
831
@ Builtin (name = "ldexp" , fixedNumOfArguments = 2 )
835
832
@ TypeSystemReference (PythonArithmeticTypes .class )
836
833
@ GenerateNodeFactory
837
- @ SuppressWarnings ("unused" )
838
834
public abstract static class LdexpNode extends PythonBuiltinNode {
839
835
840
836
private static final String EXPECTED_INT_MESSAGE = "Expected an int as second argument to ldexp." ;
@@ -1328,12 +1324,12 @@ public double count(double value) {
1328
1324
public abstract static class IsFiniteNode extends PythonUnaryBuiltinNode {
1329
1325
1330
1326
@ Specialization
1331
- public boolean isfinite (@ SuppressWarnings ( "unused" ) long value ) {
1327
+ public boolean isfinite (long value ) {
1332
1328
return true ;
1333
1329
}
1334
1330
1335
1331
@ Specialization
1336
- public boolean isfinite (@ SuppressWarnings ( "unused" ) PInt value ) {
1332
+ public boolean isfinite (PInt value ) {
1337
1333
return true ;
1338
1334
}
1339
1335
@@ -1356,12 +1352,12 @@ public boolean isinf(Object value,
1356
1352
public abstract static class IsInfNode extends PythonUnaryBuiltinNode {
1357
1353
1358
1354
@ Specialization
1359
- public boolean isinf (@ SuppressWarnings ( "unused" ) long value ) {
1355
+ public boolean isinf (long value ) {
1360
1356
return false ;
1361
1357
}
1362
1358
1363
1359
@ Specialization
1364
- public boolean isinf (@ SuppressWarnings ( "unused" ) PInt value ) {
1360
+ public boolean isinf (PInt value ) {
1365
1361
return false ;
1366
1362
}
1367
1363
@@ -1445,15 +1441,15 @@ public double log(long value, PNone novalue,
1445
1441
}
1446
1442
1447
1443
@ Specialization
1448
- public double logDN (double value , @ SuppressWarnings ( "unused" ) PNone novalue ,
1444
+ public double logDN (double value , PNone novalue ,
1449
1445
@ Cached ("createBinaryProfile()" ) ConditionProfile doNotFit ) {
1450
1446
raiseMathError (doNotFit , value <= 0 );
1451
1447
return Math .log (value );
1452
1448
}
1453
1449
1454
1450
@ Specialization
1455
1451
@ TruffleBoundary
1456
- public double logPIN (PInt value , @ SuppressWarnings ( "unused" ) PNone novalue ,
1452
+ public double logPIN (PInt value , PNone novalue ,
1457
1453
@ Cached ("createBinaryProfile()" ) ConditionProfile doNotFit ) {
1458
1454
BigInteger bValue = value .getValue ();
1459
1455
raiseMathError (doNotFit , bValue .compareTo (BigInteger .ZERO ) == -1 );
@@ -1989,7 +1985,7 @@ static double m_erf_series(double x) {
1989
1985
1990
1986
x2 = x * x ;
1991
1987
acc = 0.0 ;
1992
- fk = ( double ) ERF_SERIES_TERMS + 0.5 ;
1988
+ fk = ERF_SERIES_TERMS + 0.5 ;
1993
1989
for (i = 0 ; i < ERF_SERIES_TERMS ; i ++) {
1994
1990
acc = 2.0 + x2 * acc / fk ;
1995
1991
fk -= 1.0 ;
0 commit comments