@@ -106,7 +106,7 @@ public abstract static class MathDoubleUnaryBuiltinNode extends MathUnaryBuiltin
106
106
107
107
public abstract double executeObject (Object value );
108
108
109
- public double count (double value ) {
109
+ public double count (@ SuppressWarnings ( "unused" ) double value ) {
110
110
throw raise (NotImplementedError , "count function in Math" );
111
111
}
112
112
@@ -358,12 +358,12 @@ private BigInteger factorialPart(long start, long n) {
358
358
}
359
359
360
360
@ Specialization
361
- public int factorialBoolean (boolean value ) {
361
+ public int factorialBoolean (@ SuppressWarnings ( "unused" ) boolean value ) {
362
362
return 1 ;
363
363
}
364
364
365
365
@ Specialization (guards = {"value < 0" })
366
- public long factorialNegativeInt (int value ) {
366
+ public long factorialNegativeInt (@ SuppressWarnings ( "unused" ) int value ) {
367
367
throw raise (PythonErrorType .ValueError , "factorial() not defined for negative values" );
368
368
}
369
369
@@ -379,7 +379,7 @@ public PInt factorialInt(int value) {
379
379
}
380
380
381
381
@ Specialization (guards = {"value < 0" })
382
- public long factorialNegativeLong (long value ) {
382
+ public long factorialNegativeLong (@ SuppressWarnings ( "unused" ) long value ) {
383
383
throw raise (PythonErrorType .ValueError , "factorial() not defined for negative values" );
384
384
}
385
385
@@ -395,12 +395,12 @@ public PInt factorialLong(long value) {
395
395
}
396
396
397
397
@ Specialization (guards = "isNegative(value)" )
398
- public Object factorialPINegative (PInt value ) {
398
+ public Object factorialPINegative (@ SuppressWarnings ( "unused" ) PInt value ) {
399
399
throw raise (PythonErrorType .ValueError , "factorial() not defined for negative values" );
400
400
}
401
401
402
402
@ Specialization (guards = "isOvf(value)" )
403
- public Object factorialPIOvf (PInt value ) {
403
+ public Object factorialPIOvf (@ SuppressWarnings ( "unused" ) PInt value ) {
404
404
throw raise (PythonErrorType .OverflowError , "factorial() argument should not exceed %l" , Long .MAX_VALUE );
405
405
}
406
406
@@ -415,27 +415,27 @@ public Object factorial(PInt value) {
415
415
}
416
416
417
417
@ Specialization (guards = {"isNaN(value)" })
418
- public long factorialDoubleNaN (double value ) {
418
+ public long factorialDoubleNaN (@ SuppressWarnings ( "unused" ) double value ) {
419
419
throw raise (PythonErrorType .ValueError , "cannot convert float NaN to integer" );
420
420
}
421
421
422
422
@ Specialization (guards = {"isInfinite(value)" })
423
- public long factorialDoubleInfinite (double value ) {
423
+ public long factorialDoubleInfinite (@ SuppressWarnings ( "unused" ) double value ) {
424
424
throw raise (PythonErrorType .ValueError , "cannot convert float infinity to integer" );
425
425
}
426
426
427
427
@ Specialization (guards = "isNegative(value)" )
428
- public PInt factorialDoubleNegative (double value ) {
428
+ public PInt factorialDoubleNegative (@ SuppressWarnings ( "unused" ) double value ) {
429
429
throw raise (PythonErrorType .ValueError , "factorial() not defined for negative values" );
430
430
}
431
431
432
432
@ Specialization (guards = "!isInteger(value)" )
433
- public PInt factorialDoubleNotInteger (double value ) {
433
+ public PInt factorialDoubleNotInteger (@ SuppressWarnings ( "unused" ) double value ) {
434
434
throw raise (PythonErrorType .ValueError , "factorial() only accepts integral values" );
435
435
}
436
436
437
437
@ Specialization (guards = "isOvf(value)" )
438
- public PInt factorialDoubleOvf (double value ) {
438
+ public PInt factorialDoubleOvf (@ SuppressWarnings ( "unused" ) double value ) {
439
439
throw raise (PythonErrorType .OverflowError , "factorial() argument should not exceed %l" , Long .MAX_VALUE );
440
440
}
441
441
@@ -450,27 +450,27 @@ public Object factorialDouble(double value) {
450
450
}
451
451
452
452
@ Specialization (guards = {"isNaN(value.getValue())" })
453
- public long factorialPFLNaN (PFloat value ) {
453
+ public long factorialPFLNaN (@ SuppressWarnings ( "unused" ) PFloat value ) {
454
454
throw raise (PythonErrorType .ValueError , "cannot convert float NaN to integer" );
455
455
}
456
456
457
457
@ Specialization (guards = {"isInfinite(value.getValue())" })
458
- public long factorialPFLInfinite (PFloat value ) {
458
+ public long factorialPFLInfinite (@ SuppressWarnings ( "unused" ) PFloat value ) {
459
459
throw raise (PythonErrorType .ValueError , "cannot convert float infinity to integer" );
460
460
}
461
461
462
462
@ Specialization (guards = "isNegative(value.getValue())" )
463
- public PInt factorialPFLNegative (PFloat value ) {
463
+ public PInt factorialPFLNegative (@ SuppressWarnings ( "unused" ) PFloat value ) {
464
464
throw raise (PythonErrorType .ValueError , "factorial() not defined for negative values" );
465
465
}
466
466
467
467
@ Specialization (guards = "!isInteger(value.getValue())" )
468
- public PInt factorialPFLNotInteger (PFloat value ) {
468
+ public PInt factorialPFLNotInteger (@ SuppressWarnings ( "unused" ) PFloat value ) {
469
469
throw raise (PythonErrorType .ValueError , "factorial() only accepts integral values" );
470
470
}
471
471
472
472
@ Specialization (guards = "isOvf(value.getValue())" )
473
- public PInt factorialPFLOvf (PFloat value ) {
473
+ public PInt factorialPFLOvf (@ SuppressWarnings ( "unused" ) PFloat value ) {
474
474
throw raise (PythonErrorType .OverflowError , "factorial() argument should not exceed %l" , Long .MAX_VALUE );
475
475
}
476
476
@@ -753,12 +753,12 @@ public PTuple frexpO(Object value,
753
753
@ GenerateNodeFactory
754
754
public abstract static class IsNanNode extends PythonUnaryBuiltinNode {
755
755
@ Specialization
756
- public boolean isNan (long value ) {
756
+ public boolean isNan (@ SuppressWarnings ( "unused" ) long value ) {
757
757
return false ;
758
758
}
759
759
760
760
@ Specialization
761
- public boolean isNan (PInt value ) {
761
+ public boolean isNan (@ SuppressWarnings ( "unused" ) PInt value ) {
762
762
return false ;
763
763
}
764
764
@@ -803,17 +803,17 @@ private boolean isCloseDouble(double a, double b, double rel_tol, double abs_tol
803
803
}
804
804
805
805
@ Specialization
806
- public boolean isClose (double a , double b , PNone rel_tol , PNone abs_tol ) {
806
+ public boolean isClose (double a , double b , @ SuppressWarnings ( "unused" ) PNone rel_tol , @ SuppressWarnings ( "unused" ) PNone abs_tol ) {
807
807
return isCloseDouble (a , b , DEFAULT_REL , DEFAULT_ABS );
808
808
}
809
809
810
810
@ Specialization
811
- public boolean isClose (double a , double b , PNone rel_tol , double abs_tol ) {
811
+ public boolean isClose (double a , double b , @ SuppressWarnings ( "unused" ) PNone rel_tol , double abs_tol ) {
812
812
return isCloseDouble (a , b , DEFAULT_REL , abs_tol );
813
813
}
814
814
815
815
@ Specialization
816
- public boolean isClose (double a , double b , double rel_tol , PNone abs_tol ) {
816
+ public boolean isClose (double a , double b , double rel_tol , @ SuppressWarnings ( "unused" ) PNone abs_tol ) {
817
817
return isCloseDouble (a , b , rel_tol , DEFAULT_ABS );
818
818
}
819
819
@@ -823,7 +823,7 @@ public boolean isClose(double a, double b, double rel_tol, double abs_tol) {
823
823
}
824
824
825
825
@ Specialization
826
- public boolean isClose (double a , long b , double rel_tol , PNone abs_tol ) {
826
+ public boolean isClose (double a , long b , double rel_tol , @ SuppressWarnings ( "unused" ) PNone abs_tol ) {
827
827
return isCloseDouble (a , b , rel_tol , DEFAULT_ABS );
828
828
}
829
829
}
@@ -867,7 +867,7 @@ private double exceptInfinity(double result, double arg) {
867
867
}
868
868
869
869
@ Specialization
870
- public double ldexpDD (double mantissa , double exp ) {
870
+ public double ldexpDD (@ SuppressWarnings ( "unused" ) double mantissa , @ SuppressWarnings ( "unused" ) double exp ) {
871
871
throw raise (TypeError , EXPECTED_INT_MESSAGE );
872
872
}
873
873
@@ -877,7 +877,7 @@ public double ldexpDD(double mantissa, long exp) {
877
877
}
878
878
879
879
@ Specialization
880
- public double ldexpLD (long mantissa , double exp ) {
880
+ public double ldexpLD (@ SuppressWarnings ( "unused" ) long mantissa , @ SuppressWarnings ( "unused" ) double exp ) {
881
881
throw raise (TypeError , EXPECTED_INT_MESSAGE );
882
882
}
883
883
@@ -906,7 +906,7 @@ public double ldexpPIPI(PInt mantissa, PInt exp) {
906
906
}
907
907
908
908
@ Specialization
909
- public double ldexpPID (PInt mantissa , double exp ) {
909
+ public double ldexpPID (@ SuppressWarnings ( "unused" ) PInt mantissa , @ SuppressWarnings ( "unused" ) double exp ) {
910
910
throw raise (TypeError , EXPECTED_INT_MESSAGE );
911
911
}
912
912
@@ -917,7 +917,7 @@ public double ldexpPIL(PInt mantissa, long exp) {
917
917
}
918
918
919
919
@ Fallback
920
- public double ldexpOO (Object mantissa , Object exp ) {
920
+ public double ldexpOO (Object mantissa , @ SuppressWarnings ( "unused" ) Object exp ) {
921
921
if (!MathGuards .isNumber (mantissa )) {
922
922
throw raise (TypeError , "must be real number, not %p" , mantissa );
923
923
}
@@ -1118,27 +1118,27 @@ PInt gcd(PInt x, PInt y) {
1118
1118
}
1119
1119
1120
1120
@ Specialization
1121
- int gcd (double x , double y ) {
1121
+ int gcd (@ SuppressWarnings ( "unused" ) double x , @ SuppressWarnings ( "unused" ) double y ) {
1122
1122
throw raise (TypeError , "'float' object cannot be interpreted as an integer" );
1123
1123
}
1124
1124
1125
1125
@ Specialization
1126
- int gcd (long x , double y ) {
1126
+ int gcd (@ SuppressWarnings ( "unused" ) long x , @ SuppressWarnings ( "unused" ) double y ) {
1127
1127
throw raise (TypeError , "'float' object cannot be interpreted as an integer" );
1128
1128
}
1129
1129
1130
1130
@ Specialization
1131
- int gcd (double x , long y ) {
1131
+ int gcd (@ SuppressWarnings ( "unused" ) double x , @ SuppressWarnings ( "unused" ) long y ) {
1132
1132
throw raise (TypeError , "'float' object cannot be interpreted as an integer" );
1133
1133
}
1134
1134
1135
1135
@ Specialization
1136
- int gcd (double x , PInt y ) {
1136
+ int gcd (@ SuppressWarnings ( "unused" ) double x , @ SuppressWarnings ( "unused" ) PInt y ) {
1137
1137
throw raise (TypeError , "'float' object cannot be interpreted as an integer" );
1138
1138
}
1139
1139
1140
1140
@ Specialization
1141
- int gcd (PInt x , double y ) {
1141
+ int gcd (@ SuppressWarnings ( "unused" ) PInt x , @ SuppressWarnings ( "unused" ) double y ) {
1142
1142
throw raise (TypeError , "'float' object cannot be interpreted as an integer" );
1143
1143
}
1144
1144
@@ -1324,12 +1324,12 @@ public double count(double value) {
1324
1324
public abstract static class IsFiniteNode extends PythonUnaryBuiltinNode {
1325
1325
1326
1326
@ Specialization
1327
- public boolean isfinite (long value ) {
1327
+ public boolean isfinite (@ SuppressWarnings ( "unused" ) long value ) {
1328
1328
return true ;
1329
1329
}
1330
1330
1331
1331
@ Specialization
1332
- public boolean isfinite (PInt value ) {
1332
+ public boolean isfinite (@ SuppressWarnings ( "unused" ) PInt value ) {
1333
1333
return true ;
1334
1334
}
1335
1335
@@ -1352,12 +1352,12 @@ public boolean isinf(Object value,
1352
1352
public abstract static class IsInfNode extends PythonUnaryBuiltinNode {
1353
1353
1354
1354
@ Specialization
1355
- public boolean isinf (long value ) {
1355
+ public boolean isinf (@ SuppressWarnings ( "unused" ) long value ) {
1356
1356
return false ;
1357
1357
}
1358
1358
1359
1359
@ Specialization
1360
- public boolean isinf (PInt value ) {
1360
+ public boolean isinf (@ SuppressWarnings ( "unused" ) PInt value ) {
1361
1361
return false ;
1362
1362
}
1363
1363
@@ -1441,15 +1441,15 @@ public double log(long value, PNone novalue,
1441
1441
}
1442
1442
1443
1443
@ Specialization
1444
- public double logDN (double value , PNone novalue ,
1444
+ public double logDN (double value , @ SuppressWarnings ( "unused" ) PNone novalue ,
1445
1445
@ Cached ("createBinaryProfile()" ) ConditionProfile doNotFit ) {
1446
1446
raiseMathError (doNotFit , value <= 0 );
1447
1447
return Math .log (value );
1448
1448
}
1449
1449
1450
1450
@ Specialization
1451
1451
@ TruffleBoundary
1452
- public double logPIN (PInt value , PNone novalue ,
1452
+ public double logPIN (PInt value , @ SuppressWarnings ( "unused" ) PNone novalue ,
1453
1453
@ Cached ("createBinaryProfile()" ) ConditionProfile doNotFit ) {
1454
1454
BigInteger bValue = value .getValue ();
1455
1455
raiseMathError (doNotFit , bValue .compareTo (BigInteger .ZERO ) == -1 );
@@ -1995,7 +1995,7 @@ static double m_erf_series(double x) {
1995
1995
}
1996
1996
1997
1997
static double m_erfc_contfrac (double x ) {
1998
- double x2 , a , da , p , p_last , q , q_last , b , result ;
1998
+ double x2 , a , da , p , p_last , q , q_last , b ;
1999
1999
int i ;
2000
2000
2001
2001
if (x >= ERFC_CONTFRAC_CUTOFF ) {
0 commit comments