@@ -127,7 +127,7 @@ public double doPI(PInt value) {
127127
128128 @ Specialization (guards = "!isNumber(value)" )
129129 public double doGeneral (Object value ,
130- @ Cached ("create()" ) ConvertToDoubleNode convertToFloat ) {
130+ @ Cached ("create()" ) CastToDoubleNode convertToFloat ) {
131131 return count (convertToFloat .execute (value ));
132132 }
133133 }
@@ -261,7 +261,7 @@ public Object ceil(PInt value,
261261
262262 @ Specialization (guards = {"!isNumber(value)" })
263263 public Object ceil (Object value ,
264- @ Cached ("create()" ) ConvertToDoubleNode convertToFloat ,
264+ @ Cached ("create()" ) CastToDoubleNode convertToFloat ,
265265 @ Cached ("create(__CEIL__)" ) LookupAndCallUnaryNode dispatchCeil ) {
266266 Object result = dispatchCeil .executeObject (value );
267267 if (result == PNone .NO_VALUE ) {
@@ -742,7 +742,7 @@ public PTuple frexpPI(PInt value) {
742742
743743 @ Specialization (guards = "!isNumber(value)" )
744744 public PTuple frexpO (Object value ,
745- @ Cached ("create()" ) ConvertToDoubleNode convertToFloat ) {
745+ @ Cached ("create()" ) CastToDoubleNode convertToFloat ) {
746746 return frexpD (convertToFloat .execute (value ));
747747 }
748748 }
@@ -769,7 +769,7 @@ public boolean isNan(double value) {
769769
770770 @ Specialization (guards = "!isNumber(value)" )
771771 public boolean isinf (Object value ,
772- @ Cached ("create()" ) ConvertToDoubleNode convertToFloat ) {
772+ @ Cached ("create()" ) CastToDoubleNode convertToFloat ) {
773773 return isNan (convertToFloat .execute (value ));
774774 }
775775 }
@@ -958,7 +958,7 @@ public PTuple frexpPI(PInt value) {
958958
959959 @ Specialization (guards = "!isNumber(value)" )
960960 public PTuple frexpO (Object value ,
961- @ Cached ("create()" ) ConvertToDoubleNode convertToFloatNode ) {
961+ @ Cached ("create()" ) CastToDoubleNode convertToFloatNode ) {
962962 return modfD (convertToFloatNode .execute (value ));
963963 }
964964 }
@@ -983,7 +983,7 @@ public abstract static class FsumNode extends PythonUnaryBuiltinNode {
983983 public double doIt (Object iterable ,
984984 @ Cached ("create()" ) GetIteratorNode getIterator ,
985985 @ Cached ("create(__NEXT__)" ) LookupAndCallUnaryNode next ,
986- @ Cached ("create()" ) ConvertToDoubleNode toFloat ,
986+ @ Cached ("create()" ) CastToDoubleNode toFloat ,
987987 @ Cached ("createBinaryProfile()" ) ConditionProfile stopProfile ) {
988988 Object iterator = getIterator .executeWith (iterable );
989989 double x , y , t , hi , lo = 0 , yr , inf_sum = 0 , special_sum = 0 , sum ;
@@ -1144,11 +1144,11 @@ int gcd(@SuppressWarnings("unused") PInt x, @SuppressWarnings("unused") double y
11441144
11451145 @ Specialization (guards = "!isNumber(x) || !isNumber(y)" )
11461146 Object gcd (Object x , Object y ,
1147- @ Cached ("create()" ) ConvertToIntNode xConvert ,
1148- @ Cached ("create()" ) ConvertToIntNode yConvert ,
1147+ @ Cached ("create()" ) CastToIntNode xCast ,
1148+ @ Cached ("create()" ) CastToIntNode yCast ,
11491149 @ Cached ("create()" ) GcdNode recursiveNode ) {
1150- Object xValue = xConvert .execute (x );
1151- Object yValue = yConvert .execute (y );
1150+ Object xValue = xCast .execute (x );
1151+ Object yValue = yCast .execute (y );
11521152 return recursiveNode .execute (xValue , yValue );
11531153 }
11541154
@@ -1340,7 +1340,7 @@ public boolean isfinite(double value) {
13401340
13411341 @ Specialization (guards = "!isNumber(value)" )
13421342 public boolean isinf (Object value ,
1343- @ Cached ("create()" ) ConvertToDoubleNode convertToFloat ) {
1343+ @ Cached ("create()" ) CastToDoubleNode convertToFloat ) {
13441344 return isfinite (convertToFloat .execute (value ));
13451345 }
13461346 }
@@ -1368,7 +1368,7 @@ public boolean isinf(double value) {
13681368
13691369 @ Specialization (guards = "!isNumber(value)" )
13701370 public boolean isinf (Object value ,
1371- @ Cached ("create()" ) ConvertToDoubleNode convertToFloat ) {
1371+ @ Cached ("create()" ) CastToDoubleNode convertToFloat ) {
13721372 return isinf (convertToFloat .execute (value ));
13731373 }
13741374 }
@@ -1379,24 +1379,24 @@ public boolean isinf(Object value,
13791379 @ GenerateNodeFactory
13801380 public abstract static class LogNode extends PythonBinaryBuiltinNode {
13811381
1382- @ Child private ConvertToDoubleNode valueConvertNode ;
1383- @ Child private ConvertToDoubleNode baseConvertNode ;
1382+ @ Child private CastToDoubleNode valueCastNode ;
1383+ @ Child private CastToDoubleNode baseCastNode ;
13841384 @ Child private LogNode recLogNode ;
13851385
1386- private ConvertToDoubleNode getValueConvertNode () {
1387- if (valueConvertNode == null ) {
1386+ private CastToDoubleNode getValueCastNode () {
1387+ if (valueCastNode == null ) {
13881388 CompilerDirectives .transferToInterpreterAndInvalidate ();
1389- valueConvertNode = insert (ConvertToDoubleNode .create ());
1389+ valueCastNode = insert (CastToDoubleNode .create ());
13901390 }
1391- return valueConvertNode ;
1391+ return valueCastNode ;
13921392 }
13931393
1394- private ConvertToDoubleNode getBaseConvertNode () {
1395- if (baseConvertNode == null ) {
1394+ private CastToDoubleNode getBaseCastNode () {
1395+ if (baseCastNode == null ) {
13961396 CompilerDirectives .transferToInterpreterAndInvalidate ();
1397- baseConvertNode = insert (ConvertToDoubleNode .create ());
1397+ baseCastNode = insert (CastToDoubleNode .create ());
13981398 }
1399- return baseConvertNode ;
1399+ return baseCastNode ;
14001400 }
14011401
14021402 private double executeRecursiveLogNode (Object value , Object base ) {
@@ -1540,27 +1540,27 @@ public double logPIPI(PInt value, PInt base,
15401540
15411541 @ Specialization (guards = "!isNumber(value)" )
15421542 public double logO (Object value , PNone novalue ) {
1543- return executeRecursiveLogNode (getValueConvertNode ().execute (value ), novalue );
1543+ return executeRecursiveLogNode (getValueCastNode ().execute (value ), novalue );
15441544 }
15451545
15461546 @ Specialization (guards = {"!isNumber(value)" , "!isNoValue(base)" })
15471547 public double logOO (Object value , Object base ) {
1548- return executeRecursiveLogNode (getValueConvertNode ().execute (value ), getBaseConvertNode ().execute (base ));
1548+ return executeRecursiveLogNode (getValueCastNode ().execute (value ), getBaseCastNode ().execute (base ));
15491549 }
15501550
15511551 @ Specialization (guards = {"!isNumber(base)" })
15521552 public double logLO (long value , Object base ) {
1553- return executeRecursiveLogNode (value , getBaseConvertNode ().execute (base ));
1553+ return executeRecursiveLogNode (value , getBaseCastNode ().execute (base ));
15541554 }
15551555
15561556 @ Specialization (guards = {"!isNumber(base)" })
15571557 public double logDO (double value , Object base ) {
1558- return executeRecursiveLogNode (value , getBaseConvertNode ().execute (base ));
1558+ return executeRecursiveLogNode (value , getBaseCastNode ().execute (base ));
15591559 }
15601560
15611561 @ Specialization (guards = {"!isNumber(base)" })
15621562 public double logPIO (PInt value , Object base ) {
1563- return executeRecursiveLogNode (value , getBaseConvertNode ().execute (base ));
1563+ return executeRecursiveLogNode (value , getBaseCastNode ().execute (base ));
15641564 }
15651565
15661566 private void raiseMathError (ConditionProfile doNotFit , boolean con ) {
@@ -1801,8 +1801,8 @@ public abstract static class PowNode extends PythonBinaryBuiltinNode {
18011801
18021802 @ Specialization (guards = {"!isNumber(left)||!isNumber(right)" })
18031803 double pow (Object left , Object right ,
1804- @ Cached ("create()" ) ConvertToDoubleNode convertLeftFloat ,
1805- @ Cached ("create()" ) ConvertToDoubleNode convertRightFloat ) {
1804+ @ Cached ("create()" ) CastToDoubleNode convertLeftFloat ,
1805+ @ Cached ("create()" ) CastToDoubleNode convertRightFloat ) {
18061806 return pow (convertLeftFloat .execute (left ), convertRightFloat .execute (right ));
18071807 }
18081808 }
@@ -1875,8 +1875,8 @@ public abstract static class Atan2Node extends PythonBinaryBuiltinNode {
18751875
18761876 @ Specialization (guards = "!isNumber(left) || !isNumber(right)" )
18771877 double atan2 (Object left , Object right ,
1878- @ Cached ("create()" ) ConvertToDoubleNode convertLeftFloat ,
1879- @ Cached ("create()" ) ConvertToDoubleNode convertRightFloat ) {
1878+ @ Cached ("create()" ) CastToDoubleNode convertLeftFloat ,
1879+ @ Cached ("create()" ) CastToDoubleNode convertRightFloat ) {
18801880 return atan2DD (convertLeftFloat .execute (left ), convertRightFloat .execute (right ));
18811881 }
18821882 }
@@ -1963,9 +1963,9 @@ public double hypotPIL(PInt x, long y) {
19631963
19641964 @ Specialization (guards = "!isNumber(objectX) || !isNumber(objectY)" )
19651965 public double hypotOO (Object objectX , Object objectY ,
1966- @ Cached ("create()" ) ConvertToDoubleNode xConvertNode ,
1967- @ Cached ("create()" ) ConvertToDoubleNode yConvertNode ) {
1968- return hypotDD (xConvertNode .execute (objectX ), yConvertNode .execute (objectY ));
1966+ @ Cached ("create()" ) CastToDoubleNode xCastNode ,
1967+ @ Cached ("create()" ) CastToDoubleNode yCastNode ) {
1968+ return hypotDD (xCastNode .execute (objectX ), yCastNode .execute (objectY ));
19691969 }
19701970 }
19711971
0 commit comments